CARVIEW |
XSLT Requirements
Version 2.0
W3C Working Draft 14 February 2001
- This version:
- https://www.w3.org/TR/2001/WD-xslt20req-20010214
(available in XML or HTML) - Latest version:
- https://www.w3.org/TR/xslt20req
- Editors:
- Steve Muench (Oracle) <Steve.Muench@oracle.com>
Mark Scardina (Oracle) <Mark.Scardina@oracle.com>
Copyright ?2001 W3C? (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
Abstract
This document describes the requirements for the XSLT 2.0 specification.
Status of this document
This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C. This document is the first public XSLT 2.0 Requirements working draft.
This is a W3C Working Draft for review by W3C Members and other interested parties. It is a draft document and may be updated, replaced or made obsolete by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". This is work in progress and does not imply endorsement by the W3C membership.
This document has been produced as part of the W3C Style activity, following the procedures set out for the W3C Process. The document has been written by the XSL Working Group (W3C members only). The goals of the XSL Working Group are discussed in the XSL Working Group charter. The XSL Working Group feels that the contents of this Working Draft are relatively stable, and therefore encourages feedback on this version.
Comments on this document should be sent to the W3C mailing list xsl-editors@w3.org (archived at https://lists.w3.org/Archives/Public/xsl-editors/). A list of current W3C Recommendations and other technical documents can be found at https://www.w3.org/TR/.
Table of contents
1 Goals2 Requirements
3 References
Appendices
1 Goals
XSLT 2.0 has the following goals:
- Simplify manipulation of XML Schema-typed content
- Simplify manipulation of string content
- Support related XML standards
- Improve ease of use
- Improve interoperability
- Improve i18n support
- Maintain backward compatibility
- Enable improved processor efficiency
In addition, the following are explicitly not goals:
- Simplifying the ability to parse unstructured information to produce structured results.
- Turning XSLT into a general-purpose programming language
2 Requirements
1 | Must?Support the XML "Family" of
Standards As part of the evolving family of XML standards, XSLT 2.0 MUST support the W3C XML architecture by integrating well with other standards in the family. |
|||
???????? | 1.1 | Must?Maintain Backwards Compatibility with
XSLT 1.1 Any stylesheet whose behavior is fully defined in XSLT 1.1 and which generates no errors will produce the same result tree under XSLT 2.0 |
||
???????? | 1.2 | Must?Match Elements with Null Values
A stylesheet SHOULD be able to match elements and attributes whose
value is explicitly
|
||
???????? | 1.3 | Should?Allow Included Documents to
"Encapsulate" Local Stylesheets XSLT 2.0 SHOULD define a mechanism to allow the templates in a stylesheet associated with a secondary source document, to be imported and used to format the included fragment, taking precedence over any applicable templates in the current stylesheet.
|
||
???????? | 1.4 | Could?Support Accessing Infoset Items for
XML Declaration A stylesheet COULD be able to access information like the version and encoding from the XML declaration of a document.
|
||
???????? | 1.5 | Could?Provide QName Aware String
Functions Users manipulating documents (e.g. stylesheets, schemas) that have QName-valued element or attribute content need functions that take a string containing a QName as their argument, convert it to an expanded name using either the namespace declarations in scope at that point in the stylesheet, or the namespace declarations in scope for a specific source node, and return properties of the expanded name such as its namespace URI and local name. |
||
???????? | 1.6 | Could?Enable Constructing a Namespace with
Computed Name Provide an |
||
???????? | 1.7 | Could?Simplify Resolving Prefix Conflicts
in QName-Valued Attributes XSLT 2.0 COULD simplify the renaming of conflicting namespace prefixes in result tree fragments, particularly for attributes declared in a schema as being QNames. Once the processor knows an attribute value is a QName, an XSLT processor should be able to rename prefixes and generate namespace declarations to preserve the semantics of that attribute value, just as it does for attribute names. |
||
???????? | 1.8 | Could?Support XHTML Output Method Complementing the existing output methods for |
||
2 | Must?Improve Ease of Use XSLT 2.0 MUST address frequently requested enhancements to make using XPath even more straightfoward for handling common use cases. |
|||
???????? | 2.1 | Must?Allow Matching on Default Namespace
Without Explicit Prefix Many users stumble trying to match an element with a default namespace. They expect to be able to do something like:
<xsl:stylesheet version="1.0"
???????? xmlns:xsl="https://www.w3.org/1999/XSL/Transform" ???????? xmlns="urn:myuri"> ??<!-- Expect this matches <foo> in default namespace --> ??<xsl:template match="foo"> thinking that leaving off the prefix from the |
||
???????? | 2.2 | Must?Add Date Formatting Functions
One of the more frequent requests from XSLT 1.0 users is the
ability to format date information with similar control to XSLT's
|
||
???????? | 2.3 | Must?Simplify Accessing Id's and Key's in
Other Documents Currently it is cumbersome to lookup nodes by |
||
???????? | 2.4 | Should?Provide Function to Absolutize
Relative URIs There SHOULD be a way in XSLT 2.0 to create an absolute URI. The functionality should allow passing a node-set and return a string value representing the absolute URI resolved with respect to the base URI of the current node. |
||
???????? | 2.5 | Should?Include Unparsed Text from an
External Resource Frequently stylesheets must import text from external resources.
Today users have to resort to extension functions to accomplish this
because XSLT 1.0 only provides the
|
||
???????? | 2.6 | Should?Allow Authoring Extension Functions
in XSLT As part of the XSLT 1.1 work done on extension functions, a proposal to author XSLT extension functions in XSLT itself was deferred for reconsideration in XSLT 2.0. This would allow the functions in an extension namespace to be implemented in "pure" XSLT, without resulting to external programming languages. |
||
???????? | 2.7 | Should?Output Character Entity References
Instead of Numeric Character Entities Users have frequently requested the ability to have the output of
their transformation use (named) character references instead of the
numeric character entity. The ability to control this preference as
the level of the whole document is sufficient. For example, rather
than seeing |
||
???????? | 2.8 | Should?Construct Entity Reference by
Name Analogous to the ability to create elements and attributes, users have expressed a desire to construct named entity references.
|
||
???????? | 2.9 | Should?Support for Unicode String
Normalization For reliable string comparison of Unicode strings, users need the ability to apply Unicode normalization before comparing the strings. |
||
???????? | 2.10 | Should?Standardize Extension Element
Language Bindings XSLT 1.1 undertook the standarization of language bindings for XSLT extension functions. For XSLT 2.0, analogous bindings SHOULD be provided for extension elements. |
||
???????? | 2.11 | Could?Improve Efficiency of
Transformations on Large Documents Many useful transformations take place on large documents consisting of thousands of repeating "sub-documents". Today transformations over these documents are impractical due to the need to have the entire source tree in memory. Enabling "progressive" transformations, where the processor is able to produce progressively more output as more input is received, is tantamount to avoiding the need for XSLT processors to have random access to the entire source document. This might be accomplished by:
|
||
???????? | 2.12 | Could?Support for Reverse IDREF
attributes Given a particular value of an
|
||
???????? | 2.13 | Could?Support for Case-Insensitive
Comparisons XSLT 2.0 could expand its comparison functionality to include support for case-insensitive string comparison. |
||
???????? | 2.14 | Could?Support Lexigraphic String
Comparisons We don't let users compare strings like
|
||
???????? | 2.15 | Could?Allow Comparing Nodes Based on
Document Order Support the ability to test whether one node comes before another in document order.
|
||
???????? | 2.16 | Could?Improve Support for Unparsed
Entities In XSLT 1.0 there is an asymmetry in support for unparsed entities. They can be handled on input but not on output. In particular, there is no way to do an identity transformation that preserves them. At a minimum we need the ability to retrieve the Public ID of an unparsed entity. |
||
???????? | 2.17 | Could?Allow Processing a Node with the
"Next Best Matching" Template In the construction of large stylesheets for complex documents, it
is often necessary to construct templates that implement special
behavior for a particular instance of an element, and then apply the
normal styling for that element. Currently this is not possible
because Currently the processor determines a list of matching templates and
then discards all but the one with the highest priority. In order to
support this requirement, the processor would retain the list of
matching templates sorted in priority order. A new instruction, for
example
|
||
???????? | 2.18 | Could?Make Coercions Symmetric By Allowing
Scalar to Nodeset Conversion Presently, no datatype can be coerced or cast to a node-set. By allowing a string value to convert to a node-set, some user "gotchas" could be avoided due. |
||
3 | Must?Support XML Schema XML Schema: Structures and XML Schema: Datatypes enable users to define and use both simple and structured types and associate them to elements and attributes in a schema. XSLT 2.0 MUST provide support for the common operations needed for matching and construction of transformed documents based on a source document containing these typed elements and attributes. |
|||
???????? | 3.1 | Must?Simplify Constructing and Copying
Typed Content It MUST be possible to construct XML Schema-typed elements and attributes. In addition, when copying an element or an attribute to the result, it should be possible to preserve the type during the process.
|
||
???????? | 3.2 | Must?Support Sorting Nodes Based on XML
Schema Type XSLT 1.0 supports sorting based on
|
||
???????? | 3.3 | Could?Support Scientific Notation in
Number Formatting Several users have requested the ability to have the existing
|
||
???????? | 3.4 | Could?Provide Ability to Detect Whether
"Rich" Schema Information is Available A stylesheet that requires XML Schema type-related functionality
COULD be able to test whether a "rich" Post-Schema-Validated Infoset
is available from the XML Schema processor, so that the stylesheet can
provide fallback behavior or choose to exit with |
||
4 | Must?Simplify Grouping Grouping is complicated in XSLT 1.0. It MUST be possible for users to group nodes in a document based on
In addition XSLT must allow grouping based on sequential position,
e.g. selecting groups of adjacent Often users express this requirement in different words, asking for
a way to easily select the distinct values of an XPath expression
relative to a nodeset. For example, many users using keys have
requested a function like
|
3 References
- XML Schema: Structures, https://www.w3.org/TR/xmlschema-1/
- XML Schema: Datatypes, https://www.w3.org/TR/xmlschema-2/