For convenience, schemas are provided for validation of XSLT 3.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 3.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. 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). However, every valid stylesheet module conforms to this schema, unless it contains elements that invoke forwards compatible behavior.
A copy of this schema is available at schema-for-xslt30.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"?> <!--* <!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200105//EN" "http://www.w3.org/2001/XMLSchema.dtd" [ <!ENTITY % schemaAttrs " xmlns:xs CDATA #IMPLIED xmlns:xsl CDATA #IMPLIED xmlns:xsd CDATA #IMPLIED" > <!ENTITY % p "xs:"> <!ENTITY % s ":xs"> ]> *--> <?xml-stylesheet href="http://www.w3.org/2008/09/xsd.xsl" type="text/xsl"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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 3.0 stylesheets. It defines all the elements that appear in the XSLT namespace; it also provides hooks that allow the inclusion of user-defined literal result elements, extension instructions, and top-level data elements. </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 xsl:call-template has a declaration). Doing this in general requires cross-document validation, which is beyond the scope of XSD. </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: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 xsl:output; it contains the definitions of the version attribute that may appear on any element. </p> <p> The xsl:output does not use this definition because, although it has a version attribute, the syntax and semantics of this attribute are unrelated to the standard version attribute allowed on other elements. </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 xsl:use-package and defines any variations that the containing package wishes to make to the visibility of components made available from a library package. For example, it may indicate that some of the public components in the library package are not to be made available to the containing package. </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:EQNames"/> <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="_match" type="xs:string"/> <xs:attribute name="_phase" 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="mode" type="xsl:mode"/> <xs:attribute name="_select" 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 xsl:sort element other than the first in a sequence of sibling xsl:sort elements has a stable attribute. </p> </xs:documentation> </xs:annotation> </xs:assert> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="assert" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor"> <xs:attribute name="test" type="xsl:expression"/> <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 type and validation 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 type and validation 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 type and validation 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 type and validation 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" default="."/> <xs:attribute name="grouping-separator" type="xsl:char" default=","/> <xs:attribute name="infinity" type="xs:string" default="Infinity"/> <xs:attribute name="minus-sign" type="xsl:char" default="-"/> <xs:attribute name="exponent-separator" type="xsl:char" default="e"/> <xs:attribute name="NaN" type="xs:string" default="NaN"/> <xs:attribute name="percent" type="xsl:char" default="%"/> <xs:attribute name="per-mille" type="xsl:char" default="~"/> <xs:attribute name="zero-digit" type="xsl:zero-digit" default="0"/> <xs:attribute name="digit" type="xsl:char" default="#"/> <xs:attribute name="pattern-separator" type="xsl:char" default=";"/> <xs: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 type and validation 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 xsl:use-package 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:EQNames"/> <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="_select" 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 xsl:sort element other than the first in a sequence of sibling xsl:sort elements has a stable 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="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="_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 xsl:sort element other than the first in a sequence of sibling xsl:sort elements has a stable 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])) = 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="_identity-sensitive" 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/(@select | @_select)) and empty($e/child::node()))"> <xs:annotation> <xs:documentation> <p> A parameter for a function must have no default value. </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 function must have no visibility attribute. </p> </xs:documentation> </xs:annotation> </xs:assert> <xs:assert test="every $e in xsl:param satisfies empty($e/(@required | @_required))"> <xs:annotation> <xs:documentation> <p> A parameter for a function must have no required 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="_test" type="xs:string"/> <xs:assert test="exists(@test | @_test)"/> </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 xsl:import-schema element that contains an xs:schema element has a schema-location 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" type="xsl:sequence-constructor" substitutionGroup="xsl:instruction"/> <xs:element name="map-entry" substitutionGroup="xsl:instruction"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-and-select"> <xs:attribute name="key" type="xsl:expression"/> <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"/> <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: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="_name" type="xs:string"/> <xs:attribute name="_streamable" 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"/> <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 xsl:number is present unless the select, level, count, and from 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"/> <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-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-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-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 xsl:use-package and defines any overriding definitions of components that the containing package wishes to make to the components made available from a library package. </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="_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:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="param" substitutionGroup="xsl:declaration"> <xs:annotation> <xs:documentation> <p> Declaration of the xsl:param element, used both defining function parameters, template parameters, parameters to xsl:iterate, 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 static="yes" is specified, the xsl:param 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 xsl:sort element other than the first in a sequence of sibling xsl:sort elements has a stable 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="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-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-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="_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-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 type and validation 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" type="xsl:sequence-constructor-or-select"/> <xs:element name="sort"> <xs:complexType> <xs:complexContent mixed="true"> <xs:extension base="xsl:sequence-constructor-or-select"> <xs:attribute name="lang" type="xsl:avt"/> <xs:attribute name="data-type" type="xsl:avt" default="text"/> <xs:attribute name="order" type="xsl:avt" default="ascending"/> <xs:attribute name="case-order" type="xsl:avt"/> <xs:attribute name="collation" type="xsl:avt"/> <xs:attribute name="stable" type="xsl:avt"/> <xs: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 type and validation 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="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 xsl:template element must have either a match attribute or a name 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 xsl:template element that has no match attribute must have no mode attribute and no priority 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 xsl:template element that has no name attribute must have no visibility 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 visibility attribute is present with the value abstract then (a) the sequence constructor defining the template body must be empty: that is, the only permitted children are xsl:context-item and xsl:param </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 visibility attribute is present with the value abstract then there must be no match 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 visibility 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 xsl:stylesheet element is a child of an xsl:package element, in which case it is optional: the default is then taken from the parent xsl:package element. </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="_id" type="xs:string"/> <xs:attribute name="_input-type-annotations" 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 xsl:variable or xsl:param 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 [xsl:]exclude-result-prefixes 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 [xsl:]exclude-result-prefixes attribute and the parent element of the [xsl:]exclude-result-prefixes 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 xsl:package and defines a dependency of the containing package on another package, identified by URI in the name attribute. The package-version attribute indicates which version of the library package is required, or may indicate a range of versions. </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 xsl:variable 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 static="yes" is specified, the xsl:variable element must have empty content, and the select attribute must be present to define the value of the variable. </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="test" type="xsl:expression"/> <xs:attribute name="_test" type="xs:string"/> <xs:assert test="exists(@test | @_test)"/> </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> <p> PART C: definition of literal result elements There are three ways to define the literal result elements permissible in a stylesheet. (a) do nothing. This allows any element to be used as a literal result element, provided it is not in the XSLT namespace (b) declare all permitted literal result elements as members of the xsl:literal-result-element substitution group (c) redefine the model group xsl:result-elements to accommodate all permitted literal result elements. Literal result elements are allowed to take certain attributes in the XSLT namespace. These are defined in the attribute group literal-result-element-attributes, which can be included in the definition of any literal result element. </p> </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 use-accumulators attribute of xsl:source-document, xsl:merge-source, or xsl:global-context-item: either a list, each member being a QName; or the value #all </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 2.1 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="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 default-mode attribute of xsl:stylesheet, xsl:transform, xsl:package (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="expression"> <xs:annotation> <xs:documentation> <p> An XPath 2.0 expression. </p> </xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> <xs:pattern value=".+"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="item-type"> <xs:annotation> <xs:documentation> <p> An XPath 2.1 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 level attribute of xsl:number: one of single, multiple, or any. </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 mode attribute of xsl:apply-templates: either a QName, or #current, or #unnamed, or #default. </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 mode attribute of xsl:template: either a list, each member being either a QName or #default or #unnamed; or the value #all </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="nametests"> <xs:annotation> <xs:documentation> <p> A list of NameTests, as defined in the XPath 2.0 Recommendation. Each NameTest is either a QName, or "*", or "prefix:*", or "*:localname" </p> </xs:documentation> </xs:annotation> <xs:list> <xs:simpleType> <xs:union memberTypes="xsl:EQName"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="*"/> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction base="xs:token"> <xs:pattern value="\i\c*:\*"/> <xs:pattern value="\*:\i\c*"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> </xs:list> </xs:simpleType> <xs:simpleType name="on-multiple-match-type"> <xs:annotation> <xs:documentation> <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="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 method attribute of xsl:output: Either one of the recognized names "xml", "xhtml", "html", "text", 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: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 2.1 Recommendation. The syntax for patterns is a restricted form of the syntax for XPath 2.0 expressions. Change since XSLT 2.0: Patterns may now match any item (not only nodes) </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 #default. Used in the xsl:namespace-alias 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 [xsl:]use-attribute-sets attribute of various elements, and in the cdata-section-elements attribute of xsl:output </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 xs:QName, but rather defines its own QName type. This may be either a local name, or a prefixed QName, or a name written using the extended QName notation Q{uri}local </p> <p> Although xs:QName would define the correct validation on these attributes, a schema processor would expand unprefixed QNames incorrectly when constructing the PSVI, because (as defined in XML Schema errata) an unprefixed xs:QName is assumed to be in the default namespace, which is not the correct assumption for XSLT. The datatype is therefore defined as a union of NCName and QName, so that an unprefixed name will be validated as an NCName and will therefore not be treated as having the semantics of an unprefixed xs:QName. </p> </xs:documentation> </xs:annotation> <xs:union memberTypes="xs:NCName xs:QName"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:pattern value="Q\{[^{}]*\}[\i-[:]][\c-[:]]*"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> <xs:simpleType name="EQName-in-namespace"> <xs:annotation> <xs:documentation> <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 2.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>
The following Relax-NG schema may be used to validate XSLT 3.0 stylesheet modules. Similar caveats apply as for the XSD 1.1 version.
A copy of this schema is available at schema-for-xslt30.rnc
# XSLT 3.0 Relax NG Schema # # Copyright (c) 2010-2016, Mohamed ZERGAOUI (Innovimax) # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. # Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. # Neither the name of the Mohamed ZERGAOUI or Innovimax nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # namespace local = "" default namespace xsl = "http://www.w3.org/1999/XSL/Transform" namespace xs = "http://www.w3.org/2001/XMLSchema" start = stylesheet.element | transform.element | package.element | literal-result-element-as-stylesheet sequence-constructor.model = (instruction.category | literal-result-element | text)* literal-result-element-as-stylesheet = element * - xsl:* { attribute xsl:version { decimal.datatype }, literal-result-element-no-version.atts, sequence-constructor.model } literal-result-element = element * - xsl:* { literal-result-element.atts, sequence-constructor.model } literal-result-element.atts = literal-result-element-no-version.atts, attribute xsl:version { text }? # These attributes may also appear on a literal result element, but in this case, to distinguish them from user-defined attributes, # the names of the attributes are in the XSLT namespace. They are thus typically written as # xsl:default-collation, # xsl:default-mode, # xsl:default-validation, # xsl:exclude-result-prefixes, # xsl:expand-text, # xsl:extension-element-prefixes, # xsl:use-when, # xsl:version, # or xsl:xpath-default-namespace. literal-result-element-no-version.atts = attribute * - xsl:* { avt.datatype }* & attribute xsl:default-collation { uris.datatype }? & attribute xsl:default-mode { eqname.datatype | '#unnamed' }? & attribute xsl:default-validation { "preserve" | "strip" }? & attribute xsl:exclude-result-prefixes { exclude.prefixes.datatype }? # or prefixes.datatype ? & attribute xsl:expand-text { boolean.datatype }? & attribute xsl:extension-element-prefixes { extension.prefixes.datatype }? # or prefixes.datatype ? & attribute xsl:inherit-namespaces { boolean.datatype }? & attribute xsl:on-empty { expression.datatype }? & attribute xsl:use-attribute-sets { eqnames.datatype }? & attribute xsl:use-when { expression.datatype }? & attribute xsl:xpath-default-namespace { xsd:anyURI }? & (attribute xsl:type { eqname.datatype } | attribute xsl:validation { "strict" | "lax" | "preserve" | "strip" })? top-level-extension = element * - (xsl:* | local:*) { anyElement } anyElement = grammar { start = any any = (attribute * { text } | text | element * { any })* } extension.atts = attribute * - (xsl:* | local:*) { text }* declarations.model = (declaration.category | top-level-extension)* # [Definition: There are a number of standard attributes that may appear on any XSLT element: specifically # default-collation, # default-mode, # default-validation, # exclude-result-prefixes, # expand-text, # extension-element-prefixes, # use-when, # version, # and xpath-default-namespace.] global.atts = attribute default-collation { uris.datatype }?, attribute _default-collation { avt.datatype }?, attribute default-mode { eqname.datatype | '#unnamed' }?, attribute _default-mode { avt.datatype }?, attribute default-validation { "preserve" | "strip" }?, attribute _default-validation { avt.datatype }?, attribute exclude-result-prefixes { exclude.prefixes.datatype }?, attribute _exclude-result-prefixes { avt.datatype }?, # or prefixes.datatype ? attribute expand-text { boolean.datatype }?, attribute _expand-text { avt.datatype }?, attribute extension-element-prefixes { extension.prefixes.datatype }?, attribute _extension-element-prefixes { avt.datatype }?, # or prefixes.datatype ? attribute use-when { expression.datatype }?, attribute _use-when { avt.datatype }?, attribute version { decimal.datatype }?, attribute _version { avt.datatype }?, attribute xpath-default-namespace { uri.datatype }?, attribute _xpath-default-namespace { avt.datatype }? global.atts.except.version = attribute default-collation { uris.datatype }?, attribute _default-collation { avt.datatype }?, attribute exclude-result-prefixes { exclude.prefixes.datatype }?, attribute _exclude-result-prefixes { avt.datatype }?, # or prefixes.datatype ? attribute expand-text { boolean.datatype }?, attribute _expand-text { avt.datatype }?, attribute extension-element-prefixes { extension.prefixes.datatype }?, attribute _extension-element-prefixes { avt.datatype }?, # or prefixes.datatype ? attribute use-when { expression.datatype }?, attribute _use-when { avt.datatype }?, attribute xpath-default-namespace { uri.datatype }?, attribute _xpath-default-namespace { avt.datatype }? qname.datatype = xsd:QName # Extract from XPath 3.0 #[94] EQName ::= QName | URIQualifiedName #[104] QName ::= [http://www.w3.org/TR/REC-xml-names/#NT-QName]Names #[105] NCName ::= [http://www.w3.org/TR/REC-xml-names/#NT-NCName]Names #[99] URIQualifiedName ::= BracedURILiteral NCName #[100] BracedURILiteral ::= "Q" "{" [^{}]* "}" uri.qualified.name = xsd:token { pattern = "Q\{[^\{\}]*\}[\i-[:]][\c-[:]]*" } qname.strict = xsd:token { pattern = "[\i-[:]][\c-[:]]:[\i-[:]][\c-[:]]" } eqname.datatype = xsd:QName | uri.qualified.name | qname.strict qnames.datatype = list { qname.datatype* } eqnames.datatype = list { eqname.datatype* } ncname.datatype = xsd:NCName prefix.datatype = xsd:NCName boolean.datatype = "yes" | "no" | "true" | "false" | "0" | "1" expression.datatype = text char.datatype = xsd:string { length = "1" } string.datatype = text id.datatype = xsd:NCName tokens.datatype = list { token* } prefixes.datatype = list { token* } extension.prefixes.datatype = list { xsd:NCName* } exclude.prefixes.datatype = list { "#all" | (xsd:NCName | "#default")* } token.datatype = token language.datatype = xsd:language nmtoken.datatype = xsd:NMTOKEN decimal.datatype = xsd:decimal integer.datatype = xsd:integer uri.datatype = xsd:anyURI uris.datatype = list { xsd:anyURI* } pattern.datatype = text qname-but-not-ncname.datatype = xsd:QName { pattern = ".*:.*" } xs_schema.element = element xs:schema { anyElement* } item-type.datatype = text sequence-type.datatype = text declaration.category = use-package.element | include.element | import.element | import-schema.element | strip-space.element | preserve-space.element | decimal-format.element | template.element | mode.element | global-context-item.element | variable.element | param.element | attribute-set.element | function.element | namespace-alias.element | accumulator.element | key.element | output.element | character-map.element instruction.category = apply-templates.element | apply-imports.element | next-match.element | for-each.element | iterate.element | next-iteration.element | break.element | if.element | choose.element | try.element | variable.element | call-template.element | evaluate.element | element.element | attribute.element | text.element | value-of.element | document.element | processing-instruction.element | namespace.element | comment.element | copy.element | copy-of.element | sequence.element | where-populated.element | on-empty.element | on-non-empty.element | number.element | perform-sort.element | for-each-group.element | merge.element | fork.element | analyze-string.element | source-document.element | map.element | map-entry.element | message.element | assert.element | fallback.element | result-document.element package.element = element package { extension.atts, attribute id { id.datatype }?, attribute _id { avt.datatype }?, attribute name { uri.datatype }?, attribute _name { avt.datatype }?, attribute package-version { string.datatype }?, attribute _package-version { avt.datatype }?, attribute version { decimal.datatype }?, attribute _version { avt.datatype }?, attribute input-type-annotations { "preserve" | "strip" | "unspecified" }?, attribute _input-type-annotations { avt.datatype }?, attribute declared-modes { boolean.datatype }?, attribute _declared-modes { avt.datatype }?, attribute default-mode { eqname.datatype | "#unnamed" }?, attribute _default-mode { avt.datatype }?, attribute default-validation { "preserve" | "strip" }?, attribute _default-validation { avt.datatype }?, attribute default-collation { uris.datatype }?, attribute _default-collation { avt.datatype }?, attribute extension-element-prefixes { prefixes.datatype }?, attribute _extension-element-prefixes { avt.datatype }?, attribute exclude-result-prefixes { prefixes.datatype }?, attribute _exclude-result-prefixes { avt.datatype }?, attribute expand-text { boolean.datatype }?, attribute _expand-text { avt.datatype }?, attribute use-when { expression.datatype }?, attribute _use-when { avt.datatype }?, attribute xpath-default-namespace { uri.datatype }?, attribute _xpath-default-namespace { avt.datatype }?, ((expose.element | declarations.model)*) } use-package.element = element use-package { extension.atts, global.atts, attribute name { uri.datatype }?, attribute _name { avt.datatype }?, attribute package-version { string.datatype }?, attribute _package-version { avt.datatype }?, (accept.element | override.element)* } expose.element = element expose { extension.atts, global.atts, attribute component { "template" | "function" | "attribute-set" | "variable" | "mode" | "*" }?, attribute _component { avt.datatype }?, attribute names { tokens.datatype }?, attribute _names { avt.datatype }?, attribute visibility { "public" | "private" | "final" | "abstract" }?, attribute _visibility { avt.datatype }?, empty } accept.element = element accept { extension.atts, global.atts, (attribute component { "template" | "function" | "attribute-set" | "variable" | "mode" | "*" } | attribute _component { avt.datatype })+, (attribute names { tokens.datatype } | attribute _names { avt.datatype })+, (attribute visibility { "public" | "private" | "final" | "abstract" | "hidden" } | attribute _visibility { avt.datatype })+, empty } override.element = element override { extension.atts, global.atts, (template.element | function.element | variable.element | param.element | attribute-set.element)* } stylesheet.element = element stylesheet { extension.atts, attribute id { id.datatype }?, attribute _id { avt.datatype }?, attribute version { decimal.datatype }?, attribute _version { avt.datatype }?, attribute default-mode { eqname.datatype | "#unnamed" }?, attribute _default-mode { avt.datatype }?, attribute default-validation { "preserve" | "strip" }?, attribute _default-validation { avt.datatype }?, attribute input-type-annotations { "preserve" | "strip" | "unspecified" }?, attribute _input-type-annotations { avt.datatype }?, attribute default-collation { uris.datatype }?, attribute _default-collation { avt.datatype }?, attribute extension-element-prefixes { prefixes.datatype }?, attribute _extension-element-prefixes { avt.datatype }?, attribute exclude-result-prefixes { prefixes.datatype }?, attribute _exclude-result-prefixes { avt.datatype }?, attribute expand-text { boolean.datatype }?, attribute _expand-text { avt.datatype }?, attribute use-when { expression.datatype }?, attribute _use-when { avt.datatype }?, attribute xpath-default-namespace { uri.datatype }?, attribute _xpath-default-namespace { avt.datatype }?, (declarations.model) } transform.element = element transform { extension.atts, attribute id { id.datatype }?, attribute _id { avt.datatype }?, attribute version { decimal.datatype }?, attribute _version { avt.datatype }?, attribute default-mode { eqname.datatype | "#unnamed" }?, attribute _default-mode { avt.datatype }?, attribute default-validation { "preserve" | "strip" }?, attribute _default-validation { avt.datatype }?, attribute input-type-annotations { "preserve" | "strip" | "unspecified" }?, attribute _input-type-annotations { avt.datatype }?, attribute default-collation { uris.datatype }?, attribute _default-collation { avt.datatype }?, attribute extension-element-prefixes { prefixes.datatype }?, attribute _extension-element-prefixes { avt.datatype }?, attribute exclude-result-prefixes { prefixes.datatype }?, attribute _exclude-result-prefixes { avt.datatype }?, attribute expand-text { boolean.datatype }?, attribute _expand-text { avt.datatype }?, attribute use-when { expression.datatype }?, attribute _use-when { avt.datatype }?, attribute xpath-default-namespace { uri.datatype }?, attribute _xpath-default-namespace { avt.datatype }?, (declarations.model) } include.element = element include { extension.atts, global.atts, attribute href { uri.datatype }?, attribute _href { avt.datatype }?, empty } import.element = element import { extension.atts, global.atts, (attribute href { uri.datatype } | attribute _href { avt.datatype })+, empty } import-schema.element = element import-schema { extension.atts, global.atts, attribute namespace { uri.datatype }?, attribute _namespace { avt.datatype }?, attribute schema-location { uri.datatype }?, attribute _schema-location { avt.datatype }?, xs_schema.element? } strip-space.element = element strip-space { extension.atts, global.atts, (attribute elements { tokens.datatype } | attribute _elements { avt.datatype })+, empty } preserve-space.element = element preserve-space { extension.atts, global.atts, (attribute elements { tokens.datatype } | attribute _elements { avt.datatype })+, empty } decimal-format.element = element decimal-format { extension.atts, global.atts, attribute name { eqname.datatype }?, attribute _name { avt.datatype }?, attribute decimal-separator { char.datatype }?, attribute _decimal-separator { avt.datatype }?, attribute grouping-separator { char.datatype }?, attribute _grouping-separator { avt.datatype }?, attribute infinity { string.datatype }?, attribute _infinity { avt.datatype }?, attribute minus-sign { char.datatype }?, attribute _minus-sign { avt.datatype }?, attribute exponent-separator { char.datatype }?, attribute _exponent-separator { avt.datatype }?, attribute NaN { string.datatype }?, attribute _NaN { avt.datatype }?, attribute percent { char.datatype }?, attribute _percent { avt.datatype }?, attribute per-mille { char.datatype }?, attribute _per-mille { avt.datatype }?, attribute zero-digit { char.datatype }?, attribute _zero-digit { avt.datatype }?, attribute digit { char.datatype }?, attribute _digit { avt.datatype }?, attribute pattern-separator { char.datatype }?, attribute _pattern-separator { avt.datatype }?, empty } template.element = element template { extension.atts, global.atts, (attribute match { pattern.datatype } | attribute _match { avt.datatype } | attribute name { eqname.datatype } | attribute _name { avt.datatype })+, attribute priority { decimal.datatype }?, attribute _priority { avt.datatype }?, attribute mode { list { '#all' | ('#default' | '#unnamed' | eqname.datatype)* } }?, attribute _mode { avt.datatype }?, attribute as { sequence-type.datatype }?, attribute _as { avt.datatype }?, attribute visibility { "public" | "private" | "final" | "abstract" }?, attribute _visibility { avt.datatype }?, (context-item.element?, param.element*, sequence-constructor.model) } apply-templates.element = element apply-templates { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute mode { (eqname.datatype | '#unnamed' | '#default' | '#current') }?, attribute _mode { avt.datatype }?, (sort.element | with-param.element)* } mode.element = element mode { extension.atts, global.atts, attribute name { eqname.datatype }?, attribute _name { avt.datatype }?, attribute streamable { boolean.datatype }?, attribute _streamable { avt.datatype }?, attribute on-no-match { "deep-copy" | "shallow-copy" | "deep-skip" | "shallow-skip" | "text-only-copy" | "fail" }?, attribute _on-no-match { avt.datatype }?, attribute on-multiple-match { "use-last" | "fail" }?, attribute _on-multiple-match { avt.datatype }?, attribute warning-on-no-match { boolean.datatype }?, attribute _warning-on-no-match { avt.datatype }?, attribute warning-on-multiple-match { boolean.datatype }?, attribute _warning-on-multiple-match { avt.datatype }?, attribute typed { boolean.datatype | "strict" | "lax" | "unspecified" }?, attribute _typed { avt.datatype }?, attribute visibility { "public" | "private" | "final" }?, attribute _visibility { avt.datatype }?, attribute use-accumulators { tokens.datatype }?, attribute _use-accumulators { avt.datatype }?, empty } context-item.element = element context-item { extension.atts, global.atts, attribute as { item-type.datatype }?, attribute _as { avt.datatype }?, attribute use { "required" | "optional" | "absent" }?, attribute _use { avt.datatype }?, empty } global-context-item.element = element global-context-item { extension.atts, global.atts, attribute as { item-type.datatype }?, attribute _as { avt.datatype }?, attribute use { "required" | "optional" | "absent" }?, attribute _use { avt.datatype }?, empty } apply-imports.element = element apply-imports { extension.atts, global.atts, with-param.element* } next-match.element = element next-match { extension.atts, global.atts, (with-param.element | fallback.element)* } for-each.element = element for-each { extension.atts, global.atts, (attribute select { expression.datatype } | attribute _select { avt.datatype })+, (sort.element*, sequence-constructor.model) } iterate.element = element iterate { extension.atts, global.atts, (attribute select { expression.datatype } | attribute _select { avt.datatype })+, (param.element*, on-completion.element?, sequence-constructor.model) } next-iteration.element = element next-iteration { extension.atts, global.atts, (with-param.element*) } break.element = element break { extension.atts, global.atts, (attribute select { expression.datatype } | attribute _select { avt.datatype })?, sequence-constructor.model } on-completion.element = element on-completion { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, sequence-constructor.model } if.element = element if { extension.atts, global.atts, (attribute test { expression.datatype } | attribute _test { avt.datatype })+, sequence-constructor.model } choose.element = element choose { extension.atts, global.atts, (when.element+, otherwise.element?) } when.element = element when { extension.atts, global.atts, (attribute test { expression.datatype } | attribute _test { avt.datatype })+, sequence-constructor.model } otherwise.element = element otherwise { extension.atts, global.atts, sequence-constructor.model } try.element = element try { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute rollback-output { boolean.datatype }?, attribute _rollback-output { avt.datatype }?, (sequence-constructor.model, catch.element, (catch.element | fallback.element)*) } catch.element = element catch { extension.atts, global.atts, attribute errors { tokens.datatype }?, attribute _errors { avt.datatype }?, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, sequence-constructor.model } variable.element = element variable { extension.atts, global.atts, (attribute name { eqname.datatype } | attribute _name { avt.datatype })+, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute as { sequence-type.datatype }?, attribute _as { avt.datatype }?, attribute static { boolean.datatype }?, attribute _static { avt.datatype }?, attribute visibility { "public" | "private" | "final" | "abstract" }?, attribute _visibility { avt.datatype }?, sequence-constructor.model } param.element = element param { extension.atts, global.atts, (attribute name { eqname.datatype } | attribute _name { avt.datatype })+, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute as { sequence-type.datatype }?, attribute _as { avt.datatype }?, attribute required { boolean.datatype }?, attribute _required { avt.datatype }?, attribute tunnel { boolean.datatype }?, attribute _tunnel { avt.datatype }?, attribute static { boolean.datatype }?, attribute _static { avt.datatype }?, sequence-constructor.model } with-param.element = element with-param { extension.atts, global.atts, (attribute name { eqname.datatype } | attribute _name { avt.datatype })+, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute as { sequence-type.datatype }?, attribute _as { avt.datatype }?, attribute tunnel { boolean.datatype }?, attribute _tunnel { avt.datatype }?, sequence-constructor.model } call-template.element = element call-template { extension.atts, global.atts, (attribute name { eqname.datatype } | attribute _name { avt.datatype })+, with-param.element* } attribute-set.element = element attribute-set { extension.atts, global.atts, (attribute name { eqname.datatype } | attribute _name { avt.datatype })+, attribute use-attribute-sets { eqnames.datatype }?, attribute _use-attribute-sets { avt.datatype }?, attribute visibility { "public" | "private" | "final" | "abstract" }?, attribute _visibility { avt.datatype }?, attribute streamable { boolean.datatype }?, attribute _streamable { avt.datatype }?, attribute.element* } function.element = element function { extension.atts, global.atts, (attribute name { eqname.datatype } | attribute _name { avt.datatype })+, attribute as { sequence-type.datatype }?, attribute _as { avt.datatype }?, attribute visibility { "public" | "private" | "final" | "abstract" }?, attribute _visibility { avt.datatype }?, attribute streamability { "unclassified" | "absorbing" | "inspection" | "filter" | "shallow-descent" | "deep-descent" | "ascent" | eqname.datatype }?, attribute _streamability { avt.datatype }?, attribute override-extension-function { boolean.datatype }?, attribute _override-extension-function { avt.datatype }?, attribute override { boolean.datatype }?, attribute _override { avt.datatype }?, attribute new-each-time { "yes" | "true" | "1" | "no" | "false" | "0" | "maybe" }?, attribute _new-each-time { avt.datatype }?, attribute cache { boolean.datatype }?, attribute _cache { avt.datatype }?, (param.element*, sequence-constructor.model) } evaluate.element = element evaluate { extension.atts, global.atts, (attribute xpath { expression.datatype } | attribute _xpath { avt.datatype })+, attribute as { sequence-type.datatype }?, attribute _as { avt.datatype }?, attribute base-uri { uri.datatype | avt.datatype }?, attribute _base-uri { avt.datatype }?, attribute with-params { expression.datatype }?, attribute _with-params { avt.datatype }?, attribute context-item { expression.datatype }?, attribute _context-item { avt.datatype }?, attribute namespace-context { expression.datatype }?, attribute _namespace-context { avt.datatype }?, attribute schema-aware { boolean.datatype | avt.datatype }?, attribute _schema-aware { avt.datatype }?, (with-param.element | fallback.element)* } namespace-alias.element = element namespace-alias { extension.atts, global.atts, (attribute stylesheet-prefix { prefix.datatype | "#default" } | attribute _stylesheet-prefix { avt.datatype })+, (attribute result-prefix { prefix.datatype | "#default" } | attribute _result-prefix { avt.datatype })+, empty } element.element = element element { extension.atts, global.atts, (attribute name { qname.datatype | avt.datatype } | attribute _name { avt.datatype })+, attribute namespace { uri.datatype | avt.datatype }?, attribute _namespace { avt.datatype }?, attribute inherit-namespaces { boolean.datatype }?, attribute _inherit-namespaces { avt.datatype }?, attribute use-attribute-sets { eqnames.datatype }?, attribute _use-attribute-sets { avt.datatype }?, ((attribute type { eqname.datatype }?, attribute _type { avt.datatype }?) | (attribute validation { "strict" | "lax" | "preserve" | "strip" }?, attribute _validation { avt.datatype }? )), # type and validation are mutually exclusive sequence-constructor.model } attribute.element = element attribute { extension.atts, global.atts, (attribute name { qname.datatype | avt.datatype } | attribute _name { avt.datatype })+, attribute namespace { uri.datatype | avt.datatype }?, attribute _namespace { avt.datatype }?, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute separator { string.datatype | avt.datatype }?, attribute _separator { avt.datatype }?, ((attribute type { eqname.datatype }?, attribute _type { avt.datatype }?) | (attribute validation { "strict" | "lax" | "preserve" | "strip" }?, attribute _validation { avt.datatype }? )), # type and validation are mutually exclusive sequence-constructor.model } text.element = element text { extension.atts, global.atts, attribute disable-output-escaping { boolean.datatype }?, attribute _disable-output-escaping { avt.datatype }?, text } value-of.element = element value-of { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute separator { string.datatype | avt.datatype }?, attribute _separator { avt.datatype }?, attribute disable-output-escaping { boolean.datatype }?, attribute _disable-output-escaping { avt.datatype }?, sequence-constructor.model } document.element = element document { extension.atts, global.atts, ((attribute type { eqname.datatype }?, attribute _type { avt.datatype }?) | (attribute validation { "strict" | "lax" | "preserve" | "strip" }?, attribute _validation { avt.datatype }? )), # type and validation are mutually exclusive sequence-constructor.model } processing-instruction.element = element processing-instruction { extension.atts, global.atts, (attribute name { ncname.datatype | avt.datatype } | attribute _name { avt.datatype })+, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, sequence-constructor.model } namespace.element = element namespace { extension.atts, global.atts, (attribute name { ncname.datatype | avt.datatype } | attribute _name { avt.datatype })+, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, sequence-constructor.model } comment.element = element comment { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, sequence-constructor.model } copy.element = element copy { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute copy-namespaces { boolean.datatype }?, attribute _copy-namespaces { avt.datatype }?, attribute inherit-namespaces { boolean.datatype }?, attribute _inherit-namespaces { avt.datatype }?, attribute use-attribute-sets { eqnames.datatype }?, attribute _use-attribute-sets { avt.datatype }?, ((attribute type { eqname.datatype }?, attribute _type { avt.datatype }?) | (attribute validation { "strict" | "lax" | "preserve" | "strip" }?, attribute _validation { avt.datatype }? )), # type and validation are mutually exclusive sequence-constructor.model } copy-of.element = element copy-of { extension.atts, global.atts, (attribute select { expression.datatype } | attribute _select { avt.datatype })+, attribute copy-accumulators { boolean.datatype }?, attribute _copy-accumulators { avt.datatype }?, attribute copy-namespaces { boolean.datatype }?, attribute _copy-namespaces { avt.datatype }?, ((attribute type { eqname.datatype }?, attribute _type { avt.datatype }?) | (attribute validation { "strict" | "lax" | "preserve" | "strip" }?, attribute _validation { avt.datatype }? )), # type and validation are mutually exclusive empty } sequence.element = element sequence { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, sequence-constructor.model } where-populated.element = element where-populated { extension.atts, global.atts, sequence-constructor.model } on-empty.element = element on-empty { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, sequence-constructor.model } on-non-empty.element = element on-non-empty { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, sequence-constructor.model } number.element = element number { extension.atts, global.atts, attribute value { expression.datatype }?, attribute _value { avt.datatype }?, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute level { "single" | "multiple" | "any" }?, attribute _level { avt.datatype }?, attribute count { pattern.datatype }?, attribute _count { avt.datatype }?, attribute from { pattern.datatype }?, attribute _from { avt.datatype }?, attribute format { string.datatype | avt.datatype }?, attribute _format { avt.datatype }?, attribute lang { language.datatype | avt.datatype }?, attribute _lang { avt.datatype }?, attribute letter-value { "alphabetic" | "traditional" | avt.datatype }?, attribute _letter-value { avt.datatype }?, attribute ordinal { string.datatype | avt.datatype }?, attribute _ordinal { avt.datatype }?, attribute start-at { integer.datatype | avt.datatype }?, attribute _start-at { avt.datatype }?, attribute grouping-separator { char.datatype | avt.datatype }?, attribute _grouping-separator { avt.datatype }?, attribute grouping-size { integer.datatype | avt.datatype }?, attribute _grouping-size { avt.datatype }?, empty } sort.element = element sort { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute lang { language.datatype | avt.datatype }?, attribute _lang { avt.datatype }?, attribute order { "ascending" | "descending" | avt.datatype }?, attribute _order { avt.datatype }?, attribute collation { uri.datatype | avt.datatype }?, attribute _collation { avt.datatype }?, attribute stable { boolean.datatype | avt.datatype }?, attribute _stable { avt.datatype }?, attribute case-order { "upper-first" | "lower-first" | avt.datatype }?, attribute _case-order { avt.datatype }?, attribute data-type { "text" | "number" | eqname.datatype | avt.datatype }?, attribute _data-type { avt.datatype }?, sequence-constructor.model } perform-sort.element = element perform-sort { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, (sort.element+, sequence-constructor.model) } for-each-group.element = element for-each-group { extension.atts, global.atts, (attribute select { expression.datatype } | attribute _select { avt.datatype })+, ((attribute group-by { expression.datatype }?, attribute _group-by { avt.datatype }?) | (attribute group-adjacent { expression.datatype }?, attribute _group-adjacent { avt.datatype }?) | (attribute group-starting-with { pattern.datatype }?, attribute _group-starting-with { avt.datatype }?) | (attribute group-ending-with { pattern.datatype }?, attribute _group-ending-with { avt.datatype }?)), attribute composite { boolean.datatype }?, attribute _composite { avt.datatype }?, attribute collation { uri.datatype | avt.datatype }?, attribute _collation { avt.datatype }?, (sort.element*, sequence-constructor.model) } merge.element = element merge { extension.atts, global.atts, (merge-source.element+, merge-action.element, fallback.element*) } merge-source.element = element merge-source { extension.atts, global.atts, attribute name { ncname.datatype }?, attribute _name { avt.datatype }?, attribute for-each-item { expression.datatype }?, attribute _for-each-item { avt.datatype }?, attribute for-each-stream { expression.datatype }?, attribute _for-each-stream { avt.datatype }?, (attribute select { expression.datatype } | attribute _select { avt.datatype })+, attribute streamable { boolean.datatype }?, attribute _streamable { avt.datatype }?, attribute use-accumulators { tokens.datatype }?, attribute _use-accumulators { avt.datatype }?, attribute sort-before-merge { boolean.datatype }?, attribute _sort-before-merge { avt.datatype }?, attribute validation { "strict" | "lax" | "preserve" | "strip" }?, attribute _validation { avt.datatype }?, attribute type { eqname.datatype }?, attribute _type { avt.datatype }?, attribute for-each-source { expression.datatype }?, attribute _for-each-source { avt.datatype }?, merge-key.element+ } merge-key.element = element merge-key { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute lang { language.datatype | avt.datatype }?, attribute _lang { avt.datatype }?, attribute order { "ascending" | "descending" | avt.datatype }?, attribute _order { avt.datatype }?, attribute collation { uri.datatype | avt.datatype }?, attribute _collation { avt.datatype }?, attribute case-order { "upper-first" | "lower-first" | avt.datatype }?, attribute _case-order { avt.datatype }?, attribute data-type { "text" | "number" | eqname.datatype | avt.datatype }?, attribute _data-type { avt.datatype }?, sequence-constructor.model } merge-action.element = element merge-action { extension.atts, global.atts, sequence-constructor.model } fork.element = element fork { extension.atts, global.atts, (fallback.element*, ((sequence.element, fallback.element*)* | (for-each-group.element, fallback.element*))) } analyze-string.element = element analyze-string { extension.atts, global.atts, (attribute select { expression.datatype } | attribute _select { avt.datatype })+, (attribute regex { string.datatype | avt.datatype } | attribute _regex { avt.datatype })+, attribute flags { string.datatype | avt.datatype }?, attribute _flags { avt.datatype }?, (matching-substring.element?, non-matching-substring.element?, fallback.element*) } matching-substring.element = element matching-substring { extension.atts, global.atts, sequence-constructor.model } non-matching-substring.element = element non-matching-substring { extension.atts, global.atts, sequence-constructor.model } source-document.element = element source-document { extension.atts, global.atts, (attribute href { uri.datatype | avt.datatype } | attribute _href { avt.datatype })+, attribute use-accumulators { tokens.datatype }?, attribute _use-accumulators { avt.datatype }?, ((attribute type { eqname.datatype }?, attribute _type { avt.datatype }?) | (attribute validation { "strict" | "lax" | "preserve" | "strip" }?, attribute _validation { avt.datatype }? )), # type and validation are mutually exclusive attribute streamable { boolean.datatype }?, attribute _streamable { avt.datatype }?, sequence-constructor.model } accumulator.element = element accumulator { extension.atts, global.atts, (attribute name { eqname.datatype } | attribute _name { avt.datatype }), (attribute initial-value { expression.datatype } | attribute _initial-value { avt.datatype }), attribute as { sequence-type.datatype }?, attribute _as { avt.datatype }?, attribute streamable { boolean.datatype }?, attribute _streamable { avt.datatype }?, accumulator-rule.element+ } accumulator-rule.element = element accumulator-rule { extension.atts, global.atts, (attribute match { pattern.datatype } | attribute _match { avt.datatype })+, attribute phase { "start" | "end" }?, attribute _phase { avt.datatype }?, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, sequence-constructor.model } key.element = element key { extension.atts, global.atts, (attribute name { eqname.datatype } | attribute _name { avt.datatype })+, (attribute match { pattern.datatype } | attribute _match { avt.datatype })+, attribute use { expression.datatype }?, attribute _use { avt.datatype }?, attribute composite { boolean.datatype }?, attribute _composite { avt.datatype }?, attribute collation { uri.datatype }?, attribute _collation { avt.datatype }?, sequence-constructor.model } map.element = element map { extension.atts, global.atts, sequence-constructor.model } map-entry.element = element map-entry { extension.atts, global.atts, (attribute key { expression.datatype } | attribute _key { avt.datatype }), attribute select { expression.datatype }?, attribute _select { avt.datatype }?, sequence-constructor.model } message.element = element message { extension.atts, global.atts, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute terminate { boolean.datatype | avt.datatype }?, attribute _terminate { avt.datatype }?, attribute error-code { eqname.datatype | avt.datatype }?, attribute _error-code { avt.datatype }?, sequence-constructor.model } assert.element = element assert { extension.atts, global.atts, (attribute test { expression.datatype } | attribute _test { avt.datatype })+, attribute select { expression.datatype }?, attribute _select { avt.datatype }?, attribute error-code { eqname.datatype | avt.datatype }?, attribute _error-code { avt.datatype }?, sequence-constructor.model } fallback.element = element fallback { extension.atts, global.atts, sequence-constructor.model } result-document.element = element result-document { extension.atts, global.atts, attribute format { eqname.datatype | avt.datatype }?, attribute _format { avt.datatype }?, attribute href { uri.datatype | avt.datatype }?, attribute _href { avt.datatype }?, ((attribute type { eqname.datatype }?, attribute _type { avt.datatype }?) | (attribute validation { "strict" | "lax" | "preserve" | "strip" }?, attribute _validation { avt.datatype }? )), # type and validation are mutually exclusive attribute method { "xml" | "html" | "xhtml" | "text" | "json" | "adaptive" | eqname.datatype | avt.datatype }?, attribute _method { avt.datatype }?, attribute allow-duplicate-names { boolean.datatype | avt.datatype }?, attribute _allow-duplicate-names { avt.datatype }?, attribute build-tree { boolean.datatype | avt.datatype }?, attribute _build-tree { avt.datatype }?, attribute byte-order-mark { boolean.datatype | avt.datatype }?, attribute _byte-order-mark { avt.datatype }?, attribute cdata-section-elements { eqnames.datatype | avt.datatype }?, attribute _cdata-section-elements { avt.datatype }?, attribute doctype-public { string.datatype | avt.datatype }?, attribute _doctype-public { avt.datatype }?, attribute doctype-system { string.datatype | avt.datatype }?, attribute _doctype-system { avt.datatype }?, attribute encoding { string.datatype | avt.datatype }?, attribute _encoding { avt.datatype }?, attribute escape-uri-attributes { boolean.datatype | avt.datatype }?, attribute _escape-uri-attributes { avt.datatype }?, attribute html-version { decimal.datatype | avt.datatype }?, attribute _html-version { avt.datatype }?, attribute include-content-type { boolean.datatype | avt.datatype }?, attribute _include-content-type { avt.datatype }?, attribute indent { boolean.datatype | avt.datatype }?, attribute _indent { avt.datatype }?, attribute item-separator { string.datatype | avt.datatype }?, attribute _item-separator { avt.datatype }?, attribute json-node-output-method { "xml" | "html" | "xhtml" | "text" | eqname.datatype | avt.datatype }?, attribute _json-node-output-method { avt.datatype }?, attribute media-type { string.datatype | avt.datatype }?, attribute _media-type { avt.datatype }?, attribute normalization-form { "NFC" | "NFD" | "NFKC" | "NFKD" | "fully-normalized" | "none" | nmtoken.datatype | avt.datatype }?, attribute _normalization-form { avt.datatype }?, attribute omit-xml-declaration { boolean.datatype | avt.datatype }?, attribute _omit-xml-declaration { avt.datatype }?, attribute parameter-document { uri.datatype | avt.datatype }?, attribute _parameter-document { avt.datatype }?, attribute standalone { boolean.datatype | "omit" | avt.datatype }?, attribute _standalone { avt.datatype }?, attribute suppress-indentation { eqnames.datatype | avt.datatype }?, attribute _suppress-indentation { avt.datatype }?, attribute undeclare-prefixes { boolean.datatype | avt.datatype }?, attribute _undeclare-prefixes { avt.datatype }?, attribute use-character-maps { eqnames.datatype }?, attribute _use-character-maps { avt.datatype }?, attribute output-version { nmtoken.datatype | avt.datatype }?, attribute _output-version { avt.datatype }?, sequence-constructor.model } output.element = element output { extension.atts, global.atts.except.version, attribute name { eqname.datatype }?, attribute _name { avt.datatype }?, attribute method { "xml" | "html" | "xhtml" | "text" | "json" | "adaptive" | eqname.datatype }?, attribute _method { avt.datatype }?, attribute allow-duplicate-names { boolean.datatype }?, attribute _allow-duplicate-names { avt.datatype }?, attribute build-tree { boolean.datatype }?, attribute _build-tree { avt.datatype }?, attribute byte-order-mark { boolean.datatype }?, attribute _byte-order-mark { avt.datatype }?, attribute cdata-section-elements { eqnames.datatype }?, attribute _cdata-section-elements { avt.datatype }?, attribute doctype-public { string.datatype }?, attribute _doctype-public { avt.datatype }?, attribute doctype-system { string.datatype }?, attribute _doctype-system { avt.datatype }?, attribute encoding { string.datatype }?, attribute _encoding { avt.datatype }?, attribute escape-uri-attributes { boolean.datatype }?, attribute _escape-uri-attributes { avt.datatype }?, attribute html-version { decimal.datatype }?, attribute _html-version { avt.datatype }?, attribute include-content-type { boolean.datatype }?, attribute _include-content-type { avt.datatype }?, attribute indent { boolean.datatype }?, attribute _indent { avt.datatype }?, attribute item-separator { string.datatype }?, attribute _item-separator { avt.datatype }?, attribute json-node-output-method { "xml" | "html" | "xhtml" | "text" | eqname.datatype }?, attribute _json-node-output-method { avt.datatype }?, attribute media-type { string.datatype }?, attribute _media-type { avt.datatype }?, attribute normalization-form { "NFC" | "NFD" | "NFKC" | "NFKD" | "fully-normalized" | "none" | nmtoken.datatype }?, attribute _normalization-form { avt.datatype }?, attribute omit-xml-declaration { boolean.datatype }?, attribute _omit-xml-declaration { avt.datatype }?, attribute parameter-document { uri.datatype }?, attribute _parameter-document { avt.datatype }?, attribute standalone { boolean.datatype | "omit" }?, attribute _standalone { avt.datatype }?, attribute suppress-indentation { eqnames.datatype }?, attribute _suppress-indentation { avt.datatype }?, attribute undeclare-prefixes { boolean.datatype }?, attribute _undeclare-prefixes { avt.datatype }?, attribute use-character-maps { eqnames.datatype }?, attribute _use-character-maps { avt.datatype }?, attribute version { nmtoken.datatype }?, attribute _version { avt.datatype }?, empty } character-map.element = element character-map { extension.atts, global.atts, (attribute name { eqname.datatype } | attribute _name { avt.datatype })+, attribute use-character-maps { eqnames.datatype }?, attribute _use-character-maps { avt.datatype }?, (output-character.element*) } output-character.element = element output-character { extension.atts, global.atts, (attribute character { char.datatype } | attribute _character { avt.datatype })+, (attribute string { string.datatype } | attribute _string { avt.datatype })+, empty } avt.datatype = xsd:string # { # pattern = # """([^\{\}]|\{\{|\}\}|\{([^"'\{\}]|"[^"]*"|'[^']*')+\})*""" # this regexp will not work in all the case. # }