Valuable features have been added to XPath 2.0, XSLT 2.0,
and XQuery 1.0 reflecting productivity and feature improvements beyond
the XPath 1.0 and XSLT 1.0 standards.
XPath 2.0
- XPath 2.0 has been improved to support the XPath 2.0 and XQuery
1.0 Data Model (XDM), which is based on sequences of heterogeneous
items including nodes and primitive types. This replaces and improves
on the XPath 1.0 node-set support and becomes the foundation of XSLT
2.0 and XQuery 1.0 data navigation.
- XPath 2.0 adds an extensive collection of functions and operators
to allow for an easier programming experience, replacing the XPath
1.0 requirement for proprietary extension mechanisms. These functions
and operators help with date and time handling, enhance the string
manipulation, support regular expression matching and tokenization,
extend the number handling, and add functions for sequence manipulation.
- XPath 2.0 supports schema-aware processing, which allows for data
navigation based on XML schema information for not only built-in schema
types, but also user-defined schema types.
- XPath 2.0 adds condition (if/then/else branches), iterative (for
loops), and quantified expressions (some and every tests) typical
of other languages.
- XPath 2.0 adds named collations across multiple functions allowing
for locale-specific operation.
- XPath 2.0 provides a backwards-compatibility mode to run most
XPath 1.0 expressions unchanged.
XSLT 2.0
- XSLT 2.0 is based on XPath 2.0, allowing XSLT 2.0 to take advantage
of all new XPath 2.0 features. Temporary trees have been added to
allow navigation of constructed trees during transformation. User-defined
functions can be defined in the XSLT language and are callable using
XPath 2.0.
- XSLT 2.0 can write to multiple result documents in a single stylesheet
execution.
- XSLT 2.0 supports regular expressions to analyze and separate
strings.
- XSLT 2.0 allows variables and parameters to be typed, therefore
improving the reliability of stylesheets and functions.
- XSLT 2.0 supports schema-aware processing, which allows XSLT 2.0
to check for valid input, temporary trees, and output documents.
- XSLT 2.0 supports initial named templates, which allows the processor
to start with a defined template instead of having to match the input
document, a feature commonly used with loading documents programmatically
using the XPath 2.0 collection and document functions.
- Comparisons in sorting, grouping, and keys are supported with
any data type and can use locale-specific named collations.
- XHTML has been added to XSLT 2.0 as a valid output format.
- The next-match instruction allows the same node to be processed
with multiple templates.
- The character-map instruction allows fine grained control of serialization
of characters.
- XSLT 2.0 added addition instructions for transforming and formatting
dates and times.
- XSLT 2.0 added support for tunnel parameters, which allows parameters
to be passed through multiple template calls without having to declare
the parameter in each template call.
- XSLT 2.0 added multiple mode support to allow templates to apply
to specific modes of processing within a stylesheet.
- Unparsed text can be incorporated into the data processed by a
stylesheet, which then can be tokenized with the new regular expression
support.
- XSLT 2.0 provides a backwards-compatibility mode to run most XSLT
1.0 stylesheets unchanged.
XQuery 1.0
- XQuery 1.0 is based on XPath 2.0, allowing XQuery 1.0 to take
advantage of all new XPath 2.0 features. XQuery 1.0 builds on XPath
2.0 to provide full XML Query capability.
- XQuery's FLOWR (For, Let, Order by, Where, Return) expression
allows for complicated joins across XML datasets. FLOWR allows for
query of large documents or collections of documents. XQuery allows
for the mixture of direct XML construction along with computed content
returned from FLOWR expressions.
- XQuery has the ability to define functions and variables with
syntax that is familiar to users of other languages, allowing larger
programs to be defined around the data-query operations.
XQuery 1.0 supports schema-aware processing,
which allows input and constructed documents and elements to be validated.