<?xml version="1.0" encoding="UTF-8"?>  <?xml-stylesheet href="http://www.w3.org/2008/09/xsd.xsl" type="text/xsl"?>   <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" targetNamespace="http://www.w3.org/1999/XSL/Transform" elementFormDefault="qualified">  <xs:annotation> <xs:documentation>
This is an XSD 1.1 schema for XSLT 3.0 stylesheets. It defines all the elements that appear in the XSLT namespace; it also provides hooks that allow the inclusion of user-defined literal result elements, extension instructions, and top-level data elements.

This schema is available for use under the conditions of the W3C Software License published at http://www.w3.org/Consortium/Legal/copyright-software-19980720

The schema is organized as follows:

PART A: definitions of complex types and model groups used as the basis for element definitions

PART B: definitions of individual XSLT elements

PART C: definitions for literal result elements

PART D: definitions of simple types used in attribute definitions

The schema has a number of limitations:

The XSLT specification allows additional elements and attributes to be present where forwards compatibility is invoked. This schema does not.

The XSLT specification allows arbitrary content in a part of the stylesheet that is excluded by virtue of a use-when attribute. This schema does not.

The handling of literal result elements in this schema is imperfect; although various options are allowed, none matches the specification exactly. For example, the content of a literal result element uses lax validation, which permits child elements in the XSLT namespace that have no declaration in this schema.

The schema makes no attempt to check XPath expressions for syntactic or semantic correctness, nor to check that component references are resolved (for example that a template named in xsl:call-template has a declaration). Doing this in general requires cross-document validation, which is beyond the scope of XSD.

The schema imports the schema for XSD 1.0 schema documents. In stylesheets that contain an inline XSD 1.1 schema, this import should be replaced with one for the schema for XSD 1.1 schema documents.

 </xs:documentation> </xs:annotation>   <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>   <xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>  <xs:annotation> <xs:documentation> PART A: definitions of complex types and model groups used as the basis for element definitions </xs:documentation> </xs:annotation>  <xs:complexType name="generic-element-type" mixed="true"> <xs:annotation> <xs:documentation>
This complex type provides a generic supertype for all XSLT elements; it contains the definitions of the standard attributes that may appear on any element.
 </xs:documentation> </xs:annotation> <xs:attribute name="default-collation" type="xsl:uri-list"/> <xs:attribute name="default-mode" type="xsl:default-mode-type"/> <xs:attribute name="default-validation" type="xsl:validation-strip-or-preserve" default="strip"/> <xs:attribute name="exclude-result-prefixes" type="xsl:prefix-list-or-all"/> <xs:attribute name="expand-text" type="xsl:yes-or-no"/> <xs:attribute name="extension-element-prefixes" type="xsl:prefix-list"/> <xs:attribute name="use-when" type="xsl:expression"/> <xs:attribute name="xpath-default-namespace" type="xs:anyURI"/> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:complexType> <xs:complexType name="versioned-element-type" mixed="true"> <xs:annotation> <xs:documentation>
This complex type provides a generic supertype for all XSLT elements with the exception of xsl:output; it contains the definitions of the version attribute that may appear on any element.

The xsl:output does not use this definition because, although it has a version attribute, the syntax and semantics of this attribute are unrelated to the standard version attribute allowed on other elements.
 </xs:documentation> </xs:annotation> <xs:complexContent> <xs:extension base="xsl:generic-element-type"> <xs:attribute name="version" type="xs:decimal" use="optional"/> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="element-only-versioned-element-type" mixed="false"> <xs:complexContent> <xs:restriction base="xsl:versioned-element-type"> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:restriction> </xs:complexContent> </xs:complexType> <xs:complexType name="sequence-constructor"> <xs:annotation> <xs:documentation>
This complex type provides a generic supertype for all XSLT elements that allow a sequence constructor as their content.
 </xs:documentation> </xs:annotation> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="sequence-constructor-and-select"> <xs:annotation> <xs:documentation>
This complex type allows a sequence constructor and a select attribute.
 </xs:documentation> </xs:annotation> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="select" type="xsl:expression"/> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="sequence-constructor-or-select"> <xs:annotation> <xs:documentation>
This complex type allows a sequence constructor or a select attribute, but not both.
 </xs:documentation> </xs:annotation> <xs:complexContent mixed="true"> <xs:restriction base="xsl:sequence-constructor-and-select"> <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/> <xs:anyAttribute namespace="##other" processContents="lax"/> <xs:assert test="not(exists(@select) and (exists(* except xsl:fallback) or exists(text()[normalize-space()])))"/> </xs:restriction> </xs:complexContent> </xs:complexType> <xs:group name="sequence-constructor-group"> <xs:annotation> <xs:documentation>
This complex type provides a generic supertype for all XSLT elements that allow a sequence constructor as their content.
 </xs:documentation> </xs:annotation> <xs:choice> <xs:element ref="xsl:instruction"/> <xs:group ref="xsl:result-elements"/> </xs:choice> </xs:group> <xs:element name="declaration" type="xsl:generic-element-type" abstract="true"/> <xs:element name="instruction" type="xsl:versioned-element-type" abstract="true"/>  <xs:annotation> <xs:documentation> PART B: definitions of individual XSLT elements Elements are listed in alphabetical order. </xs:documentation> </xs:annotation>  <xs:element name="accept"> <xs:annotation> <xs:documentation>
This element appears as a child of xsl:use-package and defines any variations that the containing package wishes to make to the visibility of components made available from a library package. For example, it may indicate that some of the public components in the library package are not to be made available to the containing package.
 </xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:attribute name="component" type="xsl:component-kind-type" use="required"/> <xs:attribute name="names" type="xsl:EQNames" use="required"/> <xs:attribute name="visibility" type="xsl:visibility-type" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="accumulator" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:accumulator-rule" minOccurs="1" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xsl:EQName" /> <xs:attribute name="post-descent" type="xsl:EQName" /> <xs:attribute name="initial-value" type="xsl:expression"/> <xs:attribute name="as" type="xsl:sequence-type"/> <xs:attribute name="visibility" type="xsl:visibility-type"/> <xs:attribute name="streamable" type="xsl:yes-or-no"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="accumulator-rule"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence/> <xs:attribute name="match" type="xsl:pattern" use="required"/> <xs:attribute name="phase"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="start"/> <xs:enumeration value="end"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="new-value" type="xsl:expression" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="analyze-string" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:matching-substring" minOccurs="0"/> <xs:element ref="xsl:non-matching-substring" minOccurs="0"/> <xs:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="select" type="xsl:expression" use="required"/> <xs:attribute name="regex" type="xsl:avt" use="required"/> <xs:attribute name="flags" type="xsl:avt" default=""/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="apply-imports" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:with-param" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="apply-templates" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="xsl:sort"/> <xs:element ref="xsl:with-param"/> </xs:choice> <xs:attribute name="select" type="xsl:expression" default="child::node()"/> <xs:attribute name="mode" type="xsl:mode"/> <xs:assert test="every $e in subsequence(xsl:sort, 2) satisfies empty($e/@stable)"> <xs:annotation> <xs:documentation>
It is a static error if an xsl:sort element other than the first in a sequence of sibling xsl:sort elements has a stable attribute.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="assert" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="test" type="xsl:expression" use="required"/> <xs:attribute name="select" type="xsl:expression"/> <xs:attribute name="error-code" type="xsl:avt"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="attribute" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-or-select"> <xs:attribute name="name" type="xsl:avt" use="required"/> <xs:attribute name="namespace" type="xsl:avt"/> <xs:attribute name="separator" type="xsl:avt"/> <xs:attribute name="type" type="xsl:EQName"/> <xs:attribute name="validation" type="xsl:validation-type"/> <xs:attribute name="on-empty" type="xsl:expression"/> <xs:assert test="not(exists(@type) and exists(@validation))"> <xs:annotation> <xs:documentation>
The type and validation attributes are mutually exclusive (if one is present, the other must be absent).
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="attribute-set" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element ref="xsl:attribute"/> </xs:sequence> <xs:attribute name="name" type="xsl:EQName" use="required"/> <xs:attribute name="streamable" type="xsl:yes-or-no"/> <xs:attribute name="use-attribute-sets" type="xsl:EQNames" default=""/> <xs:attribute name="visibility" type="xsl:visibility-type"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="break" substitutionGroup="xsl:instruction" type="xsl:sequence-constructor-or-select"/> <xs:element name="call-template" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:with-param" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xsl:EQName" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="catch"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-or-select"> <xs:attribute name="errors" type="xs:token" use="optional"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="character-map" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:output-character" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xsl:EQName" use="required"/> <xs:attribute name="use-character-maps" type="xsl:EQNames" default=""/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="choose" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:when" maxOccurs="unbounded"/> <xs:element ref="xsl:otherwise" minOccurs="0"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="comment" substitutionGroup="xsl:instruction" type="xsl:sequence-constructor-or-select"/> <xs:element name="context-item"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:attribute name="as" type="xsl:item-type"/> <xs:attribute name="use"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="required"/> <xs:enumeration value="optional"/> <xs:enumeration value="prohibited"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="copy" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="select" type="xsl:expression"/> <xs:attribute name="copy-namespaces" type="xsl:yes-or-no" default="yes"/> <xs:attribute name="inherit-namespaces" type="xsl:yes-or-no" default="yes"/> <xs:attribute name="use-attribute-sets" type="xsl:EQNames" default=""/> <xs:attribute name="type" type="xsl:EQName"/> <xs:attribute name="validation" type="xsl:validation-type"/> <xs:attribute name="on-empty" type="xsl:expression"/> <xs:assert test="not(exists(@type) and exists(@validation))"> <xs:annotation> <xs:documentation>
The type and validation attributes are mutually exclusive (if one is present, the other must be absent).
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="copy-of" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:attribute name="select" type="xsl:expression" use="required"/> <xs:attribute name="copy-namespaces" type="xsl:yes-or-no" default="yes"/> <xs:attribute name="type" type="xsl:EQName"/> <xs:attribute name="validation" type="xsl:validation-type"/> <xs:assert test="not(exists(@type) and exists(@validation))"> <xs:annotation> <xs:documentation>
The type and validation attributes are mutually exclusive (if one is present, the other must be absent).
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="document" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="type" type="xsl:EQName"/> <xs:attribute name="validation" type="xsl:validation-type"/> <xs:assert test="not(exists(@type) and exists(@validation))"> <xs:annotation> <xs:documentation>
The type and validation attributes are mutually exclusive (if one is present, the other must be absent).
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="decimal-format" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:attribute name="name" type="xsl:EQName"/> <xs:attribute name="decimal-separator" type="xsl:char" default="."/> <xs:attribute name="grouping-separator" type="xsl:char" default=","/> <xs:attribute name="infinity" type="xs:string" default="Infinity"/> <xs:attribute name="minus-sign" type="xsl:char" default="-"/> <xs:attribute name="NaN" type="xs:string" default="NaN"/> <xs:attribute name="percent" type="xsl:char" default="%"/> <xs:attribute name="per-mille" type="xsl:char" default="~"/> <xs:attribute name="zero-digit" type="xsl:zero-digit" default="0"/> <xs:attribute name="digit" type="xsl:char" default="#"/> <xs:attribute name="pattern-separator" type="xsl:char" default=";"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="element" substitutionGroup="xsl:instruction"> <xs:complexType mixed="true"> <xs:complexContent> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="name" type="xsl:avt" use="required"/> <xs:attribute name="namespace" type="xsl:avt"/> <xs:attribute name="inherit-namespaces" type="xsl:yes-or-no" default="yes"/> <xs:attribute name="use-attribute-sets" type="xsl:EQNames" default=""/> <xs:attribute name="type" type="xsl:EQName"/> <xs:attribute name="validation" type="xsl:validation-type"/> <xs:attribute name="on-empty" type="xsl:expression"/> <xs:assert test="not(exists(@type) and exists(@validation))"> <xs:annotation> <xs:documentation>
The type and validation attributes are mutually exclusive (if one is present, the other must be absent).
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="evaluate" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="xsl:with-param"/> <xs:element ref="xsl:fallback"/> </xs:choice> <xs:attribute name="xpath" type="xsl:expression" use="required"/> <xs:attribute name="as" type="xsl:sequence-type"/> <xs:attribute name="base-uri" type="xsl:avt"/> <xs:attribute name="context-item" type="xsl:expression"/> <xs:attribute name="namespace-context" type="xsl:expression"/> <xs:attribute name="schema-aware" type="xsl:avt"/> <xs:attribute name="with-params" type="xsl:expression"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="expose"> <xs:annotation> <xs:documentation>
This element appears as a child of xsl:use-package and defines the visibility of components that are made available (or not) by this package to other using packages.
 </xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:attribute name="component" type="xsl:component-kind-type"/> <xs:attribute name="names" type="xsl:EQNames"/> <xs:attribute name="visibility" type="xsl:visibility-not-hidden-type"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="fallback" substitutionGroup="xsl:instruction" type="xsl:sequence-constructor"/> <xs:element name="for-each" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:sequence> <xs:element ref="xsl:sort" minOccurs="0" maxOccurs="unbounded"/> <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="select" type="xsl:expression" use="required"/> <xs:assert test="every $e in subsequence(xsl:sort, 2) satisfies empty($e/@stable)"> <xs:annotation> <xs:documentation>
It is a static error if an xsl:sort element other than the first in a sequence of sibling xsl:sort elements has a stable attribute.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="for-each-group" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:sequence> <xs:element ref="xsl:sort" minOccurs="0" maxOccurs="unbounded"/> <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="select" type="xsl:expression" use="required"/> <xs:attribute name="group-by" type="xsl:expression"/> <xs:attribute name="group-adjacent" type="xsl:expression"/> <xs:attribute name="group-starting-with" type="xsl:pattern"/> <xs:attribute name="group-ending-with" type="xsl:pattern"/> <xs:attribute name="bind-group" type="xsl:EQName"/> <xs:attribute name="bind-grouping-key" type="xsl:EQName"/> <xs:attribute name="composite" type="xsl:yes-or-no"/> <xs:attribute name="collation" type="xsl:avt"/> <xs:assert test="every $e in subsequence(xsl:sort, 2) satisfies empty($e/@stable)"> <xs:annotation> <xs:documentation>
It is a static error if an xsl:sort element other than the first in a sequence of sibling xsl:sort elements has a stable attribute.
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="count((@group-by, @group-adjacent, @group-starting-with, @group-ending-with)) = 1"> <xs:annotation> <xs:documentation>
These four attributes are mutually exclusive: it is a static error if none of these four attributes is present or if more than one of them is present.
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="if (exists(@collation) or exists(@composite)) then (exists(@group-by) or exists(@group-adjacent)) else true()"> <xs:annotation> <xs:documentation>
It is an error to specify the collation attribute or the composite attribute if neither the group-by attribute nor group-adjacent attribute is specified.
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="if (exists(@bind-grouping-key)) then (exists(@group-by) or exists(@group-adjacent)) else true()"> <xs:annotation> <xs:documentation>
It is a static error if the bind-grouping-key attribute is present on an xsl:for-each-group instruction unless either the group-by or group-adjacent attribute is present.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="fork" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:element ref="xsl:sequence"/> <xs:element ref="xsl:fallback"/> </xs:choice> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="function" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:sequence> <xs:element ref="xsl:param" minOccurs="0" maxOccurs="unbounded"/> <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xsl:EQName-in-namespace" use="required"/> <xs:attribute name="override" type="xsl:yes-or-no" default="yes"/> <xs:attribute name="as" type="xsl:sequence-type" default="item()*"/> <xs:attribute name="visibility" type="xsl:visibility-type"/> <xs:attribute name="override-extension-function" type="xsl:yes-or-no"/> <xs:attribute name="identity-sensitive" type="xsl:yes-or-no"/> <xs:attribute name="cache" type="xsl:caching-values"/> <xs:assert test="every $e in xsl:param satisfies (empty($e/@select) and empty($e/child::node()))"> <xs:annotation> <xs:documentation>
A parameter for a function must have no default value.
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="every $e in xsl:param satisfies empty($e/@visibility)"> <xs:annotation> <xs:documentation>
A parameter for a function must have no visibility attribute.
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="every $e in xsl:param satisfies empty($e/@required)"> <xs:annotation> <xs:documentation>
A parameter for a function must have no required attribute.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="if" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="test" type="xsl:expression" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="import" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:attribute name="href" type="xs:anyURI" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="import-schema" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xs:schema" minOccurs="0" maxOccurs="1"/> </xs:sequence> <xs:attribute name="namespace" type="xs:anyURI"/> <xs:attribute name="schema-location" type="xs:anyURI"/> <xs:assert test="not(exists(@schema-location) and exists(xs:schema))"> <xs:annotation> <xs:documentation>
XTSE0215: It is a static error if an xsl:import-schema element that contains an xs:schema element has a schema-location attribute
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="include" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:attribute name="href" type="xs:anyURI" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="iterate" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:sequence> <xs:element ref="xsl:param" minOccurs="0" maxOccurs="unbounded"/> <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="xsl:on-completion" minOccurs="0" maxOccurs="1"/> </xs:sequence> <xs:attribute name="select" type="xsl:expression" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="key" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="name" type="xsl:EQName" use="required"/> <xs:attribute name="match" type="xsl:pattern" use="required"/> <xs:attribute name="use" type="xsl:expression"/> <xs:attribute name="composite" type="xsl:yes-or-no"/> <xs:attribute name="collation" type="xs:anyURI"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="map" type="xsl:sequence-constructor" substitutionGroup="xsl:instruction"/> <xs:element name="map-entry" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-and-select"> <xs:attribute name="key" type="xsl:expression" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="matching-substring" type="xsl:sequence-constructor"/> <xs:element name="merge" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:merge-source" minOccurs="1" maxOccurs="unbounded"/> <xs:element ref="xsl:merge-action" minOccurs="1" maxOccurs="1"/> <xs:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="bind-group" type="xsl:EQName"/> <xs:attribute name="bind-key" type="xsl:EQName"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="merge-action" type="xsl:sequence-constructor"/> <xs:element name="merge-key" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:sequence> <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="select" type="xsl:expression"/> <xs:attribute name="lang" type="xsl:avt"/> <xs:attribute name="order" type="xsl:avt"/> <xs:attribute name="collation" type="xs:anyURI"/> <xs:attribute name="case-order" type="xsl:avt"/> <xs:attribute name="data-type" type="xsl:avt"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="merge-source"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:merge-key" minOccurs="1" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="for-each" type="xsl:expression"/> <xs:attribute name="select" type="xsl:expression" use="required"/> <xs:attribute name="bind-source" type="xsl:EQName"/> <xs:attribute name="streamable" type="xsl:yes-or-no"/> <xs:attribute name="sort-before-merge" type="xsl:yes-or-no"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="message" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="select" type="xsl:expression"/> <xs:attribute name="terminate" type="xsl:avt" default="no"/> <xs:attribute name="error-code" type="xsl:avt"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="mode" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent mixed="false"> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:context-item" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xsl:EQName"/> <xs:attribute name="streamable" type="xsl:yes-or-no" default="no"/> <xs:attribute name="initial" type="xsl:yes-or-no" default="yes"/> <xs:attribute name="on-no-match" type="xsl:on-no-match-type" default="shallow-skip"/> <xs:attribute name="on-multiple-match" type="xsl:on-multiple-match-type" default="use-last"/> <xs:attribute name="warning-on-no-match" type="xsl:yes-or-no"/> <xs:attribute name="warning-on-multiple-match" type="xsl:yes-or-no"/> <xs:attribute name="typed" type="xsl:typed-type"/> <xs:attribute name="visibility"> <xs:simpleType> <xs:restriction base="xsl:visibility-type"> <xs:enumeration value="public"/> <xs:enumeration value="private"/> <xs:enumeration value="final"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:assert test="not(normalize-space(@initial) = 'no' and exists(xsl:context-item))"> <xs:annotation> <xs:documentation>
It is a static error if an xsl:mode declaration specifying initial="no" contains an xsl:context-item element.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="namespace" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-or-select"> <xs:attribute name="name" type="xsl:avt" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="namespace-alias" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:attribute name="stylesheet-prefix" type="xsl:prefix-or-default" use="required"/> <xs:attribute name="result-prefix" type="xsl:prefix-or-default" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="next-iteration" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:with-param" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="next-match" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="xsl:with-param"/> <xs:element ref="xsl:fallback"/> </xs:choice> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="non-matching-substring" type="xsl:sequence-constructor"/> <xs:element name="number" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:attribute name="value" type="xsl:expression"/> <xs:attribute name="select" type="xsl:expression"/> <xs:attribute name="level" type="xsl:level" default="single"/> <xs:attribute name="count" type="xsl:pattern"/> <xs:attribute name="from" type="xsl:pattern"/> <xs:attribute name="format" type="xsl:avt" default="1"/> <xs:attribute name="lang" type="xsl:avt"/> <xs:attribute name="letter-value" type="xsl:avt"/> <xs:attribute name="ordinal" type="xsl:avt"/> <xs:attribute name="start-at" type="xsl:avt"/> <xs:attribute name="grouping-separator" type="xsl:avt"/> <xs:attribute name="grouping-size" type="xsl:avt"/> <xs:assert test="if (exists(@value)) then empty((@select, @count, @from)) and @level='single' else true()"> <xs:annotation> <xs:documentation>
It is a static error if the value attribute of xsl:number is present unless the select, level, count, and from attributes are all absent.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="on-completion" type="xsl:sequence-constructor-or-select"/> <xs:element name="otherwise" type="xsl:sequence-constructor"/> <xs:element name="output" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:generic-element-type"> <xs:attribute name="name" type="xsl:EQName"/> <xs:attribute name="method" type="xsl:method"/> <xs:attribute name="byte-order-mark" type="xsl:yes-or-no"/> <xs:attribute name="cdata-section-elements" type="xsl:EQNames"/> <xs:attribute name="doctype-public" type="xs:string"/> <xs:attribute name="doctype-system" type="xs:string"/> <xs:attribute name="encoding" type="xs:string"/> <xs:attribute name="escape-uri-attributes" type="xsl:yes-or-no"/> <xs:attribute name="html-version" type="xs:decimal"/> <xs:attribute name="include-content-type" type="xsl:yes-or-no"/> <xs:attribute name="indent" type="xsl:yes-or-no"/> <xs:attribute name="item-separator" type="xs:string"/> <xs:attribute name="media-type" type="xs:string"/> <xs:attribute name="normalization-form" type="xs:NMTOKEN"/> <xs:attribute name="omit-xml-declaration" type="xsl:yes-or-no"/> <xs:attribute name="parameter-document" type="xs:anyURI"/> <xs:attribute name="standalone" type="xsl:yes-or-no-or-omit"/> <xs:attribute name="suppress-indentation" type="xsl:EQNames"/> <xs:attribute name="undeclare-prefixes" type="xsl:yes-or-no"/> <xs:attribute name="use-character-maps" type="xsl:EQNames"/> <xs:attribute name="version" type="xs:NMTOKEN"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="output-character"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:attribute name="character" type="xsl:char" use="required"/> <xs:attribute name="string" type="xs:string" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="override"> <xs:annotation> <xs:documentation>
This element appears as a child of xsl:use-package and defines any overriding definitions of components that the containing package wishes to make to the components made available from a library package.
 </xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="xsl:template"/> <xs:element ref="xsl:function"/> <xs:element ref="xsl:variable"/> <xs:element ref="xsl:param"/> <xs:element ref="xsl:attribute-set"/> </xs:choice> <xs:assert test="every $e in * satisfies exists($e/@name)"> <xs:annotation> <xs:documentation>
Every component that is overridden (in particular, templates) must have a name attribute
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="every $e in xsl:template satisfies empty($e/@match)"> <xs:annotation> <xs:documentation>
A template that is overridden must not have a match attribute
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="package"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:sequence> <xs:element ref="xsl:use-package" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="xsl:transform" minOccurs="1" maxOccurs="1"/> <xs:element ref="xsl:expose" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:anyURI"/> <xs:attribute name="package-version" type="xs:string"/> <xs:attribute name="input-type-annotations" type="xsl:input-type-annotations-type"/> <xs:assert test="every $s in (.//xsl:stylesheet, .//xsl:transform)[@input-type-annotations] satisfies normalize-space($s/@input-type-annotations) = normalize-space(./@input-type-annotations)"> <xs:annotation> <xs:documentation>
XTSE0265: It is a static error if a stylesheet module specifies the value strip or preserve and the same value is not specified on the xsl:package element of the containing package
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="param" substitutionGroup="xsl:declaration"> <xs:annotation> <xs:documentation>
Declaration of the xsl:param element, used both defining function parameters, template parameters, parameters to xsl:iterate, and global stylesheet parameters.
 </xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-or-select"> <xs:attribute name="name" type="xsl:EQName" use="required"/> <xs:attribute name="as" type="xsl:sequence-type"/> <xs:attribute name="required" type="xsl:yes-or-no"/> <xs:attribute name="tunnel" type="xsl:yes-or-no"/> <xs:attribute name="visibility" type="xsl:visibility-type" use="optional"/> <xs:attribute name="static" type="xsl:yes-or-no"/> <xs:assert test="if (normalize-space(@static) = 'yes') then normalize-space(@visibility) = ('', 'private', 'final') else true()"> <xs:annotation> <xs:documentation>
When the static attribute is present with the value yes, the visibility attribute must not have a value other than private or final.
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="if (normalize-space(@static) = 'yes') then empty((*,text())) and exists(@select) else true()"> <xs:annotation> <xs:documentation>
When the attribute static="yes" is specified, the xsl:param element must have empty content.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="perform-sort" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:sequence> <xs:element ref="xsl:sort" minOccurs="1" maxOccurs="unbounded"/> <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="select" type="xsl:expression"/> <xs:assert test="every $e in subsequence(xsl:sort, 2) satisfies empty($e/@stable)"> <xs:annotation> <xs:documentation>
It is a static error if an xsl:sort element other than the first in a sequence of sibling xsl:sort elements has a stable attribute.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="preserve-space" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:attribute name="elements" type="xsl:nametests" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="processing-instruction" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-or-select"> <xs:attribute name="name" type="xsl:avt" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="result-document" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="format" type="xsl:avt"/> <xs:attribute name="href" type="xsl:avt"/> <xs:attribute name="type" type="xsl:EQName"/> <xs:attribute name="validation" type="xsl:validation-type"/> <xs:attribute name="method" type="xsl:avt"/> <xs:attribute name="byte-order-mark" type="xsl:avt"/> <xs:attribute name="cdata-section-elements" type="xsl:avt"/> <xs:attribute name="doctype-public" type="xsl:avt"/> <xs:attribute name="doctype-system" type="xsl:avt"/> <xs:attribute name="encoding" type="xsl:avt"/> <xs:attribute name="escape-uri-attributes" type="xsl:avt"/> <xs:attribute name="html-version" type="xsl:avt"/> <xs:attribute name="include-content-type" type="xsl:avt"/> <xs:attribute name="indent" type="xsl:avt"/> <xs:attribute name="item-separator" type="xsl:avt"/> <xs:attribute name="media-type" type="xsl:avt"/> <xs:attribute name="normalization-form" type="xsl:avt"/> <xs:attribute name="omit-xml-declaration" type="xsl:avt"/> <xs:attribute name="parameter-document" type="xsl:avt"/> <xs:attribute name="standalone" type="xsl:avt"/> <xs:attribute name="suppress-indentation" type="xsl:avt"/> <xs:attribute name="undeclare-prefixes" type="xsl:avt"/> <xs:attribute name="use-character-maps" type="xsl:EQNames"/> <xs:attribute name="output-version" type="xsl:avt"/> <xs:assert test="not(exists(@type) and exists(@validation))"> <xs:annotation> <xs:documentation>
The type and validation attributes are mutually exclusive (if one is present, the other must be absent).
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="sequence" substitutionGroup="xsl:instruction" type="xsl:sequence-constructor-or-select"/> <xs:element name="sort"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-or-select"> <xs:attribute name="lang" type="xsl:avt"/> <xs:attribute name="data-type" type="xsl:avt" default="text"/> <xs:attribute name="order" type="xsl:avt" default="ascending"/> <xs:attribute name="case-order" type="xsl:avt"/> <xs:attribute name="collation" type="xsl:avt"/> <xs:attribute name="stable" type="xsl:avt"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="strip-space" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:attribute name="elements" type="xsl:nametests" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="stylesheet" substitutionGroup="xsl:transform"/> <xs:element name="stream" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="href" type="xsl:avt" use="required"/> <xs:attribute name="type" type="xsl:EQName"/> <xs:attribute name="validation" type="xsl:validation-type"/> <xs:assert test="not(exists(@type) and exists(@validation))"> <xs:annotation> <xs:documentation>
The type and validation attributes are mutually exclusive (if one is present, the other must be absent).
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="template" substitutionGroup="xsl:declaration"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:sequence> <xs:element ref="xsl:context-item" minOccurs="0" maxOccurs="1"/> <xs:element ref="xsl:param" minOccurs="0" maxOccurs="unbounded"/> <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="match" type="xsl:pattern"/> <xs:attribute name="priority" type="xs:decimal"/> <xs:attribute name="mode" type="xsl:modes"/> <xs:attribute name="name" type="xsl:EQName"/> <xs:attribute name="as" type="xsl:sequence-type" default="item()*"/> <xs:attribute name="visibility" type="xsl:visibility-type"/> <xs:assert test="exists(@match) or exists(@name)"> <xs:annotation> <xs:documentation>
An xsl:template element must have either a match attribute or a name attribute, or both.
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="if (empty(@match)) then (empty(@mode) and empty(@priority)) else true()"> <xs:annotation> <xs:documentation>
An xsl:template element that has no match attribute must have no mode attribute and no priority attribute.
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="not(exists(@visibility) and empty(@name))"> <xs:annotation> <xs:documentation>
An xsl:template element that has no name attribute must have no visibility attribute
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="if (normalize-space(@visibility) = 'abstract') then empty(* except (xsl:context-item, xsl:param)) else true()"> <xs:annotation> <xs:documentation>
If the visibility attribute is present with the value abstract then (a) the sequence constructor defining the template body must be empty: that is, the only permitted children are xsl:context-item and xsl:param
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="not(normalize-space(@visibility) = 'abstract' and exists(@match))"> <xs:annotation> <xs:documentation>
If the visibility attribute is present with the value abstract then there must be no match attribute.
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="every $e in xsl:param satisfies empty($e/@visibility)"> <xs:annotation> <xs:documentation>
A parameter for a template must have no visibility attribute.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:complexType name="text-element-base-type"> <xs:simpleContent> <xs:restriction base="xsl:versioned-element-type"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:restriction> </xs:simpleContent> </xs:complexType>  <xs:complexType name="text-element-type"> <xs:simpleContent> <xs:extension base="xsl:text-element-base-type"> <xs:attribute name="disable-output-escaping" type="xsl:yes-or-no" default="no"/> </xs:extension> </xs:simpleContent> </xs:complexType> <xs:element name="text" substitutionGroup="xsl:instruction" type="xsl:text-element-type"/> <xs:complexType name="transform-element-base-type"> <xs:complexContent> <xs:restriction base="xsl:element-only-versioned-element-type"> <xs:attribute name="version" type="xs:decimal" use="optional"> <xs:annotation> <xs:documentation>
The version attribute indicates the version of XSLT that the stylesheet module requires. The attribute is required, unless the xsl:stylesheet element is a child of an xsl:package element, in which case it is optional: the default is then taken from the parent xsl:package element.
 </xs:documentation> </xs:annotation> </xs:attribute> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:restriction> </xs:complexContent> </xs:complexType> <xs:element name="transform"> <xs:complexType> <xs:complexContent> <xs:extension base="xsl:transform-element-base-type"> <xs:sequence> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="xsl:declaration"/> <xs:any namespace="##other" processContents="lax"/>  </xs:choice> </xs:sequence> <xs:attribute name="id" type="xs:ID"/> <xs:attribute name="input-type-annotations" type="xsl:input-type-annotations-type" default="unspecified"/>  <xs:assert test="every $v in (.//xsl:param, .//xsl:variable)[@static] satisfies $v[parent::xsl:stylesheet or parent::xsl:transform or parent::xsl:override] "> <xs:annotation> <xs:documentation>
The static attribute must not be present on an xsl:variable or xsl:param element unless it is a top-level element.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="try" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:versioned-element-type"> <xs:sequence> <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="xsl:catch" minOccurs="1" maxOccurs="1"/> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="xsl:catch"/> <xs:element ref="xsl:fallback"/> </xs:choice> </xs:sequence> <xs:attribute name="select" type="xsl:expression" use="optional"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="use-package"> <xs:annotation> <xs:documentation>
This element appears as a child of xsl:package and defines a dependency of the containing package on another package, identified by URI in the name attribute. The package-version attribute indicates which version of the library package is required, or may indicate a range of versions.
 </xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent mixed="false"> <xs:extension base="xsl:element-only-versioned-element-type"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="xsl:accept"/> <xs:element ref="xsl:override"/> </xs:choice> <xs:attribute name="name" type="xs:anyURI"/> <xs:attribute name="package-version" type="xs:string"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="value-of" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-or-select"> <xs:attribute name="separator" type="xsl:avt"/> <xs:attribute name="disable-output-escaping" type="xsl:yes-or-no" default="no"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="variable" substitutionGroup="xsl:declaration xsl:instruction"> <xs:annotation> <xs:documentation>
Declaration of the xsl:variable element, used both for local and global variable bindings.

This definition takes advantage of the ability in XSD 1.1 for an element to belong to more than one substitution group. A global variable is a declaration, while a local variable can appear as an instruction in a sequence constructor.
 </xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-or-select"> <xs:attribute name="name" type="xsl:EQName" use="required"/> <xs:attribute name="as" type="xsl:sequence-type" use="optional"/> <xs:attribute name="visibility" type="xsl:visibility-type" use="optional"/> <xs:attribute name="static" type="xsl:yes-or-no"/> <xs:assert test="if (normalize-space(@static) = 'yes') then normalize-space(@visibility) = ('', 'private', 'final') else true()"> <xs:annotation> <xs:documentation>
When the static attribute is present with the value yes, the visibility attribute must not have a value other than private or final.
 </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="if (normalize-space(@static) = 'yes') then (empty((*,text())) and @select) else true()"> <xs:annotation> <xs:documentation>
When the attribute static="yes" is specified, the xsl:variable element must have empty content, and the select attribute must be present to define the value of the variable.
 </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="when"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="test" type="xsl:expression" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="with-param"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-or-select"> <xs:attribute name="name" type="xsl:EQName" use="required"/> <xs:attribute name="as" type="xsl:sequence-type"/> <xs:attribute name="tunnel" type="xsl:yes-or-no"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element>  <xs:annotation> <xs:documentation> PART C: definition of literal result elements There are three ways to define the literal result elements permissible in a stylesheet. (a) do nothing. This allows any element to be used as a literal result element, provided it is not in the XSLT namespace (b) declare all permitted literal result elements as members of the xsl:literal-result-element substitution group (c) redefine the model group xsl:result-elements to accommodate all permitted literal result elements. Literal result elements are allowed to take certain attributes in the XSLT namespace. These are defined in the attribute group literal-result-element-attributes, which can be included in the definition of any literal result element. </xs:documentation> </xs:annotation>  <xs:element name="literal-result-element" abstract="true" type="xs:anyType"/> <xs:attributeGroup name="literal-result-element-attributes"> <xs:attribute name="default-collation" form="qualified" type="xsl:uri-list"/> <xs:attribute name="default-mode" type="xsl:default-mode-type"/> <xs:attribute name="default-validation" type="xsl:validation-strip-or-preserve" default="strip"/> <xs:attribute name="expand-text" type="xsl:yes-or-no"/> <xs:attribute name="extension-element-prefixes" form="qualified" type="xsl:prefixes"/> <xs:attribute name="exclude-result-prefixes" form="qualified" type="xsl:prefixes"/> <xs:attribute name="xpath-default-namespace" form="qualified" type="xs:anyURI"/> <xs:attribute name="inherit-namespaces" form="qualified" type="xsl:yes-or-no" default="yes"/> <xs:attribute name="use-attribute-sets" form="qualified" type="xsl:EQNames" default=""/> <xs:attribute name="use-when" form="qualified" type="xsl:expression"/> <xs:attribute name="version" form="qualified" type="xs:decimal"/> <xs:attribute name="type" form="qualified" type="xsl:EQName"/> <xs:attribute name="validation" form="qualified" type="xsl:validation-type"/> </xs:attributeGroup> <xs:group name="result-elements"> <xs:choice> <xs:element ref="xsl:literal-result-element"/> <xs:any namespace="##other" processContents="lax"/> <xs:any namespace="##local" processContents="lax"/> </xs:choice> </xs:group>  <xs:annotation> <xs:documentation> PART D: definitions of simple types used in stylesheet attributes </xs:documentation> </xs:annotation>  <xs:simpleType name="avt"> <xs:annotation> <xs:documentation> This type is used for all attributes that allow an attribute value template. The general rules for the syntax of attribute value templates, and the specific rules for each such attribute, are described in the XSLT 2.1 Recommendation. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:simpleType name="caching-values"> <xs:annotation> <xs:documentation> One of the values "full", "partial", or "no". </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="full"/> <xs:enumeration value="partial"/> <xs:enumeration value="no"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="char"> <xs:annotation> <xs:documentation> A string containing exactly one character. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string"> <xs:length value="1"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="component-kind-type"> <xs:annotation> <xs:documentation> Describes a kind of component within a package. </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="template"/> <xs:enumeration value="function"/> <xs:enumeration value="variable"/> <xs:enumeration value="attribute-set"/> <xs:enumeration value="mode"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="default-mode-type"> <xs:annotation> <xs:documentation> The default-mode attribute of xsl:stylesheet, xsl:transform, xsl:package (or any other xsl:* element): either a QName or #unnamed. </xs:documentation> </xs:annotation> <xs:union memberTypes="xsl:EQName"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="#unnamed"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> <xs:simpleType name="expression"> <xs:annotation> <xs:documentation> An XPath 2.0 expression. </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:pattern value=".+"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="item-type"> <xs:annotation> <xs:documentation> An XPath 2.1 ItemType</xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:pattern value=".+"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="input-type-annotations-type"> <xs:annotation> <xs:documentation> Describes how type annotations in source documents are handled. </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="preserve"/> <xs:enumeration value="strip"/> <xs:enumeration value="unspecified"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="level"> <xs:annotation> <xs:documentation> The level attribute of xsl:number: one of single, multiple, or any. </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="single"/> <xs:enumeration value="multiple"/> <xs:enumeration value="any"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="mode"> <xs:annotation> <xs:documentation> The mode attribute of xsl:apply-templates: either a QName, or #current, or #unnamed, or #default. </xs:documentation> </xs:annotation> <xs:union memberTypes="xsl:EQName"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="#default"/> <xs:enumeration value="#unnamed"/> <xs:enumeration value="#current"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> <xs:simpleType name="modes"> <xs:annotation> <xs:documentation> The mode attribute of xsl:template: either a list, each member being either a QName or #default or #unnamed; or the value #all </xs:documentation> </xs:annotation> <xs:union> <xs:simpleType> <xs:restriction> <xs:simpleType> <xs:list> <xs:simpleType> <xs:union memberTypes="xsl:EQName"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="#default"/> <xs:enumeration value="#unnamed"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> </xs:list> </xs:simpleType> <xs:assertion test="count($value) = count(distinct-values($value))"> <xs:annotation> <xs:documentation>
XTSE0550: It is a static error if the same token is included more than once in the list.
 </xs:documentation> </xs:annotation> </xs:assertion> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="#all"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> <xs:simpleType name="nametests"> <xs:annotation> <xs:documentation> A list of NameTests, as defined in the XPath 2.0 Recommendation. Each NameTest is either a QName, or "*", or "prefix:*", or "*:localname" </xs:documentation> </xs:annotation> <xs:list> <xs:simpleType> <xs:union memberTypes="xsl:EQName"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="*"/> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction base="xs:token"> <xs:pattern value="\i\c*:\*"/> <xs:pattern value="\*:\i\c*"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> </xs:list> </xs:simpleType> <xs:simpleType name="on-multiple-match-type"> <xs:annotation> <xs:documentation> Describes the action to be taken when there are several template rules to match an item in a given mode. </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="use-last"/> <xs:enumeration value="fail"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="on-no-match-type"> <xs:annotation> <xs:documentation> Describes the action to be taken when there is no template rule to match an item in a given mode. </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="deep-copy"/> <xs:enumeration value="shallow-copy"/> <xs:enumeration value="deep-skip"/> <xs:enumeration value="shallow-skip"/> <xs:enumeration value="text-only-copy"/> <xs:enumeration value="fail"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="prefixes"> <xs:list itemType="xs:NCName"/> </xs:simpleType> <xs:simpleType name="prefix-list-or-all"> <xs:union memberTypes="xsl:prefix-list"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="#all"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> <xs:simpleType name="prefix-list"> <xs:list itemType="xsl:prefix-or-default"/> </xs:simpleType> <xs:simpleType name="method"> <xs:annotation> <xs:documentation> The method attribute of xsl:output: Either one of the recognized names "xml", "xhtml", "html", "text", or a QName that must include a prefix. </xs:documentation> </xs:annotation> <xs:union> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="xml"/> <xs:enumeration value="xhtml"/> <xs:enumeration value="html"/> <xs:enumeration value="text"/> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction base="xsl:EQName"> <xs:pattern value="\c*:\c*"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> <xs:simpleType name="pattern"> <xs:annotation> <xs:documentation> A match pattern as defined in the XSLT 2.1 Recommendation. The syntax for patterns is a restricted form of the syntax for XPath 2.0 expressions. Change since XSLT 2.0: Patterns may now match any item (not only nodes) </xs:documentation> </xs:annotation> <xs:restriction base="xsl:expression"/> </xs:simpleType> <xs:simpleType name="prefix-or-default"> <xs:annotation> <xs:documentation> Either a namespace prefix, or #default. Used in the xsl:namespace-alias element. </xs:documentation> </xs:annotation> <xs:union memberTypes="xs:NCName"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="#default"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> <xs:simpleType name="EQNames"> <xs:annotation> <xs:documentation> A list of QNames. Used in the [xsl:]use-attribute-sets attribute of various elements, and in the cdata-section-elements attribute of xsl:output </xs:documentation> </xs:annotation> <xs:list itemType="xsl:EQName"/> </xs:simpleType> <xs:simpleType name="EQName"> <xs:annotation> <xs:documentation>
An extended QName. This schema does not use the built-in type xs:QName, but rather defines its own QName type. This may be either a local name, or a prefixed QName, or a name written using the extended QName notation Q{uri}local

Although xs:QName would define the correct validation on these attributes, a schema processor would expand unprefixed QNames incorrectly when constructing the PSVI, because (as defined in XML Schema errata) an unprefixed xs:QName is assumed to be in the default namespace, which is not the correct assumption for XSLT. The data type is therefore defined as a union of NCName and QName, so that an unprefixed name will be validated as an NCName and will therefore not be treated as having the semantics of an unprefixed xs:QName.
 </xs:documentation> </xs:annotation> <xs:union memberTypes="xs:NCName xs:QName"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:pattern value="Q\{.*\}\i\c*"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> <xs:simpleType name="EQName-in-namespace"> <xs:annotation> <xs:documentation>
A subtype of EQNames that excludes no-namespace names
 </xs:documentation> </xs:annotation> <xs:restriction base="xsl:EQName"> <xs:pattern value="Q\{.+\}.+|\i\c*:.+"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="sequence-type"> <xs:annotation> <xs:documentation> The description of a data type, conforming to the SequenceType production defined in the XPath 2.0 Recommendation </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:pattern value=".+"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="typed-type"> <xs:annotation> <xs:documentation> Describes whether a mode is designed to match typed or untyped nodes. </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="yes"/> <xs:enumeration value="no"/> <xs:enumeration value="strict"/> <xs:enumeration value="lax"/> <xs:enumeration value="unspecified"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="uri-list"> <xs:list itemType="xs:anyURI"/> </xs:simpleType> <xs:simpleType name="validation-strip-or-preserve"> <xs:annotation> <xs:documentation> Describes different ways of type-annotating an element or attribute. </xs:documentation> </xs:annotation> <xs:restriction base="xsl:validation-type"> <xs:enumeration value="preserve"/> <xs:enumeration value="strip"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="validation-type"> <xs:annotation> <xs:documentation> Describes different ways of type-annotating an element or attribute. </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="strict"/> <xs:enumeration value="lax"/> <xs:enumeration value="preserve"/> <xs:enumeration value="strip"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="visibility-type"> <xs:annotation> <xs:documentation> Describes the visibility of a component within a package. </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="public"/> <xs:enumeration value="private"/> <xs:enumeration value="final"/> <xs:enumeration value="abstract"/> <xs:enumeration value="hidden"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="visibility-not-hidden-type"> <xs:annotation> <xs:documentation> Describes the visibility of a component within a package. </xs:documentation> </xs:annotation> <xs:restriction base="xsl:visibility-type"> <xs:enumeration value="public"/> <xs:enumeration value="private"/> <xs:enumeration value="final"/> <xs:enumeration value="abstract"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="yes-or-no"> <xs:annotation> <xs:documentation> One of the values "yes" or "no". </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="yes"/> <xs:enumeration value="no"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="yes-or-no-or-omit"> <xs:annotation> <xs:documentation> One of the values "yes" or "no" or "omit". </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:enumeration value="yes"/> <xs:enumeration value="no"/> <xs:enumeration value="omit"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="zero-digit"> <xs:annotation> <xs:documentation> A digit that has the numerical value zero. </xs:documentation> </xs:annotation> <xs:restriction base="xsl:char"> <xs:pattern value="\p{Nd}"/> <xs:assertion test="matches(string-join(codepoints-to-string(for $i in 0 to 9 return string-to-codepoints($value) + $i), ''), '\p{Nd}{10}')"/> </xs:restriction> </xs:simpleType> </xs:schema>
This specification was developed and approved for publication by the W3C XSL Working Group (WG). WG approval of this specification does not necessarily imply that all WG members voted for its approval.
The chair of the XSL WG is Sharon Adler. The active membership of the XSL WG at the time of publication comprises:
Sharon Adler (Chair)
Anders Berglund
Oliver Becker
Carine Bournez (W3C team)
Abel Braaksma
Florent Georges
Michael Kay (Editor)
Jirka Kosek
Michael Sperberg-McQueen
Mohamed Zergaoui
The Working Group wishes to acknowledge the contribution of those who have participated in the work at earlier stages, as well as the pioneering work of the developers of STX (see [STX]) which has formed an important intellectual input to the design of XSLT 3.0 and has demonstrated the feasibility of creating a streaming transformation language based on the core XSLT concept of recursive descent of the source tree using rule-based templates.
A stylesheet may now consist of multiple packages. The language specification for packages has been designed with a view to allowing packages to be compiled independently of each other. The specification provides control over the interface offered by a package to other packages; in particular it allows functions, variables, named templates and other components to be declared as public, private, final, or abstract.
A new xsl:mode
declaration is added.
A mode may be declared to be streamable, and rules are given that constrain what the template rules in a streamable mode can do.
The xsl:mode
declaration may contain an xsl:context-item
element
to declare the expected type of the initial context
item when this mode is the initial mode.
An xsl:mode
declaration
may define the action to be taken when there is no matching
template rule, and the action to be taken when there are multiple
matching template rules.
An xsl:mode
declaration
may indicate that the template rules in a given mode are designed
to process typed (schema-validated) nodes only, or untyped nodes
only. It may also indicate that element names appearing in match
patterns for the mode are only to match elements in the source
document that have been validated against the corresponding element
declarations in the schema.
A default mode can be declared for a stylesheet module, making it easier to reuse existing stylesheet modules to construct a composite stylesheet.
Several new instructions are introduced with the aim of making it easier to write streamable transformations, although most of these instructions can also be used without streaming:
The xsl:stream
instruction is provided specifically to read and process an input
document using streaming.
The xsl:iterate
instruction allows iterative processing of a sequence, with the
ability for the processing of one item to depend on the results of
processing of previous items, and with the ability to terminate the
iteration before all the items in the sequence have been
processed.
The xsl:merge
instruction allows several input sequences to be merged into a
single output sequence, based on the value of a merge key.
The xsl:fork
instruction allows multiple results to be computed during a single
pass of a streamed input document.
The xsl:sequence
instruction can now contain a sequence constructor as an
alternative to using the select
attribute. This is
primarily for use cases involving xsl:fork
.
Other changes introduced to facilitate the writing of streamable stylesheets include:
The new top-level declaration xsl:accumulator
is
introduced. An accumulator represents information about a node in a
document that can be computed during a streamed pass over the
document, starting at the start and ending at that node.
An [xsl:]on-empty
attribute is provided for
xsl:element
, xsl:copy
, xsl:attribute
, and literal
result elements, to control their behavior when the content of the
constructed node would otherwise be empty.
New functions copy-of
and snapshot
are
provided, to enable streaming applications to operate in
"windowing" mode, where the input document is divided into a
sequence of small subtrees processed one at a time.
Some further new instructions are provided, unrelated to streaming:
The xsl:try
instruction
allows recovery from dynamic errors.
A new xsl:evaluate
instruction is provided, to allow evaluation of XPath expressions
constructed dynamically from strings, or read from a source
document.
The xsl:assert
instruction allows arbitrary assertions about the state of
variables or the input document, improving testability and
robustness.
Text nodes within a sequence constructor may now contain
text value templates (XPath
expressions enclosed in curly brackets), if this is enabled by
setting expand-text="yes">
on an enclosing
element.
The syntax of patterns has been generalized. Patterns may now
match any item (not only nodes). In consequence, xsl:apply-templates
can
now process sequences of atomic values as well as nodes, and
xsl:for-each-group
with
the group-starting-with
and
group-ending-with
options can also process atomic
sequences. As a further consequence, the initial context item supplied when
initiating a transformation is no longer required to be a node.
A new datatype, called a map, has been introduced, together with supporting functions, operators, and type syntax. Maps allow more complex data structures to be created than is possible using atomic values and nodes alone. This has particular applications to streamed processing: since a streamed application can visit each node of its primary input document only once, it often needs more advanced data structures to retain what it has already seen in the document.
Miscellaneous changes to existing instructions and declarations include:
The regular expression supplied to the xsl:analyze-string
instruction is now permitted to be one that matches a zero-length
string.
The xsl:copy
instruction now has a select
attribute, which is
convenient when it is used inside a function where there is no
context item.
Composite keys are supported in xsl:for-each-group
.
Two new attributes have been added to xsl:function
to provide
increased scope for optimization: identity-sensitive
and cache
. The first indicates whether the identity of
nodes passed in the arguments or result of the function is
significant; the second indicates whether the function is to cache
its results (memoization).
The override
attribute of xsl:function
is renamed
override-extension-function
, retaining the old name as
a deprecated synonym.
The rule requiring xsl:import
declarations to
precede all other declarations in a stylesheet module has been
removed.
Composite keys are supported in xsl:key
.
A new attribute on xsl:message
allows
specification of the error code to be returned with
terminate="yes"
is specified.
The rules for handling conflicts between xsl:strip-space
and
xsl:preserve-space
have changed. A conflict that can be detected statically is now
signaled as a static error; a run-time conflict between two
declarations having the same precedence and priority is now
resolved by taking whichever comes last in declaration order.
An xsl:template
declaration may contain an xsl:context-item
element
to declare the required type of the context item when the template
is called.
An empty xsl:value-of
instruction with
no select
attribute is now permitted; its effect is to
construct a zero-length text node.
The xsl:variable
and xsl:param
elements
may now specify static="yes"
, denoting that the
variable is available statically (informally, "at compile time").
Static variables and parameters make the
[xsl:]use-when
mechanism more useful, especially in
conjunction with xsl:assert
.
New functions are available to import and export data in JSON format.
A basic XSLT Processor now recognizes all the built-in types defined in XML Schema.
A basic XSLT Processor will now accept
the attribute validation="lax"
and interpret it in the
same way as a schema-aware processor when there is no schema
component available to perform the validation.
Some functions, including generate-id
FO30,
format-date
FO30,
format-dateTime
FO30,
format-number
FO30, format-time
FO30,
and
unparsed-text
FO30 have been
moved from this specification to the core Functions and Operators
specification, to make them available in other host languages.
The rule that effectively prevented references to external
documents in [xsl:]use-when
expressions has been
removed.
A default value is defined for the named template to be used
when initiating a transformation (specifically,
xsl:initial-template
).
Serialization to HTML5 and XHTML5 is supported. To this end, a
new serialization parameter html-version
is provided
in xsl:output
and
xsl:result-document
.
The concept of recoverable dynamic errors has been dropped. Of
the remaining recoverable dynamic errors, some are no longer
errors, and others are now situations where the behavior of the
processor is implementation-dependent.
The adjective "non-recoverable" in describing other dynamic errors
becomes redundant and has therefore been dropped (the term was in
any case misleading since the introduction of a try/catch
mechanism). Error codes of the form XTREnnnn
have been
renumbered XTDEnnnn
.
Dynamic errors occurring during pattern evaluation are always masked (they cause the pattern to report a non-match.)
The new serialization parameter html-version
is
supported in xsl:output
and xsl:result-document
.
Note that the item-separator
attribute is not
available in XSLT because the value that is serialized by XSLT is
always a singleton document node.
A family of collation URIs is defined for selecting collations based on the Unicode Collation Algorithm.
Serialization parameters can now be specified in an external parameter document.
The effect of specifying the type xs:untyped
or
xs:untypedAtomic
when validating by type is now
defined.
The xsl:output
and
xsl:result-document
elements now allow a parameter-document
attribute
allowing serialization to be configured in an external
document.
The set of constructs that set temporary output
state has been reduced, and no longer includes instructions
that create nodes, such as xsl:attribute
and xsl:value-of
. However,
xsl:merge-key
has
been added to the list.
The possibilities for invocation of a stylesheet have been expanded; they now include the ability to directly execute a stylesheet function; to supply parameters to the initial template; and to return the results of the invoked template or function as a raw value, without construction of a result tree.
A number of changes affecting XSLT 2.0 have been made in other related specifications. Some of the more significant changes are as follows:
A number of new functions have been defined whose aim is to
facilitate streaming. These include
unparsed-text-lines
FO30,
innermost
FO30,
outermost
FO30.
XPath 3.0 supports a subset of the let
expression
from XQuery.
XPath 3.0 supports function items as first-class values (functions can, for example, be bound to variables and passed as parameters to other functions.)
XPath 3.0 supports a new syntax for writing expanded names using
the namespace URI and local part only, avoiding the need to create
a static context that binds namespace prefixes. This is intended to
be particularly useful when XPath expressions are
software-generated. Complementing this, a new function path
FO30
is available to generate a (namespace-context-independent) path to
any node that can subsequently be evaluated using the xsl:evaluate
instruction, or
otherwise.
This section lists all significant changes since the Working Draft published on 10 July 2012.
Text nodes within a sequence constructor may now contain
text value templates (XPath
expressions enclosed in curly brackets), if this is enabled by
setting expand-text="yes">
on an enclosing
element.
An empty xsl:value-of
instruction with
no select
attribute is now permitted; its effect is to
construct a zero-length text node.
Static variables and parameters are introduced, to make the
[xsl:]use-when
mechanism more useful, especially in
conjunction with xsl:assert
.
The rule requiring xsl:import
declarations to
precede all other declarations in a stylesheet module has been
removed.
The rule that effectively prevented references to external
documents in [xsl:]use-when
expressions has been
removed.
The enabled
attribute of xsl:assert
is removed; its
effect can now be achieved more conveniently using a
use-when
attribute.
A default value is defined for the named template to be used
when initiating a transformation (specifically,
xsl:initial-template
).
The override
attribute of xsl:function
is renamed
override-extension-function
, retaining the old name as
a deprecated synonym.
The rules for conformance against optional features have been refactored.
(In the July 2012 draft but omitted from the change list): The
xsl:sequence
instruction can now contain a sequence constructor as an
alternative to using the select
attribute. This is
primarily for use cases involving xsl:fork
.
A new attribute with-params
is provided on xsl:evaluate
, to allow
parameters to be computed dynamically in the form of a map. This
works alongside the existing mechanism using xsl:with-param
children.
The concept of recoverable dynamic errors has been dropped. Of
the remaining recoverable dynamic errors, some are no longer
errors, and others are now situations where the behavior of the
processor is implementation-dependent.
The adjective "non-recoverable" in describing other dynamic errors
becomes redundant and has therefore been dropped (the term was in
any case misleading since the introduction of a try/catch
mechanism). Error codes of the form XTREnnnn
have been
renumbered XTDEnnnn
.
The new serialization parameters html-version
and
item-separator
are supported in xsl:output
and xsl:result-document
.
Two new attributes have been added to xsl:function
to provide
increased scope for optimization: identity-sensitive
and cache
.
A family of collation URIs is defined for selecting collations based on the Unicode Collation Algorithm.
The on-empty
attribute of xsl:copy
is no longer ignored in
cases where the selected node is not a document or element
node.
Serialization parameters can now be specified in an external parameter document.
The effect of specifying the type xs:untyped
or
xs:untypedAtomic
when validating by type is now
defined.
Maps no longer have an associated collation. In its place, a new
collation-key
function is introduced to allow key values to be normalized
according to the rules of a given collation.
The syntax for patterns has been rewritten. The grammar is now
closely aligned with the XPath 3.0 grammar, so that it can be
readily verified that the grammar is a subset of XPath, and that
there are no needless restrictions (this was necessary to fix some
bugs in this area). The type-based syntax ~typename
used in earlier drafts was found not to be well-aligned with
practical use cases for matching atomic values, and has been
replaced by the construct .[ Expr ]
which tests the
item using an arbitrary boolean expression.
Accumulators are now classified as components for the purpose of
defining packages; in addition, the rules for overriding them using
xsl:import
are now
defined. The name
and initial-value
attributes of an accumulator are now mandatory.
The regular expression supplied to the xsl:analyze-string
instruction is now permitted to be one that matches a zero-length
string.
The xsl:output
and
xsl:result-document
elements now allow a parameter-document
attribute
allowing serialization to be configured in an external
document.
The xsl:evaluate
instruction has been made part of an optional feature, the dynamic
evaluation feature.
Dynamic errors occurring during pattern evaluation are always masked (they cause the pattern to report a non-match.)
Stylesheet parameters that specify required="yes"
must have visibility equal to public
.
The meaning of on-no-match="deep-skip"
has been
changed when the selected node is a document node; in this case it
is now equivalent to shallow-skip
.
Redundant parentheses at the outermost level of a pattern in a template rule now have no effect on the semantics: they do not affect the default priority, and they do not prevent the branches of a union being effectively treated as separate template rules.
The method for invoking accumulator functions has changed;
instead of user-defined functions, there are now two built-in
functions accumulator-before
and
accumulator-after
that
take the accumulator name as an argument.
The attributes default-collation
and
default-mode
can now be specified on any element.
The attribute initial
on xsl:mode
is dropped, as the same
effect can be achieved using the visibility
attribute.
It is now a dynamic error for a map expression or an xsl:map
instruction to generate
duplicate keys.
There has been a substantial rewrite of section 19 Streamability. Some of the changes
are to relax restrictions on streamability that were found to be a
nuisance; others are to fix errors in the analysis rules that meant
some constructs (such as the copy-of
function) could not
effectively be used for their intended purpose. Other changes are
simply for clarity or conciseness of exposition. The new concept of
posture
reintroduces (under a different guise) the path analysis that was
described in graphical terms in an earlier working draft.
References to ECMA-262 (for the specification of JSON) have been replaced with references to ECMA-404.
Attributes validation
and type
have
been added to the xsl:stream
instruction to
control schema-validation of streamed input documents.
The process of initiating a stylesheet is revised to allow applications to invoke public functions as well as public template rules, to allow parameters to the initial template or function to be supplied, and to get the "raw result" of invoking a public template or function, without the result being wrapped into a result tree.
The syntax for map expressions has changed to use colon
(:
) as the separator between key and value, rather
than :=
.
This section lists all known incompatibilities with XSLT 2.0,
that is, situations wher a stylesheet that is error-free according
to the XSLT 2.0 specification and where all elements have an
effective version of 2.0
or less, will produce
different results depending on whether it is run under an XSLT 2.0
processor or an XSLT 3.0 processor.
XSLT 2.0 gave implementations freedom what to do when a node
selected by xsl:apply-templates
matched more than one template rule. XSLT 3.0 is more
prescriptive in this situation. The behavior prescribed in XSLT 3.0
(selecting the template rule that is last in declaration order) is compatible with
the action of some XSLT 2.0 processors but not necessarily
others.
It is now a static error if the same NameTest
appears in both an xsl:strip-space
and an
xsl:preserve-space
declaration with the same precedence and priority. Previously this
was a dynamic error, and processors were allowed to recover from
the error.
The current group and current grouping key are now absent rather than empty when not in use, which means that attempting to refer to them in this state gives a dynamic error.
As a consequence of functions such as format-date
FO30
moving from this specification to [Functions and Operators], error codes
associated with these functions have changed.
The concept of recoverable dynamic errors has been dropped. Of
the remaining recoverable dynamic errors, some are no longer
errors, and others are now situations where the behavior of the
processor is implementation-dependent.
Error codes of the form XTREnnnn
have been renumbered
XTDEnnnn
.
In previous versions of the specification, the element-available
function when applied to names in the XSLT namespace was defined to
return false
in the case of XSLT elements other than
instructions. (Actual practise in implementations was not always
consistent with this rule). In XSLT 3.0 the rules have been changed
so that it returns true
for the names of such
elements, bringing the specification of the function into line with
the intuitive meaning of its name.
(This is not strictly speaking an incompatibility, as conforming XSLT 2.0 stylesheets will continue to function correctly without error. It can be considered as migration advice, a warning that care is needed when introducing new XSLT 3.0 features.)
When a function or template has a parameter with a declared type
of item()
, it should not assume (as it could in XSLT
2.0) that when the supplied item is not a node, it must be an
atomic value, and vice versa. In XSLT 3.0 there is a third option:
it might be a function. Functions and templates that fail to cater
for this possibility may fail with a type error if the caller
supplies a function as the relevant parameter value.


Table with only a tbody element
| Germany | France | England |
| Berlin | Paris | London |
| Hamburg | Marseille | Manchester |
Table with thead (bold) and tbody elements
Berlin |
Paris |
London |
| Hamburg | Marseille | Manchester |
| Germany | France | England |
|---|
Table with thead (bold), tbody and tfoot (italic) elements
| Germany | France | England |
|---|---|---|
| Berlin | Paris | London |
| Hamburg | Marseille | Manchester |


SequenceExecutor
class SequenceExecutor
This class executes the sequence passed by the constructor.
SequenceMaker
abstract class SequenceMaker
An abstract maker for creating a sequence.
SequenceStep
class SequenceStep
This class is the definition of a single step.


|
i-ChingPeople have a tendency to lump the i-Ching in with fortune-telling systems such as the Tarot, Palmistry or Astrology. And, to be fair, there are some passing similarities, in the same way that a Fisher-Price toy airplane has a passing similarity to a stealth bomber — it's not just a matter of scale, it's also the question of whether it flies.i-Ching is an ancient Chinese text whose name translates as "The Book of Changes." Although it's commonly used for divination or fortune-telling, that's not its primary purpose. Some people argue that it's strictly a philosophical text, but they're also missing the point. It's difficult to pin the i-Ching down to just one word, topic or field. But it's got more in common with physics than fortune cookies. i-Ching is about 4,000 years old, give or take 1,000. Legend states it was written by a man named Lao Tsu, which is good enough for a Jeopardy answer, but probably not literally correct. Then again, who knows. After about 3,000 years of history, things start to get fuzzy. The Book of Changes is based around a geometric construction called a hexagram, which consists of six horizontal lines stacked vertically. Each line is either a solid line, representing yang or a broken line, representing yin. The first religion to outline the qualities of yin and yang was Taoism, although the principles have subsequently been adopted by Buddhism, some branches of Hinduism and tattoo lovers everywhere. Yin is primarily characterized as flexibility, while yang is taken to be firmness. Over the course of centuries, these qualities have expanded to encompass a fairly lengthy set of descriptive metaphors, including:
All these may be useful for examining various elements of philosophy and components of the i-Ching itself, but they're mostly just revisionist tinkering with the original concepts. The main points to remember here are firmness and flexibility. If you take the six lines of the hexagram, and factor in the yin and yang qualities of each line, you get a total of 64 possible combinations, each made up of a pair of trigrams with one of eight symbolic elemental associations — fire, lake, earth, thunder, water, wind, sky and mountain (the exact symbol used will vary wildly depending on who you talk to). The actual Book of Changes itself is a dictionary of the meaning of each of the hexagrams. While it varies from translation to translation, the passages typically go something like this:
35. Advance Advancing, a securely established lord presents many horses and grants audience three times a day.And so on. Now, you're probably thinking that this doesn't sound very accessible, and why should it? Based on the best estimate of the Rotten.com user profile, you're probably not a Taoist (which would be very helpful to you in grokking the above). Plus the book was written 3,000 years ago. In light of this, there are people who believe that the best way to handle the i-Ching is to boil it down to something that you might get for a penny from a machine that also tells your weight. Something like this:
28. Ta Kuo (Preponderance of the Great)While this all seems pretty basic and not dissimilar from a divination system like the Tarot, in which each card has a proscribed meaning, there's actually a lot more to the i-Ching than immediately meets the eye. For starters, the hexagram system of the i-Ching is actually the first recorded binary system of counting in history. Since we're working with yins and yangs here, it's pretty easy to see how that translates into ones and zeros. The binary interpretation of the i-Ching opens up a can of worms — or fifty. For one thing, the system immediately falls into correspondence with the elaborate system of circuits and chips you are using to read this page, which is structured around multiples of 8, 16, 32, 48 and 64. For another thing, there just happen to be 64 "codons," or nodes of information, in the DNA which makes up your personal wetware. The mathematical qualities of the i-Ching are extraordinarily complex and subtle, so they lend themselves to creative arrangements. A LOT of books have been written on this subject, dating back to about 800 B.C. and continuing right up through last week. The arrangements all seem to have a certain elegance about them, and usually they can be tied to the actual meanings of the hexagrams, which encourages yet more experimentation with the layout. When people first started noting these qualities of the system in the '70s or thereabouts (the binary part was noticed earlier), there was a groundswell of excitement among the outer fringes of the scientific community, and many people rushed to start cataloging the ways that the i-Ching corresponded to the physical world. While no one's picked up a Nobel prize for such an investigation yet, there's still a lot of people working on it, to varying degrees of scientific and/or pop literature success. The reason the i-Ching works so well in analyzing physical systems is that, at its heart, the book really sets out to provide a model of system processes. By counterbalancing firmness and flexibility in varying quantities and with line positions that each represent a state of time and/or space, the hexagrams were actually originally meant to model the process of how change takes place. When you boil physical properties down to their most basic sorts of quantities, at the atomic, genetic or even the Quantum Physics levels, things tend toward the binary, and firmness versus flexibility can be stretched around most of the defined states you encounter. A particle exists (yang) or there is empty space (yin). A particle has position (yang) or momentum (yin). A particle is energetic (yang) or static (yin). The i-Ching trigrams each represent a broad process or quality; the hexagrams represent the mix and interplay of the eight basic processes. Interpretations of the hexagrams like those above are, when read very literally, a detailed analysis of how these binary quantities (lines) move into the processes (trigrams) and then into a system (hexagrams). So in any given situation, you can pick it apart in detail, break it down for the meanings of each line and trigram, and assign yin and yang to each line based on your evaluation of the facts. The resulting hexagram is intended to provide insight into the process of which you are a part.  Naturally, virtually no one wants to be bothered with going to all that trouble. That's where the fortune-telling comes into it. In lieu of a long, strenuous quest for thoughtful self-knowledge, the general practice is to randomly select a hexagram and just kind of assume it's meant to reflect your life, perhaps thanks to the vagaries of chaos theory (the i-Ching is frequently lumped in with chaos theory, in books like "The Tao of Chaos" and deranged head trips like those of Terence McKenna). There are several methods by which one can apparently invite chaos theory into one's parlor. The easiest is that you go buy a copy of the i-Ching and randomly open it to a page. Then you read what's on the page and apply it to your life and/or your expectations for the immediate future. The next most common method is using coins. You toss three coins, with heads representing yang and tails representing yin (or vice versa if you feel like it). Majority rules. For those interested in authenticity, you can go down to any New Age shop and pick up some genuine "i-Ching coins," but pennies will do. Advanced users can also employ this method to figure out "transforming lines." When you have two heads and one tails, it's considered yang transforming into yin and yields a few additional lines of text. The absolute most authentic traditional approach, for the purists out there, is to pull yarrow stalks out of a bag. Yarrow is a Chinese plant with stalks. The yarrow sticks are marked for yin and yang, and you arrange them into a hexagram. Presto! You have a reading. The absolute least authentic approach, but one which is from a pure theory standpoint no worse than any other, is using a Web site to select your i-Ching text. In addition to being the second easiest approach, it saves you the trouble of flipping through one of those oh-so-retro "books" your grandfather is always going on about (if you don't mind settling for the worst of all possible translations). Technically, the i-Ching is not set up to tell you anything about your future, as even a casual reading of the text will quickly establish. It's more of a cosmic conscience, advising you on the correct way to live your life, based on your current circumstance. Depending on the translation, this advice comes in Taoist and Buddhist flavors, as well as in a blandified sugar-laden New Age variety. The fact that it's not supposed to be used to tell the future doesn't mean squat of course.  And lots of people do it. In fact, they've been doing it almost since the book was written, so (as the i-Ching itself would say) there is no blame. It's more intellectually sound than a palm-reading, and it's only a wee little bit crass, so knock yourself out.


I have a background in production, went to school for cinematography, but it soon became a hobby instead of a career path. I have since decided that I would like to pursue a career in programming.
Most of my family works in the tech industry, and they are all programmers except for one.
I was motivated to start Epicodus because of this, I think that the logic behind programming appeals to me much more than other careers do.
I studied motion graphics and animation for some time.
I soon after switched my studies to cinematography when I realized I liked to be the one in control of the camera. I then started a small buisness with a buisness partner and we began video production locally in Portland.
I am skilled in multiple programs involved with production, including the Adobe Suite.