Following a
long thread initiated by Charles Reitzel about the need of a XPath API and the
suggestion made by several posts to define a XML encoding that could be
returned by SAX XPath parsers, Wayne Steele posted a proposal ( DTD and
examples) for such an encoding under the title "XML-Encoded XPath: an
alternate syntax for XPath expressions".
This proposal doesn't use XPath syntax, but rather provides a straight XML representation of the concepts described in the XPath 1.0 recommendation:
- An XPath expression is broken into a sequence of location steps and represented as a multi-rooted set of location steps.
- Each location step contains the three parts (axis, node test and one of more predicates).
- The function calls are defined by their name and set of parameters.
Steele welcomes questions, comments and errata.
Related stories:
|