Free Trial - Stylus Studio, The World's Best XML IDE!


com.saxonica.importer
Class SelectionParser

java.lang.Object
  |
  +--net.sf.saxon.expr.ExpressionParser
        |
        +--com.saxonica.importer.SelectionParser

public class SelectionParser
extends ExpressionParser

This class parses the two XPath subsets defined in XML Schema for handling the "selector" and "field" attributes of the , , and elements.


Nested Class Summary
 
Nested classes inherited from class net.sf.saxon.expr.ExpressionParser
ExpressionParser.ForClause
 
Field Summary
 
Fields inherited from class net.sf.saxon.expr.ExpressionParser
env, numberOfRangeVariables, rangeVariables, scanOnly, t
 
Constructor Summary
SelectionParser()
           
 
Method Summary
 Selection parseSelector(java.lang.String expression, StaticContext env, boolean isField)
          Parse a string representing the restricted XPath expression allowed in an XML Schema selector or field attribute
protected  Expression parseStepExpression()
          Override the general XPath parsing of a StepExpression to support the simpler kind of Step used in XML Schema selectors
 
Methods inherited from class net.sf.saxon.expr.ExpressionParser
currentTokenDisplay, declareRangeVariable, expect, getExecutable, getLanguage, getRangeVariableStack, getTokenizer, grumble, isKeyword, makeLocalNameTest, makeLocator, makeNameCode, makeNamespaceTest, makeNameTest, makeStringLiteral, nextToken, parse, parseConstructor, parseExpression, parseExprSingle, parseForExpression, parseMappingExpression, parseNodeTest, parsePattern, parseRelativePath, parseSequenceType, parseSequenceType, parseTypeswitchExpression, parseValidateExpression, setLocation, setLocation, setRangeVariableStack, setScanOnly, undeclareRangeVariable, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionParser

public SelectionParser()
Method Detail

parseSelector

public Selection parseSelector(java.lang.String expression,
                               StaticContext env,
                               boolean isField)
                        throws XPathException
Parse a string representing the restricted XPath expression allowed in an XML Schema selector or field attribute

Parameters:
expression - the expression expressed as a String
env - the static context for the expression
isField - true if the attribute is a "field" attribute, false if it is a "selector" attribute
Returns:
an Expression object representing the result of parsing
Throws:
XPathException - if the expression contains a syntax error

parseStepExpression

protected Expression parseStepExpression()
                                  throws XPathException.Static
Override the general XPath parsing of a StepExpression to support the simpler kind of Step used in XML Schema selectors

Overrides:
parseStepExpression in class ExpressionParser
Returns:
an Expression, which will always be either an AxisExpression or a ContextItemExpression
Throws:
XPathException.Static


Stylus Studio features integrated development and debugging support for Saxon in the XQuery editor and XSLT editor.