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
def predicateList1(self, __stack, __ptr): """ from XPath/XPathBase.bgen.frag, line 90 predicateList: predicate """ __val = ParsedPredicateList.ParsedPredicateList([__stack[__ptr + 1]]) return __val
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
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)
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