def __init__(self,rel):
     self._rel = rel
     nt = ParsedNodeTest.ParsedNodeTest('node', '')
     ppl = ParsedPredicateList.ParsedPredicateList([])
     as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
     self._step = ParsedStep.ParsedStep(as, nt, ppl)
     return
示例#2
0
def predicateList1(self, __stack, __ptr):
    """
    from XPath/XPathBase.bgen.frag, line 90
    predicateList: predicate
    """
    __val = ParsedPredicateList.ParsedPredicateList([__stack[__ptr + 1]])
    return __val
示例#3
0
 def __init__(self, rel):
     self._rel = rel
     nt = ParsedNodeTest.ParsedNodeTest("node", "")
     ppl = ParsedPredicateList.ParsedPredicateList([])
     axisSpecifier = ParsedAxisSpecifier.ParsedAxisSpecifier(
         "descendant-or-self")
     self._step = ParsedStep.ParsedStep(axisSpecifier, nt, ppl)
     return
示例#4
0
 def __init__(self,left,right):
     """
     left can be a step or a relative location path
     right is only a step
     """
     self._left = left
     self._right = right
     nt = ParsedNodeTest.ParsedNodeTest('node','')
     ppl = ParsedPredicateList.ParsedPredicateList([])
     as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
     self._middle = ParsedStep.ParsedStep(as, nt, ppl)
示例#5
0
    def __init__(self, descendant, left, right):
        self._left = left
        self._right = right
        if descendant:
            nt = ParsedNodeTest.ParsedNodeTest("node", "")
            axis = ParsedAxisSpecifier.ParsedAxisSpecifier(
                "descendant-or-self")
            from xml.xpath import ParsedPredicateList

            pList = ParsedPredicateList.ParsedPredicateList([])
            self._step = ParsedStep.ParsedStep(axis, nt, pList)
        else:
            self._step = None