ó @ėm>c@sdZddlmZddlmZddlmZddlZdd d„ƒYZdd d „ƒYZd dd „ƒYZ dS(s A Parsed token that represents a step on the result tree. WWW: http://4suite.org/XPATH 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 iĸĸĸĸ(tNode(tUtil(t NamespaceNodeNt ParsedStepcBsAeZdd„Zd„ZeZdd„Zd„Zd„ZRS(cCs||_||_||_dS(N(t_axist _nodeTestt _predicates(tselftaxistnodeTestt predicates((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyt__init__s   cCsU|jj||jjƒ\}}|jrQt|ƒrQ|jj|||ƒ}n|S(st Select a set of nodes from the axis, then filter through the node test and the predicates. (RtselectRtmatchRtlentfilter(Rtcontexttnode_settreverse((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pytevaluates!tcCsX|t|ƒGH|jj|dƒ|jj|dƒ|joS|jj|dƒdS(Ns (tstrRtpprintRR(Rtindent((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyR&scCsdt|ƒt|ƒfS(Ns(tidtrepr(R((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyt__str__,scCsCt|jƒdt|jƒ}|jr?|t|jƒ}n|S(Ns::(RRRR(Rtresult((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyt__repr__/s  N( t__name__t __module__tNoneR RR RRR(((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyRs     tParsedAbbreviatedStepcBs>eZd„Zd„ZeZdd„Zd„Zd„ZRS(cCs ||_dS(N(tparent(RR!((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyR 6scCsT|jrJ|jjtjkr+|jjgS|jjrF|jjgpIgS|jgS(N(R!tnodetnodeTypeRtATTRIBUTE_NODEt ownerElementt parentNode(RR((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyR9s   RcCs|t|ƒGHdS(N(R(RR((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyRAscCsdt|ƒt|ƒfS(Ns(RR(R((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyRDscCs|jrdpdS(Ns..t.(R!(R((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyRGs(RRR RR RRR(((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyR 5s     tParsedNodeSetFunctioncBsAeZdd„Zd„ZeZdd„Zd„Zd„ZRS(cCs||_||_dS(N(t _functionR(RtfunctionR ((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyR Ms  cCsz|jj|ƒ}t|ƒtgƒkrFtdt|jƒƒ‚n|jrvt|ƒrv|jj||tƒ}n|S(sn Select a set of nodes from the node-set function then filter through the predicates. s"%s does not evaluate to a node-set( R)Rttypet SyntaxErrorRRRRR(RRR((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyRRsRcCsD|t|ƒGH|jj|dƒ|jo?|jj|dƒdS(Ns (RR)RR(RR((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyR`scCsdt|ƒt|ƒfS(Ns(RR(R((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyRescCs2t|jƒ}|jr.|t|jƒ}n|S(N(RR)R(RR((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyRhs N( RRRR RR RRR(((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyR(Ls     (((( t__doc__txml.domRt xml.xpathRRtsysRR R((((sF/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/ParsedStep.pyt s !