예제 #1
0
 def createStepPattern(self, axis, test, predicates):
     axis = axis.principalType
     if predicates:
         predicates = ParsedPredicateList(predicates)
         return ParsedStepPattern.PredicateStepPattern(test, axis, predicates)
     else:
         return ParsedStepPattern.StepPattern(test, axis)
예제 #2
0
 def createAbbreviatedStep(self,parent):
     if parent:
         type = 'parent'
     else:
         type = 'self'
     return ParsedStep(ParsedAxisSpecifier(type),
                       ParsedNodeTest.ParsedNodeTest('node',""),
                       ParsedPredicateList([]))
예제 #3
0
 def createAbbreviatedStep(self, parent):
     if parent:
         type = "parent"
     else:
         type = "self"
     return ParsedStep(
         ParsedAxisSpecifier(type),
         ParsedNodeTest.ParsedNodeTest("node", ""),
         ParsedPredicateList([]),
     )
예제 #4
0
 def createFilterExpr(self, filter, predicates):
     return ParsedExpr.ParsedFilterExpr(filter, ParsedPredicateList(predicates))
예제 #5
0
 def createStep(self, axis, test, predicates):
     return ParsedStep(axis, test, ParsedPredicateList(predicates))