XPath over XML Schema
Description
The primary purpose of this software is to address parts of an XML Schema
document with an XPath 1.0 expression written for instances of that Schema.
The library may be used, for example, to get at compile-time an approximate
set of nodes that will be matched at run-time.
A special feature of the XPathOverSchema library is the ability to evaluate one XPath in the context of results of another XPath expression. Another useful extra feature is the ability to get line/column and file offset of a matched node.
Latest Release: 1.1 [March 9, 2008]
Dependencies (XmlBeans 2.1, Jaxen 1.1b8, JSR 173 1.0): all-in-one zip
A special feature of the XPathOverSchema library is the ability to evaluate one XPath in the context of results of another XPath expression. Another useful extra feature is the ability to get line/column and file offset of a matched node.
Latest Release: 1.1 [March 9, 2008]
Dependencies (XmlBeans 2.1, Jaxen 1.1b8, JSR 173 1.0): all-in-one zip
Levels of Support of XPath 1.0 Features
W3C XPath 1.0 Specifications can be found here.
Note, that an XPath within a predicate is always analysed in the context of its step node, even if it is absolute (starts with "/"). So, "/A[/X]" is equivalent to "/A[./X]" (the predicate tests that A has a child X, not that the document root has a child X).
- Nodes
- Axes
- NodeTests
- Predicates
Note, that an XPath within a predicate is always analysed in the context of its step node, even if it is absolute (starts with "/"). So, "/A[/X]" is equivalent to "/A[./X]" (the predicate tests that A has a child X, not that the document root has a child X).
- Abbreviated Syntax
- Functions
- Variable bindings and references, namespace declarations
Summary of Current Limitations
- XML Schemas must have targetNamespace attribute defined and non-empty.
- The namespace axis is not supported.
- Namespace, processing instruction, and comment nodes are not supported.
- The only type of predicate supported is the relative node test.
- Variables and functions are not supported.
Required software
To work with XPathOverSchema you need additional software.
To simplify installation and operation of XPathOverSchema an additional ZIP file is provided that holds all other JARs that are required. Please note that we probably not use the very latest versions of these JARs, but we used them during the tests.
1. XPath expressions are parsed using SaxPath library (part of Jaxen).
2. XML Schema documents are parsed into OO entities using XMLBeans 2.1 or better.
3. JSR-173 API library is required by the XMLBeans.
To simplify installation and operation of XPathOverSchema an additional ZIP file is provided that holds all other JARs that are required. Please note that we probably not use the very latest versions of these JARs, but we used them during the tests.
1. XPath expressions are parsed using SaxPath library (part of Jaxen).
2. XML Schema documents are parsed into OO entities using XMLBeans 2.1 or better.
3. JSR-173 API library is required by the XMLBeans.