The following associated resources are available: Specification in XML format, XSD 1.1 Schema for XSLT 4.0 Stylesheets (non-normative), Relax-NG Schema for XSLT 4.0 Stylesheets (non-normative), Stylesheet for XML-to-JSON conversion (non-normative)
Copyright © 2026 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark and document use rules apply.
This specification defines the syntax and semantics of XSLT 4.0, a language designed primarily for transforming XML documents into other XML documents.
XSLT 4.0 is a revised version of the XSLT 3.0 Recommendation [XSLT 3.0] published on 8 June 2017. Changes are presented in 1.2 What’s New in XSLT 4.0?.
XSLT 4.0 is designed to be used in conjunction with XPath 4.0, which is defined in [XPath 4.0]. XSLT shares the same data model as XPath 4.0, which is defined in [XDM 3.0], and it uses the library of functions and operators defined in [Functions and Operators 4.0]. XPath 4.0 and the underlying function library introduce a number of enhancements, for example the availability of union and record types.
This document contains hyperlinks to specific sections or definitions within other documents in this family of specifications. These links are indicated visually by a superscript identifying the target specification: for example XP for XPath 4.0, DM for the XDM data model version 4.0, FO for Functions and Operators version 4.0.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.
This document has no official standing. It is produced by the editor as a proposal for community review. Insofar as it copies large amounts of text from the W3C XSLT 3.0 Recommendation, W3C copyright and similar provisions apply.
The publications of this community group are dedicated to our co-chair, Michael Sperberg-McQueen (1954–2024).
Template rules define the processing that can be applied to items that match a particular pattern.
[Definition: A mode is a set of template rules; when the xsl:apply-templates instruction selects a set of items for processing, it identifies the rules to be used for processing those items by nominating a mode, explicitly or implicitly.] Modes allow a node in a source tree (for example) to be processed multiple times, each time producing a different result. They also allow different sets of template rules to be active when processing different trees, for example when processing documents loaded using the document function (see 20.1 fn:document).
Modes are identified by an expanded QName; in addition to any named modes, there is always one unnamed mode available. Whether a mode is named or unnamed, its properties may be defined in an xsl:mode declaration. If a mode name is used (for example in an xsl:template declaration or an xsl:apply-templates instruction) and no declaration of that mode appears in the stylesheet, the mode is implicitly declared with default properties.
The xsl:mode declaration acquires an attribute as="sequence-type" which declares the return type of all template rules in that mode. [Issue 750 PR 751 16 October 2023]
The xsl:mode declaration acquires an attribute copy-namespaces which determines whether or not the built-in template rule copies unused namespace bindings. [Issue 1724 13 April 2025]
<!-- Category: declaration -->
<xsl:mode
name? = eqname
as? = sequence-type〔'item()*'〕
streamable? = boolean〔'no'〕
use-accumulators? = tokens〔''〕
on-no-match? = "deep-copy" | "shallow-copy" | "shallow-copy-all" | "deep-skip" | "shallow-skip" | "text-only-copy" | "fail"〔'text-only-copy'〕
on-multiple-match? = "use-last" | "fail"〔'use-last'〕
warning-on-no-match? = boolean
warning-on-multiple-match? = boolean
typed? = boolean | "strict" | "lax" | "unspecified"〔'unspecified'〕
copy-namespaces? = boolean〔'yes'〕
visibility? = "public" | "private" | "final"〔'private'〕 >
<!-- Content: (xsl:template*) -->
</xsl:mode>
[Definition: The unnamed mode is the default mode used when no mode attribute is specified on an xsl:apply-templates instruction or xsl:template declaration, unless a different default mode has been specified using the [xsl:]default-mode attribute of a containing element.]
Every mode other than the unnamed mode is identified by an expanded QName.
A stylesheet may contain multiple xsl:mode declarations and may include or import stylesheet modules that also contain xsl:mode declarations. The name of an xsl:mode declaration is the value of its name attribute, if any.
[Definition: All the xsl:mode declarations in a package that share the same name are grouped into a named mode definition; those that have no name are grouped into a single unnamed mode definition.]
The declared-modes attribute of the xsl:package element determines whether implicit mode declarations are allowed, as described in 3.5.4.1 Requiring Explicit Mode Declarations. If the package allows implicit mode declarations, then if a stylesheet does not contain a declaration of the unnamed mode, a declaration is implied equivalent to an xsl:mode element with no attributes. Similarly, if there is a mode that is named in an xsl:template or xsl:apply-templates element, or in the [xsl:]default-mode attribute of a containing element, and the stylesheet does not contain a declaration of that mode, then a declaration is implied comprising an xsl:mode element with a name attribute equal to that mode name, plus the attribute visibility="private".
The attributes of the xsl:mode declaration establish values for a number of properties of a mode. The allowed values and meanings of the attributes are given in the following table.
| Attribute | Values | Meaning | ||||
|---|---|---|---|---|---|---|
| name | An EQName | Specifies the name of the mode. If omitted, this xsl:mode declaration provides properties of the unnamed mode | ||||
| as | A SequenceType | Declares the type of value returned by all template rules in this mode. If any template rules in this mode declare their return type using an as attribute on xsl:template, the values must be consistent. | ||||
| streamable | yes or no (default no) | Determines whether template rules in this mode are to be capable of being processed using streaming. If the value yes is specified, then the body of any template rule that uses this mode must conform to the rules for streamable templates given in 6.7.6 Streamable Templates. | ||||
| use-accumulators | List of accumulator names, or #all (default is an empty list) | Relevant only when this mode is the initial mode of the transformation, determines which accumulators are applicable to documents containing nodes in the initial match selection. For further details see 18.2.2 Applicability of Accumulators. | ||||
| on-no-match | One of deep-copy, shallow-copy, deep-skip, shallow-skip, text-only-copy or fail (default text-only-copy) | Determines selection of the built-in template rules that are used to process an item when an xsl:apply-templates instruction selects an item that does not match any user-written template rule in the stylesheet. For details, see 6.8 Built-in Template Rules. | ||||
| on-multiple-match | One of fail or use-last (default use-last) | Defines the action to be taken when xsl:apply-templates is used in this mode and more than one user-written template rule is available to process an item, each having the same import precedence and priority. The value fail indicates that it is a dynamic error if more than one template rule matches an item. The value use-last indicates that the situation is not to be treated as an error (the last template in declaration order is the one that is used). | ||||
| warning-on-no-match | One of yes or no. The default is implementation-defined | Requests the processor to output (or not to output) a warning message in the case where an xsl:apply-templates instruction selects an item that matches no user-written template rule. The form and destination of such warnings is implementation-defined. The processor may ignore this attribute, for example if the environment provides no suitable means of communicating with the user. | ||||
| warning-on-multiple-match | One of yes or no. The default is implementation-defined | Requests the processor to output a warning message in the case where an xsl:apply-templates instruction selects an item that matches multiple template rules having the same import precedence and priority. The form and destination of such warnings is implementation-defined. The processor may ignore this attribute, for example if the environment provides no suitable means of communicating with the user. | ||||
| typed | One of yes, no, strict, lax, or unspecified. The default is unspecified. | See 6.7.3 Declaring the Type of Nodes Processed by a Mode. | ||||
| copy-namespaces | One of yes or no. The default is yes. | If on-no-match is shallow-copy, shallow-copy-all, or deep-copy, this attribute determines the effective value of the copy-namespaces attribute on the implicit xsl:copy or xsl:copy-of instruction in the built-in template rule (see 6.8 Built-in Template Rules). In other cases it is ignored, apart from checking that its value is valid. | ||||
| visibility | One of public, private, or final. The default is private. | See 3.5.3.1 Visibility of Components. If the mode is unnamed, that is, if the name attribute is absent, then the visibility attribute if present must have the value private.
| ||||
[Definition: A streamable mode is a mode that is declared in an xsl:mode declaration with the attribute streamable="yes".]
For any named mode, the effective value of each attribute is taken from an xsl:mode declaration that has a matching name in its name attribute, and that specifies an explicit value for the required attribute. If there is no such declaration, the default value of the attribute is used. If there is more than one such declaration, the one with highest import precedence is used.
For the unnamed mode, the effective value of each attribute is taken from an xsl:mode declaration that has no name attribute, and that specifies an explicit value for the required attribute. If there is no such declaration, the default value of the attribute is used. If there is more than one such declaration, the one with highest import precedence is used.
[ERR XTSE0545] It is a static error if for any named or unnamed mode, a package explicitly specifies two conflicting values for the same attribute in different xsl:mode declarations having the same import precedence, unless there is another definition of the same attribute with higher import precedence. The attributes in question are the attributes other than name on the xsl:mode element.
When an item is selected by xsl:apply-templates and there is no user-specified template rule in the stylesheet that can be used to process that item, then a built-in template rule is evaluated instead.
The built-in template rules have lower import precedence than all other template rules. Thus, the stylesheet author can override a built-in template rule by including an explicit template rule.
There are seven sets of built-in template rules available. The set that is chosen is a property of the mode selected by the xsl:apply-templates instruction. This property is set using the on-no-match attribute of the xsl:mode declaration, which takes one of the values deep-copy, shallow-copy, shallow-copy-all,deep-skip, shallow-skip, text-only-copy, or fail, the default being text-only-copy. The effect of these seven sets of built-in template rules is explained in the following subsections.
The effect of processing a tree using a mode that specifies on-no-match="deep-copy" is that an unmatched element in the source tree is copied unchanged to the output, together with its entire subtree. Other unmatched items are also copied unchanged. The subtree is copied unconditionally, without attempting to match nodes in the subtree against template rules.
When this default action is selected for a mode M, all items (nodes, atomic items, and functions, including maps and arrays) are processed using a template rule that is equivalent to the following:
<xsl:template match="." mode="M"> <xsl:copy-of select="." validation="preserve" copy-namespaces="CN"/> </xsl:template>
where CN is the value of the copy-namespaces attribute of the relevant xsl:mode declaration, defaulting to yes.
The effect of processing a tree using a mode that specifies on-no-match="shallow-copy" is that the source tree is copied unchanged to the output, except for nodes where different processing is specified using an explicit template rule.
When this default action is selected for a mode M, all items (nodes, atomic items, and functions, including maps and arrays) are processed using a template rule that is equivalent to the following, except that all parameters supplied in xsl:with-param elements are passed on implicitly to the called templates:
<xsl:template match="." mode="M"> <xsl:copy validation="preserve" copy-namespaces="CN"> <xsl:apply-templates select="@*" mode="M"/> <xsl:apply-templates select="node()" mode="M"/> </xsl:copy> </xsl:template>
where CN is the value of the copy-namespaces attribute of the relevant xsl:mode declaration, defaulting to yes.
This rule is often referred to as the identity template, though it should be noted that it does not preserve node identity.
Note:
This rule differs from the traditional identity template rule by using two xsl:apply-templates instructions, one to process the attributes and one to process the children. The only observable difference from the traditional select="node() | @*" is that with two separate instructions, the value of position() in the called templates forms one sequence starting at 1 for the attributes, and a new sequence starting at 1 for the children.
The following stylesheet transforms an input document by deleting all elements named note, together with their attributes and descendants:
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:mode on-no-match="shallow-copy" streamable="true"/> <xsl:template match="note"> <!-- no action --> </xsl:template> </xsl:stylesheet>
The syntax of each XSLT element is summarized below, together with the context in the stylesheet where the element may appear. Some elements (specifically, instructions) are allowed as a child of any element that is allowed to contain a sequence constructor. These elements are:
Model:
Permitted parent elements: |
Category: declaration Model:
Permitted parent elements: |
Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: declaration Model:
Permitted parent elements: |
Category: declaration Model:
Permitted parent elements: |
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Model:
Permitted parent elements: |
Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Model:
|
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Model:
Permitted parent elements: |
Category: declaration Model:
Permitted parent elements: |
Model:
Permitted parent elements: |
Model:
Permitted parent elements: |
Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Model:
|
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Model:
|
Category: instruction Model:
Permitted parent elements:
|
Category: declaration Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Category: declaration instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
Model:
Permitted parent elements: |
Category: instruction Model:
Permitted parent elements:
|
Model:
Permitted parent elements: |
For convenience, schemas are provided for validation of XSLT 4.0 stylesheets using the XSD 1.1 and Relax NG schema languages. These are non-normative. Neither will detect every static error that might arise in an XSLT 4.0 stylesheet (for example, there is no attempt to check the syntax of XPath expressions); in addition, these schemas may reject some stylesheets that are valid, for example because they rely on xsl:use-when to eliminate sections of code that would otherwise be invalid.
The following XSD 1.1 schema describes the structure of an XSLT stylesheet module. There are some limitations:
It does not define all the constraints that apply to a stylesheet (for example, it does not attempt to define a datatype that precisely represents attributes containing XPath expressions).
Stylesheets that use forwards compatible behavior (an [xsl:]version attribute greater than 4.0), or that have sections excluded using [xsl:]use-when attributes, are not required to conform to the schema.
The specification allows xsl:note elements to appear anywhere, but this schema is more restrictive.
A copy of this schema is available at schema-for-xslt40.xsd
Note:
The schema as written uses a lax wildcard to permit literal result elements to appear in a sequence constructor. This assumes that the schema used for validation will not contain any global element declaration that matches the element name of a literal result element. The content model for an element such as invoice appearing within a stylesheet is not the same as the content model for the same element appearing within a source document (it is likely to contain XSLT instructions rather than other elements from the target vocabulary): therefore, including such declarations in the schema used for validating a stylesheet is inappropriate.
The reason that lax validation rather than skip validation is used is so that XSLT instructions appearing as children of the literal result element will themselves be validated, using the appropriate global element declaration.
Note:
The schema uses XSD 1.1 assertions to represent some of the non-grammatical constraints appearing in the specification, for example the rule that some elements can have either a select attribute or a contained sequence constructor, but not both. At this stage, no attempt has been made to represent every such constraint, even where it is not difficult to express the rule. There will always be some constraints that cannot be expressed at all, for example those that require access to multiple stylesheet modules, those that require access to the in-scope schema components, and those that involve parsing a non-regular grammar, such as the grammar for patterns.
Apart from assertions, the only other significant use of XSD 1.1 features is that the elements xsl:param and xsl:variable are in two substitution groups: one containing all instructions, and one containing all declarations. If the schema needs to be converted to an XSD 1.0 schema, removing all assertions is straightforward; the other change needed is to remove xsl:param and xsl:variable from the substitution group for declarations, and instead permit them explicitly as children of xsl:transform.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
targetNamespace="http://www.w3.org/1999/XSL/Transform"
elementFormDefault="qualified"
vc:minVersion="1.1">
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:annotation>
<xs:documentation>
<p>
This is an XSD 1.1 schema for XSLT 4.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.
</p>
<p>
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
</p>
<p>
The schema is organized as follows:
</p>
<ul>
<li>
PART A: definitions of complex types and model groups used as the basis
for element definitions
</li>
<li>
PART B: definitions of individual XSLT elements
</li>
<li>
PART C: definitions for literal result elements
</li>
<li>
PART D: definitions of simple types used in attribute definitions
</li>
</ul>
<p>
The schema has a number of limitations:
</p>
<ul>
<li>
The XSLT specification allows additional elements and attributes to be
present where forwards compatibility is invoked. This schema does not.
</li>
<li>
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.
</li>
<li>
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.
</li>
<li>
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 <code>xsl:call-template</code> has a
declaration). Doing this in general requires cross-document validation,
which is beyond the scope of XSD.
</li>
<li>
The XSLT specification allows <code>xsl:note</code> elements to appear
anywhere, with arbitrary content. This schema does not: for example, it does
not allow <code>xsl:note</code> as a child of an element such as <code>xsl:text</code>
or <code>xsl:strip-space</code>.
</li>
<li>
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.
</li>
</ul>
</xs:documentation>
</xs:annotation>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!--
The declaration of xml:space and xml:lang may need to be commented out because
of problems processing the schema using various tools
-->
<xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
<!--schemaLocation="http://www.w3.org/2001/xml.xsd"-->
<!--
An XSLT stylesheet may contain an in-line schema within an xsl:import-schema element,
so the Schema for schemas needs to be imported. We use the XSD 1.1 version.
-->
<xs:import namespace="http://www.w3.org/2001/XMLSchema"
schemaLocation="http://www.w3.org/TR/xmlschema11-1/XMLSchema.xsd"/>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:annotation>
<xs:documentation>
<p>
PART A: definitions of complex types and model groups used as the basis
for element definitions
</p>
</xs:documentation>
</xs:annotation>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:defaultOpenContent>
<!-- Allow xsl:note anywhere -->
<xs:any processContents="strict"
namespace="##targetNamespace"
notQName="xsl:accept
xsl:accumulator
xsl:accumulator-rule
xsl:analyze-string
xsl:apply-imports
xsl:apply-templates
xsl:array
xsl:assert
xsl:attribute
xsl:attribute-set
xsl:break
xsl:call-template
xsl:catch
xsl:character-map
xsl:choose
xsl:comment
xsl:context-item
xsl:copy
xsl:copy-of
xsl:document
xsl:decimal-format
xsl:element
xsl:evaluate
xsl:expose
xsl:fallback
xsl:for-each
xsl:for-each-group
xsl:fork
xsl:function
xsl:global-context-item
xsl:if
xsl:import
xsl:import-schema
xsl:include
xsl:iterate
xsl:key
xsl:map
xsl:map-entry
xsl:matching-substring
xsl:merge
xsl:merge-action
xsl:merge-key
xsl:merge-source
xsl:message
xsl:mode
xsl:namespace
xsl:namespace-alias
xsl:next-iteration
xsl:next-match
xsl:non-matching-substring
xsl:number
xsl:on-completion
xsl:on-empty
xsl:on-non-empty
xsl:otherwise
xsl:output
xsl:output-character
xsl:override
xsl:package
xsl:param
xsl:perform-sort
xsl:preserve-space
xsl:processing-instruction
xsl:result-document
xsl:sequence
xsl:sort
xsl:source-document
xsl:strip-space
xsl:stylesheet
xsl:switch
xsl:template
xsl:text
xsl:transform
xsl:try
xsl:use-package
xsl:value-of
xsl:variable
xsl:when
xsl:where-populated
xsl:with-param
"/>
</xs:defaultOpenContent>
<xs:complexType name="generic-element-type" mixed="true">
<xs:annotation>
<xs:documentation>
<p>
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.
</p>
</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:attribute name="_default-collation" type="xs:string"/>
<xs:attribute name="_default-mode" type="xs:string"/>
<xs:attribute name="_default-validation" type="xs:string"/>
<xs:attribute name="_exclude-result-prefixes" type="xs:string"/>
<xs:attribute name="_expand-text" type="xs:string"/>
<xs:attribute name="_extension-element-prefixes" type="xs:string"/>
<xs:attribute name="_use-when" type="xs:string"/>
<xs:attribute name="_xpath-default-namespace" type="xs:string"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<xs:complexType name="versioned-element-type" mixed="true">
<xs:annotation>
<xs:documentation>
<p>This complex type provides a generic supertype for all XSLT elements with
the exception of <code>xsl:output</code>; it contains the
definitions of the <code>version</code> attribute that may appear on any element.
</p>
<p>The <code>xsl:output</code> element does not use this definition because, although it
has a <code>version</code> attribute, the syntax and semantics of this attribute are
unrelated to the standard <code>version</code> attribute allowed on other elements.</p>
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="xsl:generic-element-type">
<xs:attribute name="version" type="xs:decimal" use="optional"/>
<xs:attribute name="_version" type="xs:string"/>
</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>
<p>
This complex type provides a generic supertype for all XSLT elements
that allow a sequence constructor as their content.
</p>
</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>
<p>
This complex type allows a sequence constructor and a select attribute.
</p>
</xs:documentation>
</xs:annotation>
<xs:complexContent mixed="true">
<xs:extension base="xsl:sequence-constructor">
<xs:attribute name="select" type="xsl:expression"/>
<xs:attribute name="_select" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="sequence-constructor-or-select">
<xs:annotation>
<xs:documentation>
<p>
This complex type allows a sequence constructor or a select attribute,
but not both.
</p>
</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 | @_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>
<p>
This complex type provides a generic supertype for all XSLT elements
that allow a sequence constructor as their content.
</p>
</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>
<p>
PART B: definitions of individual XSLT elements Elements are listed in
alphabetical order.
</p>
</xs:documentation>
</xs:annotation>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:element name="accept">
<xs:annotation>
<xs:documentation>
<p>This element appears as a child of <code>xsl:use-package</code> 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.</p>
</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:component-tests"/>
<xs:attribute name="visibility" type="xsl:visibility-type"/>
<xs:attribute name="_component" type="xs:string"/>
<xs:attribute name="_names" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
<xs:assert test="exists(@component | @_component)"/>
<xs:assert test="exists(@names | @_names)"/>
<xs:assert test="exists(@visibility | @_visibility)"/>
</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="initial-value" type="xsl:expression"/>
<xs:attribute name="as" type="xsl:sequence-type"/>
<xs:attribute name="streamable" type="xsl:yes-or-no"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_initial-value" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_streamable" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="accumulator-rule">
<xs:complexType>
<xs:complexContent mixed="true">
<xs:extension base="xsl:sequence-constructor-or-select">
<xs:sequence/>
<xs:attribute name="match" type="xsl:pattern"/>
<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="capture" type="xsl:yes-or-no" default="no"/>
<xs:attribute name="_match" type="xs:string"/>
<xs:attribute name="_phase" type="xs:string"/>
<xs:attribute name="_capture" type="xs:string"/>
<xs:assert test="exists(@match | @_match)"/>
</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"/>
<xs:attribute name="regex" type="xsl:avt"/>
<xs:attribute name="flags" type="xsl:avt" default=""/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_regex" type="xs:string"/>
<xs:attribute name="_flags" type="xs:string"/>
<xs:assert test="exists(@select | @_select)"/>
<xs:assert test="exists(@regex | @_regex)"/>
</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="separator" type="xsl:avt"/>
<xs:attribute name="mode" type="xsl:mode"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_separator" type="xs:string"/>
<xs:attribute name="_mode" type="xs:string"/>
<xs:assert test="every $e in subsequence(xsl:sort, 2)
satisfies empty($e/(@stable | @_stable))">
<xs:annotation>
<xs:documentation>
<p>
It is a static error if an <code>xsl:sort</code> element other than the first
in a sequence of sibling <code>xsl:sort</code> elements has a <code>stable</code>
attribute.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="array"
substitutionGroup="xsl:instruction"
type="xsl:sequence-constructor-or-select"/>
<xs:element name="array-member"
substitutionGroup="xsl:instruction"
type="xsl:sequence-constructor-or-select"/>
<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"/>
<xs:attribute name="select" type="xsl:expression"/>
<xs:attribute name="error-code" type="xsl:avt"/>
<xs:attribute name="_test" type="xs:string"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_error-code" type="xs:string"/>
<xs:assert test="exists(@test | @_test)"/>
</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"/>
<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="_name" type="xs:string"/>
<xs:attribute name="_namespace" type="xs:string"/>
<xs:attribute name="_separator" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="exists(@name | @_name)"/>
</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"/>
<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:attribute name="_name" type="xs:string"/>
<xs:attribute name="_streamable" type="xs:string"/>
<xs:attribute name="_use-attribute-sets" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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:attribute name="_errors" type="xs:string"/>
</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"/>
<xs:attribute name="use-character-maps" type="xsl:EQNames" default=""/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_use-character-maps" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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="absent"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_use" type="xs:string"/>
</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="_select" type="xs:string"/>
<xs:attribute name="_copy-namespaces" type="xs:string"/>
<xs:attribute name="_inherit-namespaces" type="xs:string"/>
<xs:attribute name="_use-attribute-sets" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</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"/>
<xs:attribute name="copy-accumulators" type="xsl:yes-or-no" default="no"/>
<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:attribute name="_select" type="xs:string"/>
<xs:attribute name="_copy-accumulators" type="xs:string"/>
<xs:attribute name="_copy-namespaces" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="exists(@select | @_select)"/>
</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:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</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-optionally-expanded" default="."/>
<xs:attribute name="grouping-separator" type="xsl:char-optionally-expanded" default=","/>
<xs:attribute name="infinity" type="xs:string" default="Infinity"/>
<xs:attribute name="minus-sign" type="xs:string" default="-"/>
<xs:attribute name="exponent-separator" type="xsl:char-optionally-expanded" default="e"/>
<xs:attribute name="NaN" type="xs:string" default="NaN"/>
<xs:attribute name="percent" type="xsl:char-optionally-expanded" default="%"/>
<xs:attribute name="per-mille" type="xsl:char-optionally-expanded" 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:attribute name="_name" type="xs:string"/>
<xs:attribute name="_decimal-separator" type="xs:string"/>
<xs:attribute name="_grouping-separator" type="xs:string"/>
<xs:attribute name="_infinity" type="xs:string"/>
<xs:attribute name="_minus-sign" type="xs:string"/>
<xs:attribute name="_exponent-separator" type="xs:string"/>
<xs:attribute name="_NaN" type="xs:string"/>
<xs:attribute name="_percent" type="xs:string"/>
<xs:attribute name="_per-mille" type="xs:string"/>
<xs:attribute name="_zero-digit" type="xs:string"/>
<xs:attribute name="_digit" type="xs:string"/>
<xs:attribute name="_pattern-separator" type="xs:string"/>
</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"/>
<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="_name" type="xs:string"/>
<xs:attribute name="_namespace" type="xs:string"/>
<xs:attribute name="_inherit-namespaces" type="xs:string"/>
<xs:attribute name="_use-attribute-sets" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</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"/>
<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:attribute name="_xpath" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_base-uri" type="xs:string"/>
<xs:attribute name="_context-item" type="xs:string"/>
<xs:attribute name="_namespace-context" type="xs:string"/>
<xs:attribute name="_schema-aware" type="xs:string"/>
<xs:attribute name="_with-params" type="xs:string"/>
<xs:assert test="exists(@xpath | @_xpath)"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="expose">
<xs:annotation>
<xs:documentation>
<p>This element appears as a child of <code>xsl:use-package</code> and defines
the visibility of components that are made available (or not) by this package
to other using packages.</p>
</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:component-tests"/>
<xs:attribute name="visibility" type="xsl:visibility-not-hidden-type"/>
<xs:attribute name="_component" type="xs:string"/>
<xs:attribute name="_names" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
</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"/>
<xs:attribute name="separator" type="xsl:avt"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_separator" type="xs:string"/>
<xs:assert test="every $e in subsequence(xsl:sort, 2)
satisfies empty($e/(@stable | @_stable))">
<xs:annotation>
<xs:documentation>
<p>
It is a static error if an <code>xsl:sort</code> element other than the first
in a sequence of sibling <code>xsl:sort</code> elements has a <code>stable</code>
attribute.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="exists(@select | @_select)"/>
</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"/>
<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="split-when" type="xsl:expression"/>
<xs:attribute name="composite" type="xsl:yes-or-no"/>
<xs:attribute name="collation" type="xsl:avt"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_group-by" type="xs:string"/>
<xs:attribute name="_group-adjacent" type="xs:string"/>
<xs:attribute name="_group-starting-with" type="xs:string"/>
<xs:attribute name="_group-ending-with" type="xs:string"/>
<xs:attribute name="_split_when" type="xs:string"/>
<xs:attribute name="_composite" type="xs:string"/>
<xs:attribute name="_collation" type="xs:string"/>
<xs:assert test="exists(@select | @_select)"/>
<xs:assert test="every $e in subsequence(xsl:sort, 2)
satisfies empty($e/(@stable | @_stable))">
<xs:annotation>
<xs:documentation>
<p>
It is a static error if an <code>xsl:sort</code> element other than the first
in a sequence of sibling <code>xsl:sort</code> elements has a <code>stable</code>
attribute.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="count(((@group-by|@_group-by)[1],
(@group-adjacent|@_group-adjacent)[1],
(@group-starting-with|@_group-starting-with)[1],
(@group-ending-with|@_group-ending-with)[1],
(@split-when|@_split-when)[1])) = 1">
<xs:annotation>
<xs:documentation>
<p>
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.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="if (exists(@collation|@_collation) or exists(@composite|@_composite))
then (exists(@group-by|@_group-by) or exists(@group-adjacent|@_group-adjacent))
else true()">
<xs:annotation>
<xs:documentation>
<p>
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.
</p>
</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:sequence>
<xs:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/>
<xs:choice>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="xsl:sequence"/>
<xs:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element ref="xsl:for-each-group"/>
<xs:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:choice>
</xs:sequence>
</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"/>
<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="streamability" type="xsl:streamability-type"/>
<xs:attribute name="override-extension-function" type="xsl:yes-or-no"/>
<xs:attribute name="new-each-time" type="xsl:yes-or-no-or-maybe"/>
<xs:attribute name="cache" type="xsl:yes-or-no"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_override" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
<xs:attribute name="_streamability" type="xs:string"/>
<xs:attribute name="_override-extension-function" type="xs:string"/>
<xs:attribute name="_new-each-time" type="xs:string"/>
<xs:attribute name="_cache" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
<xs:assert test="every $e in xsl:param satisfies empty($e/(@visibility | @_visibility))">
<xs:annotation>
<xs:documentation>
<p>A parameter for a function must have no <code>visibility</code> attribute.</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="global-context-item" substitutionGroup="xsl:declaration">
<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="absent"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_use" type="xs:string"/>
</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"/>
<xs:attribute name="then" type="xsl:expression"/>
<xs:attribute name="else" type="xsl:expression"/>
<xs:attribute name="_test" type="xs:string"/>
<xs:attribute name="_then" type="xs:string"/>
<xs:attribute name="_else" type="xs:string"/>
<xs:assert test="exists(@test | @_test)"/>
<xs:assert test="not(exists(@then | @_then) and
(exists(* except xsl:fallback) or exists(text()[normalize-space()])))"/>
</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"/>
<xs:attribute name="_href" type="xs:string"/>
<xs:assert test="exists(@href | @_href)"/>
</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:attribute name="_namespace" type="xs:string"/>
<xs:attribute name="_schema-location" type="xs:string"/>
<xs:assert test="not(exists(@schema-location | @_schema-location) and exists(xs:schema))">
<xs:annotation>
<xs:documentation>
<p>
XTSE0215: It is a static error if an <code>xsl:import-schema</code> element
that contains an xs:schema element has a <code>schema-location</code>
attribute
</p>
</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"/>
<xs:attribute name="_href" type="xs:string"/>
<xs:assert test="exists(@href | @_href)"/>
</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:element ref="xsl:on-completion" minOccurs="0" maxOccurs="1"/>
<xs:group ref="xsl:sequence-constructor-group"
minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="select" type="xsl:expression"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:assert test="exists(@select | @_select)"/>
</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"/>
<xs:attribute name="match" type="xsl:pattern"/>
<xs:attribute name="use" type="xsl:expression"/>
<xs:attribute name="composite" type="xsl:yes-or-no"/>
<xs:attribute name="collation" type="xs:anyURI"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_match" type="xs:string"/>
<xs:attribute name="_use" type="xs:string"/>
<xs:attribute name="_composite" type="xs:string"/>
<xs:attribute name="_collation" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
<xs:assert test="exists(@match | @_match)"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="map"
substitutionGroup="xsl:instruction">
<xs:complexType>
<xs:complexContent mixed="true">
<xs:extension base="xsl:sequence-constructor-and-select">
<xs:attribute name="duplicates" type="xsl:expression"/>
<xs:attribute name="_duplicates" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<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"/>
<xs:attribute name="_key" type="xs:string"/>
<xs:assert test="exists(@key | @_key)"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="matching-substring" type="xsl:sequence-constructor-or-select"/>
<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: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:attribute name="_select" type="xs:string"/>
<xs:attribute name="_lang" type="xs:string"/>
<xs:attribute name="_order" type="xs:string"/>
<xs:attribute name="_collation" type="xs:string"/>
<xs:attribute name="_case-order" type="xs:string"/>
<xs:attribute name="_data-type" type="xs:string"/>
</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="name" type="xs:NCName"/>
<xs:attribute name="for-each-item" type="xsl:expression"/>
<xs:attribute name="for-each-source" type="xsl:expression"/>
<xs:attribute name="select" type="xsl:expression"/>
<xs:attribute name="streamable" type="xsl:yes-or-no"/>
<xs:attribute name="use-accumulators" type="xsl:accumulator-names"/>
<xs:attribute name="sort-before-merge" type="xsl:yes-or-no"/>
<xs:attribute name="type" type="xsl:EQName"/>
<xs:attribute name="validation" type="xsl:validation-type"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_for-each-item" type="xs:string"/>
<xs:attribute name="_for-each-source" type="xs:string"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_streamable" type="xs:string"/>
<xs:attribute name="_use-accumulators" type="xs:string"/>
<xs:attribute name="_sort-before-merge" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="exists(@select | @_select)"/>
</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:attribute name="_select" type="xs:string"/>
<xs:attribute name="_terminate" type="xs:string"/>
<xs:attribute name="_error-code" type="xs:string"/>
</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:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="xsl:template"/>
<xs:element ref="xsl:fallback"/>
</xs:choice>
<xs:attribute name="as" type="xsl:sequence-type"/>
<xs:attribute name="name" type="xsl:EQName"/>
<xs:attribute name="streamable" type="xsl:yes-or-no" default="no"/>
<xs:attribute name="use-accumulators" type="xsl:accumulator-names"/>
<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:attribute name="_as" type="xs:string"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_streamable" type="xs:string"/>
<xs:attribute name="_use-accumulators" type="xs:string"/>
<xs:attribute name="_on-no-match" type="xs:string"/>
<xs:attribute name="_on-multiple-match" type="xs:string"/>
<xs:attribute name="_warning-on-no-match" type="xs:string"/>
<xs:attribute name="_warning-on-multiple-match" type="xs:string"/>
<xs:attribute name="_typed" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
</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"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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"/>
<xs:attribute name="result-prefix" type="xsl:prefix-or-default"/>
<xs:attribute name="_stylesheet-prefix" type="xs:string"/>
<xs:attribute name="_result-prefix" type="xs:string"/>
<xs:assert test="exists(@stylesheet-prefix | @_stylesheet-prefix)"/>
<xs:assert test="exists(@result-prefix | @_result-prefix)"/>
<xs:assert test="every $prefix in (@stylesheet-prefix, @result-prefix)/normalize-space(.)[. ne '#default']
satisfies $prefix = in-scope-prefixes(.)"/>
</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-or-select"/>
<xs:element name="note" type="xs:anyType"/>
<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:attribute name="_value" type="xs:string"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_level" type="xs:string"/>
<xs:attribute name="_count" type="xs:string"/>
<xs:attribute name="_from" type="xs:string"/>
<xs:attribute name="_format" type="xs:string"/>
<xs:attribute name="_lang" type="xs:string"/>
<xs:attribute name="_letter-value" type="xs:string"/>
<xs:attribute name="_ordinal" type="xs:string"/>
<xs:attribute name="_start-at" type="xs:string"/>
<xs:attribute name="_grouping-separator" type="xs:string"/>
<xs:attribute name="_grouping-size" type="xs:string"/>
<xs:assert test="if (exists(@value | @_value))
then empty((@select | @_select, @count | @_count, @from | @_from))
and (exists(@_level) or normalize-space(@level)='single')
else true()">
<xs:annotation>
<xs:documentation>
<p>
It is a static error if the value attribute of <code>xsl:number</code> is
present unless the <code>select</code>, <code>level</code>, <code>count</code>,
and <code>from</code> attributes are all absent.
</p>
</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="on-empty"
substitutionGroup="xsl:instruction"
type="xsl:sequence-constructor-or-select"/>
<xs:element name="on-non-empty"
substitutionGroup="xsl:instruction"
type="xsl:sequence-constructor-or-select"/>
<xs:element name="otherwise"
type="xsl:sequence-constructor-or-select"/>
<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="allow-duplicate-names" type="xsl:yes-or-no"/>
<xs:attribute name="build-tree" type="xsl:yes-or-no"/>
<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-solidus" type="xsl:yes-or-no"/>
<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="json-lines" type="xsl:yes-or-no"/>
<xs:attribute name="json-node-output-method" type="xsl:method"/>
<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:attribute name="_name" type="xs:string"/>
<xs:attribute name="_method" type="xs:string"/>
<xs:attribute name="_byte-order-mark" type="xs:string"/>
<xs:attribute name="_cdata-section-elements" type="xs:string"/>
<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-solidus" type="xs:string"/>
<xs:attribute name="_escape-uri-attributes" type="xs:string"/>
<xs:attribute name="_html-version" type="xs:string"/>
<xs:attribute name="_include-content-type" type="xs:string"/>
<xs:attribute name="_indent" type="xs:string"/>
<xs:attribute name="_item-separator" type="xs:string"/>
<xs:attribute name="_media-type" type="xs:string"/>
<xs:attribute name="_normalization-form" type="xs:string"/>
<xs:attribute name="_omit-xml-declaration" type="xs:string"/>
<xs:attribute name="_parameter-document" type="xs:string"/>
<xs:attribute name="_standalone" type="xs:string"/>
<xs:attribute name="_suppress-indentation" type="xs:string"/>
<xs:attribute name="_undeclare-prefixes" type="xs:string"/>
<xs:attribute name="_use-character-maps" type="xs:string"/>
<xs:attribute name="_version" type="xs:string"/>
</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"/>
<xs:attribute name="string" type="xs:string"/>
<xs:attribute name="_character" type="xs:string"/>
<xs:attribute name="_string" type="xs:string"/>
<xs:assert test="exists(@character | @_character)"/>
<xs:assert test="exists(@string | @_string)"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="override">
<xs:annotation>
<xs:documentation>
<p>This element appears as a child of <code>xsl:use-package</code> and defines
any overriding definitions of components that the containing package wishes to make
to the components made available from a library package.</p>
</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: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:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="xsl:expose"/>
<xs:element ref="xsl:declaration"/>
<xs:any namespace="##other" processContents="lax"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="declared-modes" type="xsl:yes-or-no"/>
<xs:attribute name="id" type="xs:ID"/>
<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:attribute name="fixed-namespaces" type="xsl:fixed-namespaces-type"/>
<xs:attribute name="_declared-modes" type="xs:string"/>
<xs:attribute name="_id" type="xs:string"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_package-version" type="xs:string"/>
<xs:attribute name="_input-type-annotations" type="xs:string"/>
<xs:attribute name="_fixed-namespaces" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="param" substitutionGroup="xsl:declaration">
<xs:annotation>
<xs:documentation>
<p>Declaration of the <code>xsl:param</code> element, used both defining function
parameters, template parameters, parameters to <code>xsl:iterate</code>,
and global stylesheet parameters.</p>
</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"/>
<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="static" type="xsl:yes-or-no"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_required" type="xs:string"/>
<xs:attribute name="_tunnel" type="xs:string"/>
<xs:attribute name="_static" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
<xs:assert test="if (normalize-space(@static) = ('yes', 'true', '1'))
then empty((*,text()))
else true()">
<xs:annotation>
<xs:documentation>
<p>
When the attribute <code>static="yes"</code> is specified, the <code>xsl:param</code>
element must have empty content.
</p>
</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 | @_stable))">
<xs:annotation>
<xs:documentation>
<p>
It is a static error if an <code>xsl:sort</code> element other than the first
in a sequence of sibling <code>xsl:sort</code> elements has a <code>stable</code>
attribute.
</p>
</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"/>
<xs:attribute name="_elements" type="xs:string"/>
<xs:assert test="exists(@elements | @_elements)"/>
</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"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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="select" type="xsl:expression"/>
<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="allow-duplicate-names" type="xsl:avt"/>
<xs:attribute name="build-tree" 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-solidus" 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="json-lines" type="xsl:avt"/>
<xs:attribute name="json-node-output-method" 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:attribute name="_format" type="xs:string"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_href" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:attribute name="_method" type="xs:string"/>
<xs:attribute name="_byte-order-mark" type="xs:string"/>
<xs:attribute name="_cdata-section-elements" type="xs:string"/>
<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-solidus" type="xs:string"/>
<xs:attribute name="_escape-uri-attributes" type="xs:string"/>
<xs:attribute name="_html-version" type="xs:string"/>
<xs:attribute name="_include-content-type" type="xs:string"/>
<xs:attribute name="_indent" type="xs:string"/>
<xs:attribute name="_item-separator" type="xs:string"/>
<xs:attribute name="_media-type" type="xs:string"/>
<xs:attribute name="_normalization-form" type="xs:string"/>
<xs:attribute name="_omit-xml-declaration" type="xs:string"/>
<xs:attribute name="_parameter-document" type="xs:string"/>
<xs:attribute name="_standalone" type="xs:string"/>
<xs:attribute name="_suppress-indentation" type="xs:string"/>
<xs:attribute name="_undeclare-prefixes" type="xs:string"/>
<xs:attribute name="_use-character-maps" type="xs:string"/>
<xs:attribute name="_output-version" type="xs:string"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="sequence"
substitutionGroup="xsl:instruction">
<xs:complexType>
<xs:complexContent mixed="true">
<xs:extension base="xsl:sequence-constructor-or-select">
<xs:attribute name="as" type="xsl:sequence-type"/>
<xs:attribute name="_as" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<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"/>
<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:attribute name="_lang" type="xs:string"/>
<xs:attribute name="_data-type" type="xs:string"/>
<xs:attribute name="_order" type="xs:string"/>
<xs:attribute name="_case-order" type="xs:string"/>
<xs:attribute name="_collation" type="xs:string"/>
<xs:attribute name="_stable" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="source-document" substitutionGroup="xsl:instruction">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xsl:sequence-constructor">
<xs:attribute name="href" type="xsl:avt"/>
<xs:attribute name="streamable" type="xsl:yes-or-no" default="no"/>
<xs:attribute name="use-accumulators" type="xsl:accumulator-names"/>
<xs:attribute name="type" type="xsl:EQName"/>
<xs:attribute name="validation" type="xsl:validation-type"/>
<xs:attribute name="_href" type="xs:string"/>
<xs:attribute name="_streamable" type="xs:string"/>
<xs:attribute name="_use-accumulators" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="exists(@href | @_href)"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
</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"/>
<xs:attribute name="_elements" type="xs:string"/>
<xs:assert test="exists(@elements | @_elements)"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="stylesheet" substitutionGroup="xsl:transform"/>
<xs:element name="switch" 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:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="select" type="xsl:expression"/>
<xs:attribute name="_select" type="xsl:avt"/>
<xs:assert test="exists(@select | @_select)"/>
</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:attribute name="_match" type="xs:string"/>
<xs:attribute name="_priority" type="xs:string"/>
<xs:attribute name="_mode" type="xs:string"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
<xs:assert test="exists(@match | @_match) or exists(@name | @_name)">
<xs:annotation>
<xs:documentation>
<p>
An <code>xsl:template</code> element must have either a <code>match</code> attribute or a
<code>name</code> attribute, or both.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="if (empty(@match | @_match))
then (empty(@mode | @_mode) and empty(@priority | @_priority))
else true()">
<xs:annotation>
<xs:documentation>
<p>
An <code>xsl:template</code> element that has no <code>match</code> attribute must have no
<code>mode</code> attribute and no <code>priority</code> attribute.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="not(exists(@visibility | @_visibility) and empty(@name | @_name))">
<xs:annotation>
<xs:documentation>
<p>
An <code>xsl:template</code> element that has no <code>name</code> attribute must have no
<code>visibility</code> attribute
</p>
</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>
<p>
If the <code>visibility</code> attribute is present with the value <code>abstract</code>
then (a) the sequence constructor defining the template body
must be empty: that is, the only permitted children are
<code>xsl:context-item</code> and <code>xsl:param</code>
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="not(normalize-space(@visibility) = 'abstract' and exists(@match))">
<xs:annotation>
<xs:documentation>
<p>
If the <code>visibility</code> attribute is present with the value <code>abstract</code>
then there must be no <code>match</code> attribute.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="every $e in xsl:param satisfies empty($e/(@visibility | @_visibility))">
<xs:annotation>
<xs:documentation>
<p>A parameter for a template must have no <code>visibility</code> attribute.</p>
</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:attribute name="_disable-output-escaping" type="xs:string"/>
</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:attribute name="_version" type="xs:string">
<xs:annotation>
<xs:documentation>
<p>
The version attribute indicates the version of XSLT that the
stylesheet module requires. The attribute is required, unless the
<code>xsl:stylesheet</code> element is a child of an <code>xsl:package</code> element, in
which case it is optional: the default is then taken from the
parent <code>xsl:package</code> element.
</p>
</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"/>
<!-- weaker than XSLT 1.0 -->
</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:attribute name="fixed-namespaces"
type="xsl:fixed-namespaces-type"/>
<xs:attribute name="_id" type="xs:string"/>
<xs:attribute name="_input-type-annotations" type="xs:string"/>
<xs:attribute name="_fixed-namespaces" type="xs:string"/>
<!--* The 'static' attribute may be used on 'param' and 'variable'
* only when they are top-level elements. *-->
<xs:assert test="every $v in (.//xsl:param, .//xsl:variable)[exists(@static | @_static)]
satisfies $v[parent::xsl:stylesheet or parent::xsl:transform or parent::xsl:override]">
<xs:annotation>
<xs:documentation>
<p>
The static attribute must not be present on an <code>xsl:variable</code> or
<code>xsl:param</code> element unless it is a top-level element.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="every $prefix in (@exclude-result-prefixes[not(. = '#all')],
@extension-element-prefixes)
satisfies ((if ($prefix = '#default') then '' else $prefix) = in-scope-prefixes(.))">
<xs:annotation>
<xs:documentation>
<p>
XTSE0808: It is a static error if a namespace prefix is used
within the <code>[xsl:]exclude-result-prefixes</code> attribute and there is
no namespace binding in scope for that prefix.
</p>
<p>
XTSE0809: It is a static error if the value #default is used
within the <code>[xsl:]exclude-result-prefixes</code> attribute and the
parent element of the <code>[xsl:]exclude-result-prefixes</code> attribute
has no default namespace.
</p>
</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="rollback-output" type="xsl:yes-or-no" default="yes"/>
<xs:attribute name="select" type="xsl:expression" use="optional"/>
<xs:attribute name="_rollback-output" type="xs:string"/>
<xs:attribute name="_select" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="use-package" substitutionGroup="xsl:declaration">
<xs:annotation>
<xs:documentation>
<p>This element appears as a child of <code>xsl:package</code> and defines a dependency
of the containing package on another package, identified by URI in the <code>name</code>
attribute. The <code>package-version</code> attribute indicates which version of the
library package is required, or may indicate a range of versions.</p>
</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:attribute name="_name" type="xs:string"/>
<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:attribute name="_separator" type="xs:string"/>
<xs:attribute name="_disable-output-escaping" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="variable" substitutionGroup="xsl:declaration xsl:instruction">
<xs:annotation>
<xs:documentation>
<p>Declaration of the <code>xsl:variable</code> element, used both for local
and global variable bindings.</p>
<p>
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.
</p>
</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"/>
<xs:attribute name="as" type="xsl:sequence-type"/>
<xs:attribute name="visibility" type="xsl:visibility-type"/>
<xs:attribute name="static" type="xsl:yes-or-no"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
<xs:attribute name="_static" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
<xs:assert test="if (normalize-space(@static) = ('yes', 'true', '1'))
then (exists(@_visibility) or normalize-space(@visibility)
= ('', 'private', 'final'))
else true()">
<xs:annotation>
<xs:documentation>
<p>
When the static attribute is present with the value yes, the
visibility attribute must not have a value other than private or
final.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="if (normalize-space(@static) = ('yes', 'true', '1'))
then (empty((*, text())) and exists(@select | @_select))
else true()">
<xs:annotation>
<xs:documentation>
<p>
When the attribute <code>static="yes"</code> is specified, the <code>xsl:variable</code>
element must have empty content, and the <code>select</code> attribute must
be present to define the value of the variable.
</p>
</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="select" type="xsl:expression"/>
<xs:attribute name="test" type="xsl:expression"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_test" type="xs:string"/>
<xs:assert test="exists(@test | @_test)"/>
<xs:assert test="not(exists(@select | @_select) and
(exists(* except xsl:fallback) or exists(text()[normalize-space()])))"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="where-populated"
substitutionGroup="xsl:instruction"
type="xsl:sequence-constructor"/>
<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"/>
<xs:attribute name="as" type="xsl:sequence-type"/>
<xs:attribute name="tunnel" type="xsl:yes-or-no"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_tunnel" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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 <code>xsl:literal-result-element</code>
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
<code>literal-result-element-attributes</code>, 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>
<p>
PART D: definitions of simple types used in stylesheet attributes
</p>
</xs:documentation>
</xs:annotation>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:simpleType name="accumulator-names">
<xs:annotation>
<xs:documentation>
<p>
The <code>use-accumulators</code> attribute of <code>xsl:source-document</code>,
<code>xsl:merge-source</code>, or <code>xsl:global-context-item</code>:
either a list, each member being a QName; or the value <code>#all</code>
</p>
</xs:documentation>
</xs:annotation>
<xs:union>
<xs:simpleType>
<xs:list itemType="xsl:EQName"/>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="#all"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType name="avt">
<xs:annotation>
<xs:documentation>
<p>
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 4.0 Recommendation.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:simpleType name="char">
<xs:annotation>
<xs:documentation>
<p>
A string containing exactly one character.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:length value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="char-optionally-expanded">
<xs:annotation>
<xs:documentation>
<p>
A string containing either a single character, or a single character
followed by a colon followed by an arbitrary string
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value=".(:.*)?"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="component-kind-type">
<xs:annotation>
<xs:documentation>
<p>
Describes a kind of component within a package.
</p>
</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:enumeration value="*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="default-mode-type">
<xs:annotation>
<xs:documentation>
<p>
The <code>default-mode</code> attribute of <code>xsl:stylesheet</code>,
<code>xsl:transform</code>, <code>xsl:package</code>
(or any other xsl:* element): either a QName or #unnamed.
</p>
</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="component-test">
<xs:annotation>
<xs:documentation>
<p> A NameTest or a named function reference. </p>
</xs:documentation>
</xs:annotation>
<xs:union memberTypes="xsl:nametest xsl:named-function-reference"/>
</xs:simpleType>
<xs:simpleType name="component-tests">
<xs:annotation>
<xs:documentation>
<p> A list of NameTests or named function references</p>
</xs:documentation>
</xs:annotation>
<xs:list itemType="xsl:component-test"/>
</xs:simpleType>
<xs:simpleType name="expression">
<xs:annotation>
<xs:documentation>
<p>
An XPath 4.0 expression.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:pattern value=".+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="fixed-namespaces-type">
<xs:annotation>
<xs:documentation>
<p>
A sequence of tokens, each of which may be one of #default, an NCName, a prefix=namespace binding, or a URI
</p>
</xs:documentation>
</xs:annotation>
<xs:list>
<xs:simpleType>
<xs:union memberTypes="xsl:fixed-namespaces-type-default xs:NCName xsl:fixed-namespaces-type-prefix-binding xs:anyURI"/>
</xs:simpleType>
</xs:list>
</xs:simpleType>
<xs:simpleType name="fixed-namespaces-type-default">
<xs:restriction base="xs:string">
<xs:enumeration value="#default"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="fixed-namespaces-type-prefix-binding">
<xs:restriction base="xs:string">
<xs:pattern value="([\i-[:]][\c-[:]]*:)=.+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="item-type">
<xs:annotation>
<xs:documentation>
<p>
An XPath 4.0 ItemType
</p>
</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>
<p>
Describes how type annotations in source documents are handled.
</p>
</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>
<p>
The <code>level</code> attribute of <code>xsl:number</code>:
one of <code>single</code>, <code>multiple</code>, or <code>any</code>.
</p>
</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>
<p>
The <code>mode</code> attribute of <code>xsl:apply-templates</code>:
either a QName, or <code>#current</code>,
or <code>#unnamed</code>, or <code>#default</code>.
</p>
</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>
<p>
The <code>mode</code> attribute of <code>xsl:template</code>: either a list, each member being
either a QName or <code>#default</code> or <code>#unnamed</code>; or the value <code>#all</code>
</p>
</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>
<p>
XTSE0550: It is a static error if the same token is included
more than once in the list.
</p>
</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="named-function-reference">
<xs:annotation>
<xs:documentation>
<p> In simple terms, this is an EQName followed by "#arity" where "arity" is a non-negative integer. However,
XSD doesn't allow us to reuse the definition of EQName in this way, so it has to be defined from scratch. The simplest
way to do this is with an assertion. However, the assertion cannot exploit types such as <code>xsl:EQName</code> defined in this
schema</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:pattern value="((Q\{.*\})|([\i-[:]][\c-[:]]*:))?[\i-[:]][\c-[:]]*#[0-9]+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="nametest">
<xs:annotation>
<xs:documentation>
<p> A list of NameTests, as defined in the XPath 31 Recommendation. Each NameTest is either
an EQName, or "*", or "prefix:*", or "*:localname", or the wildcard Q{uri}*. </p>
</xs:documentation>
</xs:annotation>
<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:pattern value="Q\{[^}]*\}\*"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType name="nametests">
<xs:annotation>
<xs:documentation>
<p> A list of NameTests, as defined in the XPath 4.0 Recommendation. Each NameTest is either
a QName, or "*", or "prefix:*", or "*:localname" </p>
</xs:documentation>
</xs:annotation>
<xs:list itemType="xsl:nametest"/>
</xs:simpleType>
<xs:simpleType name="on-multiple-match-type">
<xs:annotation>
<xs:documentation>
<p>
Describes the action to be taken when there are several template rules
to match an item in a given mode.
</p>
</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>
<p>
Describes the action to be taken when there is no template rule to match
an item in a given mode.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="deep-copy"/>
<xs:enumeration value="shallow-copy"/>
<xs:enumeration value="shallow-copy-all"/>
<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>
<p>
The <code>method</code> attribute of <code>xsl:output</code>: Either one of the recognized names
"xml", "xhtml", "html", "text", "json", or "adaptive",
or a QName that must include a prefix.
</p>
</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:enumeration value="json"/>
<xs:enumeration value="adaptive"/>
</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>
<p>
A match pattern as defined in the XSLT 4.0 Recommendation. The syntax
for patterns is a restricted form of the syntax for XPath 4.0
expressions.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xsl:expression"/>
</xs:simpleType>
<xs:simpleType name="prefix-or-default">
<xs:annotation>
<xs:documentation>
<p>
Either a namespace prefix, or <code>#default</code>. Used in the <code>xsl:namespace-alias</code>
element.
</p>
</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>
<p>
A list of QNames. Used in the <code>[xsl:]use-attribute-sets</code> attribute of
various elements, and in the <code>cdata-section-elements</code> attribute of
<code>xsl:output</code>.
</p>
</xs:documentation>
</xs:annotation>
<xs:list itemType="xsl:EQName"/>
</xs:simpleType>
<xs:simpleType name="EQName">
<xs:annotation>
<xs:documentation>
<p>
An extended QName. This schema does not use the built-in type <code>xs:QName</code>,
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
<code>Q{uri}local</code>
</p>
<p>In XSLT 4.0, where a QName is used in the <code>name</code> attribute
of (say) <code>xsl:template</code> or <code>xsl:call-template</code>, the prefix
does not have to be bound in an XML namespace declaration; rather it can be bound
in a <code>fixed-namespaces</code> attribute on the <code>xsl:stylesheet</code>
element. Therefore, the built-in <code>xs:QName</code> type cannot be used.
This schema does not attempt to verify that namespace prefixes have been
properly declared.</p>
</xs:documentation>
</xs:annotation>
<xs:union memberTypes="xs:NCName">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:pattern value="[\i-[:]][\c-[:]]*:[\i-[:]][\c-[:]]*"/>
</xs:restriction>
</xs:simpleType>
<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>
<p>
A subtype of EQNames that excludes no-namespace names
</p>
</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>
<p>
The description of a datatype, conforming to the SequenceType production
defined in the XPath 4.0 Recommendation
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:pattern value=".+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="streamability-type">
<xs:annotation>
<xs:documentation>
<p>
Describes the category to which a function belongs, with regards to its
streaming behavior.
</p>
</xs:documentation>
</xs:annotation>
<xs:union memberTypes="xsl:EQName-in-namespace">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="unclassified"/>
<xs:enumeration value="absorbing"/>
<xs:enumeration value="inspection"/>
<xs:enumeration value="filter"/>
<xs:enumeration value="shallow-descent"/>
<xs:enumeration value="deep-descent"/>
<xs:enumeration value="ascent"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType name="typed-type">
<xs:annotation>
<xs:documentation>
<p>
Describes whether a mode is designed to match typed or untyped nodes.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
<xs:enumeration value="1"/>
<xs:enumeration value="0"/>
<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>
<p>
Describes different ways of type-annotating an element or attribute.
</p>
</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>
<p>
Describes different ways of type-annotating an element or attribute.
</p>
</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>
<p>
Describes the visibility of a component within a package.
</p>
</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>
<p>
Describes the visibility of a component within a package.
</p>
</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>
<p>
One of the values "yes" or "no": the values "true" or "false", or "1" or
"0" are accepted as synonyms.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
<xs:enumeration value="1"/>
<xs:enumeration value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="yes-or-no-or-maybe">
<xs:annotation>
<xs:documentation>
<p>
One of the values "yes" or "no" or "omit". The values "true" or "false",
or "1" or "0" are accepted as synonyms of "yes" and "no" respectively.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
<xs:enumeration value="1"/>
<xs:enumeration value="0"/>
<xs:enumeration value="maybe"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="yes-or-no-or-omit">
<xs:annotation>
<xs:documentation>
<p>
One of the values "yes" or "no" or "omit". The values "true" or "false",
or "1" or "0" are accepted as synonyms of "yes" and "no" respectively.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
<xs:enumeration value="1"/>
<xs:enumeration value="0"/>
<xs:enumeration value="omit"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="zero-digit">
<xs:annotation>
<xs:documentation>
<p>
A digit that has the numerical value zero.
</p>
</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>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
targetNamespace="http://www.w3.org/1999/XSL/Transform"
elementFormDefault="qualified"
vc:minVersion="1.1">
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:annotation>
<xs:documentation>
<p>
This is an XSD 1.1 schema for XSLT 4.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.
</p>
<p>
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
</p>
<p>
The schema is organized as follows:
</p>
<ul>
<li>
PART A: definitions of complex types and model groups used as the basis
for element definitions
</li>
<li>
PART B: definitions of individual XSLT elements
</li>
<li>
PART C: definitions for literal result elements
</li>
<li>
PART D: definitions of simple types used in attribute definitions
</li>
</ul>
<p>
The schema has a number of limitations:
</p>
<ul>
<li>
The XSLT specification allows additional elements and attributes to be
present where forwards compatibility is invoked. This schema does not.
</li>
<li>
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.
</li>
<li>
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.
</li>
<li>
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 <code>xsl:call-template</code> has a
declaration). Doing this in general requires cross-document validation,
which is beyond the scope of XSD.
</li>
<li>
The XSLT specification allows <code>xsl:note</code> elements to appear
anywhere, with arbitrary content. This schema does not: for example, it does
not allow <code>xsl:note</code> as a child of an element such as <code>xsl:text</code>
or <code>xsl:strip-space</code>.
</li>
<li>
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.
</li>
</ul>
</xs:documentation>
</xs:annotation>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!--
The declaration of xml:space and xml:lang may need to be commented out because
of problems processing the schema using various tools
-->
<xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
<!--schemaLocation="http://www.w3.org/2001/xml.xsd"-->
<!--
An XSLT stylesheet may contain an in-line schema within an xsl:import-schema element,
so the Schema for schemas needs to be imported. We use the XSD 1.1 version.
-->
<xs:import namespace="http://www.w3.org/2001/XMLSchema"
schemaLocation="http://www.w3.org/TR/xmlschema11-1/XMLSchema.xsd"/>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:annotation>
<xs:documentation>
<p>
PART A: definitions of complex types and model groups used as the basis
for element definitions
</p>
</xs:documentation>
</xs:annotation>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:defaultOpenContent>
<!-- Allow xsl:note anywhere -->
<xs:any processContents="strict"
namespace="##targetNamespace"
notQName="xsl:accept
xsl:accumulator
xsl:accumulator-rule
xsl:analyze-string
xsl:apply-imports
xsl:apply-templates
xsl:array
xsl:assert
xsl:attribute
xsl:attribute-set
xsl:break
xsl:call-template
xsl:catch
xsl:character-map
xsl:choose
xsl:comment
xsl:context-item
xsl:copy
xsl:copy-of
xsl:document
xsl:decimal-format
xsl:element
xsl:evaluate
xsl:expose
xsl:fallback
xsl:for-each
xsl:for-each-group
xsl:fork
xsl:function
xsl:global-context-item
xsl:if
xsl:import
xsl:import-schema
xsl:include
xsl:iterate
xsl:key
xsl:map
xsl:map-entry
xsl:matching-substring
xsl:merge
xsl:merge-action
xsl:merge-key
xsl:merge-source
xsl:message
xsl:mode
xsl:namespace
xsl:namespace-alias
xsl:next-iteration
xsl:next-match
xsl:non-matching-substring
xsl:number
xsl:on-completion
xsl:on-empty
xsl:on-non-empty
xsl:otherwise
xsl:output
xsl:output-character
xsl:override
xsl:package
xsl:param
xsl:perform-sort
xsl:preserve-space
xsl:processing-instruction
xsl:result-document
xsl:sequence
xsl:sort
xsl:source-document
xsl:strip-space
xsl:stylesheet
xsl:switch
xsl:template
xsl:text
xsl:transform
xsl:try
xsl:use-package
xsl:value-of
xsl:variable
xsl:when
xsl:where-populated
xsl:with-param
"/>
</xs:defaultOpenContent>
<xs:complexType name="generic-element-type" mixed="true">
<xs:annotation>
<xs:documentation>
<p>
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.
</p>
</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:attribute name="_default-collation" type="xs:string"/>
<xs:attribute name="_default-mode" type="xs:string"/>
<xs:attribute name="_default-validation" type="xs:string"/>
<xs:attribute name="_exclude-result-prefixes" type="xs:string"/>
<xs:attribute name="_expand-text" type="xs:string"/>
<xs:attribute name="_extension-element-prefixes" type="xs:string"/>
<xs:attribute name="_use-when" type="xs:string"/>
<xs:attribute name="_xpath-default-namespace" type="xs:string"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<xs:complexType name="versioned-element-type" mixed="true">
<xs:annotation>
<xs:documentation>
<p>This complex type provides a generic supertype for all XSLT elements with
the exception of <code>xsl:output</code>; it contains the
definitions of the <code>version</code> attribute that may appear on any element.
</p>
<p>The <code>xsl:output</code> element does not use this definition because, although it
has a <code>version</code> attribute, the syntax and semantics of this attribute are
unrelated to the standard <code>version</code> attribute allowed on other elements.</p>
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="xsl:generic-element-type">
<xs:attribute name="version" type="xs:decimal" use="optional"/>
<xs:attribute name="_version" type="xs:string"/>
</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>
<p>
This complex type provides a generic supertype for all XSLT elements
that allow a sequence constructor as their content.
</p>
</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>
<p>
This complex type allows a sequence constructor and a select attribute.
</p>
</xs:documentation>
</xs:annotation>
<xs:complexContent mixed="true">
<xs:extension base="xsl:sequence-constructor">
<xs:attribute name="select" type="xsl:expression"/>
<xs:attribute name="_select" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="sequence-constructor-or-select">
<xs:annotation>
<xs:documentation>
<p>
This complex type allows a sequence constructor or a select attribute,
but not both.
</p>
</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 | @_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>
<p>
This complex type provides a generic supertype for all XSLT elements
that allow a sequence constructor as their content.
</p>
</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>
<p>
PART B: definitions of individual XSLT elements Elements are listed in
alphabetical order.
</p>
</xs:documentation>
</xs:annotation>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:element name="accept">
<xs:annotation>
<xs:documentation>
<p>This element appears as a child of <code>xsl:use-package</code> 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.</p>
</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:component-tests"/>
<xs:attribute name="visibility" type="xsl:visibility-type"/>
<xs:attribute name="_component" type="xs:string"/>
<xs:attribute name="_names" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
<xs:assert test="exists(@component | @_component)"/>
<xs:assert test="exists(@names | @_names)"/>
<xs:assert test="exists(@visibility | @_visibility)"/>
</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="initial-value" type="xsl:expression"/>
<xs:attribute name="as" type="xsl:sequence-type"/>
<xs:attribute name="streamable" type="xsl:yes-or-no"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_initial-value" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_streamable" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="accumulator-rule">
<xs:complexType>
<xs:complexContent mixed="true">
<xs:extension base="xsl:sequence-constructor-or-select">
<xs:sequence/>
<xs:attribute name="match" type="xsl:pattern"/>
<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="capture" type="xsl:yes-or-no" default="no"/>
<xs:attribute name="_match" type="xs:string"/>
<xs:attribute name="_phase" type="xs:string"/>
<xs:attribute name="_capture" type="xs:string"/>
<xs:assert test="exists(@match | @_match)"/>
</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"/>
<xs:attribute name="regex" type="xsl:avt"/>
<xs:attribute name="flags" type="xsl:avt" default=""/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_regex" type="xs:string"/>
<xs:attribute name="_flags" type="xs:string"/>
<xs:assert test="exists(@select | @_select)"/>
<xs:assert test="exists(@regex | @_regex)"/>
</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="separator" type="xsl:avt"/>
<xs:attribute name="mode" type="xsl:mode"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_separator" type="xs:string"/>
<xs:attribute name="_mode" type="xs:string"/>
<xs:assert test="every $e in subsequence(xsl:sort, 2)
satisfies empty($e/(@stable | @_stable))">
<xs:annotation>
<xs:documentation>
<p>
It is a static error if an <code>xsl:sort</code> element other than the first
in a sequence of sibling <code>xsl:sort</code> elements has a <code>stable</code>
attribute.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="array"
substitutionGroup="xsl:instruction"
type="xsl:sequence-constructor-or-select"/>
<xs:element name="array-member"
substitutionGroup="xsl:instruction"
type="xsl:sequence-constructor-or-select"/>
<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"/>
<xs:attribute name="select" type="xsl:expression"/>
<xs:attribute name="error-code" type="xsl:avt"/>
<xs:attribute name="_test" type="xs:string"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_error-code" type="xs:string"/>
<xs:assert test="exists(@test | @_test)"/>
</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"/>
<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="_name" type="xs:string"/>
<xs:attribute name="_namespace" type="xs:string"/>
<xs:attribute name="_separator" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="exists(@name | @_name)"/>
</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"/>
<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:attribute name="_name" type="xs:string"/>
<xs:attribute name="_streamable" type="xs:string"/>
<xs:attribute name="_use-attribute-sets" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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:attribute name="_errors" type="xs:string"/>
</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"/>
<xs:attribute name="use-character-maps" type="xsl:EQNames" default=""/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_use-character-maps" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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="absent"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_use" type="xs:string"/>
</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="_select" type="xs:string"/>
<xs:attribute name="_copy-namespaces" type="xs:string"/>
<xs:attribute name="_inherit-namespaces" type="xs:string"/>
<xs:attribute name="_use-attribute-sets" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</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"/>
<xs:attribute name="copy-accumulators" type="xsl:yes-or-no" default="no"/>
<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:attribute name="_select" type="xs:string"/>
<xs:attribute name="_copy-accumulators" type="xs:string"/>
<xs:attribute name="_copy-namespaces" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="exists(@select | @_select)"/>
</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:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</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-optionally-expanded" default="."/>
<xs:attribute name="grouping-separator" type="xsl:char-optionally-expanded" default=","/>
<xs:attribute name="infinity" type="xs:string" default="Infinity"/>
<xs:attribute name="minus-sign" type="xs:string" default="-"/>
<xs:attribute name="exponent-separator" type="xsl:char-optionally-expanded" default="e"/>
<xs:attribute name="NaN" type="xs:string" default="NaN"/>
<xs:attribute name="percent" type="xsl:char-optionally-expanded" default="%"/>
<xs:attribute name="per-mille" type="xsl:char-optionally-expanded" 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:attribute name="_name" type="xs:string"/>
<xs:attribute name="_decimal-separator" type="xs:string"/>
<xs:attribute name="_grouping-separator" type="xs:string"/>
<xs:attribute name="_infinity" type="xs:string"/>
<xs:attribute name="_minus-sign" type="xs:string"/>
<xs:attribute name="_exponent-separator" type="xs:string"/>
<xs:attribute name="_NaN" type="xs:string"/>
<xs:attribute name="_percent" type="xs:string"/>
<xs:attribute name="_per-mille" type="xs:string"/>
<xs:attribute name="_zero-digit" type="xs:string"/>
<xs:attribute name="_digit" type="xs:string"/>
<xs:attribute name="_pattern-separator" type="xs:string"/>
</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"/>
<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="_name" type="xs:string"/>
<xs:attribute name="_namespace" type="xs:string"/>
<xs:attribute name="_inherit-namespaces" type="xs:string"/>
<xs:attribute name="_use-attribute-sets" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</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"/>
<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:attribute name="_xpath" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_base-uri" type="xs:string"/>
<xs:attribute name="_context-item" type="xs:string"/>
<xs:attribute name="_namespace-context" type="xs:string"/>
<xs:attribute name="_schema-aware" type="xs:string"/>
<xs:attribute name="_with-params" type="xs:string"/>
<xs:assert test="exists(@xpath | @_xpath)"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="expose">
<xs:annotation>
<xs:documentation>
<p>This element appears as a child of <code>xsl:use-package</code> and defines
the visibility of components that are made available (or not) by this package
to other using packages.</p>
</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:component-tests"/>
<xs:attribute name="visibility" type="xsl:visibility-not-hidden-type"/>
<xs:attribute name="_component" type="xs:string"/>
<xs:attribute name="_names" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
</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"/>
<xs:attribute name="separator" type="xsl:avt"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_separator" type="xs:string"/>
<xs:assert test="every $e in subsequence(xsl:sort, 2)
satisfies empty($e/(@stable | @_stable))">
<xs:annotation>
<xs:documentation>
<p>
It is a static error if an <code>xsl:sort</code> element other than the first
in a sequence of sibling <code>xsl:sort</code> elements has a <code>stable</code>
attribute.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="exists(@select | @_select)"/>
</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"/>
<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="split-when" type="xsl:expression"/>
<xs:attribute name="composite" type="xsl:yes-or-no"/>
<xs:attribute name="collation" type="xsl:avt"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_group-by" type="xs:string"/>
<xs:attribute name="_group-adjacent" type="xs:string"/>
<xs:attribute name="_group-starting-with" type="xs:string"/>
<xs:attribute name="_group-ending-with" type="xs:string"/>
<xs:attribute name="_split_when" type="xs:string"/>
<xs:attribute name="_composite" type="xs:string"/>
<xs:attribute name="_collation" type="xs:string"/>
<xs:assert test="exists(@select | @_select)"/>
<xs:assert test="every $e in subsequence(xsl:sort, 2)
satisfies empty($e/(@stable | @_stable))">
<xs:annotation>
<xs:documentation>
<p>
It is a static error if an <code>xsl:sort</code> element other than the first
in a sequence of sibling <code>xsl:sort</code> elements has a <code>stable</code>
attribute.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="count(((@group-by|@_group-by)[1],
(@group-adjacent|@_group-adjacent)[1],
(@group-starting-with|@_group-starting-with)[1],
(@group-ending-with|@_group-ending-with)[1],
(@split-when|@_split-when)[1])) = 1">
<xs:annotation>
<xs:documentation>
<p>
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.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="if (exists(@collation|@_collation) or exists(@composite|@_composite))
then (exists(@group-by|@_group-by) or exists(@group-adjacent|@_group-adjacent))
else true()">
<xs:annotation>
<xs:documentation>
<p>
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.
</p>
</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:sequence>
<xs:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/>
<xs:choice>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="xsl:sequence"/>
<xs:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element ref="xsl:for-each-group"/>
<xs:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:choice>
</xs:sequence>
</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"/>
<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="streamability" type="xsl:streamability-type"/>
<xs:attribute name="override-extension-function" type="xsl:yes-or-no"/>
<xs:attribute name="new-each-time" type="xsl:yes-or-no-or-maybe"/>
<xs:attribute name="cache" type="xsl:yes-or-no"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_override" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
<xs:attribute name="_streamability" type="xs:string"/>
<xs:attribute name="_override-extension-function" type="xs:string"/>
<xs:attribute name="_new-each-time" type="xs:string"/>
<xs:attribute name="_cache" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
<xs:assert test="every $e in xsl:param satisfies empty($e/(@visibility | @_visibility))">
<xs:annotation>
<xs:documentation>
<p>A parameter for a function must have no <code>visibility</code> attribute.</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="global-context-item" substitutionGroup="xsl:declaration">
<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="absent"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_use" type="xs:string"/>
</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"/>
<xs:attribute name="then" type="xsl:expression"/>
<xs:attribute name="else" type="xsl:expression"/>
<xs:attribute name="_test" type="xs:string"/>
<xs:attribute name="_then" type="xs:string"/>
<xs:attribute name="_else" type="xs:string"/>
<xs:assert test="exists(@test | @_test)"/>
<xs:assert test="not(exists(@then | @_then) and
(exists(* except xsl:fallback) or exists(text()[normalize-space()])))"/>
</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"/>
<xs:attribute name="_href" type="xs:string"/>
<xs:assert test="exists(@href | @_href)"/>
</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:attribute name="_namespace" type="xs:string"/>
<xs:attribute name="_schema-location" type="xs:string"/>
<xs:assert test="not(exists(@schema-location | @_schema-location) and exists(xs:schema))">
<xs:annotation>
<xs:documentation>
<p>
XTSE0215: It is a static error if an <code>xsl:import-schema</code> element
that contains an xs:schema element has a <code>schema-location</code>
attribute
</p>
</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"/>
<xs:attribute name="_href" type="xs:string"/>
<xs:assert test="exists(@href | @_href)"/>
</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:element ref="xsl:on-completion" minOccurs="0" maxOccurs="1"/>
<xs:group ref="xsl:sequence-constructor-group"
minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="select" type="xsl:expression"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:assert test="exists(@select | @_select)"/>
</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"/>
<xs:attribute name="match" type="xsl:pattern"/>
<xs:attribute name="use" type="xsl:expression"/>
<xs:attribute name="composite" type="xsl:yes-or-no"/>
<xs:attribute name="collation" type="xs:anyURI"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_match" type="xs:string"/>
<xs:attribute name="_use" type="xs:string"/>
<xs:attribute name="_composite" type="xs:string"/>
<xs:attribute name="_collation" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
<xs:assert test="exists(@match | @_match)"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="map"
substitutionGroup="xsl:instruction">
<xs:complexType>
<xs:complexContent mixed="true">
<xs:extension base="xsl:sequence-constructor-and-select">
<xs:attribute name="duplicates" type="xsl:expression"/>
<xs:attribute name="_duplicates" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<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"/>
<xs:attribute name="_key" type="xs:string"/>
<xs:assert test="exists(@key | @_key)"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="matching-substring" type="xsl:sequence-constructor-or-select"/>
<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: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:attribute name="_select" type="xs:string"/>
<xs:attribute name="_lang" type="xs:string"/>
<xs:attribute name="_order" type="xs:string"/>
<xs:attribute name="_collation" type="xs:string"/>
<xs:attribute name="_case-order" type="xs:string"/>
<xs:attribute name="_data-type" type="xs:string"/>
</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="name" type="xs:NCName"/>
<xs:attribute name="for-each-item" type="xsl:expression"/>
<xs:attribute name="for-each-source" type="xsl:expression"/>
<xs:attribute name="select" type="xsl:expression"/>
<xs:attribute name="streamable" type="xsl:yes-or-no"/>
<xs:attribute name="use-accumulators" type="xsl:accumulator-names"/>
<xs:attribute name="sort-before-merge" type="xsl:yes-or-no"/>
<xs:attribute name="type" type="xsl:EQName"/>
<xs:attribute name="validation" type="xsl:validation-type"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_for-each-item" type="xs:string"/>
<xs:attribute name="_for-each-source" type="xs:string"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_streamable" type="xs:string"/>
<xs:attribute name="_use-accumulators" type="xs:string"/>
<xs:attribute name="_sort-before-merge" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="exists(@select | @_select)"/>
</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:attribute name="_select" type="xs:string"/>
<xs:attribute name="_terminate" type="xs:string"/>
<xs:attribute name="_error-code" type="xs:string"/>
</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:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="xsl:template"/>
<xs:element ref="xsl:fallback"/>
</xs:choice>
<xs:attribute name="as" type="xsl:sequence-type"/>
<xs:attribute name="name" type="xsl:EQName"/>
<xs:attribute name="streamable" type="xsl:yes-or-no" default="no"/>
<xs:attribute name="use-accumulators" type="xsl:accumulator-names"/>
<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="copy-namespaces" type="xsl:yes-or-no"/>
<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:attribute name="_as" type="xs:string"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_streamable" type="xs:string"/>
<xs:attribute name="_use-accumulators" type="xs:string"/>
<xs:attribute name="_on-no-match" type="xs:string"/>
<xs:attribute name="_on-multiple-match" type="xs:string"/>
<xs:attribute name="_warning-on-no-match" type="xs:string"/>
<xs:attribute name="_warning-on-multiple-match" type="xs:string"/>
<xs:attribute name="_typed" type="xs:string"/>
<xs:attribute name="_copy_namespaces" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
</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"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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"/>
<xs:attribute name="result-prefix" type="xsl:prefix-or-default"/>
<xs:attribute name="_stylesheet-prefix" type="xs:string"/>
<xs:attribute name="_result-prefix" type="xs:string"/>
<xs:assert test="exists(@stylesheet-prefix | @_stylesheet-prefix)"/>
<xs:assert test="exists(@result-prefix | @_result-prefix)"/>
<xs:assert test="every $prefix in (@stylesheet-prefix, @result-prefix)/normalize-space(.)[. ne '#default']
satisfies $prefix = in-scope-prefixes(.)"/>
</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-or-select"/>
<xs:element name="note" type="xs:anyType"/>
<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:attribute name="_value" type="xs:string"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_level" type="xs:string"/>
<xs:attribute name="_count" type="xs:string"/>
<xs:attribute name="_from" type="xs:string"/>
<xs:attribute name="_format" type="xs:string"/>
<xs:attribute name="_lang" type="xs:string"/>
<xs:attribute name="_letter-value" type="xs:string"/>
<xs:attribute name="_ordinal" type="xs:string"/>
<xs:attribute name="_start-at" type="xs:string"/>
<xs:attribute name="_grouping-separator" type="xs:string"/>
<xs:attribute name="_grouping-size" type="xs:string"/>
<xs:assert test="if (exists(@value | @_value))
then empty((@select | @_select, @count | @_count, @from | @_from))
and (exists(@_level) or normalize-space(@level)='single')
else true()">
<xs:annotation>
<xs:documentation>
<p>
It is a static error if the value attribute of <code>xsl:number</code> is
present unless the <code>select</code>, <code>level</code>, <code>count</code>,
and <code>from</code> attributes are all absent.
</p>
</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="on-empty"
substitutionGroup="xsl:instruction"
type="xsl:sequence-constructor-or-select"/>
<xs:element name="on-non-empty"
substitutionGroup="xsl:instruction"
type="xsl:sequence-constructor-or-select"/>
<xs:element name="otherwise"
type="xsl:sequence-constructor-or-select"/>
<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="allow-duplicate-names" type="xsl:yes-or-no"/>
<xs:attribute name="build-tree" type="xsl:yes-or-no"/>
<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-solidus" type="xsl:yes-or-no"/>
<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="json-lines" type="xsl:yes-or-no"/>
<xs:attribute name="json-node-output-method" type="xsl:method"/>
<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:attribute name="_name" type="xs:string"/>
<xs:attribute name="_method" type="xs:string"/>
<xs:attribute name="_byte-order-mark" type="xs:string"/>
<xs:attribute name="_cdata-section-elements" type="xs:string"/>
<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-solidus" type="xs:string"/>
<xs:attribute name="_escape-uri-attributes" type="xs:string"/>
<xs:attribute name="_html-version" type="xs:string"/>
<xs:attribute name="_include-content-type" type="xs:string"/>
<xs:attribute name="_indent" type="xs:string"/>
<xs:attribute name="_item-separator" type="xs:string"/>
<xs:attribute name="_media-type" type="xs:string"/>
<xs:attribute name="_normalization-form" type="xs:string"/>
<xs:attribute name="_omit-xml-declaration" type="xs:string"/>
<xs:attribute name="_parameter-document" type="xs:string"/>
<xs:attribute name="_standalone" type="xs:string"/>
<xs:attribute name="_suppress-indentation" type="xs:string"/>
<xs:attribute name="_undeclare-prefixes" type="xs:string"/>
<xs:attribute name="_use-character-maps" type="xs:string"/>
<xs:attribute name="_version" type="xs:string"/>
</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"/>
<xs:attribute name="string" type="xs:string"/>
<xs:attribute name="_character" type="xs:string"/>
<xs:attribute name="_string" type="xs:string"/>
<xs:assert test="exists(@character | @_character)"/>
<xs:assert test="exists(@string | @_string)"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="override">
<xs:annotation>
<xs:documentation>
<p>This element appears as a child of <code>xsl:use-package</code> and defines
any overriding definitions of components that the containing package wishes to make
to the components made available from a library package.</p>
</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: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:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="xsl:expose"/>
<xs:element ref="xsl:declaration"/>
<xs:any namespace="##other" processContents="lax"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="declared-modes" type="xsl:yes-or-no"/>
<xs:attribute name="id" type="xs:ID"/>
<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:attribute name="fixed-namespaces" type="xsl:fixed-namespaces-type"/>
<xs:attribute name="_declared-modes" type="xs:string"/>
<xs:attribute name="_id" type="xs:string"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_package-version" type="xs:string"/>
<xs:attribute name="_input-type-annotations" type="xs:string"/>
<xs:attribute name="_fixed-namespaces" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="param" substitutionGroup="xsl:declaration">
<xs:annotation>
<xs:documentation>
<p>Declaration of the <code>xsl:param</code> element, used both defining function
parameters, template parameters, parameters to <code>xsl:iterate</code>,
and global stylesheet parameters.</p>
</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"/>
<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="static" type="xsl:yes-or-no"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_required" type="xs:string"/>
<xs:attribute name="_tunnel" type="xs:string"/>
<xs:attribute name="_static" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
<xs:assert test="if (normalize-space(@static) = ('yes', 'true', '1'))
then empty((*,text()))
else true()">
<xs:annotation>
<xs:documentation>
<p>
When the attribute <code>static="yes"</code> is specified, the <code>xsl:param</code>
element must have empty content.
</p>
</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 | @_stable))">
<xs:annotation>
<xs:documentation>
<p>
It is a static error if an <code>xsl:sort</code> element other than the first
in a sequence of sibling <code>xsl:sort</code> elements has a <code>stable</code>
attribute.
</p>
</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"/>
<xs:attribute name="_elements" type="xs:string"/>
<xs:assert test="exists(@elements | @_elements)"/>
</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"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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="select" type="xsl:expression"/>
<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="allow-duplicate-names" type="xsl:avt"/>
<xs:attribute name="build-tree" 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-solidus" 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="json-lines" type="xsl:avt"/>
<xs:attribute name="json-node-output-method" 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:attribute name="_format" type="xs:string"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_href" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:attribute name="_method" type="xs:string"/>
<xs:attribute name="_byte-order-mark" type="xs:string"/>
<xs:attribute name="_cdata-section-elements" type="xs:string"/>
<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-solidus" type="xs:string"/>
<xs:attribute name="_escape-uri-attributes" type="xs:string"/>
<xs:attribute name="_html-version" type="xs:string"/>
<xs:attribute name="_include-content-type" type="xs:string"/>
<xs:attribute name="_indent" type="xs:string"/>
<xs:attribute name="_item-separator" type="xs:string"/>
<xs:attribute name="_media-type" type="xs:string"/>
<xs:attribute name="_normalization-form" type="xs:string"/>
<xs:attribute name="_omit-xml-declaration" type="xs:string"/>
<xs:attribute name="_parameter-document" type="xs:string"/>
<xs:attribute name="_standalone" type="xs:string"/>
<xs:attribute name="_suppress-indentation" type="xs:string"/>
<xs:attribute name="_undeclare-prefixes" type="xs:string"/>
<xs:attribute name="_use-character-maps" type="xs:string"/>
<xs:attribute name="_output-version" type="xs:string"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="sequence"
substitutionGroup="xsl:instruction">
<xs:complexType>
<xs:complexContent mixed="true">
<xs:extension base="xsl:sequence-constructor-or-select">
<xs:attribute name="as" type="xsl:sequence-type"/>
<xs:attribute name="_as" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<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"/>
<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:attribute name="_lang" type="xs:string"/>
<xs:attribute name="_data-type" type="xs:string"/>
<xs:attribute name="_order" type="xs:string"/>
<xs:attribute name="_case-order" type="xs:string"/>
<xs:attribute name="_collation" type="xs:string"/>
<xs:attribute name="_stable" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="source-document" substitutionGroup="xsl:instruction">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xsl:sequence-constructor">
<xs:attribute name="href" type="xsl:avt"/>
<xs:attribute name="streamable" type="xsl:yes-or-no" default="no"/>
<xs:attribute name="use-accumulators" type="xsl:accumulator-names"/>
<xs:attribute name="type" type="xsl:EQName"/>
<xs:attribute name="validation" type="xsl:validation-type"/>
<xs:attribute name="_href" type="xs:string"/>
<xs:attribute name="_streamable" type="xs:string"/>
<xs:attribute name="_use-accumulators" type="xs:string"/>
<xs:attribute name="_type" type="xs:string"/>
<xs:attribute name="_validation" type="xs:string"/>
<xs:assert test="exists(@href | @_href)"/>
<xs:assert test="not(exists(@type | @_type) and exists(@validation | @_validation))">
<xs:annotation>
<xs:documentation>
<p>The <code>type</code> and <code>validation</code> attributes are mutually exclusive
(if one is present, the other must be absent).</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
</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"/>
<xs:attribute name="_elements" type="xs:string"/>
<xs:assert test="exists(@elements | @_elements)"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="stylesheet" substitutionGroup="xsl:transform"/>
<xs:element name="switch" 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:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="select" type="xsl:expression"/>
<xs:attribute name="_select" type="xsl:avt"/>
<xs:assert test="exists(@select | @_select)"/>
</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:attribute name="_match" type="xs:string"/>
<xs:attribute name="_priority" type="xs:string"/>
<xs:attribute name="_mode" type="xs:string"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
<xs:assert test="exists(@match | @_match) or exists(@name | @_name)">
<xs:annotation>
<xs:documentation>
<p>
An <code>xsl:template</code> element must have either a <code>match</code> attribute or a
<code>name</code> attribute, or both.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="if (empty(@match | @_match))
then (empty(@mode | @_mode) and empty(@priority | @_priority))
else true()">
<xs:annotation>
<xs:documentation>
<p>
An <code>xsl:template</code> element that has no <code>match</code> attribute must have no
<code>mode</code> attribute and no <code>priority</code> attribute.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="not(exists(@visibility | @_visibility) and empty(@name | @_name))">
<xs:annotation>
<xs:documentation>
<p>
An <code>xsl:template</code> element that has no <code>name</code> attribute must have no
<code>visibility</code> attribute
</p>
</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>
<p>
If the <code>visibility</code> attribute is present with the value <code>abstract</code>
then (a) the sequence constructor defining the template body
must be empty: that is, the only permitted children are
<code>xsl:context-item</code> and <code>xsl:param</code>
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="not(normalize-space(@visibility) = 'abstract' and exists(@match))">
<xs:annotation>
<xs:documentation>
<p>
If the <code>visibility</code> attribute is present with the value <code>abstract</code>
then there must be no <code>match</code> attribute.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="every $e in xsl:param satisfies empty($e/(@visibility | @_visibility))">
<xs:annotation>
<xs:documentation>
<p>A parameter for a template must have no <code>visibility</code> attribute.</p>
</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:attribute name="_disable-output-escaping" type="xs:string"/>
</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:attribute name="_version" type="xs:string">
<xs:annotation>
<xs:documentation>
<p>
The version attribute indicates the version of XSLT that the
stylesheet module requires. The attribute is required, unless the
<code>xsl:stylesheet</code> element is a child of an <code>xsl:package</code> element, in
which case it is optional: the default is then taken from the
parent <code>xsl:package</code> element.
</p>
</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"/>
<!-- weaker than XSLT 1.0 -->
</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:attribute name="fixed-namespaces"
type="xsl:fixed-namespaces-type"/>
<xs:attribute name="_id" type="xs:string"/>
<xs:attribute name="_input-type-annotations" type="xs:string"/>
<xs:attribute name="_fixed-namespaces" type="xs:string"/>
<!--* The 'static' attribute may be used on 'param' and 'variable'
* only when they are top-level elements. *-->
<xs:assert test="every $v in (.//xsl:param, .//xsl:variable)[exists(@static | @_static)]
satisfies $v[parent::xsl:stylesheet or parent::xsl:transform or parent::xsl:override]">
<xs:annotation>
<xs:documentation>
<p>
The static attribute must not be present on an <code>xsl:variable</code> or
<code>xsl:param</code> element unless it is a top-level element.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="every $prefix in (@exclude-result-prefixes[not(. = '#all')],
@extension-element-prefixes)
satisfies ((if ($prefix = '#default') then '' else $prefix) = in-scope-prefixes(.))">
<xs:annotation>
<xs:documentation>
<p>
XTSE0808: It is a static error if a namespace prefix is used
within the <code>[xsl:]exclude-result-prefixes</code> attribute and there is
no namespace binding in scope for that prefix.
</p>
<p>
XTSE0809: It is a static error if the value #default is used
within the <code>[xsl:]exclude-result-prefixes</code> attribute and the
parent element of the <code>[xsl:]exclude-result-prefixes</code> attribute
has no default namespace.
</p>
</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="rollback-output" type="xsl:yes-or-no" default="yes"/>
<xs:attribute name="select" type="xsl:expression" use="optional"/>
<xs:attribute name="_rollback-output" type="xs:string"/>
<xs:attribute name="_select" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="use-package" substitutionGroup="xsl:declaration">
<xs:annotation>
<xs:documentation>
<p>This element appears as a child of <code>xsl:package</code> and defines a dependency
of the containing package on another package, identified by URI in the <code>name</code>
attribute. The <code>package-version</code> attribute indicates which version of the
library package is required, or may indicate a range of versions.</p>
</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:attribute name="_name" type="xs:string"/>
<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:attribute name="_separator" type="xs:string"/>
<xs:attribute name="_disable-output-escaping" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="variable" substitutionGroup="xsl:declaration xsl:instruction">
<xs:annotation>
<xs:documentation>
<p>Declaration of the <code>xsl:variable</code> element, used both for local
and global variable bindings.</p>
<p>
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.
</p>
</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"/>
<xs:attribute name="as" type="xsl:sequence-type"/>
<xs:attribute name="visibility" type="xsl:visibility-type"/>
<xs:attribute name="static" type="xsl:yes-or-no"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_visibility" type="xs:string"/>
<xs:attribute name="_static" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
<xs:assert test="if (normalize-space(@static) = ('yes', 'true', '1'))
then (exists(@_visibility) or normalize-space(@visibility)
= ('', 'private', 'final'))
else true()">
<xs:annotation>
<xs:documentation>
<p>
When the static attribute is present with the value yes, the
visibility attribute must not have a value other than private or
final.
</p>
</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="if (normalize-space(@static) = ('yes', 'true', '1'))
then (empty((*, text())) and exists(@select | @_select))
else true()">
<xs:annotation>
<xs:documentation>
<p>
When the attribute <code>static="yes"</code> is specified, the <code>xsl:variable</code>
element must have empty content, and the <code>select</code> attribute must
be present to define the value of the variable.
</p>
</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="select" type="xsl:expression"/>
<xs:attribute name="test" type="xsl:expression"/>
<xs:attribute name="_select" type="xs:string"/>
<xs:attribute name="_test" type="xs:string"/>
<xs:assert test="exists(@test | @_test)"/>
<xs:assert test="not(exists(@select | @_select) and
(exists(* except xsl:fallback) or exists(text()[normalize-space()])))"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="where-populated"
substitutionGroup="xsl:instruction"
type="xsl:sequence-constructor"/>
<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"/>
<xs:attribute name="as" type="xsl:sequence-type"/>
<xs:attribute name="tunnel" type="xsl:yes-or-no"/>
<xs:attribute name="_name" type="xs:string"/>
<xs:attribute name="_as" type="xs:string"/>
<xs:attribute name="_tunnel" type="xs:string"/>
<xs:assert test="exists(@name | @_name)"/>
</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 <code>xsl:literal-result-element</code>
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
<code>literal-result-element-attributes</code>, 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>
<p>
PART D: definitions of simple types used in stylesheet attributes
</p>
</xs:documentation>
</xs:annotation>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:simpleType name="accumulator-names">
<xs:annotation>
<xs:documentation>
<p>
The <code>use-accumulators</code> attribute of <code>xsl:source-document</code>,
<code>xsl:merge-source</code>, or <code>xsl:global-context-item</code>:
either a list, each member being a QName; or the value <code>#all</code>
</p>
</xs:documentation>
</xs:annotation>
<xs:union>
<xs:simpleType>
<xs:list itemType="xsl:EQName"/>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="#all"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType name="avt">
<xs:annotation>
<xs:documentation>
<p>
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 4.0 Recommendation.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:simpleType name="char">
<xs:annotation>
<xs:documentation>
<p>
A string containing exactly one character.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:length value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="char-optionally-expanded">
<xs:annotation>
<xs:documentation>
<p>
A string containing either a single character, or a single character
followed by a colon followed by an arbitrary string
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value=".(:.*)?"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="component-kind-type">
<xs:annotation>
<xs:documentation>
<p>
Describes a kind of component within a package.
</p>
</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:enumeration value="*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="default-mode-type">
<xs:annotation>
<xs:documentation>
<p>
The <code>default-mode</code> attribute of <code>xsl:stylesheet</code>,
<code>xsl:transform</code>, <code>xsl:package</code>
(or any other xsl:* element): either a QName or #unnamed.
</p>
</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="component-test">
<xs:annotation>
<xs:documentation>
<p> A NameTest or a named function reference. </p>
</xs:documentation>
</xs:annotation>
<xs:union memberTypes="xsl:nametest xsl:named-function-reference"/>
</xs:simpleType>
<xs:simpleType name="component-tests">
<xs:annotation>
<xs:documentation>
<p> A list of NameTests or named function references</p>
</xs:documentation>
</xs:annotation>
<xs:list itemType="xsl:component-test"/>
</xs:simpleType>
<xs:simpleType name="expression">
<xs:annotation>
<xs:documentation>
<p>
An XPath 4.0 expression.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:pattern value=".+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="fixed-namespaces-type">
<xs:annotation>
<xs:documentation>
<p>
A sequence of tokens, each of which may be one of #default, an NCName, a prefix=namespace binding, or a URI
</p>
</xs:documentation>
</xs:annotation>
<xs:list>
<xs:simpleType>
<xs:union memberTypes="xsl:fixed-namespaces-type-default xs:NCName xsl:fixed-namespaces-type-prefix-binding xs:anyURI"/>
</xs:simpleType>
</xs:list>
</xs:simpleType>
<xs:simpleType name="fixed-namespaces-type-default">
<xs:restriction base="xs:string">
<xs:enumeration value="#default"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="fixed-namespaces-type-prefix-binding">
<xs:restriction base="xs:string">
<xs:pattern value="([\i-[:]][\c-[:]]*:)=.+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="item-type">
<xs:annotation>
<xs:documentation>
<p>
An XPath 4.0 ItemType
</p>
</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>
<p>
Describes how type annotations in source documents are handled.
</p>
</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>
<p>
The <code>level</code> attribute of <code>xsl:number</code>:
one of <code>single</code>, <code>multiple</code>, or <code>any</code>.
</p>
</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>
<p>
The <code>mode</code> attribute of <code>xsl:apply-templates</code>:
either a QName, or <code>#current</code>,
or <code>#unnamed</code>, or <code>#default</code>.
</p>
</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>
<p>
The <code>mode</code> attribute of <code>xsl:template</code>: either a list, each member being
either a QName or <code>#default</code> or <code>#unnamed</code>; or the value <code>#all</code>
</p>
</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>
<p>
XTSE0550: It is a static error if the same token is included
more than once in the list.
</p>
</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="named-function-reference">
<xs:annotation>
<xs:documentation>
<p> In simple terms, this is an EQName followed by "#arity" where "arity" is a non-negative integer. However,
XSD doesn't allow us to reuse the definition of EQName in this way, so it has to be defined from scratch. The simplest
way to do this is with an assertion. However, the assertion cannot exploit types such as <code>xsl:EQName</code> defined in this
schema</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:pattern value="((Q\{.*\})|([\i-[:]][\c-[:]]*:))?[\i-[:]][\c-[:]]*#[0-9]+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="nametest">
<xs:annotation>
<xs:documentation>
<p> A list of NameTests, as defined in the XPath 31 Recommendation. Each NameTest is either
an EQName, or "*", or "prefix:*", or "*:localname", or the wildcard Q{uri}*. </p>
</xs:documentation>
</xs:annotation>
<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:pattern value="Q\{[^}]*\}\*"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType name="nametests">
<xs:annotation>
<xs:documentation>
<p> A list of NameTests, as defined in the XPath 4.0 Recommendation. Each NameTest is either
a QName, or "*", or "prefix:*", or "*:localname" </p>
</xs:documentation>
</xs:annotation>
<xs:list itemType="xsl:nametest"/>
</xs:simpleType>
<xs:simpleType name="on-multiple-match-type">
<xs:annotation>
<xs:documentation>
<p>
Describes the action to be taken when there are several template rules
to match an item in a given mode.
</p>
</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>
<p>
Describes the action to be taken when there is no template rule to match
an item in a given mode.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="deep-copy"/>
<xs:enumeration value="shallow-copy"/>
<xs:enumeration value="shallow-copy-all"/>
<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>
<p>
The <code>method</code> attribute of <code>xsl:output</code>: Either one of the recognized names
"xml", "xhtml", "html", "text", "json", or "adaptive",
or a QName that must include a prefix.
</p>
</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:enumeration value="json"/>
<xs:enumeration value="adaptive"/>
</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>
<p>
A match pattern as defined in the XSLT 4.0 Recommendation. The syntax
for patterns is a restricted form of the syntax for XPath 4.0
expressions.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xsl:expression"/>
</xs:simpleType>
<xs:simpleType name="prefix-or-default">
<xs:annotation>
<xs:documentation>
<p>
Either a namespace prefix, or <code>#default</code>. Used in the <code>xsl:namespace-alias</code>
element.
</p>
</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>
<p>
A list of QNames. Used in the <code>[xsl:]use-attribute-sets</code> attribute of
various elements, and in the <code>cdata-section-elements</code> attribute of
<code>xsl:output</code>.
</p>
</xs:documentation>
</xs:annotation>
<xs:list itemType="xsl:EQName"/>
</xs:simpleType>
<xs:simpleType name="EQName">
<xs:annotation>
<xs:documentation>
<p>
An extended QName. This schema does not use the built-in type <code>xs:QName</code>,
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
<code>Q{uri}local</code>
</p>
<p>In XSLT 4.0, where a QName is used in the <code>name</code> attribute
of (say) <code>xsl:template</code> or <code>xsl:call-template</code>, the prefix
does not have to be bound in an XML namespace declaration; rather it can be bound
in a <code>fixed-namespaces</code> attribute on the <code>xsl:stylesheet</code>
element. Therefore, the built-in <code>xs:QName</code> type cannot be used.
This schema does not attempt to verify that namespace prefixes have been
properly declared.</p>
</xs:documentation>
</xs:annotation>
<xs:union memberTypes="xs:NCName">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:pattern value="[\i-[:]][\c-[:]]*:[\i-[:]][\c-[:]]*"/>
</xs:restriction>
</xs:simpleType>
<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>
<p>
A subtype of EQNames that excludes no-namespace names
</p>
</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>
<p>
The description of a datatype, conforming to the SequenceType production
defined in the XPath 4.0 Recommendation
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:pattern value=".+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="streamability-type">
<xs:annotation>
<xs:documentation>
<p>
Describes the category to which a function belongs, with regards to its
streaming behavior.
</p>
</xs:documentation>
</xs:annotation>
<xs:union memberTypes="xsl:EQName-in-namespace">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="unclassified"/>
<xs:enumeration value="absorbing"/>
<xs:enumeration value="inspection"/>
<xs:enumeration value="filter"/>
<xs:enumeration value="shallow-descent"/>
<xs:enumeration value="deep-descent"/>
<xs:enumeration value="ascent"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType name="typed-type">
<xs:annotation>
<xs:documentation>
<p>
Describes whether a mode is designed to match typed or untyped nodes.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
<xs:enumeration value="1"/>
<xs:enumeration value="0"/>
<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>
<p>
Describes different ways of type-annotating an element or attribute.
</p>
</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>
<p>
Describes different ways of type-annotating an element or attribute.
</p>
</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>
<p>
Describes the visibility of a component within a package.
</p>
</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>
<p>
Describes the visibility of a component within a package.
</p>
</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>
<p>
One of the values "yes" or "no": the values "true" or "false", or "1" or
"0" are accepted as synonyms.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
<xs:enumeration value="1"/>
<xs:enumeration value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="yes-or-no-or-maybe">
<xs:annotation>
<xs:documentation>
<p>
One of the values "yes" or "no" or "omit". The values "true" or "false",
or "1" or "0" are accepted as synonyms of "yes" and "no" respectively.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
<xs:enumeration value="1"/>
<xs:enumeration value="0"/>
<xs:enumeration value="maybe"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="yes-or-no-or-omit">
<xs:annotation>
<xs:documentation>
<p>
One of the values "yes" or "no" or "omit". The values "true" or "false",
or "1" or "0" are accepted as synonyms of "yes" and "no" respectively.
</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
<xs:enumeration value="1"/>
<xs:enumeration value="0"/>
<xs:enumeration value="omit"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="zero-digit">
<xs:annotation>
<xs:documentation>
<p>
A digit that has the numerical value zero.
</p>
</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>
Use the arrows to browse significant changes since the 3.0 version of this specification.
Sections with significant changes are marked Δ in the table of contents.
Named item types can be declared using the new xsl:item-type element. This is designed to avoid repeating lengthy type definitions (for example function types) every time they are used. [This feature was present in the editor's draft presented to the WG when it started work.]
The xsl:for-each and xsl:apply-templates instructions acquire an attribute separator that can be used to insert content between adjacent items. [This change was in the editor's draft adopted as a baseline when the WG commenced work.]
PR 751 1386
The result type of a mode can be declared using an as attribute. The result type of all template rules in this mode must be consistent with this, as must the values returned by any built-in template rules for the mode.
The xsl:for-each and xsl:apply-templates instructions acquire an attribute separator that can be used to insert content between adjacent items. [This change was in the editor's draft adopted as a baseline when the WG commenced work.]
Numeric values of type xs:decimal are compared as decimals, without first converting to xs:double.
Functions that accept a lexical QName as an argument, such as key, function-available, element-available, type-available, system-property, accumulator-before, and accumulator-after, now have the option of supplying an xs:QName value instead. [This change was in the editor's draft accepted by the WG as its baseline when it started work.]
Functions that accept a lexical QName as an argument, such as key, function-available, element-available, type-available, system-property, accumulator-before, and accumulator-after, now have the option of supplying an xs:QName value instead. [This change was in the editor's draft accepted by the WG as its baseline when it started work.]
It is possible to invoke a named template using an extension instruction, specifically, an element whose name matches the name of the named template.
See 10.1.3 Invoking Named Templates using Extension Instructions
A new attribute xsl:map/@duplicates is available, allowing control over how duplicate keys are handled by the xsl:map instruction.
The semantics of patterns using the intersect and except operators have been changed to reflect the intuitive meaning: for example a node now matches A except B if it matches A and does not match B.
A new attribute xsl:for-each-group/@split-when is available to give applications more complete control over how a sequence is partitioned
See 14 Grouping
Duplicate xsl:include declarations within a stylesheet level are now ignored, preventing spurious errors caused by the presence of duplicate named components.
Named record types are introduced.
The contents of a character map declared using xsl:character-map are now available dynamically via a new character-map function.
New variables err:stack-trace, err:additional, and err:map are available within an xsl:catch clause.
See 8.4 Try/Catch
The input to the serializer can be defined using the select attribute of xsl:result-document as an alternative to using a sequence constructor.
It is no longer an intrinsic error for a global variable to refer to itself; this is now permitted, for example in cases where the value of the global variable is a recursive inline function. Cases where self-reference would not make sense are covered by the existing rules on circularities: see 9.11 Circular Definitions.
The default value for the indent parameter is now defined to be no for all output methods other than html and xhtml.
The xsl:map instruction allows a select attribute as an alternative to the contained sequence constructor.
The xsl:map-entry instruction, in common with other instructions, now raises error XTSE3185 (rather than XTSE3280) if both a select attribute and a sequence constructor are present.
Composite sort keys are allowed in xsl:sort.
The xsl:mode declaration acquires an attribute copy-namespaces which determines whether or not the built-in template rule copies unused namespace bindings.
The default priority for a template rule using a union pattern has changed. This change may cause incompatible behavior.
The xsl:apply-imports and xsl:next-match instructions automatically pass supplied parameters to the overridden template rule.
PR 159
Parameters on functions declared using xsl:function can now be defined as optional, with a default value supplied.
PR 237
The xsl:if instruction now allows then and else attributes.
See 8.1 Conditional Processing with xsl:if
In xsl:choose, the xsl:when and xsl:otherwise elements can take a select attribute in place of a sequence constructor.
See 8.2 Conditional Processing with xsl:choose
A new xsl:switch instruction is introduced.
PR 326
The higher-order-function feature no longer exists; higher-order functions are now a core part of XSLT, no longer an optional extra.
See 27 Conformance
PR 353
A new attribute, main-module, is added to the xsl:stylesheet element. The attribute is provided for the benefit of development tools such as syntax-directed editors to provide information about all the components (variables, functions, etc) visible within a stylesheet module.
A new element xsl:note is available for documentation and similar purposes: it can appear anywhere in the stylesheet and is ignored by the XSLT processor.
PR 401
Patterns (especially those used in template rules) can now be defined by reference to item types, so any item type can be used as a match pattern. For example match="record(longitude, latitude, *)" matches any map that includes the key values "longitude" and "latitude".
PR 406
The new instruction xsl:array is introduced to allow construction of arrays.
PR 470
The xsl:stylesheet, xsl:transform, or xsl:package element may have a fixed-namespaces attribute making it easier to have the same namespace declarations in force throughout a stylesheet.
PR 489
The xsl:matching-substring and xsl:non-matching-substring elements within xsl:analyze-string may now take a select attribute in place of a contained sequence constructor.
PR 534
A new serialization parameter escape-solidus is provided to control whether the character / is escaped as \/ by the JSON serialization method.
PR 542
A mode (called an enclosing mode) can be defined in which all the relevant template rules are children of the xsl:mode element. This is intended to allow a stylesheet design in which it is easier to determine which rules might apply to a given xsl:apply-templates call.
PR 599
Simplified stylesheets no longer require an xsl:version attribute (which means they might not need a declaration of the XSLT namespace). Unless otherwise specified, a 4.0 simplified stylesheet defaults expand-text to true.
PR 635
The rules concerning the compatibility of schemas imported by different packages have been clarified. It is now explicitly stated that instructions that trigger validation must use the imported schema of the package in which validation is invoked. This differs from the current practice of some XSLT 3.0 processors, which may use (for example) a schema formed from the union of the imported schemas in all packages.
See 3.15 Importing Schema Components
See 25.4 Validation
PR 717
Capturing accumulators have been added; when streaming with a capturing accumulator, the accumulator-after has full access to a snapshot of the matched element node.
PR 718
To allow recursive-descent transformation on a tree of maps and arrays, a new set of built-in templates rules shallow-copy-all is introduced.
PR 751
The xsl:mode declaration acquires an attribute as="sequence-type" which declares the return type of all template rules in that mode.
PR 1181
The [xsl:]xpath-default-namespace attribute can be set to the value ##any, which causes unprefixed element names to match in any namespace or none.
See 5.1.2 Unprefixed Lexical QNames in Expressions and Patterns
PR 1250
The strings used in the formatted number to represent a decimal separator, grouping separator, exponent separator, percent sign, per mille sign, or minus sign, are no longer constrained to be single characters.
PR 1254
The rules concerning the interpretation of xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes have been tightened up.
See 25.4 Validation
PR 1306
An as attribute is available on the xsl:sequence instruction.
PR 1361
The term atomic value has been replaced by atomic item.
See 2.1 Terminology
PR 1378
A function call at the outermost level can now be named using any valid EQName (for example fn:doc) provided it binds to one of the permitted functions fn:doc, fn:id, fn:element-with-id, fn:key, or fn:root. If two functions are called, for example doc('a.xml')/id('abc'), it is no longer necessary to put the second call in parentheses.
PR 1442
Default priorities are added for new forms of ElementTest and AttributeTest, for example element(p:*) and element(a|b).
PR 1622
The rules for equality comparison have changed to bring keys into line with maps.
See 20.2.2 fn:key
New in 4.0.
PR 1689
Composite merge keys are now allowed.
See 15 Merging
PR 1703
Ordered maps are introduced.
PR 1819
Different parts of a stylesheet may now use different imported schemas.
See 2.10 Stylesheets and XML Schemas
The standard attribute [xsl:]schema-role is introduced, to allow different parts of a stylesheet to use different schemas.
Different parts of a stylesheet may now use different imported schemas.
See 3.15 Importing Schema Components
A stylesheet can import multiple schemas with different schema role names.
PR 1856
The rules have been adjusted to allow for new capabilities in regular expressions, such as zero-width assertions.
PR 1858
The xsl:record instruction is introduced to make construction of record maps simpler.
Attribute xsl:record/@xsl:duplicates is added to control duplicate keys handling in the xsl:record instruction.