MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.4/site-packages/_xmlplus/xpath/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/site-packages/_xmlplus/xpath/Util.pyc
mň
Aěm>c@sŐdZdkZdkZdkZdkZdklZlZdkl	Z	dk
lZdkl
Z
lZhadZZd„Zd„Zd„Zd	„Zddd
„Zd„Zd„Zd
„Zd„ZdS(sđ
General Utilities for XPath apps.
WWW: http://4suite.org/4XSLT        e-mail: support@4suite.org

Copyright (c) 2000-2001 Fourthought Inc, USA.   All Rights Reserved.
See  http://4suite.org/COPYRIGHT  for license and copyright information
N(s
XML_NAMESPACEsEMPTY_NAMESPACE(sNode(s
NodeFilter(sg_xpathRecognizedNodessCompilecCs›g}|i}|itdfƒp|itdfƒ}|o |i|jo|i	|i
ƒx3td„|iƒD]}|i
t||ƒƒqwW|S(NtidtIDcCs|itijS(N(tnodetnodeTypetNodetELEMENT_NODE(R((t7/usr/lib/python2.4/site-packages/_xmlplus/xpath/Util.pyt<lambda>s(telementstelementt
attributestattrstgettEMPTY_NAMESPACEtidattrtvaluetnametappendtownerElementtfiltert
childNodestextendtElementsById(R	RRRR((RRs	+'
cCsJtit|ƒƒodSnh}t|d|ƒ}|tt|ƒ<dS(Ni(tg_documentOrderIndexthas_keyRtdoctmappingt__IndexNodetcount(RRR((Rt
IndexDocument%scCs+tit|ƒƒott|ƒ=ndS(N(RRRR(R((RtFreeDocumentIndex.scCsłt|ƒddgjo|Snt|ddƒo|id„ƒ|Sn|dip|d}t|ƒtit	|ƒƒo|}|itƒnt|g|ƒ}|S(NiitdocIndexcCst|i|iƒS(N(tcmptaRtb(R!R"((RR8s(
tlentnListthasattrtsortt
ownerDocumentRRRRRtrtt	IndexSortt
__recurseSort(R$R(R((RtSortDocOrder4s
cCsƒh}|otiii|ƒ}n|o
|}ntiii|ƒ\}}|djo|||f}n
t|f}|S(sk
    Expand the given QName in the context of the given node,
    or in the given namespace dictionary
    tN(
tnsstrefNodetxmltdomtexttGetAllNst
namespacest
SplitQNametqnametprefixtlocalt
split_nameR
(R5R.R3R8R6R-R7((RtExpandQNameEs

cCsŁ|itjo||t|ƒ<|d}|itijo8x5|ii	ƒD] }||t|ƒ<|d}qMWnx'|iD]}t
|||ƒ}qWn|S(Ni(RRtg_xpathRecognizedNodestcurIndexRRRRR
tvaluestattrRt	childNodeR(RR;RR=R>((RRXs

cCsƒt|ip|ƒ}t|ip|ƒ}||jo9t|ƒ}t|ƒ}tt	||t	||ƒSnt||ƒSdS(N(
RtleftR'tldocIdtrighttrdocIdtlidtridR R(R?RARCR@RBRD((RR)is
!cCsľg}x¨|D] }t|d„|ƒ}||jo|i|ƒn|itijo2|i	i
ƒ}|t||ƒ}|pPq‹n|t|i
|ƒ}|pPq
q
W|S(shCheck whether any of the nodes in toSort are in the list test, and if so, sort them into the result listcCs
||jS(N(txtn(RERF((RRxsN(tresultttestRRttoSortRRRRR
R<tattrListR*R(RHRIRRJRG((RR*ts 
		cCs×|i}xÇ|oż|itijoœ|io0|iitijo|iid|iƒqĹ|io2|i	i
|iƒ}|ii
||ƒ|}qĹ|i}|ii|ƒ|}qn|itijo‘|i}xQ|oI|ititigjo-|i|iƒ|ii|ƒ|i}qáW|ip&|i}|ii|ƒ|}qqĹn`|itijoLx;|iiƒD]*}t|iƒdjot|ƒq‰q‰Wt|ƒn|i}qWdS(s‘NormalizeNode is used to prepare a DOM for XPath evaluation.

    1.  Convert CDATA Sections to Text Nodes.
    2.  Normalize all text nodes
    iiN(Rt
firstChildRRtCDATA_SECTION_NODEtnextSiblingt	TEXT_NODEt
insertDatatdataR'tcreateTextNodettextt
parentNodetreplaceChildtnexttremoveChildt
appendDataRR
R<R=R#Rt
NormalizeNode(RR=RRRU((RRX‹sF	 

		#
	(t__doc__tostglobtstringtxml.dom.extR/txml.domt
XML_NAMESPACER
Rtxml.dom.NodeFiltert
NodeFiltert	xml.xpathR:tCompileRtNonetg_xmlSpaceDescendanttg_xmlSpaceAncestorRRRR+R9RR)R*RX(RfRRXR
R/RRR\R[RcR)R+RR_RaR:RReR*R9RZ((Rt?s"	


								

Anon7 - 2021