m?Z?ddl@mAZAddlBmCZCddl2m3Z3ddl4m5Z5yJddlDmEZEddlFmGZGddlFmHZHddlFmIZIdZJWn dZJnXddlKZKddlLZLdd-d YZMeMZNddlOZOd!eOjPfd"YZPd#d.d$YZQeQZRd%ZSd&ZTd'd/d(YZUd)d0d*YZVeUeVZWd+d1d,YZXeUeXZYdS(2iiiiiiiii i i i i iiii(t ParsedExprtParsedNodeTest(tParsedAbsoluteLocationPath(tParsedRelativeLocationPath(t%ParsedAbbreviatedRelativeLocationPath(t%ParsedAbbreviatedAbsoluteLocationPath(t ParsedStep(tParsedAxisSpecifier(tParsedPredicateList(t ParsedPattern(tParsedStepPattern(tParsedRelativePathPattern(tParsedLocationPathPatterniNt FtFactorycBseZeZeZeZeZ dZ dZ i de 6de 6de6de6de6de6de6d e6d e6d e6d e6d e6de6ZdZide6de6de6de6ZdZ dZ!ie"j#e$6e"j%e&6e"j'dfe(6e"j'dfe)6e"j*dfe+6e"j*dfe,6e"j*dfe-6e"j*dfe.6e"j/dfe06e"j/dfe16e"j2dfe36e"j2dfe46e"j2dfe56e"j6e76Z8dZ9dZ:dZ;d Z<d!Z=d"Z>e"j?Z@e"jAZBd#ZCeDreEZFnd$ZGd%ZHd&ZIRS('cCst||t|S(N(RR(tselftaxisttestt predicates((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyt createStepZscCs=|rd}nd}tt|tjddtgS(NtparentRtnodet(RRRR(RRttype((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateAbbreviatedStep]s   tancestorsancestor-or-selft attributetchildt descendantsdescendant-or-selft followingsfollowing-siblingt namespaceRt precedingspreceding-siblingRcCst|j|S(N(RtaxisMap(RR((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateAxisSpecifiervstcommentttextsprocessing-instructionRcCs,|dkrd}ntj|j||S(NR(tNoneRtntMap(RRtval((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateNodeTests  cCsO|dkr,|rtj|StjSn|rBtj||Stj|S(Nt*(Rt LocalNameTesttPrincipalTypeTesttQualifiedNameTestt NodeNameTest(Rtprefixtlocal((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateNameTests   t=s!=iiiiicCsl|tkr%|dkr%tj|S|j|}t|tjkr_|d|d||S|||S(Nii(tMINUS_OPERATORR#RtParsedUnaryExprtopMapRttypest TupleType(Rtoperatortlefttrighttcl((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateNumericExprs   cCsG|j|}t|tjkr:|d|d||S|||S(Nii(R2RR3R4(RR5R6R7R8((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateBooleanExprs cCstjd||S(Nt/(RtParsedPathExpr(RR6R7((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreatePathExprscCstjtj||S(N(RR<tXPATHt DOUBLE_SLASH(RR6R7((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateAbbreviatedPathExprscCstj|t|S(N(RtParsedFilterExprR(RtfilterR((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateFilterExprscCs4|rtjd|d|Stjd|SdS(Nt$t:(RtParsedVariableReferenceExpr(RR,t localName((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateVariableReferencescCs2|rtj|d||Stj||SdS(NRE(RtParsedFunctionCallExpr(RR,RGtargs((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateFunctionCallscCs1|dkr"|dkr"tjS|dkr;tj|S| rR|dkrR|S|}x%|j}t|dr||}q[Pq[|r|dkrtj}d}nE|rtj}|f}n*|f}|dkrtj}n tj }|dkrt |||j }nt |||j |_|S(NR(( R#R t RootPatternt IdKeyPatternRthasattrR tRootParentStepPatterntIdKeyParentPatterntIdKeyAncestorPatterntapplyt getShortcutt parentAxis(RtidkeytisparenttsteptlastRtctorRJ((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateLocationPathPatterns4              c CsR|j\}}|j\}}|r6tj}n tj}|||||S(N(RSR tParentStepPatterntAncestorStepPattern( RtrelRRWt parent_testt parent_axist node_testt axis_typeRY((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateRelativePathPatterns   cCsB|j}|r.t|}tj|||Stj||SdS(N(t principalTypeRR tPredicateStepPatternt StepPattern(RRRR((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytcreateStepPatterns   (Jt__name__t __module__tPALPtcreateAbsoluteLocationPathtPAALPt%createAbbreviatedAbsoluteLocationPathtPRLPtcreateRelativeLocationPathtPARLPt%createAbbreviatedRelativeLocationPathRRt ANCESTOR_AXIStANCESTOR_OR_SELF_AXIStATTRIBUTE_AXISt CHILD_AXIStDESCENDANT_AXIStDESCENDANT_OR_SELF_AXIStFOLLOWING_AXIStFOLLOWING_SIBLING_AXIStNAMESPACE_AXISt PARENT_AXIStPRECEDING_AXIStPRECEDING_SIBLING_AXISt SELF_AXISRR tCOMMENTtTEXTtPROCESSING_INSTRUCTIONtNODER$R&R.Rt ParsedOrExprt OR_OPERATORt ParsedAndExprt AND_OPERATORtParsedEqualityExprt EQ_OPERATORt NEQ_OPERATORtParsedRelationalExprt LT_OPERATORt GT_OPERATORt LE_OPERATORt GE_OPERATORtParsedAdditiveExprt PLUS_OPERATORR0tParsedMultiplicativeExprtTIMES_OPERATORt DIV_OPERATORt MOD_OPERATORtParsedUnionExprtUNION_OPERATORR2R9R:R=R@RCRHtParsedLiteralExprt createLiteraltParsedNLiteralExprt createNumberRKt_xslt_patternsR t createPatternRZRbRf(((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyR Tsr                     ( t SyntaxErrorcBseZdZdZRS(cCs#tjj|||||_dS(N(tyappsrtRt__init__tstr(RtpostmsgR((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyRscCs|jdkrdS|j}t|jdkr|jd}|dkr^d|j|}nt|dkr|d d}qnd}|t|j||jfSdS( Nis#iiis...is"SyntaxError[@ char %s in '%s': %s](RRtlentreprR(RR"tstarttfmt((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyt__repr__ s   (RgRhRR(((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyRs tParsercBs#eZdZdZdZRS(cCshy3ddlm}m}|||tjSWn.tjk rc}t|j|j|nXdS(Ni(tXPatht XPathScanner( t XPathGrammarRRtfactorytStartRRRR(RRRRte((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytparseLocationPaths cCshy3ddlm}m}|||tjSWn.tjk rc}t|j|j|nXdS(Ni(RR( RRRRtFullExprRRRR(RRRRR((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyt parseExpr"s cCshy3ddlm}m}|||tjSWn.tjk rc}t|j|j|nXdS(Ni(RR( RRRRt FullPatternRRRR(RRRRR((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyt parsePattern)s (RgRhRRR(((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyRs  cCs tj|S(N(tparserR(R((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytCompile2scCs tj|S(N(RR(R((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytCompilePattern5stFactorycBseZdZRS(cCs ||_dS(N(tnew(RR8((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyR9s(RgRhR(((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyR8st ExprParsercBseZdZRS(cCshy3ddlm}m}|||tjSWn.tjk rc}t|j|j|nXdS(Ni(RR( RRRRRRRRR(RRRRR((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pytparse=s (RgRhR(((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyR<st PatternParsercBseZdZRS(cCshy3ddlm}m}|||tjSWn.tjk rc}t|j|j|nXdS(Ni(RR( RRRRRRRRR(RRRRR((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyRFs (RgRhR(((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyREs((((((ZtABSOLUTE_LOCATION_PATHt"ABBREVIATED_ABSOLUTE_LOCATION_PATHtRELATIVE_LOCATION_PATHt"ABBREVIATED_RELATIVE_LOCATION_PATHt STEP_EXPRt NODE_TESTt NAME_TESTt BINARY_EXPRt UNARY_EXPRt PATH_EXPRtABBREVIATED_PATH_EXPRt FILTER_EXPRtVARIABLE_REFERENCEtLITERALtNUMBERt FUNCTION_CALLRqRrRsRtRuRvRwRxRyRzR{R|R}R~RRRRRRRRRRRRR0RRRRt xml.xpathRRt$xml.xpath.ParsedAbsoluteLocationPathRt$xml.xpath.ParsedRelativeLocationPathRt/xml.xpath.ParsedAbbreviatedRelativeLocationPathRt/xml.xpath.ParsedAbbreviatedAbsoluteLocationPathRRiRmRkRotxml.xpath.ParsedStepRtxml.xpath.ParsedAxisSpecifierRtxml.xpath.ParsedPredicateListRtxml.xslt.ParsedPatternR txml.xsltR R R RtstringR3R RRRRRRRRRtExprParserFactoryRtPatternParserFactory(((sC/opt/freeware/lib/python2.7/site-packages/_xmlplus/xpath/pyxpath.pyts