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/BuiltInExtFunctions.pyo
mò
<ìm>c@sbdZdkZdkZdkZdkZdklZlZdkl	Z	dk
lZdkl
Z
lZlZlZd„Zd„Zdd„Zdd	„Zdd
„Zdd„Zd„Zd
„Zdd„Zd„Zd„ZydkZd„ZWn
dZnXd„Z dd„Z!dd„Z"d„Z#d„Z$d„Z%hedfe<edfe<edfei&djoepe<edfe<edfe<edfe<edfe<ed fe <ed!fe!<ed"fe"<ed#fe#<ed$fe$<ed%fe%<ed&fe<ed'fe<ed(fe<ed)fe<edfe<edfe<edfei&djoepe<edfe<edfe<edfe<edfe<ed fe <ed!fe!<ed"fe"<ed#fe#<ed$fe$<ed%fe%<ed&fe<ed'fe<Z'dS(*sñ
4XPath-specific Extension functions
WWW: http://4suite.org/XSLT        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(sNodesEMPTY_NAMESPACE(sText(sboolean(s
CoreFunctionssConversionssFT_EXT_NAMESPACEsFT_OLD_EXT_NAMESPACEcCs'ydkl}|SWndSnXdS(N(s__version__s0.11.1(tFt.__init__t__version__(tcontextR((tF/usr/lib/python2.4/site-packages/_xmlplus/xpath/BuiltInExtFunctions.pytVersions

cCsdt|ƒtgƒjo|Snt|dƒo&|itijot|iƒ}n
|g}|S(s,Convert a result-tree fragment to a node-settnodeTypeN(	ttypetrtfthasattrRtNodet
DOCUMENT_NODEtlistt
childNodestnode_set(RRR
((RtNodeSets#	cCsM|p
|i}nti|ƒ}ti||ƒo
ti	pti
}|S(s2Do a regular expression match against the argumentN(targRtnodetConversionstStringValuetretmatchtpatterntbooleanttruetfalsetbool(RRRR((RtMatch's
&cCsT|p
|i}nti|ƒ}ti|ƒ}ti|ƒ}ti|||ƒS(s5Do a global search and replace of the string contentsN(	RRRRRtoldtnewtstringtreplace(RRRR((RtReplace0s
c	Cs4|p
|i}nti|ƒ}ti||ƒ}|i	}g}xé|D]á}|i
ƒ|ididtƒt|ƒtfƒjo
|f}nxM|D]E}|ididtƒ|idi|ƒ|ididƒqŸW|ididƒ|iƒ}|ii|ƒ|i|idƒqKW|S(sJDo a regular expression search against the argument (i.e. get all matches)iÿÿÿÿRtGroupiN(RRRRRRtfindallRtmatchest	processortproctmatches_nodesettgroupst
pushResulttwriterststartElementtEMPTY_NAMESPACERtgroupttextt
endElementt	popResulttfragtrtfstappendR(	RRRR/R&R"R+R%R$((RtSearchRe;s.
	

c
Cs`|p
|i}nti|ƒ}|i}	g}ti	|ƒ}|i|ƒ}x	|o|	iƒ|	ididtƒ|iƒ}|pt|iƒƒ}nxT|D]L}|	ididtƒ|	idi|pdƒ|	ididƒq«W|	ididƒ|	iƒ}|ii|ƒ|i|idƒ|i||iƒƒ}qSW|S(sJDo a regular expression search against the argument (i.e. get all matches)iÿÿÿÿRR tiN(RRRRRR#R$R%RtcompileRt_retsearcht_matchR'R(R)R*R&t_groupsttupleR+R,R-R.R/R0R1Rtend(
RRRR8R+R5R7R%R/R$((RtSearchRePy20Vs4
	
c
Gst|d|iƒ\}}titƒpt	i	itdƒ}
|
ptd|ƒ‚nt
gt|ƒ}	d„}tt||	f|ƒ}|i}g}xe|D]]}|iƒ|iditi|ƒƒ|iƒ}|i i!|ƒ|i!|i"dƒq¦W|S(sÍ
    Apply the function serially over the given node sets.
    In iteration i, the function is passed N parameters
    where N is the number of argument node sets.  Each
    parameter is a node set of size 1, whose node is
    the ith node of the corresponding argument node set.
    The return value is a node set consisting of a series
    of result-tree nodes, each of which is a text node
    whose value is the string value of the result of the
    ith function invocation.
    Warning: this function uses the implied ordering of the node set
    Based on its implementation as a Python list.  But in reality
    There is no reliable ordering of XPath node sets.
    In other words, this function is voodoo.
    t
namespacess*Dynamically invoked function %s not found.cGs
t||ƒS(N(tapplytftargs(txR>R?((Rt<lambda>ŠsiÿÿÿÿiN(#tExpandQNametfuncnameRtprocessorNsstprefixtlocaltg_extFunctionstgettexpandedt
CoreFunctionstNonetfunct	ExceptionR>tlentnodesetstflisttlfR=tmaptretlistR#R$tresult_nodesettretR'R(R,RRR.R/R0R1R(
RRCRORERQRUR$R/RTRPRLRFRS((RtMapts$%		
cCstiti|ƒƒS(s"Escape illegal characters in a URLN(turllibtquoteRRturl(RRY((Rt	EscapeUrl˜scCsa|p|ig}nt|ddƒo|diSn$t|ddƒo|diSndS(s Get the base URI of the argumentitbaseUritrefUriR3N(RRRRR[R\(RR((RtBaseUriscCs%dk}|iƒ}|ii|ƒS(N(tDateTimetnowtdtISOtstr(RR`R^((RtIsoTime¨s	cCs(dk}|iititƒd|ƒS(NR(t	xml.xpathtxmltxpathtEvaluateRRtstR(RtexprRe((RRg®s	cCs dkl}|i|iƒƒS(N(sUuid(tFt.LibtUuidtUuidAsStringtGenerateUuid(RRk((RRm¶s
cCs]t|ƒtgƒjotdƒ‚nh}x!|D]}||ti|ƒ<q6W|iƒS(Ns.'distinct' parameter must be of type node-set!(RtnodesetRMtnodesRRRtvalues(RRnRRo((RtdistinctÄscCsj|i}x|io
|i}qWg}x9titi|ƒ|ƒD]}|i|i
|ƒƒqFW|S(N(RRtdoct
parentNodeRnRtsplitRRRtdelimttokenR1tcreateTextNode(RRRuRrRvRn((RRtÎs	
cCs>td„|ƒ}|oti||ƒSnti|ƒSdS(NcCs
ti|ƒS(N(RRR@(R@((RRAÚs(RRRntcompsRuRt
joinfields(RRnRuRx((RtjoinÙscCs‚|i}x|io
|i}qWti|ƒ}ti|ƒ}g}x3t	||ƒD]"}|i|it
|ƒƒƒqXW|S(N(RRRrRsRtNumberValuetlothiRntxrangetnumberR1RwRb(RR|R}RRrRn((Rtrangeàs	
 cCs ti|ƒo|Sn|SdS(N(RtBooleanValuetcondtv1tv2(RR‚RƒR„((Rtif_functionîscCs"titi|ƒti|ƒƒS(N(RtfindRRtoutertinner(RR‡Rˆ((RR†ôssnode-setRs	search-reiñsbase-uris
escape-urlsiso-timetevaluateRqRtRzR€tifR†RRtversions
generate-uuidR((t__doc__tsysRRRWtxml.domR	R*txml.dom.TexttTextt	xml.utilsRRdRJRtFT_EXT_NAMESPACEtFT_OLD_EXT_NAMESPACERRRKRRR2R;RVRZR]RcRgtFt.Lib.DumpBgTupletFtRmRqRtRzR€R…R†t
hexversiontExtFunctions( RJRZRR*R—R†RR	RVR;RqRgRWRRtR2RRR]RcRR“R•RRmRzRRR€RR’R…((Rt?s8$

				$				


	
			

Anon7 - 2021