package ast
Abstract syntax tree of XPath expressions, as produced by the parsers specified in the 'parse' package.
- Alphabetic
- By Inheritance
- ast
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
BracedUriLiteral
(namespaceOption: Option[String]) extends Product with Serializable
Braced URI literal.
-
sealed
trait
EQName
extends AnyRef
EQName, so either a URIQualifiedName or a QNameAsEQName.
-
final
case class
NCName
(name: String) extends Product with Serializable
NCName, that is, a non-colon name.
- final case class QNameAsEQName (qname: QName) extends EQName with Product with Serializable
- final case class URIQualifiedName (ename: EName) extends EQName with Product with Serializable
Value Members
- object BracedUriLiteral extends Serializable
- object EQName
- object NCName extends Serializable
- object QNameAsEQName extends Serializable
- object URIQualifiedName extends Serializable
-
object
XPathExpressions
XPath 3.0 AST.
XPath 3.0 AST.
The purpose of this AST is as follows:
- It must represent the syntax tree of a successfully parsed XPath expression
- It is not annotated with more semantic information, like type information that is not included in the XPath expression
- It does not know anything about the context in which it runs, like bound namespaces etc.
- It is rich enough to be able to serialize the AST back to XPath, knowing exactly where to place parentheses, braces, etc.
- It is rich enough to contain operator precedence in the AST itself
- Serialization of the AST to XPath may lead to differences in whitespace (and operator aliases), but other than that the result must be the same
- The AST class hierarchy does not have to use the exact same names as the XPath grammar
Having such an AST of a successfully parsed XPath expression, it must be easy to reliably find used namespace prefixes, for example.
TODO Improve several class names.
TODO XPath 3.1.