XSLT and XQuery Serialization 3.0 /**/ /* from xsl:query.xsl (C) */ code { font-family: monospace; }
div.constraint, div.issue, div.note, div.notice { margin-left: 2em; }
div.issue p.title { margin-left: -2em; }
ol.enumar { list-style-type: decimal; } ol.enumla { list-style-type: lower-alpha; } ol.enumlr { list-style-type: lower-roman; } ol.enumua { list-style-type: upper-alpha; } ol.enumur { list-style-type: upper-roman; }
li p { margin-top: 0.3em; margin-bottom: 0.3em; }
sup small { font-style: italic; color: #8F8F8F; } /* from xsl:query.xsl (D) */ div.exampleInner pre { margin-left: 1em; margin-top: 0em; margin-bottom: 0em} div.exampleOuter {border: 4px double gray; margin: 0em; padding: 0em} div.exampleInner { background-color: #d5dee3; border-top-width: 4px; border-top-style: double; border-top-color: #d3d3d3; border-bottom-width: 4px; border-bottom-style: double; border-bottom-color: #d3d3d3; padding: 4px; margin: 0em } div.exampleWrapper { margin: 4px } div.exampleHeader { font-weight: bold; margin: 4px}
div.issue { border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1pt; margin-bottom: 20pt; }
th.issue-toc-head { border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1pt; }
dd.indent { margin-left: 2em; } p.element-syntax { border: solid thin; background-color: #ffccff } div.proto { border: solid thin; background-color: #ffccff } div.example { border: solid thin; background-color: blue; padding: 1em } span.verb { font: small-caps 100% sans-serif } span.error { font-size: small }
/* from xsl-query.xsl (B) */ table.small { font-size: x-small; } a.judgment:visited, a.judgment:link { font-family: sans-serif; color: black; text-decoration: none } a.processing:visited, a.processing:link { color: black; text-decoration: none } a.env:visited, a.env:link { color: black; text-decoration: none } /** Advisement Box ************************************************************/ /* for attention-grabbing normative statements */
.advisement { border-color: orange; border-style: none solid; background: #fec; color: black; padding: .5em; border-width: .5em; page-break-inside: avoid; margin: 1em auto; }
/**/ Status Update (6 April 2021): Feedback, comments, error reports on this specification should be sent via GitHub https://github.com/w3c/qtspecs/issues [email protected] This version: http://www.w3.org/TR/2014/REC-xslt-xquery-serialization-30-20140408/ Latest version of XSLT and XQuery Serialization 3.0: http://www.w3.org/TR/xslt-xquery-serialization-30/ Previous versions of XSLT and XQuery Serialization 3.0: http://www.w3.org/TR/2013/PR-xslt-xquery-serialization-30-20131022/ http://www.w3.org/TR/2013/CR-xslt-xquery-serialization-30-20130328/ http://www.w3.org/TR/2013/WD-xslt-xquery-serialization-30-20130108/ http://www.w3.org/TR/2011/WD-xslt-xquery-serialization-30-20111213/ http://www.w3.org/TR/2011/WD-xslt-xquery-serialization-30-20110614/ http://www.w3.org/TR/2010/WD-xslt-xquery-serialization-30-20101214/ http://www.w3.org/TR/2009/WD-xslt-xquery-serialization-11-20091215/ Most recent version of XSLT and XQuery Serialization 3: http://www.w3.org/TR/xslt-xquery-serialization-3/ Most recent version of XSLT and XQuery Serialization: http://www.w3.org/TR/xslt-xquery-serialization/ Most recent Recommendation of XSLT and XQuery Serialization: http://www.w3.org/TR/2010/REC-xslt-xquery-serialization-20101214/ Editors: Henry Zongaro, IBM Canada Software Lab - Toronto Site <http://www-03.ibm.com/software/ca/en/canadalab/locations.html> Andrew Coleman, IBM Hursley Laboratories <[email protected]> C. M. Sperberg-McQueen, Black Mesa Technologies <http://blackmesatech.com/> Please check the errata See also translations This document is also available in these non-normative formats: XML Change markings relative to 1.0 Recommendation Copyright W3C ® MIT ERCIM Keio Beihang liability trademark document use This document defines serialization of an instance of the data model as defined in [XQuery and XPath Data Model (XDM) 3.0] [XSL Transformations (XSLT) Version 3.0] [XQuery 3.0: An XML Query Language] This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index This is one document in a set of six documents that have been progressed to Recommendation together (XQuery 3.0, XQueryX 3.0, XPath 3.0, Data Model 3.0, Functions and Operators 3.0, and Serialization 3.0). This is a Recommendation XSLT Working Group XML Query Working Group XML Activity This Recommendation of XSLT and XQuery Serialization 3.0 represents the second version of a previous W3C Recommendation This specification is designed to be referenced normatively from other specifications defining a host language for it; it is not intended to be implemented outside a host language. The implementability of this specification has been tested in the context of its normative inclusion in host languages defined by the XQuery 3.0 XQuery 3.0 implementation report This document incorporates minor changes made against the Proposed Recommendation Proposed Recommendation F Change Log Please report errors in this document using W3C's public Bugzilla system http://www.w3.org/XML/2005/04/qt-bugzilla [email protected] http://lists.w3.org/Archives/Public/public-qt-comments/ This document has been reviewed by W3C Members, by software developers, and by other W3C groups and interested parties, and is endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web. This document was produced by groups operating under the 5 February 2004 W3C Patent Policy public list of any patent disclosures public list of any patent disclosures Essential Claim(s) section 6 of the W3C Patent Policy 1 Introduction Terminology Namespaces Sequence Normalization Serialization Parameters Setting Serialization Parameters by Means of a Data Model Instance Phases of Serialization XML Output Method The Influence of Serialization Parameters upon the XML Output Method XML Output Method: the version Parameter XML Output Method: the html-version Parameter XML Output Method: the encoding Parameter XML Output Method: the indent and suppress-indentation Parameters XML Output Method: the cdata-section-elements Parameter XML Output Method: the omit-xml-declaration and standalone Parameters XML Output Method: the doctype-system and doctype-public Parameters XML Output Method: the undeclare-prefixes Parameter XML Output Method: the normalization-form Parameter XML Output Method: the media-type Parameter XML Output Method: the use-character-maps Parameter XML Output Method: the byte-order-mark Parameter XML Output Method: the escape-uri-attributes Parameter XML Output Method: the include-content-type Parameter XML Output Method: the item-separator Parameter XHTML Output Method The Influence of Serialization Parameters upon the XHTML Output Method XHTML Output Method: the version Parameter XHTML Output Method: the html-version Parameter XHTML Output Method: the encoding Parameter XHTML Output Method: the indent and suppress-indentation Parameters XHTML Output Method: the cdata-section-elements Parameter XHTML Output Method: the omit-xml-declaration and standalone Parameters XHTML Output Method: the doctype-system and doctype-public Parameters XHTML Output Method: the undeclare-prefixes Parameter XHTML Output Method: the normalization-form Parameter XHTML Output Method: the media-type Parameter XHTML Output Method: the use-character-maps Parameter XHTML Output Method: the byte-order-mark Parameter XHTML Output Method: the escape-uri-attributes Parameter XHTML Output Method: the include-content-type Parameter XHTML Output Method: the item-separator Parameter Polyglot markup and namespace declarations HTML Output Method Markup for Elements Writing Attributes Writing Character Data The Influence of Serialization Parameters upon the HTML Output Method HTML Output Method: the version and html-version Parameters HTML Output Method: the encoding Parameter HTML Output Method: the indent and suppress-indentation Parameters HTML Output Method: the cdata-section-elements Parameter HTML Output Method: the omit-xml-declaration and standalone Parameters HTML Output Method: the doctype-system and doctype-public Parameters HTML Output Method: the undeclare-prefixes Parameter HTML Output Method: the normalization-form Parameter HTML Output Method: the media-type Parameter HTML Output Method: the use-character-maps Parameter HTML Output Method: the byte-order-mark Parameter HTML Output Method: the escape-uri-attributes Parameter HTML Output Method: the include-content-type Parameter HTML Output Method: the item-separator Parameter Text Output Method The Influence of Serialization Parameters upon the Text Output Method Text Output Method: the version Parameter Text Output Method: the html-version Parameter Text Output Method: the encoding Parameter Text Output Method: the indent and suppress-indentation Parameters Text Output Method: the cdata-section-elements Parameter Text Output Method: the omit-xml-declaration and standalone Parameters Text Output Method: the doctype-system and doctype-public Parameters Text Output Method: the undeclare-prefixes Parameter Text Output Method: the normalization-form Parameter Text Output Method: the media-type Parameter Text Output Method: the use-character-maps Parameter Text Output Method: the byte-order-mark Parameter Text Output Method: the escape-uri-attributes Parameter Text Output Method: the include-content-type Parameter Text Output Method: the item-separator Parameter Character Maps Conformance A References Normative References Informative References Schema for Serialization Parameters Summary of Error Conditions List of URI Attributes Checklist of Implementation-Defined Features Change Log Changes applied for the Recommendation Changes applied for the Candidate Recommendation Changes applied for the fifth Public Working Draft Changes applied for the fourth Public Working Draft Changes applied for the third Public Working Draft Changes applied for the second Public Working Draft Changes applied for the first Public Working Draft This document defines serialization of the W3C XQuery and XPath Data Model 3.0 [XML Path Language (XPath) 3.0] [XSL Transformations (XSLT) Version 3.0] [XQuery 3.0: An XML Query Language] In this document, examples and material labeled as "Note" are provided for explanatory purposes and are not normative. Serialization is the process of converting an instance of the [XQuery and XPath Data Model (XDM) 3.0] In this specification, where they appear in upper case, the words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", "MAY", "REQUIRED", and "RECOMMENDED" are to be interpreted as described in [RFC2119] [ Definition 10 Conformance serializer REQUIRED In this document, material labeled as "Note" and examples are provided for explanatory purposes and are not normative. Certain aspects of serialization are described in this specification as implementation-defined implementation-dependent [ Definition Implementation-defined MAY serializers MUST 10 Conformance serializer [ Definition Implementation-dependent MAY serializers REQUIRED 10 Conformance serializer [ Definition 3 Serialization Parameters serialization error serializer REQUIRED 10 Conformance serializer implementation-defined serializer [ Definition without regard to case serializer MUST Many terms used in this document are defined in the XPath specification [XML Path Language (XPath) 3.0] [XQuery and XPath Data Model (XDM) 3.0] [ Definition atomization Section 2.4.2 Atomization XP30 nodes atomic values XP30 atomic values XP30 nodes typed values XP30 [XQuery and XPath Data Model (XDM) 3.0] [ Definition Node Section 6 Nodes DM30 nodes [ Definition sequence Section 2 Basics XP30 sequence [ Definition function Section 2.8.1 Functions DM30 [ Definition string value Section 5.13 string-value Accessor DM30 node string value string value string values nodes [ Definition expanded QName Section 2 Basics XP30 expanded QName expanded QName [ Definition expanded-QName null namespace URI [ Definition null namespace URI non-null namespace URI [ Definition whitespace character Where this specification indicates that an XSLT instruction is evaluated, the behavior is as specified by [XSL Transformations (XSLT) Version 2.0] [XQuery 3.0: An XML Query Language] This specification refers to several namespaces that affect the process of serialization. These are: [ Definition Output declaration namespace http://www.w3.org/2010/xslt-xquery-serialization [ Definition XML namespace http://www.w3.org/XML/1998/namespace [ Definition XHTML namespace http://www.w3.org/1999/xhtml [ Definition SVG namespace http://www.w3.org/2000/svg [ Definition MathML namespace http://www.w3.org/1998/Math/MathML Wherever an element node or attribute node is said to be in a particular namespace, it is understood that the namespace URI of the node is equal to the namespace URI corresponding to that namespace. Wherever a namespace node is said to be a namespace node for a particular namespace, it is understood that the string value An instance of the data model that is input to the serialization process is a sequence. Prior to serializing a sequence using any of the output methods whose behavior is specified by this document ( 3 Serialization Parameters serializer MUST Definition sequence normalization Definition sequence normalization result tree The normalized sequence for serialization is constructed by applying all of the following rules in order, with the initial sequence being input to the first step, and the sequence that results from any step being used as input to the subsequent step. For any implementation-defined implementation-defined Where the process of converting the input sequence to a normalized sequence indicates that a value MUST xs:string Section 18.1.1 Casting to xs:string and xs:untypedAtomic FO30 [XQuery and XPath Functions and Operators 3.0] Where a step in the sequence normalization process indicates that a node should be copied, the copy is performed in the same way as an XSLT xsl:copy-of validation preserve select in Section 11.9.2 Deep Copy XT [XSL Transformations (XSLT) Version 2.0] Section 3.9.1.3 Content XQ30 [XQuery 3.0: An XML Query Language] preserve If the sequence that is input to serialization is empty, create a sequence S 1 S 1 For each item in S 1 xs:string S 2 If the item-separator S 2 Otherwise, copy each item in S 2 item-separator S 3 For each item in S 3 node string value S 4 For each item in S 4 node S 5 For each subsequence of adjacent text nodes in S 5 S 6 It is a serialization error err:SENR0001 S 6 node node or a function S 7 node nodes node S 7 The result tree node serialization error serializer MUST Note: If the item-separator $seq node <xsl:document> <xsl:copy-of select="$seq" validation="preserve"/> </xsl:document> or the XQuery expression: declare construction preserve;
document { $seq } If the item-separator $seq node <xsl:document> <xsl:for-each select="$seq"> <xsl:sequence select="if (position() gt 1) then $sep else ()"/>
<xsl:choose> <xsl:when test=". instance of node()"> <xsl:sequence select="."/> </xsl:when> <xsl:otherwise> <xsl:value-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:document> or the XQuery expression: declare construction preserve;
document { for $item at $pos in $seq let $node := if ($item instance of node()) then $item else text { $item } return if ($pos eq 1) then $node else ($sep, $node) } where the value of the sep item-separator This process results in a serialization error err:SENR0001 $seq nodes nodes There are a number of parameters that influence how serialization is performed. Host languages MAY REQUIRED host language MUST It is a serialization error err:SEPM0016 host language The following serialization parameters are defined: Serialization parameter name Permitted values for parameter byte-order-mark One of the enumerated values yes no [Unicode Encoding] implementation-dependent cdata-section-elements A list of expanded QNames, possibly empty. doctype-public A string of PubidChar XML This parameter MAY doctype-system A string of Unicode characters that does not include both an apostrophe (#x27) and a quotation mark (#x22) character. This parameter MAY encoding A string of Unicode characters in the range #x21 to #x7E (that is, printable ASCII characters); the value SHOULD [IANA] [RFC2978] x- X- escape-uri-attributes One of the enumerated values yes no html-version A decimal value. This parameter MAY include-content-type One of the enumerated values yes no indent One of the enumerated values yes no item-separator A string of Unicode characters. This parameter MAY media-type A string of Unicode characters specifying the media type (MIME content type) [RFC2046] MUST NOT media-type MAY MAY method An expanded QName with a null namespace URI xml xhtml html text non-null namespace URI implementation-defined normalization-form One of the enumerated values NFC NFD NFKC NFKD fully-normalized none implementation-defined of type NMTOKEN omit-xml-declaration One of the enumerated values yes no standalone One of the enumerated values yes no omit suppress-indentation A list of expanded QNames, possibly empty. undeclare-prefixes One of the enumerated values yes no use-character-maps A list of pairs, possibly empty, with each pair consisting of a single Unicode character and a string of Unicode characters. version A string of Unicode characters. The value of the method expanded QName null namespace URI MUST xml html xhtml text MUST implementation-defined In those cases where they have no important effect on the content of the serialized result, details of the output methods defined by this specification are left unspecified and are regarded as implementation-dependent serializer The detailed semantics of each parameter will be described separately for each output method for which it is applicable If the semantics of a parameter are not described for an output method, then it is not applicable to that output method. Implementations MAY MAY that are either implementation-defined host language MUST Any such additional serialization parameters MUST NOT http://www.w3.org/2010/xslt-xquery-serialization host language MAY MAY xml html xhtml text MAY serializer implementation-defined implementation-dependent indent yes serializer that are not permitted err:SERE0014 A host language MAY [XQuery and XPath Data Model (XDM) 3.0] MUST With the exception of the use-character-maps defined in this specification (validate lax { document { . } }) /output:serialization-parameters /output:*[local-name() eq $param-name]/data(@value) or equivalently the XSLT instructions <xsl:sequence> <xsl:variable name="validated-instance"> <xsl:document validation="lax"> <xsl:sequence select="."/> </xsl:document> </xsl:variable> <xsl:sequence select="$validated-instance /output:serialization-parameters /output:*[local-name() eq $param-name ] with the supplied instance of the data model as the context item, the param-name xs:string serialization error err:SEPM0017 If the result of evaluating this expression for a particular serialization parameter is the empty sequence: if the parameter is either cdata-section-elements suppress-indentation XQuery (validate lax { document { . } }) /output:serialization-parameters /output:*[local-name() eq $param-name] or equivalently the XSLT instructions <xsl:sequence> <xsl:variable name="validated-instance"> <xsl:document select="." validation="lax"> <xsl:sequence select="."/> </xsl:document> </xsl:variable> <xsl:sequence select="$validated-instance /output:serialization-parameters /output:*[local-name() eq $param-name ] with the same settings of the static context and dynamic context is not an empty sequence, the setting of the parameter is the empty list; otherwise, the setting of the parameter is absent The components of the static context used in evaluating the XQuery expressions or XSLT instructions Static Context Component XQuery or XSLT Setting XPath 1.0 Both false Statically known namespaces XQuery The pair (output,http://www.w3.org/2010/xslt-xquery-serialization) XSLT The pairs (output,http://www.w3.org/2010/xslt-xquery-serialization), (xslt,http://www.w3.org/1999/XSL/Transform) Default element/type namespace Both "none" Default function namespace Both http://www.w3.org/2005/xpath-functions In-scope schema types, In-scope element declarations, Substitution groups, In-scope attribute declarations Both As defined by the schema for serialization parameters ( B Schema for Serialization Parameters implementation-defined In-scope variables Both {param-name} Context item static type Both node() Statically-known Both { fn:data($arg as item()*) as xs:anyAtomicType* Statically known collations Both { (http://www.w3.org/2005/xpath-functions/collation/codepoint, The Unicode codepoint collation ) } Default collation Both The Unicode codepoint collation Construction mode XQuery strip Ordering mode XQuery ordered Default order for empty sequences XQuery least Boundary space policy XQuery strip Copy-namespaces mode XQuery (preserve,inherit) Base URI Both Absent Statically known documents Both None Statically known collections Both None Statically known default collection type Both node()* Statically known decimal formats Both None Set of named keys XSLT {} Values of system properties XSLT None Set of available instructions XSLT The empty set (not needed for evaluating these expressions). The remaining components of the dynamic context used in evaluating the XQuery expressions or XSLT instructions Dynamic Context Component XQuery or XSLT Setting Context position Both 1 Context size Both 1 Variable values Both The param-name xs:string Function implementations Both The implementation of fn:data Current dateTime Both Absent Implicit timezone Both Absent Available documents Both None Available collections Both None Default collection Both None Current template rule XSLT Absent Current mode XSLT The default mode Current group XSLT Absent Current grouping key XSLT Absent Current captured substrings XSLT The empty sequence Output state XSLT Temporary output state In the case of the use-character-maps XQuery (validate lax { document { . } }) /output:serialization-parameters/output:use-character-maps /output:character-map[@character eq $char]/string(@map-string) or equivalently the XSLT instructions <xsl:sequence> <xsl:variable name="validated-instance"> <xsl:document validation="lax"> <xsl:sequence select="."/> </xsl:document> </xsl:variable> <xsl:sequence select="$validated-instance /output:serialization-parameters /output:use-character-maps /output:character-map[@character eq $char ] is evaluated for each Unicode character that is permitted in an XML document. The dynamic context and static context used to evaluate the expression are as defined above, except that in-scope variables is the set { char char xs:string use-character-maps serialization error err:SEPM0018 Using the same settings of the components of the dynamic context and static context, serialization error err:SEPM0019 XQuery (document { . })/output:serialization-parameters /(count(distinct-values(*/node-name(.))) eq (count(*))) or equivalently if the result of evaluating the following XSLT instructions is not true. <xsl:sequence> <xsl:variable name="doc"> <xsl:document> <xsl:sequence select="."/> </xsl:document> </xsl:variable> <xsl:sequence select="$doc/output:serialization-parameters /(count(distinct-values(*/node-name(.))) eq (count(*)))"/> </xsl:sequence> The result of evaluating either will be false if the data model instance supplies a value more than once, or will be the empty sequence if the data model instance does not have as its root node an element node or a document node with an element node child, where the local part of the name of the element node is serialization-parameters http://www.w3.org/2010/xslt-xquery-serialization Note: A serializer host language The host language MAY are absent If the instance of the data model contains elements or attributes that are in a namespace other than http://www.w3.org/2010/xslt-xquery-serialization MAY implementation-defined implementation-defined The following XML document, if converted to a data model instance and processed using the mechanism described in this section, would specify the settings of the method version indent xml 1.0 yes <output:serialization-parameters xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization"> <output:method value="xml"/> <output:version value="1.0"/> <output:indent value="yes"/> </output:serialization-parameters> The following document would specify the setting of the cdata-section-elements http://example.org/book/chapter heading http://example.org/book footnote <output:serialization-parameters xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization" xmlns:book="http://example.org/book" xmlns="http://example.org/book/chapter"> <output:cdata-section-elements value="heading book:footnote"/> </output:serialization-parameters> The following document would specify the value of the method html Notice that in this example, the default namespace declaration in scope has no effect on the interpretation of the setting of the method <output:serialization-parameters xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization" xmlns="http://example.org/ext"> <output:method value="html"/> </output:serialization-parameters> The following document would specify the value of the method http://example.org/ext jsp use-character-maps («, <%), (», %>) <output:serialization-parameters xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization" xmlns:ext="http://example.org/ext"> <output:method value="ext:jsp"/> <output:use-character-maps> <output:character-map character="«" map-string="<%"/> <output:character-map character="»" map-string="%>"/> </output:use-character-maps> </output:serialization-parameters> Serialization comprises five phases of processing (preceded optionally by the sequence normalization process described in 2 Sequence Normalization For an implementation-defined MAY MAY A meta meta include-content-type Markup generation the document type declaration; start tags and end tags (except for attribute values, whose representation is produced by the character expansion phase); processing instructions; and comments. In the cases of the XML and XHTML output methods, this phase also produces the following: the XML or text declaration; and empty element tags (except for the attribute values); In the case of the text output method, this phase replaces the single document node produced by sequence normalization Character expansion nodes node If the node is an attribute that is a URI attribute value escape-uri-attributes URI escaping [ Definition URI escaping URI attribute values normalize to NFC using the method defined in Section 5.4.6 fn:normalize-unicode FO30 percent-encode any special characters in the URI using the method defined in Section 6.4 fn:escape-html-uri FO30 escape according to the rules of the XML or HTML output method, whichever is applicable, any characters that require < < 7.3 Writing Character Data [ Definition D List of URI Attributes URI attribute values xs:anyURI If the node is a text node whose parent element is selected by the rules of the cdata-section-elements Apply the following two processes in sequence to create CDATA sections Unicode Normalization normalization-form apply changes as detailed in the description of the cdata-section-elements Apply character mapping as determined by the use-character-maps Apply Unicode Normalization normalization-form [ Definition Unicode Normalization [UAX #15: Unicode Normalization Forms] [Character Model for the World Wide Web 1.0: Normalization] The meanings associated with the possible values of the normalization-form 5.1.9 XML Output Method: the normalization-form Parameter Continue with step e. Escape according to the rules of the XML or HTML output method, whichever is applicable, < & < < 7.3 Writing Character Data > Indentation indent and the suppress-indentation MAY Encoding encoding Note: Serialization is only defined in terms of encoding the result as a stream of octets. However, a serializer MAY implementation-defined serializer The XML output method serializes the normalized sequence as an XML entity that MUST serialization error err:SERE0003 serializer 4 Phases of Serialization serialization error serialization error serializer MUST If the document node node node MUST [XML Names] [XML Names 1.1] <?xml version=" version entity-URI where entity-URI version version MUST [XML Names] [XML Names 1.1] [ Definition reconstructed tree [XQuery and XPath Data Model (XDM) 3.0] MUST reconstructed tree result tree If the document was produced by adding a document wrapper, as described above, then it will contain an extra doc The order of attribute and namespace nodes MAY The following properties of corresponding nodes MAY the base-uri property of document nodes nodes the document-uri and unparsed-entities properties of document nodes the type-name and typed-value properties of element and attribute nodes the nilled property of element nodes the content property of text nodes indent use-character-maps The reconstructed tree MAY nodes The type annotations of the nodes MAY result tree MAY result tree Note: In order to influence the type annotations in the instance of the data model that would result from processing a serialized XML document, the author of the XSLT stylesheet, XQuery expression or other process might wish to create the instance of the data model that is input to the serialization process so that it makes use of mechanisms provided by [XML Schema] xsi:type xsi:schemaLocation result tree Similarly, it is possible that an element node nilled true xsi:nil nilled Additional namespace nodes MAY reconstructed tree 5.1.8 XML Output Method: the undeclare-prefixes Parameter node node node node The result tree MAY nodes reconstructed tree MAY Section 6.2.3 Construction from an Infoset DM30 Section 6.2.4 Construction from a PSVI DM30 [XQuery and XPath Data Model (XDM) 3.0] If the indent yes additional text nodes MAY reconstructed tree text nodes result tree MAY nodes reconstructed tree result tree See 5.1.4 XML Output Method: the indent and suppress-indentation Parameters indent Additional nodes MAY reconstructed tree nodes nodes reconstructed tree MAY result tree Unicode Normalization Note: The use-character-maps nodes nodes reconstructed tree A consequence of this rule is that certain characters MUST nodes MUST 
 … 
 nodes MUST 
 
 	 … 
 nodes nodes MUST For example, an attribute with the value "x" followed by "y" separated by a newline will result in the output "x
y" "x y" Note: XML 1.0 did not permit an XML processor to normalize NEL or LINE SEPARATOR characters to a LINE FEED character. However, if a document entity that specifies version 1.1 invokes an external general parsed entity with no text declaration or a text declaration that specifies version 1.0, the external parsed entity is processed according to the rules of XML 1.1. For this reason, NEL and LINE SEPARATOR characters in text and attribute nodes MUST version XML 1.0 permitted control characters in the range #x7F through #x9F to appear as literal characters in an XML document, but XML 1.1 requires such characters, other than NEL, to be escaped as character references. An external general parsed entity with no text declaration or a text declaration that specifies a version pseudo-attribute with value 1.0 MUST MUST version It is a serialization error err:SEPM0004 omit nodes nodes node serializer MUST standalone version The version MUST serializer The value of the version MUST VersionNum XML [XML10] [XML11] err:SESU0013 version serializer serializer MUST This document provides the normative definition of serialization for the XML output method if the version 1.0 1.1 version implementation-defined implementation-defined MAY If the serialized result would contain an NCName Names version serialization error err:SERE0005 serializer MUST If the serialized result would contain a character that is not permitted by the version of XML specified by the version serialization error err:SERE0006 serializer MUST For example, if the version 1.0 serialization error err:SERE0006 version 1.1 node serialization error err:SERE0006 html-version The html-version host language encoding The encoding Serializers REQUIRED UTF-8 UTF-16 serialization error err:SESU0007 UTF-8 UTF-16 serializer serializer MUST UTF-8 UTF-16 serializer MUST NOT EncName XML [XML10] When outputting a newline character in the instance of the data model, the serializer 9 Character Maps When outputting any other character that is defined in the selected encoding, the character MUST It is possible that the instance of the data model will contain a character that cannot be represented in the encoding that the serializer node node MUST serialization error err:SERE0008 serializer MUST For example, if a text node encoding US-ASCII MUST node serialization error err:SERE0008 indent and suppress-indentation The indent suppress-indentation serializer MAY indent yes serializer MAY MAY [ Definition content Content XML Section 3.1 Start-Tags, End-Tags, and Empty-Element Tags XML [XML10] Definition immediate content content content If the indent no serializer MUST NOT indent yes serializer MUST If more than one constraint applies, the serializer MUST MUST NOT SHOULD NOT MAY SHOULD NOT Whitespace characters MAY node only if the text node contains only whitespace characters. Whitespace characters in such a text node MAY MAY Whitespace characters MAY immediate content xs:untyped xs:anyType immediate content content Whitespace characters MUST NOT elided or replaced immediate content known to be simple or empty Whitespace characters SHOULD NOT elided or replaced immediate content that is annotated with a type other than xs:untyped xs:anyType Whitespace characters MUST NOT elided or replaced content suppress-indentation Whitespace characters MUST NOT added, elided or replaced xml:space preserve [XML10] xml:space Note: The effect of these rules is to ensure that whitespace is only added in places where (a) XSLT's <xsl:strip-space> string value node Note: The whitespace added may possibly be based on whitespace stripped from either the source document or the stylesheet (in the case of XSLT), or guided by other means that might depend on the host language cdata-section-elements The cdata-section-elements node node MUST If the text node ]]> MUST ]] > If the text node MUST MUST MUST node CDATA sections MUST NOT cdata-section-elements implementation-defined Note: This is phrased to permit an implementor to provide an option that attempts to preserve CDATA sections present in the source document. omit-xml-declaration standalone The XML output method MUST omit-xml-declaration no MUST standalone yes no MUST standalone standalone omit MUST NOT A serialization error err:SEPM0009 omit-xml-declaration yes the standalone omit the version 1.0 doctype-system The serializer MUST Otherwise, if the omit-xml-declaration yes MUST NOT doctype-system doctype-public If the doctype-system MUST <!DOCTYPE MUST doctype-public MUST PUBLIC MUST SYSTEM MUST doctype-public MUST doctype-system undeclare-prefixes The Data Model allows an element node node Namespaces in XML 1.1 [XML Names 1.1] undeclare-prefixes yes version 1.0 serializer MUST undeclare-prefixes no MUST NOT Consider an element x:foo x http://example.org/x y http://example.org/y z http://example.org/z xml http://www.w3.org/XML/1998/namespace Suppose that it has a child element x:bar x http://example.org/x y http://example.org/y xml http://www.w3.org/XML/1998/namespace If namespace undeclaration is in effect, it will be serialized this way: <x:foo xmlns:x="http://example.org/x" xmlns:y="http://example.org/y" xmlns:z="http://example.org/z"> <x:bar xmlns:z="">...</x:bar> </x:foo> In Namespaces in XML [XML Names] undeclare-prefixes yes version 1.0 serialization error err:SEPM0010 serializer MUST normalization-form The normalization-form NFC none MUST serializer serialization error err:SESU0011 normalization-form serializer serializer MUST The meanings associated with the possible values of the normalization-form NFC [UAX #15: Unicode Normalization Forms] NFD [UAX #15: Unicode Normalization Forms] NFKC [UAX #15: Unicode Normalization Forms] NFKD [UAX #15: Unicode Normalization Forms] fully-normalized in Section 5.4.6 fn:normalize-unicode FO30 [XQuery and XPath Functions and Operators 3.0] none Unicode Normalization An implementation-defined implementation-defined If the value of the parameter is fully-normalized relevant construct serializer relevant construct [XML11] serialization error err:SERE0012 MUST Note: Specifying fully-normalized serializer [XML11] serializer include normalized serializer media-type The media-type 3 Serialization Parameters use-character-maps The use-character-maps 9 Character Maps byte-order-mark The byte-order-mark 3 Serialization Parameters Note: The byte order mark may be undesirable under certain circumstances; for example, to concatenate resulting XML fragments without additional processing to remove the byte order mark. Therefore this specification does not mandate the byte-order-mark yes MUST escape-uri-attributes The escape-uri-attributes host language include-content-type The include-content-type host language item-separator The effect of the item-separator 2 Sequence Normalization The XHTML output method serializes the instance of the data model as XML, using the HTML compatibility guidelines defined in the XHTML specification ( [XHTML 1.0] current drafts of and related specifications [HTML5] and [Polyglot] At the time this document was published, the current version of [HTML5] A.1 Normative References [HTML5] [HTML5] MUST A.1 Normative References [HTML5] A.1 Normative References implementation-defined [HTML5] recognized as HTML elements void elements phrasing content Boolean attributes [HTML5] MAY MAY [ Definition recognized as an HTML element the element node is in the XHTML namespace html-version or if the html-version the value of the html- 5.0 null namespace URI [HTML5] without regard to case Note: As noted elsewhere, processors conforming to this specification MUST [HTML5] [HTML5] implementation-defined [HTML5] It is entirely the responsibility of the person or process that creates the instance of the data model to ensure that the instance of the data model conforms to the [XHTML 1.0] [XHTML 1.1] if the html-version 5.0 or that it conforms to if the value of the html-version 5.0 the XHTML syntax of HTML5 (see [HTML5] [Polyglot] The serialization of the instance of the data model follows the same rules as for the XML output method, with the general exceptions noted below and parameter-specific exceptions in 6.1 The Influence of Serialization Parameters upon the XHTML Output Method [XHTML 1.0] and on [Polyglot] If the value of the html-version 5.0 prefix normalization [ Definition prefix normalization XHTML namespace SVG namespace MathML namespace The process of prefix normalization <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mathml="http://www.w3.org/1998/Math/MathML"> <xsl:template match="xhtml:*|svg:*|mathml:*"> <xsl:element name="{local-name()}" namespace="{namespace-uri()}"> <xsl:call-template name="copy-namespace-nodes"/> <xsl:apply-templates select="@*|node()"/> </xsl:element> </xsl:template> <xsl:template match="node()|@*"> <xsl:copy copy-namespaces="no"> <xsl:call-template name="copy-namespace-nodes"/> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template>
<xsl:template name="copy-namespace-nodes"> <xsl:copy-of select="namespace::* [not(. = ('http://www.w3.org/1999/xhtml', 'http://www.w3.org/2000/svg', 'http://www.w3.org/1998/Math/MathML'))]"/> </xsl:template> </xsl:stylesheet> [ Definition EMPTY area base br col embed hr img input link meta basefont frame isindex param [ Definition void area base br col embed hr img input keygen link meta param source track wbr Note: This list of void elements is that given for void elements 8.1.2 [HTML5] MAY [HTML5] [ Definition expected to be empty recognized as an HTML element the html-version 5.0 EMPTY the html-version 5.0 void If an element node that has no child nodes is not expected to be empty serializer MUST NOT MUST <p></p> <p /> If an element that has no children is expected to be empty serializer MUST <br /> <br></br> legacy If the html-version absent or has a value 5.0 serializer MUST /> <br /> <hr /> <img src="karen.jpg" alt="Karen" /> If the html-version absent or has a value 5.0 serializer MUST NOT ' defined versions of prior to HTML5, If the html-version absent or has a value 5.0 serializer SHOULD If the value of the html-version 5.0 serializer SHOULD ensures that the namespace declarations in the resulting document are quirk-compatible 6.2 Polyglot markup and namespace declarations Note: If the html <html xmlns="http://www.w3.org/1999/xhtml"> ... </html> html node Note: The XHTML 1.0 DTDs require the declaration xmlns="http://www.w3.org/1999/xhtml" html html [Polyglot] 6.2 Polyglot markup and namespace declarations The serializer MUST nodes result tree SHOULD for versions prior to HTML5, or where they would not be quirk-compatible Note: [Polyglot] [XHTML 1.0] serializer In all other cases, the guidelines can be adhered to by the instance of the data model that is input to the serialization process. The guideline on the use of whitespace characters in attribute values is one such example. Another example is that xml:lang="..." xml:lang="..." lang="..." serialization error version The behavior for the version 5.1.1 XML Output Method: the version Parameter html-version The html-version [HTML5] [XHTML 1.0] [XHTML 1.1] The differences are described in detail throughout 6 XHTML Output Method encoding The behavior for encoding 5.1.3 XML Output Method: the encoding Parameter indent and suppress-indentation If the indent yes serializer MAY result tree if it observes the following constraints. Whitespace MUST NOT Whitespace MUST NOT recognized as HTML elements those elements defined to be phrasing content [HTML5] recognized as HTML elements ins del [ Definition phrasing content [HTML5] a abbr area audio b bdi bdo br button canvas cite code data datalist del dfn em embed i iframe img input ins kbd keygen label map mark math meter noscript object output progress q ruby s samp script select small span strong sub sup svg template textarea time u var video wbr Note: This list of phrasing content is that given in section 3.2.4.1.5 Phrasing content [HTML5] MAY [HTML5] Whitespace MUST NOT recognized as HTML elements pre script style title textarea Whitespace characters MUST NOT matches suppress-indentation The expanded QName of an element node is considered to match a member of the list of expanded QNames if: the two expanded QNames are equal; the expanded QNames both have null namespace URIs without regard to case the value of the html-version 5.0 without regard to case null namespace URI XHTML namespace Note: The effect of the above constraints is to ensure any insertion or deletion of whitespace would not affect how an that conforms to the specified version of HTML The HTML definition of whitespace is different from the XML definition: see section 9.1 of [HTML] cdata-section-elements The behavior for cdata-section-elements 5.1.5 XML Output Method: the cdata-section-elements Parameter omit-xml-declaration standalone The behavior for omit-xml-declaration standalone 5.1.6 XML Output Method: the omit-xml-declaration and standalone Parameters Note: As with the XML output method, the XHTML output method specifies that an XML declaration will be output unless it is suppressed using the omit-xml-declaration [XHTML 1.0] doctype-system doctype-public If the value of the html-version 5.0 doctype-system the first element node child of recognized as an HTML element HTML without regard to case and any text node preceding that element in document order contains only whitespace characters, MUST <!DOCTYPE MUST be the same as the local part of the name of the element Otherwise, doctype-system doctype-public 5.1.7 XML Output Method: the doctype-system and doctype-public Parameters undeclare-prefixes The behavior for undeclare-prefixes 5.1.8 XML Output Method: the undeclare-prefixes Parameter normalization-form The behavior for normalization-form 5.1.9 XML Output Method: the normalization-form Parameter media-type The behavior for media-type 5.1.10 XML Output Method: the media-type Parameter use-character-maps The behavior for use-character-maps 5.1.11 XML Output Method: the use-character-maps Parameter byte-order-mark The behavior for byte-order-mark 5.1.12 XML Output Method: the byte-order-mark Parameter escape-uri-attributes If the escape-uri-attributes yes MUST URI escaping URI attribute values MUST NOT Note: This escaping is deliberately confined to non-ASCII characters, because escaping of ASCII characters is not always appropriate, for example when URIs or URI fragments are interpreted locally by the HTML user agent. Even in the case of non-ASCII characters, escaping can sometimes cause problems. More precise control of URI escaping escape-uri-attributes no Section 6.2 fn:encode-for-uri FO30 Section 6.3 fn:iri-to-uri FO30 include-content-type If the instance of the data model includes a head recognized as an HTML element include-content-type yes MUST meta head For example, <head> <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" /> ... The content type SHOULD media-type Note: It is recommended that the host language [RFC2046] text/html [RFC2854] application/xhtml+xml [RFC3236] text/html If a meta head meta head http-equiv without regard to case MUST Note: This process removes possible parameters in the attribute value. For example, <meta http-equiv="Content-Type" content="text/html;version='3.0'" /> in the data model instance would be replaced by, <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> item-separator The effect of the item-separator 2 Sequence Normalization [ Definition quirk-compatible Each occurrence of the html http://www.w3.org/1999/xhtml Each occurrence of the MathML math http://www.w3.org/1998/Math/MathML Each occurrence of the SVG svg http://www.w3.org/2000/svg For each occurrence of an attribute in the XLink namespace ( http://www.w3.org/1999/xlink xlink Note: It is recommended, for compatibility with [Polyglot] svg math No other namespace declarations occur in the document. Note: This definition is derived from the draft of [Polyglot] [Polyglot] The HTML output method serializes the instance of the data model as HTML. For example, the following XSL stylesheet generates html output, <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="4.0"/> <xsl:template match="/"> <html> <xsl:apply-templates/> </html> </xsl:template> ... </xsl:stylesheet> In the example, the version xsl:output [HTML] (or [HTML5] At the time this document was published, the current version of [HTML5] A.1 Normative References [HTML5] [HTML5] MUST A.1 Normative References [HTML5] A.1 Normative References implementation-defined [HTML5] recognized as HTML elements void elements phrasing elements Boolean attributes [HTML5] MAY MAY It is entirely the responsibility of the person or process that creates the instance of the data model to ensure that the instance of the data model conforms to the HTML Recommendation [HTML] If the result tree is valid HTML, the serializer MUST requested HTML version As is described in detail below, the will not element is to be serialized as an HTML element Definition that is not to be serialized as an HTML element XML Island. Definition serialized as an HTML element the expanded QName of the element has a null namespace URI requested HTML version the value of the requested HTML version 5.0 in XHTML namespace If the element is to be serialized as an HTML element MUST span Any namespace node in the result tree for the XML namespace if the requested HTML version 5.0 XHTML namespace MathML namespace SVG namespace MUST serializer MUST xmlns xmlns xmlns If the namespace node is ignored serializer MUST NOT For namespace nodes in the result tree that are not ignored MUST xmlns xmlns: prefix version 1.0 If the result tree non-null namespace URI MUST nodes version 1.0 Where special rules are defined later in this section for serializing specific HTML elements and attributes, these rules MUST NOT that is not to be serialized as an HTML element an non-null namespace URI MUST When serializing an element whose name is not defined in the HTML specification, but that is is to be serialized as an HTML element MUST span MUST span When serializing an element whose name is in a non-null namespace, the HTML output method MUST div MUST div except for the influence of the cdata-section-elements The HTML output method MUST NOT empty element if the element type has an empty content model, and the value of the requested HTML version 5.0 a void requested HTML version 5.0 For HTML 4.0, the element types that have an empty content model are area base basefont br col embed frame hr img input isindex link meta param For HTML5, the void elements 6 XHTML Output Method implementation-defined basefont frame isindex requested HTML version 5.0 For example, an element written as <br/> <br></br> MUST <br> Note: The markup generation step of the phases of serialization serializer MUST For any element node that is to be serialized as an HTML element MUST compare the local part of the name of the element node with the names of HTML elements making the comparison without regard to case If the local part of the name of the element node, compares equal to that of any HTML element, the element node MUST br BR Br MUST br The HTML output method MUST NOT any text node descendant, nor for any attribute of an element node descendant, a script or style element For example, a script <script>if (a < b) foo()</script> or <script><![CDATA[if (a < b) foo()]]></script> MUST <script>if (a < b) foo()</script> A common requirement is to output a script <script type="application/ecmascript"> document.write ("<em>This won't work</em>") </script> This is invalid [HTML] Firstly, by use of a script <script type="application/ecmascript"> document.write ("<em>This won't work</em>") </script> Secondly, by constructing the markup from ordinary text characters: <script type="application/ecmascript"> document.write ("<em>This won't work</em>") </script> As the [HTML] <script type="application/ecmascript"> document.write ("<em>This will work<\/em>") </script> The [HTML] MUST serializer The HTML output method MUST NOT < A boolean attribute is an attribute with only a single allowed value in any of the HTML DTDs or that is specified to be a Boolean attribute [HTML5] MUST making the comparison without regard to case [ Definition Boolean attributes [HTML5] Attribute Element(s) async script autofocus button, input, keygen, select, textarea autoplay audio, video checked input controls audio, video default track defer script disabled button, fieldset, input, keygen, optgroup, option, select, textarea formnovalidate button, input hidden HTML elements ismap img loop audio, video multiple input, select muted audio, video novalidate form open details open dialog readonly input, textarea required input, select, textarea reversed ol scoped style seamless iframe selected option typemustmatch object Note: This list of Boolean attributes is that given in the index [HTML5] MAY [HTML5] For example, a start-tag created using the following XQuery direct element constructor or XSLT literal result element <OPTION selected="selected"> MUST <OPTION selected> The HTML output method MUST NOT & { Section B.7.1 [HTML] For example, a start-tag created using the following XQuery direct element constructor or XSLT literal result element <BODY bgcolor='&{{randomrbg}};'> MUST <BODY bgcolor='&{randomrbg};'> See 7.4 The Influence of Serialization Parameters upon the HTML Output Method MAY The HTML output method MAY SHOULD When outputting a sequence of whitespace characters characters are pre textarea MAY characters [XHTML Modularization] for versions of HTML prior to HTML5, and see the [HTML5] Note: The terms space character and white_space character defined in HTML5 do not match the definition of whitespace character Certain characters are permitted prior to HTML5 — for example, the control characters #x7F-#x9F, are permitted permitted prior to HTML5 serialization error err:SERE0014 if and the value of the requested HTML version 5.0 serializer MUST The HTML output method MUST > ?> serialization error err:SERE0015 > version and html-version Parameters The html-version version serialization parameter [HTML] or [HTML5] Definition If the html-version requested HTML version html-version version serializer the requested HTML version MUST serialization error err:SESU0013 This document provides the normative definition of serialization for the HTML output method if the requested HTML version 5.0 implementation-defined implementation-defined MAY encoding The encoding Serializers REQUIRED UTF-8 UTF-16 serialization error err:SESU0007 UTF-8 UTF-16 serializer serializer MUST It is possible that the instance of the data model will contain a character that cannot be represented in the encoding that the serializer MUST script style serializer MUST serialization error err:SERE0008 See 7.4.13 HTML Output Method: the include-content-type Parameter include-content-type indent and suppress-indentation If the indent yes MAY result tree if it observes the following constraints. Whitespace MUST NOT Whitespace MUST NOT %inline or those elements defined to be phrasing content [HTML5] ins del Whitespace MUST NOT pre script style title textarea Whitespace characters MUST NOT matches suppress-indentation The expanded QName of an element node is considered to match a member of the list of expanded QNames if: the two expanded QNames are equal; the expanded QNames both have null namespace URIs without regard to case the value of the requested HTML version 5.0 without regard to case null namespace URI Note: The effect of the above constraints is to ensure any insertion or deletion of whitespace would not affect how an conforming HTML user agent would render the output, assuming the serialized document does not refer to any HTML style sheets. Note that the HTML definition of whitespace is different from the XML definition (see section 9.1 of the [HTML] cdata-section-elements The cdata-section-elements XML Islands omit-xml-declaration standalone The omit-xml-declaration standalone doctype-system doctype-public If the doctype-public doctype-system MUST doctype-public MUST PUBLIC doctype-system MUST doctype-system doctype-public MUST SYSTEM If the value of the requested HTML version 5.0 doctype-public doctype-system the first element node child of serialized as an HTML element HTML without regard to case and any text node that precedes that element node in document contain only whitespace characters, MUST If the HTML output method MUST MUST <!DOCTYPE MUST HTML html undeclare-prefixes The undeclare-prefixes normalization-form The normalization-form NFC none MUST serializer serialization error err:SESU0011 normalization-form serializer serializer MUST media-type The media-type 3 Serialization Parameters 7.4.13 HTML Output Method: the include-content-type Parameter include-content-type use-character-maps The use-character-maps 9 Character Maps byte-order-mark The byte-order-mark 3 Serialization Parameters escape-uri-attributes If the escape-uri-attributes yes MUST URI escaping URI attribute values MUST NOT Note: This escaping is deliberately confined to non-ASCII characters, because escaping of ASCII characters is not always appropriate, for example when URIs or URI fragments are interpreted locally by the HTML user agent. Even in the case of non-ASCII characters, escaping can sometimes cause problems. More precise control of URI escaping escape-uri-attributes no Section 6.2 fn:encode-for-uri FO30 Section 6.3 fn:iri-to-uri FO30 include-content-type If there is a head include-content-type yes MUST meta head For example, <HEAD> <META http-equiv="Content-Type" content="text/html; charset=EUC-JP"> ... The content type MUST media-type If a meta head meta head http-equiv , making the comparison without regard to case MUST Note: This process removes possible parameters in the attribute value. For example, <meta http-equiv="Content-Type" content="text/html;version='3.0'"/> in the data model instance would be replaced by, <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> item-separator The effect of the item-separator 2 Sequence Normalization The Text output method serializes the instance of the data model by outputting the string value node the markup generation step of the phases of serialization A newline character in the instance of the data model MAY version The version html-version The html-version encoding The encoding MUST Serializers REQUIRED UTF-8 UTF-16 serialization error err:SESU0007 serializer encoding serializer MUST serializer serializer MUST serialization error err:SERE0008 indent and suppress-indentation The indent and suppress-indentation cdata-section-elements The cdata-section-elements omit-xml-declaration standalone The omit-xml-declaration standalone doctype-system doctype-public The doctype-system doctype-public undeclare-prefixes The undeclare-prefixes normalization-form The normalization-form NFC none MUST serializer serialization error err:SESU0011 normalization-form serializer serializer MUST media-type The media-type 3 Serialization Parameters use-character-maps The use-character-maps 9 Character Maps byte-order-mark The byte-order-mark 3 Serialization Parameters escape-uri-attributes The escape-uri-attributes include-content-type The include-content-type item-separator The effect of the item-separator 2 Sequence Normalization The use-character-maps Character maps allow a specific character appearing in a text or attribute node serializer Section 25.1 Character Maps XT30 [XSL Transformations (XSLT) Version 3.0] Character mapping is applied to the characters that actually appear in a text or attribute node Unicode Normalization serializer Character mapping is not applied to characters in text nodes cdata-section-elements a feature in all versions of XSLT URI escaping URI escaping escape-uri-attributes On serialization, occurrences of a character specified in the use-character-maps nodes use-character-maps Note: Using a character map can result in non-well-formed documents if the string contains XML-significant characters. For example, it is possible to create documents containing unmatched start and end tags, references to entities that are not declared, or attributes that contain tags or unescaped quotation marks. If a character is mapped, then it is not subjected to XML or HTML escaping. A serialization error err:SERE0008 serializer serializer MUST Serialization is intended primarily as a component of a host language Definition A host language [XSL Transformations (XSLT) Version 3.0] [XQuery 3.0: An XML Query Language] , or it might be an application programming interface (API) intended to be used by programs written in some other high-level programming language. The use of the term language This MUST NOT host language serialization errors are to Certain facilities in this specification are described as producing implementation-defined MUST E Checklist of Implementation-Defined Features XQuery and XPath Data Model (XDM) 3.0 latest version XQuery and XPath Functions and Operators 3.0 latest version HTML5 et. al. latest version HTML 4.01 Specification latest version Character Sets Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types Key words for use in RFCs to Indicate Requirement Levels IANA Charset Registration Procedures Unicode Character Encoding Model Unicode Normalization Forms XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition) latest version XHTML™ 1.1 - Module-based XHTML - Second Edition latest version Extensible Markup Language (XML) 1.0 (Fifth Edition) et. al. latest version Extensible Markup Language (XML) 1.1 (Second Edition) et. al. latest version Namespaces in XML 1.0 (Third Edition) et. al. latest version Namespaces in XML 1.1 (Second Edition) latest version XML Path Language (XPath) 3.0 latest version XQuery 3.0: An XML Query Language latest version XSL Transformations (XSLT) Version 2.0 (Second Edition) latest version Character Model for the World Wide Web 1.0: Normalization et. al. latest version Polyglot Markup: A robust profile of the HTML5 vocabulary latest version The 'text/html' Media Type The 'application/xhtml+xml' Media Type XML Schema Part 1: Structures Second Edition latest version XHTML™ Modularization 1.1 - Second Edition latest version XQuery 1.0 and XPath 2.0 Data Model (XDM) (Second Edition) et. al. latest version XSLT 2.0 and XQuery 1.0 Serialization (Second Edition), W3C Recommendation et. al. XSL Transformations (XSLT) Version 3.0 latest version The following schema describes the structure of a Data Model instance that can be used to specify the settings of serialization parameters using the mechanism described in 3.1 Setting Serialization Parameters by Means of a Data Model Instance A copy of this schema is available at http://www.w3.org/2014/04/xslt-xquery-serialization/schema-for-serialization-parameters.xsd <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2010/xslt-xquery-serialization" xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization" elementFormDefault="qualified">
<xs:annotation> <xs:documentation> This is a schema for serialization parameters for XSLT and XQuery Serialization 3.0.
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 It defines a schema for XML Infoset instances with which a user of a host language MAY specify serialization parameters for use in serializing an instance of the XQuery and XPath Data Model. It also provides hooks that allow the inclusion of implementation- defined serialization parameters and implementation-defined modifiers to serialization parameters. </xs:documentation> </xs:annotation>
<xs:simpleType name="QNames-type"> <xs:list itemType="xs:QName"/> </xs:simpleType>
<xs:simpleType name="yes-no-type"> <xs:restriction base="xs:token"> <xs:enumeration value="no"/> <xs:enumeration value="yes"/> </xs:restriction> </xs:simpleType>
<xs:simpleType name="yes-no-omit-type"> <xs:restriction base="xs:token"> <xs:enumeration value="no"/> <xs:enumeration value="omit"/> <xs:enumeration value="yes"/> </xs:restriction> </xs:simpleType>
<xs:simpleType name="char-type"> <xs:restriction base="xs:string"> <xs:maxLength value="1"/> <xs:minLength value="1"/> </xs:restriction> </xs:simpleType>
<xs:simpleType name="encoding-string-type"> <xs:restriction base="xs:string"> <xs:pattern value="[A-Za-z][A-Za-z0-9._\-]*"/> </xs:restriction> </xs:simpleType>
<xs:simpleType name="method-type"> <xs:union> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="html"/> <xs:enumeration value="text"/> <xs:enumeration value="xml"/> <xs:enumeration value="xhtml"/> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction base="xs:QName"> <xs:pattern value=".*:.*"/> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType>
<xs:simpleType name="pubid-char-string-type"> <xs:restriction base="xs:string"> <xs:pattern value="([- \r\n\ta-zA-Z0-9'()+,./:=?;!*#@$_%])*"/> </xs:restriction> </xs:simpleType>
<xs:simpleType name="system-id-string-type"> <xs:restriction base="xs:string"> <xs:pattern value="[^']*|[^"]*"/> </xs:restriction> </xs:simpleType>
<!-- - Base type of all serialization parameter types --> <xs:complexType name="base-param-type"> <xs:complexContent> <xs:restriction base="xs:anyType"> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:restriction> </xs:complexContent> </xs:complexType>
<!-- - Generic string serialization parameters --> <xs:complexType name="string-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:attribute name="value" type="xs:string" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Generic decimal serialization parameters --> <xs:complexType name="decimal-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:attribute name="value" type="xs:decimal" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Serialization parameter type for "yes" or "no" - serialization parameters --> <xs:complexType name="yes-no-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:attribute name="value" type="output:yes-no-type" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Serialization parameter type for list of xs:QName - serialization parameters --> <xs:complexType name="QNames-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:attribute name="value" type="output:QNames-type" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Serialization parameter type for "yes", "no" or "omit" - serialization parameters --> <xs:complexType name="yes-no-omit-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:attribute name="value" type="output:yes-no-omit-type" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Serialization parameter type for NMTOKEN serialization parameters --> <xs:complexType name="NMTOKEN-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:attribute name="value" type="xs:NMTOKEN" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Base element declaration for all serialization parameter elements --> <xs:element name="serialization-parameter-element" abstract="true" type="output:base-param-type"/>
<!-- - Serialization parameter element for byte-order-mark parameter --> <xs:element id="byte-order-mark" name="byte-order-mark" type="output:yes-no-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for cdata-section-elements parameter --> <xs:element id="cdata-section-elements" name="cdata-section-elements" type="output:QNames-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter type for doctype-public parameter --> <xs:complexType name="doctype-public-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:attribute name="value" type="output:pubid-char-string-type" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Serialization parameter element for doctype-public parameter --> <xs:element id="doctype-public" name="doctype-public" type="output:doctype-public-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter type for doctype-system parameter --> <xs:complexType name="doctype-system-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:attribute name="value" type="output:system-id-string-type" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Serialization parameter element for doctype-system parameter --> <xs:element id="doctype-system" name="doctype-system" type="output:doctype-system-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter type for encoding parameter --> <xs:complexType name="encoding-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:attribute name="value" type="output:encoding-string-type" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Serialization parameter element for encoding parameter --> <xs:element id="encoding" name="encoding" type="output:encoding-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for escape-uri-attributes parameter --> <xs:element id="escape-uri-attributes" name="escape-uri-attributes" type="output:yes-no-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for html-version parameter --> <xs:element id="html-version" name="html-version" type="output:decimal-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for include-content-type parameter --> <xs:element id="include-content-type" name="include-content-type" type="output:yes-no-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for indent parameter --> <xs:element id="indent" name="indent" type="output:yes-no-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for item-separator parameter --> <xs:element id="item-separator" name="item-separator" type="output:string-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for media-type parameter --> <xs:element id="media-type" name="media-type" type="output:string-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter type for method parameter --> <xs:complexType name="method-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:attribute name="value" type="output:method-type" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Serialization parameter element for method parameter --> <xs:element id="method" name="method" type="output:method-param-type" substitutionGroup="output:serialization-parameter-element"/> <!-- - Serialization parameter element for normalization-form parameter --> <xs:element id="normalization-form" name="normalization-form" type="output:NMTOKEN-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for omit-xml-declaration parameter --> <xs:element id="omit-xml-declaration" name="omit-xml-declaration" type="output:yes-no-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for standalone parameter --> <xs:element id="standalone" name="standalone" type="output:yes-no-omit-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for suppress-indentation parameter --> <xs:element id="suppress-indentation" name="suppress-indentation" type="output:QNames-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for undeclare-prefixes parameter --> <xs:element id="undeclare-prefixes" name="undeclare-prefixes" type="output:yes-no-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter type for use-character-maps - parameter --> <xs:complexType name="use-character-maps-param-type"> <xs:complexContent> <xs:extension base="output:base-param-type"> <xs:sequence> <xs:element name="character-map" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="character" type="output:char-type"/> <xs:attribute name="map-string" type="xs:string"/> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:complexType> </xs:element> <xs:any minOccurs="0" namespace="##other" processContents="lax"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType>
<!-- - Serialization parameter element for use-character-maps parameter --> <xs:element id="use-character-maps" name="use-character-maps" type="output:use-character-maps-param-type" substitutionGroup="output:serialization-parameter-element"/>
<!-- - Serialization parameter element for version parameter --> <xs:element id="version" name="version" type="output:string-param-type" substitutionGroup="output:serialization-parameter-element"/>
<xs:element name="serialization-parameters"> <xs:complexType> <xs:sequence> <xs:element ref="output:serialization-parameter-element" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> This document uses the err [XML Path Language (XPath) 3.0] It is an error if an item in S 6 sequence normalization It is an error if the serializer It is an error to specify the doctype-system parameter, or to specify the standalone parameter with a value other than omit It is an error if the serialized result would contain an NCName Names version It is an error if the serialized result would contain a character that is not permitted by the version of XML specified by the version It is an error if an output encoding other than UTF-8 UTF-16 serializer It is an error if a character that cannot be represented in the encoding that the serializer It is an error if the omit-xml-declaration yes standalone omit version 1.0 doctype-system It is an error if the output method is xml or xhtml undeclare-prefixes yes version It is an error if the value of the normalization-form serializer It is an error if the value of the normalization-form fully-normalized It is an error if the serializer version or the version of HTML specified by the html-version version It is an error to use the HTML output method if characters which are permitted the requested HTML version It is an error to use the HTML output method when > It is an error if a parameter value is invalid for the defined domain. It is an error if evaluating an expression in order to extract the setting of a serialization parameter from a data model instance would yield an error. It is an error if evaluating an expression in order to extract the setting of the use-character-maps It is an error if an instance of the data model used to specify the settings of serialization parameters specifies the value of the same parameter more than once , or if the instance does not have as its root node an element node or a document node with an element node child, where the local part of the name of the element node is serialization-parameters http://www.w3.org/2010/xslt-xquery-serialization This error has been removed. The following list of attributes are declared as type %URI %UriList name A name A SHOULD [HTML] Attributes Elements action FORM archive OBJECT background BODY cite BLOCKQUOTE, DEL, INS, Q classid OBJECT codebase APPLET, OBJECT data OBJECT datasrc BUTTON, DIV, INPUT, OBJECT, SELECT, SPAN, TABLE, TEXTAREA for SCRIPT formaction BUTTON, INPUT href A, AREA, BASE, LINK icon COMMAND longdesc FRAME, IFRAME, IMG manifest HTML name A poster VIDEO profile HEAD src AUDIO, EMBED, , SOURCE, TRACK, VIDEO usemap IMG, INPUT, OBJECT value INPUT This appendix provides a summary of Serialization features whose effect is explicitly implementation-defined 10 Conformance For any implementation-defined implementation-defined sequence normalization 2 Sequence Normalization If the namespace URI is non-null for the method implementation-defined 3 Serialization Parameters The effect of additional serialization parameters on the output of the serializer MUST implementation-defined implementation-dependent MUST NOT 3 Serialization Parameters Implementation-defined MAY 3.1 Setting Serialization Parameters by Means of a Data Model Instance If an instance of the data model used to determine the settings of serialization parameters contains elements or attributes that are in a namespace other than http://www.w3.org/2010/xslt-xquery-serialization MAY implementation-defined implementation-defined 3.1 Setting Serialization Parameters by Means of a Data Model Instance The effect of providing an option that allows the encoding phase to be skipped, so that the result of serialization is a stream of Unicode characters, is implementation-defined serializer 4 Phases of Serialization If an implementation supports a value of the version implementation-defined 5.1.1 XML Output Method: the version Parameter A serializer MAY implementation-defined result tree 5.1.5 XML Output Method: the cdata-section-elements Parameter If the value of the normalization-form NFC NFD NFKC NFKD fully-normalized none implementation-defined 5.1.9 XML Output Method: the normalization-form Parameter For information used in the XHTML and HTML output methods for which this specification cites [HTML5] MUST A.1 Normative References [HTML5] A.1 Normative References implementation-defined [HTML5] recognized as HTML elements void elements phrasing content Boolean attributes 6 XHTML Output Method For the HTML output method, it is implementation-defined basefont frame isindex requested HTML version 5.0 7.1 Markup for Elements If an implementation supports a value of the version implementation-defined 7.4.1 HTML Output Method: the version and html-version Parameters This appendix details the changes that have been made since the publication of the [XSLT 2.0 and XQuery 1.0 Serialization (Second Edition)] The following changes have been applied since the publication of the Candidate Recommendation to produce this document. Bugzilla bug (if applicable) Erratum (if applicable) Category Description of change Affected sections Bugzilla bug 25149 None Editorial Remove normative dependencies to documents whose technical stability is not assured. 1.1 Terminology 2 Sequence Normalization 3.1 Setting Serialization Parameters by Means of a Data Model Instance 4 Phases of Serialization 5.1.9 XML Output Method: the normalization-form Parameter 6 XHTML Output Method 6.1.4 XHTML Output Method: the indent and suppress-indentation Parameters 6.2 Polyglot markup and namespace declarations 7.1 Markup for Elements 7.2 Writing Attributes 7.3 Writing Character Data 7.4.1 HTML Output Method: the version and html-version Parameters 7.4.3 HTML Output Method: the indent and suppress-indentation Parameters 9 Character Maps A.1 Normative References A.2 Informative References E Checklist of Implementation-Defined Features Bugzilla bug 25156 None Editorial Correct typo in sample XSLT expression for use-character-maps 3.1 Setting Serialization Parameters by Means of a Data Model Instance The following changes have been applied since the publication of the fifth Public Working Draft to produce this, the sixth Public Working Draft. Bugzilla bug (if applicable) Erratum (if applicable) Category Description of change Affected sections Bugzilla bug 20245 None Editorial Editorial improvements to the description of how void elements and elements with an empty content model are processed by the XHTML output method. 6 XHTML Output Method Bugzilla bug 20251 Bugzilla bug 20261 None Substantive Corrections to the description of prefix stripping for the XHTML output method. 6 XHTML Output Method 7.1 Markup for Elements C Summary of Error Conditions The following changes have been applied since the publication of the fourth Public Working Draft to produce this, the fifth Public Working Draft. Bugzilla bug (if applicable) Erratum (if applicable) Category Description of change Affected sections Bugzilla bug 16311 None Substantive Added new serialization parameter for specifying a separator that is inserted between items in the sequence that is to be serialized. 2 Sequence Normalization 5.1.15 XML Output Method: the item-separator Parameter 6.1.15 XHTML Output Method: the item-separator Parameter 7.4.14 HTML Output Method: the item-separator Parameter 8.1.15 Text Output Method: the item-separator Parameter None None Editorial Added XSLT instructions equivalent to XQuery expressions for setting serialization parameters by means of a data model instance, and other editorial corrections and improvements. 3.1 Setting Serialization Parameters by Means of a Data Model Instance None None Editorial Clarified the definition of host language to make it clear that APIs can be considered to be host languages. 10 Conformance Bugzilla 6129 None Substantive Extended the definitions of the HTML and XHTML output methods to include support for HTML5 serialization. 3 Serialization Parameters 5.1.2 XML Output Method: the html-version Parameter 6 XHTML Output Method 6.1.2 XHTML Output Method: the html-version Parameter 6.1.4 XHTML Output Method: the indent and suppress-indentation Parameters 6.1.7 XHTML Output Method: the doctype-system and doctype-public Parameters 6.1.14 XHTML Output Method: the include-content-type Parameter 7 HTML Output Method 7.1 Markup for Elements 7.2 Writing Attributes 7.3 Writing Character Data 7.4.1 HTML Output Method: the version and html-version Parameters 7.4.3 HTML Output Method: the indent and suppress-indentation Parameters 7.4.6 HTML Output Method: the doctype-system and doctype-public Parameters 7.4.6 HTML Output Method: the doctype-system and doctype-public Parameters D List of URI Attributes Bugzilla 17619 None Editorial Text associated with links to the definitions of the terms NCName, EncName and VersionNum was repeated several times. 5.1.1 XML Output Method: the version Parameter 5.1.3 XML Output Method: the encoding Parameter C Summary of Error Conditions Bugzilla 15915 None Editorial Made uses of the terms "absent" and "unspecified" consistent. 3.1 Setting Serialization Parameters by Means of a Data Model Instance Bugzilla 17282 None Substantive Changed type of the normalization-form NMTOKEN normalization-form NMToken 3 Serialization Parameters B Schema for Serialization Parameters The following changes were following fourth [XSLT 2.0 and XQuery 1.0 Serialization (Second Edition)] Bugzilla bug (if applicable) Erratum (if applicable) Category Description of change Affected sections Bugzilla bug 12852 None Substantive Corrected the type of the media-type B Schema for Serialization Parameters Bugzilla bug 13688 None Substantive Corrected the regular expression associated with the encoding-string-type encoding B Schema for Serialization Parameters Bugzilla bug 10176 SE.E20 Substantive Clarified what it means for the html output method to output an XML island as XML. 7.1 Markup for Elements Bugzilla bug 14751 None Editorial Corrected typographical errors in the comments associated with the yes-no-param-type encoding-param-type B Schema for Serialization Parameters The following changes were applied after the publication of the second Public Working Draft to produce the third Public Working Draft. None of these changes introduces an incompatibility with [XSLT 2.0 and XQuery 1.0 Serialization (Second Edition)] Bugzilla bug (if applicable) Erratum (if applicable) Category Description of change Affected sections Bugzilla bug 11635 SE.E19 Substantive Clarified that serialization error SEPM0010 applies to the xhtml output method as well as the xml output method. C Summary of Error Conditions The following changes were applied after the publication of the first Public Working Draft to produce the second Public Working Draft. None of these changes introduces an incompatibility with [XSLT 2.0 and XQuery 1.0 Serialization (Second Edition)] Bugzilla bug (if applicable) Erratum (if applicable) Category Description of change Affected sections Bugzilla bug 6535 None Substantive Added definition of the suppress-indentation 3 Serialization Parameters 4 Phases of Serialization 5.1.4 XML Output Method: the indent and suppress-indentation Parameters 6.1.4 XHTML Output Method: the indent and suppress-indentation Parameters 7.4.3 HTML Output Method: the indent and suppress-indentation Parameters 8.1.4 Text Output Method: the indent and suppress-indentation Parameters Bugzilla bug 7829 SE.E14 Substantive Clarified how minimized attributes are handled under the rules of the HTML output method. 7.2 Writing Attributes Bugzilla bug 8245 SE.E15 Editorial Corrected description of a serialization error that mentions which control characters are not permitted under the rules of the HTML output method 7.3 Writing Character Data C Summary of Error Conditions Bugzilla bug 7823 SE.E16 Substantive Clarified how the script style 7.1 Markup for Elements Bugzilla bug 8651 SE.E17 Substantive Clarified what it means to compare without regard to case. 1.1 Terminology 6.1.14 XHTML Output Method: the include-content-type Parameter 7.1 Markup for Elements 7.2 Writing Attributes 7.4.13 HTML Output Method: the include-content-type Parameter Bugzilla bug 8206 SE.E18 Editorial Clarified what it means to escape according to HTML or XML rules. 4 Phases of Serialization Bugzilla bug 6808 None Substantive Relaxed rules for the XML output method that specify where a serializer is permitted to add whitespace. This introduces an incompatibility only inasmuch as the serialized results produced by a serializer conforming to this specification could differ from the results a serializer that adheres to [XSLT 2.0 and XQuery 1.0 Serialization (Second Edition)] 5.1.4 XML Output Method: the indent and suppress-indentation Parameters Bugzilla bug 9302 None Substantive Defined a mechanism for specifying serialization parameter settings in the form of a data model instance. 3.1 Setting Serialization Parameters by Means of a Data Model Instance None None Editorial Replaced all uses of the words legal illegal The following changes were applied after the publication of [XSLT 2.0 and XQuery 1.0 Serialization (Second Edition)] [XSLT 2.0 and XQuery 1.0 Serialization (Second Edition)] Bugzilla bug (if applicable) Erratum (if applicable) Category Description of change Affected sections Bugzilla bug 6723 SE.E13 Substantive Clarified how HTML elements that have no children but whose content model is not empty are serialized. 7 HTML Output Method 7.1 Markup for Elements Bugzilla bug 6732 SE.E12 Substantive Clarified for which versions of XML and HTML this document makes normative statements. 5.1.1 XML Output Method: the version Parameter 7.4.1 HTML Output Method: the version and html-version Parameters None None Substantive Take into account presence of function items in a sequence that is to be serialized. 2 Sequence Normalization None None Editorial Miscellaneous minor editorial corrections and improvements.