Bug 20843, updated autogen xsl, now excl. xslt2 functions (1902), added xslt rec xml
authorabraaksm
Tue, 31 Mar 2015 03:20:57 +0200
changeset 903 dec54db70682
parent 902 06166b29e2f1
child 904 feb31444d2c9
Bug 20843, updated autogen xsl, now excl. xslt2 functions (1902), added xslt rec xml
updated output format, added compare file, added indented version, minor updates on other autogen xsl
specs/functions-and-operators-rec20.xml
specs/functions-and-operators-rec30.xml
specs/xslt-lcwd30.xml
specs/xslt-rec20.xml
tests/decl/function/_function-test-set.xml
tests/decl/function/function-1901-generate.xsl
tests/decl/function/function-1902-generate.xsl
tests/decl/function/function-1902.indented.out
tests/decl/function/function-1902.out
tests/decl/function/function-1902.xml
tests/decl/function/function-1902.xsl
tests/decl/function/function-2001-generate.xsl
--- a/specs/functions-and-operators-rec20.xml	Mon Mar 30 22:22:21 2015 +0200
+++ b/specs/functions-and-operators-rec20.xml	Tue Mar 31 03:20:57 2015 +0200
@@ -1,6 +1,11 @@
-<!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!-- 
+  IGNORE DOCTYPE, processors may try to load it and we don't need it
+
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
---><html lang="EN" xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN">
+    
+-->
+<html lang="EN" xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN">
 <head>
 <meta name="generator" content=
 "HTML Tidy for Windows (vers 14 February 2006), see www.w3.org" />
--- a/specs/functions-and-operators-rec30.xml	Mon Mar 30 22:22:21 2015 +0200
+++ b/specs/functions-and-operators-rec30.xml	Tue Mar 31 03:20:57 2015 +0200
@@ -1,6 +1,10 @@
-<!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!-- IGNORE DOCTYPE, processors may try to load it and we don't need it
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
---><!--XSLT Processor: SAXON 9.3.0.5 from Saxonica SAXON EE 9.3.0.5-->
+-->
+
+<!--XSLT Processor: SAXON 9.3.0.5 from Saxonica SAXON EE 9.3.0.5-->
 <html lang="EN" xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN">
 <head>
 <meta name="generator" content=
--- a/specs/xslt-lcwd30.xml	Mon Mar 30 22:22:21 2015 +0200
+++ b/specs/xslt-lcwd30.xml	Tue Mar 31 03:20:57 2015 +0200
@@ -1,16 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--{xsl-query} XSLT Processor: Saxonica SAXON HE 9.4.0.3-->
-<!--{xmlspec} XSLT Processor: SaxonicaSAXONHE 9.4.0.3-->
-<!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
---><html lang="EN" xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN">
-<head>
-<meta name="generator" content=
-"HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.12), see www.w3.org" />
-<title>XSL Transformations (XSLT) Version 3.0</title>
-
-<style type="text/css">
-/*<![CDATA[*/
+<?xml version="1.0" encoding="UTF-8"?><!--{xsl-query} XSLT Processor: Saxonica SAXON HE 9.4.0.3--><!--{xmlspec} XSLT Processor: SaxonicaSAXONHE 9.4.0.3--><html xmlns="http://www.w3.org/1999/xhtml" lang="EN" xml:lang="EN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="generator" content="HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.12), see www.w3.org" /><title>XSL Transformations (XSLT) Version 3.0 -- Review
+Version</title><style type="text/css" xml:space="preserve">
+/**/
 /* from xsl:query.xsl (C) */          
 code           { font-family: monospace; }
 
@@ -64,6 +54,33 @@
 }
 
       
+/* from xslt3.0/diff.xsl (A) */  
+div.diff-add  { background-color: #99ff99 }
+div.diff-del  { background-color: #ff9999; text-decoration: line-through }
+div.diff-chg  { background-color: #ffff99 }
+div.diff-off  {  }
+
+span.diff-chg:before,
+span.diff-chg:after {
+content: "";
+}
+
+div.diff-chg:before,
+div.diff-chg:after {
+content: "";
+}
+
+
+span.diff-add { background-color: #99ff99 }
+span.diff-del { background-color: #ff9999; text-decoration: line-through }
+span.diff-chg { background-color: #ffff99 }
+span.diff-off {  }
+
+td.diff-add   { background-color: #99ff99 }
+td.diff-del   { background-color: #ff9999; text-decoration: line-through }
+td.diff-chg   { background-color: #ffff99 }
+td.diff-off   {  }
+
 /* from xslt3.0/diff.xsl (B) */  
 dd.indent { margin-left: 2em; }
 p.element-syntax { border: solid thin; background-color: #ffccff }
@@ -77,6 +94,12 @@
 span.definition { font: small-caps 100% sans-serif } 
 span.grayed { color: gray }
 
+/* from xsl-query.xsl (A) */      
+.diff-add  { background-color: #99ff99 }
+.diff-del  { background-color: #ff9999; text-decoration: line-through }
+.diff-chg  { background-color: #ffff99 }
+.diff-off  { background-color: #ffffff; text-decoration: none; }
+    
 /* from xsl-query.xsl (B) */    
 table.small                             { font-size: x-small; }
 a.judgment:visited, a.judgment:link     { font-family: sans-serif;
@@ -86,82 +109,56 @@
                                                 text-decoration: none }
 a.env:visited, a.env:link               { color: black; 
                                           text-decoration: none }
-/*]]>*/
-</style>
-<link rel="stylesheet" type="text/css" href=
-"//www.w3.org/StyleSheets/TR/W3C-WD.css" />
-</head>
-<body>
+/**/
+</style><link rel="stylesheet" type="text/css" href="//www.w3.org/StyleSheets/TR/W3C-WD.css" /></head><body>
+<div>
+<p>The presentation of this document has been augmented to identify
+changes from a previous version. Three kinds of changes are
+highlighted: <span class="diff-add">new, added text</span>,
+<span class="diff-chg">changed text</span>, and <span class="diff-del">deleted text</span>.</p>
+<p>The baseline for changes is the publication dated 2 October
+2014.</p>
+<hr /></div>
 <div class="head">
-<p><a href="http://www.w3.org/"><img src=
-"http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width=
-"72" /></a></p>
-<h1><a name="title" id="title"></a>XSL Transformations (XSLT)
+<p><a href="http://www.w3.org/" shape="rect"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72" /></a></p>
+<h1><a name="title" id="title" shape="rect"></a>XSL Transformations (XSLT)
 Version 3.0</h1>
-<h2><a name="w3c-doctype" id="w3c-doctype"></a>W3C Last Call
-Working Draft 2 October 2014</h2>
-<dl>
-<dt>This version:</dt>
-<dd><a href=
-"http://www.w3.org/TR/2014/WD-xslt-30-20141002/">http://www.w3.org/TR/2014/WD-xslt-30-20141002/</a></dd>
-<dt>Latest version:</dt>
-<dd><a href=
-"http://www.w3.org/TR/xslt-30/">http://www.w3.org/TR/xslt-30/</a><br />
-</dd>
-<dt>Previous versions:</dt>
-<dd><a href=
-"http://www.w3.org/TR/2013/WD-xslt-30-20131212/">http://www.w3.org/TR/2013/WD-xslt-30-20131212/</a><br />
-<br />
-<a href=
-"http://www.w3.org/TR/2012/WD-xslt-30-20120710/">http://www.w3.org/TR/2012/WD-xslt-30-20120710/</a><br />
-<br />
-<a href=
-"http://www.w3.org/TR/2010/WD-xslt-21-20100511/">http://www.w3.org/TR/2010/WD-xslt-21-20100511/</a><br />
-</dd>
-<dt>Editor:</dt>
-<dd>Michael Kay, Saxonica <a href=
-"http://www.saxonica.com/">&lt;http://www.saxonica.com/&gt;</a></dd>
-</dl>
-<p>See also <a href=
-"http://www.w3.org/2003/03/Translations/byTechnology?technology=xslt-30">
+<h2><a name="w3c-doctype" id="w3c-doctype" shape="rect"></a>W3C Internal Working
+Draft 16 March 2015</h2>
+<dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2015/WD-xslt-30-20150316/" shape="rect">http://www.w3.org/TR/2015/WD-xslt-30-20150316/</a></dd><dt>Latest version:</dt><dd><a href="http://www.w3.org/TR/xslt-30/" shape="rect">http://www.w3.org/TR/xslt-30/</a><br clear="none" />
+</dd><dt>Previous versions:</dt><dd><a href="http://www.w3.org/TR/2012/WD-xslt-30-20131212/" shape="rect">http://www.w3.org/TR/2012/WD-xslt-30-20131212/</a><br clear="none" />
+
+<br clear="none" />
+<a href="http://www.w3.org/TR/2012/WD-xslt-30-20120710/" shape="rect">http://www.w3.org/TR/2012/WD-xslt-30-20120710/</a><br clear="none" />
+
+<br clear="none" />
+<a href="http://www.w3.org/TR/2010/WD-xslt-21-20100511/" shape="rect">http://www.w3.org/TR/2010/WD-xslt-21-20100511/</a><br clear="none" />
+</dd><dt>Editor:</dt><dd>Michael Kay, Saxonica <a href="http://www.saxonica.com/" shape="rect">&lt;http://www.saxonica.com/&gt;</a></dd></dl>
+<p>See also <a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xslt-30" shape="rect">
 <strong>translations</strong></a>.</p>
 <p>The following associated resources are available:</p>
-<ul>
-<li><a href="Overview.html">Normative specification in HTML
-format</a></li>
-<li><a href="Overview-diff.html">HTML with revision markings
-(non-normative)</a></li>
-<li><a href="schema-for-xslt30.xsd">Schema for XSLT 3.0 stylesheets
-(non-normative)</a></li>
-<li><a href="schema-for-json.xsd">Schema for the XML representation
-of JSON used by fn:json-to-xml (non-normative)</a></li>
-<li><a href="xml-to-json.xsl">Stylesheet for XML-to-JSON conversion
-(non-normative)</a></li>
-</ul>
-<p class="copyright"><a href=
-"http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>&#160;©&#160;2014&#160;<a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup>
-(<a href="http://www.csail.mit.edu/"><acronym title=
-"Massachusetts Institute of Technology">MIT</acronym></a>, <a href=
-"http://www.ercim.eu/"><acronym title=
-"European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
-<a href="http://www.keio.ac.jp/">Keio</a>, <a href=
-"http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C
-<a href=
-"http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
-<a href=
-"http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
-and <a href=
-"http://www.w3.org/Consortium/Legal/copyright-documents">document
+<ul><li><a href="Overview.html" shape="rect">Normative specification in HTML
+format</a></li><li><a href="Overview-diff.html" shape="rect">HTML with revision markings
+(non-normative)</a></li><li><a href="schema-for-xslt30.xsd" shape="rect">Schema for XSLT 3.0 stylesheets
+(non-normative)</a></li><li><a href="schema-for-json.xsd" shape="rect">Schema for the XML representation
+of JSON used by fn:json-to-xml (non-normative)</a></li><li><a href="xml-to-json.xsl" shape="rect">Stylesheet for XML-to-JSON conversion
+(non-normative)</a></li></ul>
+<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright" shape="rect">Copyright</a> © 2015 <a href="http://www.w3.org/" shape="rect"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup>
+(<a href="http://www.csail.mit.edu/" shape="rect"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/" shape="rect"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
+<a href="http://www.keio.ac.jp/" shape="rect">Keio</a>, <a href="http://ev.buaa.edu.cn/" shape="rect">Beihang</a>), All Rights Reserved. W3C
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer" shape="rect">liability</a>,
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks" shape="rect">trademark</a>
+and <a href="http://www.w3.org/Consortium/Legal/copyright-documents" shape="rect">document
 use</a> rules apply.</p>
 </div>
 <hr />
 <div>
-<h2><a name="abstract" id="abstract"></a>Abstract</h2>
+<h2><a name="abstract" id="abstract" shape="rect"></a>Abstract</h2>
 <p>This specification defines the syntax and semantics of XSLT
-<span>3.0</span>, a language for transforming XML documents into
-other XML documents.</p>
+<span>3.0</span>, a language <span class="diff-add" id="bug27258a" title="Bug 27258"><span>designed primarily</span></span> for
+transforming XML documents into other XML documents.</p>
 <p>XSLT 3.0 is a revised version of the XSLT 2.0 Recommendation
-<a href="#xslt20">[XSLT 2.0]</a> published on 23 January 2007.</p>
+<a href="#xslt20" shape="rect">[XSLT 2.0]</a> published on 23 January 2007.</p>
 <p>The primary purpose of the changes in this version of the
 language is to enable transformations to be performed in streaming
 mode, where neither the source document nor the result document is
@@ -170,25 +167,21 @@
 to be developed from independently-developed components with a high
 level of software engineering robustness.</p>
 <p>XSLT 3.0 is designed to be used in conjunction with XPath 3.0,
-which is defined in <a href="#xpath-30">[XPath 3.0]</a>. XSLT
+which is defined in <a href="#xpath-30" shape="rect">[XPath 3.0]</a>. XSLT
 shares the same data model as XPath 3.0, which is defined in
-<a href="#xpath-datamodel-30">[Data Model]</a>, and it uses the
-library of functions and operators defined in <a href=
-"#xpath-functions-30">[Functions and Operators]</a>. XPath 3.0 and
+<a href="#xpath-datamodel-30" shape="rect">[Data Model]</a>, and it uses the
+library of functions and operators defined in <a href="#xpath-functions-30" shape="rect">[Functions and Operators]</a>. XPath 3.0 and
 the underlying function library introduce a number of enhancements,
 for example the availability of higher-order functions. Some of the
 functions that were previously defined in <span>the XSLT 2.0</span>
-specification, such as the <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-format-date"><code>format-date</code></a><sup><small>FO30</small></sup>
-and <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-format-number"><code>
+specification, such as the <a href="http://www.w3.org/TR/xpath-functions-30/#func-format-date" shape="rect"><code>format-date</code></a><sup><small>FO30</small></sup>
+and <a href="http://www.w3.org/TR/xpath-functions-30/#func-format-number" shape="rect"><code>
 format-number</code></a><sup><small>FO30</small></sup> functions,
 are now defined in the standard function library to make them
 available to other host languages.</p>
 <p>XSLT 3.0 also includes optional facilities to serialize the
 results of a transformation, by means of an interface to the
-serialization component described in <a href=
-"#xslt-xquery-serialization-30">[XSLT and XQuery
+serialization component described in <a href="#xslt-xquery-serialization-30" shape="rect">[XSLT and XQuery
 Serialization]</a>.</p>
 <p><em>This document contains hyperlinks to specific sections or
 definitions within other documents in this family of
@@ -198,30 +191,22 @@
 and Operators version 3.0.</em></p>
 </div>
 <div>
-<h2><a name="status" id="status"></a>Status of this Document</h2>
+<h2><a name="status" id="status" shape="rect"></a>Status of this Document</h2>
 <p><em>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 <a href=
-"http://www.w3.org/TR/">W3C technical reports index at
+revision of this technical report can be found in the <a href="http://www.w3.org/TR/" shape="rect">W3C technical reports index at
 http://www.w3.org/TR/.</a></em></p>
-<p >This document is governed by the <a id="w3c_process_revision" href=
-"http://www.w3.org/2005/10/Process-20051014/">14 October 2005 W3C
-Process Document</a>.</p>
-<p>This is a <a href=
-"http://www.w3.org/2005/10/Process-20051014/tr.html#last-call">Last
-Call Working Draft</a> as described in the <a href=
-"http://www.w3.org/2005/10/Process-20051014/">W3C Process
-Document</a>. It has been developed by the <a href=
-"http://www.w3.org/Style/XSL/">W3C XSLT Working Group</a>, which is
-part of the <a href="http://www.w3.org/XML/Activity">XML
+<p>This document is governed by the <a xmlns:html="http://www.w3.org/1999/xhtml" href="http://www.w3.org/2005/10/Process-20051014/" id="w3c_process_revision">14 October 2005 W3C Process Document</a>.</p>
+<p>This is a <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#last-call" shape="rect">Last
+Call Working Draft</a> as described in the <a xmlns:html="http://www.w3.org/1999/xhtml" href="http://www.w3.org/2005/10/Process-20051014/" id="w3c_process_revision">14 October 2005 W3C Process Document</a>. It has been developed by the <a href="http://www.w3.org/Style/XSL/" shape="rect">W3C XSLT Working Group</a>, which is
+part of the <a href="http://www.w3.org/XML/Activity" shape="rect">XML
 Activity</a>. Comments on this document will be formally accepted
 until 26 November 2014. The Working Group expects to advance this
-specification to <a href=
-"http://www.w3.org/2005/10/Process-20051014/tr.html#RecsW3C">Recommendation</a>
+specification to <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#RecsW3C" shape="rect">Recommendation</a>
 Status.</p>
 <p>This specification has been developed in conjunction with
-<a href="#xpath-30">[XPath 3.0]</a> and other documents that
+<a href="#xpath-30" shape="rect">[XPath 3.0]</a> and other documents that
 underpin both XSLT and XQuery. XSLT 3.0 is dependent on XPath 3.0,
 which is already at Recommendation status. The relationship of XSLT
 3.0 to XPath 3.1, which us currently under development, is being
@@ -235,1148 +220,917 @@
 Group (which has joint responsibility for XDM and XPath), and these
 extensions have been incorporated into working drafts of XDM 3.1
 and XPath 3.1.</em></p>
-<p>Changes since the previous Recommendation are listed in <a href=
-"#changes-since-2.0"><i>J Changes since XSLT 2.0</i></a>. The only
+<p>Changes since the previous Recommendation are listed in <a href="#changes-since-2.0" shape="rect"><i>J Changes since XSLT 2.0</i></a>. The only
 incompatibilities with XSLT 2.0 relate to the way in which certain
-error conditions are handled: the details are given in <a href=
-"#incompatibilities"><i>M Incompatibilities with XSLT
+error conditions are handled: the details are given in <a href="#incompatibilities" shape="rect"><i>M Incompatibilities with XSLT
 2.0</i></a>.</p>
-<p>A previous Last Call Working Draft was published on 12 December
-2013. Some 148 comments were received and most of these resulted to
-changes in the specification. There are also a number changes
-resulting from the incorporation of previously-agreed XSLT 2.0
-errata which had been accidentally omitted from previous XSLT 3.0
-drafts. The changes are listed at <a href=
-"#changes-since-dec-2013"><i>L Changes since the Last Call Working
-Draft of 12 December 2013</i></a>. The change-marked version of
-this publication links each entry in the change list to the
-specific places in the text that changed as a result. Some of the
-changes are substantive. Many are concerned with the detailed rules
-for streamability of stylesheets. Most of the changes result from
+<p>The second Last Call Working Draft was published on 2 October
+2014. The changes are listed at <a href="#changes-since-oct-2014" shape="rect"><i>L Changes since the Last Call Working
+Draft of 2 October 2014</i></a>. The change-marked version of this
+publication links each entry in the change list to the specific
+places in the text that changed as a result. Some of the changes
+are substantive. Many are concerned with the detailed rules for
+streamability of stylesheets. Most of the changes result from
 practical experience in implementing product features and writing
 test cases.</p>
-<p>Please report errors in this document using W3C's <a href=
-"https://www.w3.org/Bugs/Public/">public Bugzilla system</a>
-(instructions can be found at <a href=
-"http://www.w3.org/XML/2005/04/qt-bugzilla">http://www.w3.org/XML/2005/04/qt-bugzilla</a>).
+<p>Please report errors in this document using W3C’s <a href="https://www.w3.org/Bugs/Public/" shape="rect">public Bugzilla system</a>
+(instructions can be found at <a href="http://www.w3.org/XML/2005/04/qt-bugzilla" shape="rect">http://www.w3.org/XML/2005/04/qt-bugzilla</a>).
 If access to that system is not feasible, you may send your
 comments to the W3C XSLT/XPath/XQuery public comments mailing list,
-<a href=
-"mailto:public-qt-comments@w3.org">public-qt-comments@w3.org</a>.
+<a href="mailto:public-qt-comments@w3.org" shape="rect">public-qt-comments@w3.org</a>.
 It will be very helpful if you include the string "[XSLT30]" in the
 subject line of your report, whether made in Bugzilla or in email.
 Please use multiple Bugzilla entries (or, if necessary, multiple
 email messages) if you have more than one comment to make. Archives
-of the comments and responses are available at <a href=
-"http://lists.w3.org/Archives/Public/public-qt-comments/">http://lists.w3.org/Archives/Public/public-qt-comments/</a>.</p>
+of the comments and responses are available at <a href="http://lists.w3.org/Archives/Public/public-qt-comments/" shape="rect">http://lists.w3.org/Archives/Public/public-qt-comments/</a>.</p>
 <p>A public test suite for XSLT 3.0 is under development.
 Implementers and others are encouraged to run these tests, to
 submit comments and contributions, and to report their results. The
-test suite is available at <a href=
-"https://dvcs.w3.org/hg/xslt30-test/">https://dvcs.w3.org/hg/xslt30-test/</a>.</p>
+test suite is available at <a href="https://dvcs.w3.org/hg/xslt30-test/" shape="rect">https://dvcs.w3.org/hg/xslt30-test/</a>.</p>
 <p>Publication as a Last Call Working Draft does not imply
 endorsement by the W3C Membership. This is a draft document and may
 be updated, replaced or obsoleted by other documents at any time.
 It is inappropriate to cite this document as other than work in
 progress.</p>
 <p>This document was produced by a group operating under the
-<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
-February 2004 W3C Patent Policy</a>. W3C maintains a <a href=
-"http://www.w3.org/2004/01/pp-impl/19552/status#disclosures">public
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/" shape="rect">5
+February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/19552/status#disclosures" shape="rect">public
 list of any patent disclosures</a> made in connection with the
 deliverables of the group; that page also includes instructions for
 disclosing a patent. An individual who has actual knowledge of a
-patent which the individual believes contains <a href=
-"http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">
+patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential" shape="rect">
 Essential Claim(s)</a> must disclose the information in accordance
-with <a href=
-"http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
+with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure" shape="rect">
 section 6 of the W3C Patent Policy</a>.</p>
 </div>
 <div class="toc">
-<h2><a name="contents" id="contents"></a>Table of Contents</h2>
-<p class="toc">1 <a href="#introduction">Introduction</a><br />
-&#160;&#160;&#160;&#160;1.1 <a href="#what-is-xslt">What is
-XSLT?</a><br />
-&#160;&#160;&#160;&#160;1.2 <a href="#whats-new-in-xslt3">What's
-New in XSLT 3.0?</a><br />
-2 <a href="#concepts">Concepts</a><br />
-&#160;&#160;&#160;&#160;2.1 <a href=
-"#terminology">Terminology</a><br />
-&#160;&#160;&#160;&#160;2.2 <a href="#notation">Notation</a><br />
-&#160;&#160;&#160;&#160;2.3 <a href="#initiating">Initiating a
-Transformation</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.3.1 <a href=
-"#info-for-static-analysis">Information needed for Static
-Analysis</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.3.2 <a href=
-"#priming-stylesheet">Priming a Stylesheet</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.3.3 <a href=
-"#invoking-initial-mode">Apply-Templates Invocation</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.3.4 <a href=
-"#invoking-initial-template">Call-Template Invocation</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.3.5 <a href=
-"#invoking-initial-function">Function Call Invocation</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.3.6 <a href=
-"#post-processing">Post-processing the Raw Result</a><br />
-&#160;&#160;&#160;&#160;2.4 <a href=
-"#executing-a-transformation">Executing a Transformation</a><br />
-&#160;&#160;&#160;&#160;2.5 <a href="#context">The Evaluation
-Context</a><br />
-&#160;&#160;&#160;&#160;2.6 <a href=
-"#parsing-and-serialization">Parsing and Serialization</a><br />
-&#160;&#160;&#160;&#160;2.7 <a href=
-"#packages-and-modules">Packages and Modules</a><br />
-&#160;&#160;&#160;&#160;2.8 <a href=
-"#extensibility">Extensibility</a><br />
-&#160;&#160;&#160;&#160;2.9 <a href=
-"#stylesheets-and-schemas">Stylesheets and XML Schemas</a><br />
-&#160;&#160;&#160;&#160;2.10 <a href=
-"#streaming-concepts">Streaming</a><br />
-&#160;&#160;&#160;&#160;2.11 <a href="#errors">Error
-Handling</a><br />
-3 <a href="#stylesheet-structure">Stylesheet Structure</a><br />
-&#160;&#160;&#160;&#160;3.1 <a href="#xslt-namespace">XSLT
-Namespace</a><br />
-&#160;&#160;&#160;&#160;3.2 <a href="#reserved-namespaces">Reserved
-Namespaces</a><br />
-&#160;&#160;&#160;&#160;3.3 <a href=
-"#extension-attributes">Extension Attributes</a><br />
-&#160;&#160;&#160;&#160;3.4 <a href="#xslt-media-type">XSLT Media
-Type</a><br />
-&#160;&#160;&#160;&#160;3.5 <a href="#standard-attributes">Standard
-Attributes</a><br />
-&#160;&#160;&#160;&#160;3.6 <a href="#packages">Packages</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.1 <a href=
-"#package-versions">Versions of a Package</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.2 <a href=
-"#package-dependencies">Dependencies between Packages</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.3 <a href=
-"#named-components">Named Components in Packages</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.3.1
-<a href="#visibility">Visibility of Components</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.3.2
-<a href="#accepting-components">Accepting Components</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.3.3
-<a href="#package-overriding-components">Overriding Named
-Components from a Used Package</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.3.4
-<a href="#component-references">Binding References to
-Components</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.4 <a href=
-"#modes-and-packages">Overriding Template Rules from a Used
-Package</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.4.1
-<a href="#requiring-explicit-modes">Requiring Explicit Mode
-Declarations</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.5 <a href=
-"#package-local-declarations">Declarations Local to a
-Package</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.6 <a href=
-"#declaring-global-context-item">Declaring the Global Context
-Item</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.7 <a href=
-"#xquery-packages">Using an XQuery Library Package</a><br />
-&#160;&#160;&#160;&#160;3.7 <a href=
-"#stylesheet-modules">Stylesheet Modules</a><br />
-&#160;&#160;&#160;&#160;3.8 <a href=
-"#stylesheet-element">Stylesheet Element</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.1 <a href=
-"#default-collation-attribute">The default-collation
-Attribute</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.2 <a href=
-"#default-mode">The [xsl:]default-mode Attribute</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.3 <a href=
-"#user-defined-top-level">User-defined Data Elements</a><br />
-&#160;&#160;&#160;&#160;3.9 <a href=
-"#simplified-stylesheet">Simplified Stylesheet Modules</a><br />
-&#160;&#160;&#160;&#160;3.10 <a href="#backwards">Backwards
-Compatible Processing</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.1 <a href=
-"#backwards-1.0">XSLT 1.0 Compatibility Mode</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.2 <a href=
-"#backwards-2.0">XSLT 2.0 Compatibility Mode</a><br />
-&#160;&#160;&#160;&#160;3.11 <a href="#forwards">Forwards
-Compatible Processing</a><br />
-&#160;&#160;&#160;&#160;3.12 <a href="#combining-modules">Combining
-Stylesheet Modules</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.1 <a href=
-"#locating-modules">Locating Stylesheet Modules</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.2 <a href=
-"#include">Stylesheet Inclusion</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.3 <a href=
-"#import">Stylesheet Import</a><br />
-&#160;&#160;&#160;&#160;3.13 <a href="#embedded">Embedded
-Stylesheet Modules</a><br />
-&#160;&#160;&#160;&#160;3.14 <a href="#preprocessing">Stylesheet
-Preprocessing</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.1 <a href=
-"#conditional-inclusion">Conditional Element Inclusion</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.2 <a href=
-"#shadow-attributes">Shadow Attributes</a><br />
-&#160;&#160;&#160;&#160;3.15 <a href="#built-in-types">Built-in
-Types</a><br />
-&#160;&#160;&#160;&#160;3.16 <a href="#import-schema">Importing
-Schema Components</a><br />
-4 <a href="#data-model">Data Model</a><br />
-&#160;&#160;&#160;&#160;4.1 <a href="#xml-versions">XML
-Versions</a><br />
-&#160;&#160;&#160;&#160;4.2 <a href=
-"#stylesheet-stripping">Stripping Whitespace from the
-Stylesheet</a><br />
-&#160;&#160;&#160;&#160;4.3 <a href=
-"#stripping-annotations">Stripping Type Annotations from a Source
-Tree</a><br />
-&#160;&#160;&#160;&#160;4.4 <a href="#strip">Stripping Whitespace
-from a Source Tree</a><br />
-&#160;&#160;&#160;&#160;4.5 <a href="#id-in-data-model">Attribute
-Types and DTD Validation</a><br />
-&#160;&#160;&#160;&#160;4.6 <a href="#model-for-streaming">Data
-Model for Streaming</a><br />
-&#160;&#160;&#160;&#160;4.7 <a href="#limits">Limits</a><br />
-&#160;&#160;&#160;&#160;4.8 <a href="#d-o-e-in-data-model">Disable
-Output Escaping</a><br />
-5 <a href="#constructs">Features of the XSLT Language</a><br />
-&#160;&#160;&#160;&#160;5.1 <a href="#qname">Qualified
-Names</a><br />
-&#160;&#160;&#160;&#160;5.2 <a href="#unprefixed-qnames">Unprefixed
-Lexical QNames in Expressions and Patterns</a><br />
-&#160;&#160;&#160;&#160;5.3 <a href=
-"#expressions">Expressions</a><br />
-&#160;&#160;&#160;&#160;5.4 <a href=
-"#static-and-dynamic-context">The Static and Dynamic
-Context</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.1 <a href=
-"#static-context">Initializing the Static Context</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.2 <a href=
-"#additional-static-context">Additional Static Context Components
-used by XSLT</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.3 <a href=
-"#xpath-dynamic-context">Initializing the Dynamic Context</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.3.1
-<a href="#focus">Maintaining Position: the Focus</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.3.2
-<a href="#evaluation-context">Other Components of the XPath Dynamic
-Context</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.4.4 <a href=
-"#additional-dynamic-context">Additional Dynamic Context Components
-used by XSLT</a><br />
-&#160;&#160;&#160;&#160;5.5 <a href=
-"#defining-decimal-format">Defining a Decimal Format</a><br />
-&#160;&#160;&#160;&#160;5.6 <a href="#patterns">Patterns</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.6.1 <a href=
-"#pattern-examples">Examples of Patterns</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.6.2 <a href=
-"#pattern-syntax">Syntax of Patterns</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.6.3 <a href=
-"#pattern-semantics">The Meaning of a Pattern</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.6.4 <a href=
-"#pattern-errors">Errors in Patterns</a><br />
-&#160;&#160;&#160;&#160;5.7 <a href="#value-templates">Value
-Templates</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.7.1 <a href=
-"#attribute-value-templates">Attribute Value Templates</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.7.2 <a href=
-"#text-value-templates">Text Value Templates</a><br />
-&#160;&#160;&#160;&#160;5.8 <a href=
-"#sequence-constructors">Sequence Constructors</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.8.1 <a href=
-"#constructing-complex-content">Constructing Complex
-Content</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.8.2 <a href=
-"#constructing-simple-content">Constructing Simple
-Content</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.8.3 <a href=
-"#namespace-fixup">Namespace Fixup</a><br />
-&#160;&#160;&#160;&#160;5.9 <a href="#uri-references">URI
-References</a><br />
-6 <a href="#rules">Template Rules</a><br />
-&#160;&#160;&#160;&#160;6.1 <a href="#defining-templates">Defining
-Templates</a><br />
-&#160;&#160;&#160;&#160;6.2 <a href=
-"#defining-template-rules">Defining Template Rules</a><br />
-&#160;&#160;&#160;&#160;6.3 <a href="#applying-templates">Applying
-Template Rules</a><br />
-&#160;&#160;&#160;&#160;6.4 <a href="#conflict">Conflict Resolution
-for Template Rules</a><br />
-&#160;&#160;&#160;&#160;6.5 <a href="#default-priority">Default
-Priority for Template Rules</a><br />
-&#160;&#160;&#160;&#160;6.6 <a href="#modes">Modes</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.6.1 <a href=
-"#declaring-modes">Declaring Modes</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.6.2 <a href=
-"#using-modes">Using Modes</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.6.3 <a href=
-"#xsl-mode-typed">Declaring the Type of Nodes Processed by a
-Mode</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.6.4 <a href=
-"#streamable-templates">Streamable Templates</a><br />
-&#160;&#160;&#160;&#160;6.7 <a href="#built-in-rule">Built-in
-Template Rules</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.7.1 <a href=
-"#built-in-templates-text-only-copy">Built-in Templates: Text-only
-Copy</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.7.2 <a href=
-"#built-in-templates-deep-copy">Built-in Templates: Deep
-Copy</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.7.3 <a href=
-"#built-in-templates-shallow-copy">Built-in Templates: Shallow
-Copy</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.7.4 <a href=
-"#built-in-templates-deep-skip">Built-in Templates: Deep
-Skip</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.7.5 <a href=
-"#built-in-templates-shallow-skip">Built-in Templates: Shallow
-Skip</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.7.6 <a href=
-"#built-in-templates-fail">Built-in Templates: Fail</a><br />
-&#160;&#160;&#160;&#160;6.8 <a href="#apply-imports">Overriding
-Template Rules</a><br />
-&#160;&#160;&#160;&#160;6.9 <a href=
-"#parameters-to-template-rules">Passing Parameters to Template
-Rules</a><br />
-7 <a href="#repetition">Repetition</a><br />
-&#160;&#160;&#160;&#160;7.1 <a href="#for-each">The xsl:for-each
-instruction</a><br />
-&#160;&#160;&#160;&#160;7.2 <a href="#iterate">The xsl:iterate
-Instruction</a><br />
-8 <a href="#conditionals">Conditional Processing</a><br />
-&#160;&#160;&#160;&#160;8.1 <a href="#xsl-if">Conditional
-Processing with xsl:if</a><br />
-&#160;&#160;&#160;&#160;8.2 <a href="#xsl-choose">Conditional
-Processing with xsl:choose</a><br />
-&#160;&#160;&#160;&#160;8.3 <a href=
-"#try-catch">Try/Catch</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.3.1 <a href=
-"#recovery">Recovery of Result Trees</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.3.2 <a href=
-"#try-catch-examples">Try/Catch Examples</a><br />
-9 <a href="#variables-and-parameters">Variables and
-Parameters</a><br />
-&#160;&#160;&#160;&#160;9.1 <a href=
-"#variables">Variables</a><br />
-&#160;&#160;&#160;&#160;9.2 <a href=
-"#parameters">Parameters</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.2.1 <a href=
-"#parameter-type">The Required Type of a Parameter</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;9.2.2 <a href=
-"#default-values-of-parameters">Default Values of
-Parameters</a><br />
-&#160;&#160;&#160;&#160;9.3 <a href="#variable-values">Values of
-Variables and Parameters</a><br />
-&#160;&#160;&#160;&#160;9.4 <a href="#temporary-trees">Creating
-Implicit Document Nodes</a><br />
-&#160;&#160;&#160;&#160;9.5 <a href="#global-variables">Global
-Variables and Parameters</a><br />
-&#160;&#160;&#160;&#160;9.6 <a href="#static-params">Static
-Variables and Parameters</a><br />
-&#160;&#160;&#160;&#160;9.7 <a href="#static-expression">Static
-Expressions</a><br />
-&#160;&#160;&#160;&#160;9.8 <a href="#local-variables">Local
-Variables and Parameters</a><br />
-&#160;&#160;&#160;&#160;9.9 <a href="#scope-of-variables">Scope of
-Variables</a><br />
-&#160;&#160;&#160;&#160;9.10 <a href="#with-param">Setting
-Parameter Values</a><br />
-&#160;&#160;&#160;&#160;9.11 <a href="#circularity">Circular
-Definitions</a><br />
-10 <a href="#callable-components">Callable Components</a><br />
-&#160;&#160;&#160;&#160;10.1 <a href="#named-templates">Named
-Templates</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.1.1 <a href=
-"#declaring-context-item">Declaring the Context Item for a
-Template</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.1.2 <a href=
-"#call-template-params">Passing Parameters to Named
-Templates</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.1.3 <a href=
-"#tunnel-params">Tunnel Parameters</a><br />
-&#160;&#160;&#160;&#160;10.2 <a href="#attribute-sets">Named
-Attribute Sets</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.1 <a href=
-"#using-attribute-sets">Using Attribute Sets</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.2 <a href=
-"#visibility-of-attribute-sets">Visibility of Attribute
-Sets</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.3 <a href=
-"#streamability-of-attribute-sets">Streamability of Attribute
-Sets</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.4 <a href=
-"#evaluating-attribute-sets">Evaluating Attribute Sets</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.2.5 <a href=
-"#attribute-sets-examples">Attribute Sets: Examples</a><br />
-&#160;&#160;&#160;&#160;10.3 <a href=
-"#stylesheet-functions">Stylesheet Functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.3.1 <a href=
-"#xsl-function-name">Function Name and Arity</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.3.2 <a href=
-"#function-arguments">Arguments</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.3.3 <a href=
-"#function-result">Function Result</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.3.4 <a href=
-"#function-visibility-and-overriding">Visibility and Overriding of
-Functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.3.5 <a href=
-"#streamable-stylesheet-functions">Streamability of Stylesheet
-Functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.3.6 <a href=
-"#function-lookup">Dynamic Access to Functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.3.7 <a href=
-"#function-determinism">Determinism of Functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.3.8 <a href=
-"#memoization">Memoization</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.3.9 <a href=
-"#function-examples">Examples of Stylesheet Functions</a><br />
-&#160;&#160;&#160;&#160;10.4 <a href="#dynamic-xpath">Dynamic XPath
-Evaluation</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.4.1 <a href=
-"#evaluate-static-context">Static context for the target
-expression</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.4.2 <a href=
-"#evaluate-dynamic-context">Dynamic context for the target
-expression</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.4.3 <a href=
-"#evaluate-effect">The effect of the xsl:evaluate
-instruction</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.4.4 <a href=
-"#evaluation-as-optional-feature">xsl:evaluate as an optional
-feature</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;10.4.5 <a href=
-"#evaluate-examples">Examples of xsl:evaluate</a><br />
-11 <a href="#creating-new-nodes">Creating Nodes and
-Sequences</a><br />
-&#160;&#160;&#160;&#160;11.1 <a href=
-"#literal-result-element">Literal Result Elements</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.1.1 <a href=
-"#setting-annotation-for-lre">Setting the Type Annotation for
-Literal Result Elements</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.1.2 <a href=
-"#attributes-for-lres">Attribute Nodes for Literal Result
-Elements</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.1.3 <a href=
-"#lre-namespaces">Namespace Nodes for Literal Result
-Elements</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.1.4 <a href=
-"#conditional-literal-result-elements">Conditional Creation of
-Literal Result Elements</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.1.5 <a href=
-"#namespace-aliasing">Namespace Aliasing</a><br />
-&#160;&#160;&#160;&#160;11.2 <a href="#xsl-element">Creating
-Element Nodes Using xsl:element</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.2.1 <a href=
-"#xsl-element-content">The Content of the Constructed Element
-Node</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.2.2 <a href=
-"#xsl-element-name">The Name of the Constructed Element
-Node</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.2.3 <a href=
-"#xsl-element-properties">Other Properties of the Constructed
-Element Node</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.2.4 <a href=
-"#annotation-for-constructed-element">The Type Annotation of the
-Constructed Element Node</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.2.5 <a href=
-"#xsl-element-on-empty">Conditional Construction of Element
-Nodes</a><br />
-&#160;&#160;&#160;&#160;11.3 <a href=
-"#creating-attributes">Creating Attribute Nodes Using
-xsl:attribute</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.3.1 <a href=
-"#annotation-for-constructed-attribute">Setting the Type Annotation
-for a Constructed Attribute Node</a><br />
-&#160;&#160;&#160;&#160;11.4 <a href=
-"#creating-text-nodes">Creating Text Nodes</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.4.1 <a href=
-"#literal-text-nodes">Literal Text Nodes</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.4.2 <a href=
-"#xsl-text">Creating Text Nodes Using xsl:text</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.4.3 <a href=
-"#value-of">Generating Text with xsl:value-of</a><br />
-&#160;&#160;&#160;&#160;11.5 <a href=
-"#creating-document-nodes">Creating Document Nodes</a><br />
-&#160;&#160;&#160;&#160;11.6 <a href=
-"#creating-processing-instructions">Creating Processing
-Instructions</a><br />
-&#160;&#160;&#160;&#160;11.7 <a href=
-"#creating-namespace-nodes">Creating Namespace Nodes</a><br />
-&#160;&#160;&#160;&#160;11.8 <a href="#creating-comments">Creating
-Comments</a><br />
-&#160;&#160;&#160;&#160;11.9 <a href="#copying">Copying
-Nodes</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.9.1 <a href=
-"#shallow-copy">Shallow Copy</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.9.1.1
-<a href="#conditional-copy">Conditional Copying of Nodes</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;11.9.2 <a href=
-"#copy-of">Deep Copy</a><br />
-&#160;&#160;&#160;&#160;11.10 <a href=
-"#constructing-sequences">Constructing Sequences</a><br />
-12 <a href="#number">Numbering</a><br />
-&#160;&#160;&#160;&#160;12.1 <a href=
-"#formatting-supplied-number">Formatting a Supplied
-Number</a><br />
-&#160;&#160;&#160;&#160;12.2 <a href=
-"#numbering-based-on-position">Numbering based on Position in a
-Document</a><br />
-&#160;&#160;&#160;&#160;12.3 <a href="#convert">Number to String
-Conversion Attributes</a><br />
-13 <a href="#sorting">Sorting</a><br />
-&#160;&#160;&#160;&#160;13.1 <a href="#xsl-sort">The xsl:sort
-Element</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;13.1.1 <a href=
-"#sorting-process">The Sorting Process</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;13.1.2 <a href=
-"#comparing-sort-keys">Comparing Sort Key Values</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;13.1.3 <a href=
-"#collating-sequences">Sorting Using Collations</a><br />
-&#160;&#160;&#160;&#160;13.2 <a href=
-"#creating-sorted-sequence">Creating a Sorted Sequence</a><br />
-&#160;&#160;&#160;&#160;13.3 <a href="#sorted-iteration">Processing
-a Sequence in Sorted Order</a><br />
-&#160;&#160;&#160;&#160;13.4 <a href="#uca-collations">The Unicode
-Collation Algorithm</a><br />
-14 <a href="#grouping">Grouping</a><br />
-&#160;&#160;&#160;&#160;14.1 <a href="#xsl-for-each-group">The
-xsl:for-each-group Element</a><br />
-&#160;&#160;&#160;&#160;14.2 <a href=
-"#information-about-group">Accessing Information about the Current
-Group Value</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.2.1 <a href=
-"#func-current-group">fn:current-group</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;14.2.2 <a href=
-"#func-current-grouping-key">fn:current-grouping-key</a><br />
-&#160;&#160;&#160;&#160;14.3 <a href="#order-of-groups">Ordering
-among Groups</a><br />
-&#160;&#160;&#160;&#160;14.4 <a href="#grouping-examples">Examples
-of Grouping</a><br />
-&#160;&#160;&#160;&#160;14.5 <a href=
-"#non-transitivity">Non-Transitivity</a><br />
-15 <a href="#merging">Merging</a><br />
-&#160;&#160;&#160;&#160;15.1 <a href=
-"#merge-terminology">Terminology for Merging</a><br />
-&#160;&#160;&#160;&#160;15.2 <a href="#merge-instruction">The
-xsl:merge Instruction</a><br />
-&#160;&#160;&#160;&#160;15.3 <a href=
-"#merge-input-sequences">Selecting the Sequences to be
-Merged</a><br />
-&#160;&#160;&#160;&#160;15.4 <a href=
-"#streamable-merging">Streamable Merging</a><br />
-&#160;&#160;&#160;&#160;15.5 <a href="#merge-keys">Defining the
-Merge Keys</a><br />
-&#160;&#160;&#160;&#160;15.6 <a href=
-"#current-merge-group-and-key">The Current Merge Group and
-Key</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;15.6.1 <a href=
-"#func-current-merge-group">fn:current-merge-group</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;15.6.2 <a href=
-"#func-current-merge-key">fn:current-merge-key</a><br />
-&#160;&#160;&#160;&#160;15.7 <a href="#merge-action">The
-xsl:merge-action Element</a><br />
-&#160;&#160;&#160;&#160;15.8 <a href="#merge-examples">Examples of
-xsl:merge</a><br />
-16 <a href="#splitting">Splitting</a><br />
-&#160;&#160;&#160;&#160;16.1 <a href="#fork-instruction">The
-xsl:fork Instruction</a><br />
-&#160;&#160;&#160;&#160;16.2 <a href="#splitting-examples">Examples
-of Splitting with Streamed Data</a><br />
-17 <a href="#regular-expressions">Regular Expressions</a><br />
-&#160;&#160;&#160;&#160;17.1 <a href="#analyze-string">The
-xsl:analyze-string Instruction</a><br />
-&#160;&#160;&#160;&#160;17.2 <a href=
-"#func-regex-group">fn:regex-group</a><br />
-&#160;&#160;&#160;&#160;17.3 <a href="#regex-examples">Examples of
-Regular Expression Matching</a><br />
-18 <a href="#streaming">Streaming</a><br />
-&#160;&#160;&#160;&#160;18.1 <a href="#stream-instruction">The
-xsl:stream Instruction</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.1 <a href=
-"#stream-validation">Validation of Streamed Documents</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.2 <a href=
-"#stream-examples">Examples of xsl:stream</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.1.3 <a href=
-"#func-stream-available">fn:stream-available</a><br />
-&#160;&#160;&#160;&#160;18.2 <a href=
-"#accumulators">Accumulators</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.2.1 <a href=
-"#accumulator-declaration">Declaring an Accumulator</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.2.2 <a href=
-"#accumulator-informal-rules">Informal Model for
-Accumulators</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.2.3 <a href=
-"#accumulator-formal-rules">Formal Model for Accumulators</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.2.4 <a href=
-"#func-accumulator-before">fn:accumulator-before</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.2.5 <a href=
-"#func-accumulator-after">fn:accumulator-after</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.2.6 <a href=
-"#accumulators-visibility-and-overriding">Visibility and Overriding
-of Accumulators</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.2.7 <a href=
-"#streamability-of-accumulators">Streamability of
-Accumulators</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;18.2.8 <a href=
-"#accumulator-examples">Examples of Accumulators</a><br />
-&#160;&#160;&#160;&#160;18.3 <a href=
-"#func-copy-of">fn:copy-of</a><br />
-&#160;&#160;&#160;&#160;18.4 <a href=
-"#func-snapshot">fn:snapshot</a><br />
-19 <a href="#streamability">Streamability</a><br />
-&#160;&#160;&#160;&#160;19.2 <a href=
-"#determining-static-type">Determining the Static Type of a
-Construct</a><br />
-&#160;&#160;&#160;&#160;19.3 <a href=
-"#determining-context-item-type">Determining the Context Item
-Type</a><br />
-&#160;&#160;&#160;&#160;19.4 <a href="#operand-roles">Operand
-Roles</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.4.1 <a href=
-"#operand-usage-examples">Examples showing the Effect of Operand
-Usage</a><br />
-&#160;&#160;&#160;&#160;19.5 <a href="#posture">Determining the
-Posture of a Construct</a><br />
-&#160;&#160;&#160;&#160;19.6 <a href=
-"#determining-context-posture">Determining the Context
-Posture</a><br />
-&#160;&#160;&#160;&#160;19.7 <a href="#sweep">The Sweep of a
-Construct</a><br />
-&#160;&#160;&#160;&#160;19.8 <a href=
-"#classifying-constructs">Classifying Constructs</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.1 <a href=
-"#general-streamability-rules">General Rules for
-Streamability</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.2 <a href=
-"#general-streamability-examples">Examples of the General
-Streamability Rules</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.3 <a href=
-"#classifying-sequence-constructors">Classifying Sequence
-Constructors</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4 <a href=
-"#classifying-instructions">Classifying Instructions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.1
-<a href="#streamability-literal-result-elements">Streamability of
-Literal Result Elements</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.2
-<a href="#streamability-extension-instructions">Streamability of
-extension instructions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.3
-<a href="#streamability-xsl-analyze-string">Streamability of
-xsl:analyze-string</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.4
-<a href="#streamability-xsl-apply-imports">Streamability of
-xsl:apply-imports</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.5
-<a href="#streamability-xsl-apply-templates">Streamability of
-xsl:apply-templates</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.6
-<a href="#streamability-xsl-assert">Streamability of
-xsl:assert</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.7
-<a href="#streamability-xsl-attribute">Streamability of
-xsl:attribute</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.8
-<a href="#streamability-xsl-break">Streamability of
-xsl:break</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.9
-<a href="#streamability-xsl-call-template">Streamability of
-xsl:call-template</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.10
-<a href="#streamability-xsl-choose">Streamability of
-xsl:choose</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.11
-<a href="#streamability-xsl-comment">Streamability of
-xsl:comment</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.12
-<a href="#streamability-xsl-copy">Streamability of
-xsl:copy</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.13
-<a href="#streamability-xsl-copy-of">Streamability of
-xsl:copy-of</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.14
-<a href="#streamability-xsl-document">Streamability of
-xsl:document</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.15
-<a href="#streamability-xsl-element">Streamability of
-xsl:element</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.16
-<a href="#streamability-xsl-evaluate">Streamability of
-xsl:evaluate</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.17
-<a href="#streamability-xsl-fallback">Streamability of
-xsl:fallback</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.18
-<a href="#streamability-xsl-for-each">Streamability of
-xsl:for-each</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.19
-<a href="#streamability-xsl-for-each-group">Streamability of
-xsl:for-each-group</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.20
-<a href="#streamability-xsl-fork">Streamability of
-xsl:fork</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.21
-<a href="#streamability-xsl-if">Streamability of xsl:if</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.22
-<a href="#streamability-xsl-iterate">Streamability of
-xsl:iterate</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.23
-<a href="#streamability-xsl-map">Streamability of xsl:map</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.24
-<a href="#streamability-xsl-map-entry">Streamability of
-xsl:map-entry</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.25
-<a href="#streamability-xsl-merge">Streamability of
-xsl:merge</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.26
-<a href="#streamability-xsl-message">Streamability of
-xsl:message</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.27
-<a href="#streamability-xsl-namespace">Streamability of
-xsl:namespace</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.28
-<a href="#streamability-xsl-next-iteration">Streamability of
-xsl:next-iteration</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.29
-<a href="#streamability-xsl-next-match">Streamability of
-xsl:next-match</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.30
-<a href="#streamability-xsl-number">Streamability of
-xsl:number</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.31
-<a href="#streamability-xsl-perform-sort">Streamability of
-xsl:perform-sort</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.32
-<a href="#streamability-xsl-processing-instruction">Streamability
-of xsl:processing-instruction</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.33
-<a href="#streamability-xsl-result-document">Streamability of
-xsl:result-document</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.34
-<a href="#streamability-xsl-sequence">Streamability of
-xsl:sequence</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.35
-<a href="#streamability-xsl-stream">Streamability of
-xsl:stream</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.36
-<a href="#streamability-xsl-text">Streamability of
-xsl:text</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.37
-<a href="#streamability-xsl-try">Streamability of xsl:try</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.38
-<a href="#streamability-xsl-value-of">Streamability of
-xsl:value-of</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.4.39
-<a href="#streamability-xsl-variable">Streamability of
-xsl:variable</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.5 <a href=
-"#classifying-attribute-sets">Classifying Attribute Sets</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.6 <a href=
-"#classifying-vts">Classifying Value Templates</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7 <a href=
-"#classifying-expressions">Classifying Expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.1
-<a href="#streamability-of-for-expressions">Streamability of for
-expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.2
-<a href="#streamability-of-quantified-expressions">Streamability of
-Quantified Expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.3
-<a href="#streamability-of-if-expressions">Streamability of if
-expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.4
-<a href="#streamability-of-union-expressions">Streamability of
-union, intersect, and except expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.5
-<a href=
-"#streamability-of-simple-mapping-expressions">Streamability of
-Simple Mapping Expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.6
-<a href="#streamability-of-path-expressions">Streamability of Path
-Expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.7
-<a href="#streamability-of-axis-steps">Streamability of Axis
-Steps</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.8
-<a href="#streamability-of-filter-expressions">Streamability of
-Filter Expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.9
-<a href="#streamability-of-dynamic-function-calls">Streamability of
-Dynamic Function Calls</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.10
-<a href="#streamability-of-variable-references">Streamability of
-Variable References</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.11
-<a href="#streamability-of-context-item-expression">Streamability
-of the Context Item Expression</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.12
-<a href="#streamability-of-function-calls">Streamability of
-Function Calls</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.13
-<a href="#streamability-of-named-function-ref">Streamability of
-Named Function References</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.14
-<a href="#streamability-of-inline-functions">Streamability of
-Inline Function Declarations</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.7.15
-<a href="#streamability-of-map-expressions">Streamability of map
-expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8 <a href=
-"#classifying-built-in-functions">Classifying Calls to Built-In
-Functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.1
-<a href="#streamability-fn-accumulator-after">Streamability of the
-accumulator-after function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.2
-<a href="#streamability-fn-accumulator-before">Streamability of the
-accumulator-before function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.3
-<a href="#streamability-fn-current">Streamability of the current
-function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.4
-<a href="#streamability-fn-current-group">Streamability of the
-current-group function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.5
-<a href="#streamability-fn-current-grouping-key">Streamability of
-the current-grouping-key function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.6
-<a href="#streamability-fn-current-merge-group">Streamability of
-the current-merge-group function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.7
-<a href="#streamability-fn-current-merge-key">Streamability of the
-current-merge-key function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.8
-<a href="#streamability-fn-fold-left">Streamability of the
-fold-left function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.9
-<a href="#streamability-fn-fold-right">Streamability of the
-fold-right function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.10
-<a href="#streamability-fn-for-each">Streamability of the for-each
-function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.11
-<a href="#streamability-fn-for-each-pair">Streamability of the
-for-each-pair function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.12
-<a href="#streamability-fn-function-lookup">Streamability of the
-function-lookup function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.13
-<a href="#streamability-fn-innermost">Streamability of the
-innermost function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.14
-<a href="#streamability-fn-last">Streamability of the last
-function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.15
-<a href="#streamability-fn-outermost">Streamability of the
-outermost function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.16
-<a href="#streamability-fn-position">Streamability of the position
-function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.17
-<a href="#streamability-fn-reverse">Streamability of the reverse
-function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.18
-<a href="#streamability-fn-root">Streamability of the root
-function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.19
-<a href="#streamability-fn-unparsed-entity-public-id">Streamability
-of the unparsed-entity-public-id function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.8.20
-<a href="#streamability-fn-unparsed-entity-uri">Streamability of
-the unparsed-entity-uri function</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;19.8.9 <a href=
-"#classifying-patterns">Classifying Patterns</a><br />
-&#160;&#160;&#160;&#160;19.9 <a href=
-"#streamability-analysis-examples">Examples of Streamability
-Analysis</a><br />
-&#160;&#160;&#160;&#160;19.10 <a href=
-"#streamability-guarantees">Streamability Guarantees</a><br />
-20 <a href="#add-func">Additional Functions</a><br />
-&#160;&#160;&#160;&#160;20.1 <a href=
-"#func-document">fn:document</a><br />
-&#160;&#160;&#160;&#160;20.2 <a href="#key">Keys</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;20.2.1 <a href=
-"#xsl-key">The xsl:key Declaration</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;20.2.2 <a href=
-"#func-key">fn:key</a><br />
-&#160;&#160;&#160;&#160;20.3 <a href="#misc-func">Miscellaneous
-Additional Functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;20.3.1 <a href=
-"#func-current">fn:current</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;20.3.2 <a href=
-"#func-unparsed-entity-uri">fn:unparsed-entity-uri</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;20.3.3 <a href=
-"#func-unparsed-entity-public-id">fn:unparsed-entity-public-id</a><br />
-
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;20.3.4 <a href=
-"#func-system-property">fn:system-property</a><br />
-21 <a href="#additional-types">XPath Extensions</a><br />
-&#160;&#160;&#160;&#160;21.1 <a href="#map">Maps</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.1 <a href=
-"#map-type">The Type of a Map</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2 <a href=
-"#map-functions">Functions that Operate on Maps</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.1
-<a href="#func-map-merge">map:merge</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.2
-<a href="#func-map-size">map:size</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.3
-<a href="#func-map-keys">map:keys</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.4
-<a href="#func-map-contains">map:contains</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.5
-<a href="#func-map-get">map:get</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.6
-<a href="#func-map-put">map:put</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.7
-<a href="#func-map-entry">map:entry</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.8
-<a href="#func-map-remove">map:remove</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.9
-<a href="#func-map-for-each">map:for-each</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.10
-<a href="#func-collation-key">fn:collation-key</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.2.12
-<a href="#func-deep-equal">fn:deep-equal</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.3 <a href=
-"#map-instructions">Map Instructions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.4 <a href=
-"#map-expressions">Map Expressions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.5 <a href=
-"#maps-streaming">Maps and Streaming</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.1.6 <a href=
-"#map-examples">Examples using Maps</a><br />
-&#160;&#160;&#160;&#160;21.2 <a href="#json">Processing JSON
-Data</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.2.1 <a href=
-"#json-to-xml-mapping">XML Representation of JSON</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.2.2 <a href=
-"#func-json-to-xml">fn:json-to-xml</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.2.3 <a href=
-"#func-xml-to-json">fn:xml-to-json</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;21.2.4 <a href=
-"#xml-to-json-transformation">Transforming XML to JSON</a><br />
-22 <a href="#diagnostics">Diagnostics</a><br />
-&#160;&#160;&#160;&#160;22.1 <a href="#message">Messages</a><br />
-&#160;&#160;&#160;&#160;22.2 <a href=
-"#assertions">Assertions</a><br />
-23 <a href="#extension">Extensibility and Fallback</a><br />
-&#160;&#160;&#160;&#160;23.1 <a href=
-"#extension-functions">Extension Functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;23.1.1 <a href=
-"#func-function-available">fn:function-available</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;23.1.2 <a href=
-"#calling-extension-functions">Calling Extension
-Functions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;23.1.3 <a href=
-"#external-objects">External Objects</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;23.1.4 <a href=
-"#func-type-available">fn:type-available</a><br />
-&#160;&#160;&#160;&#160;23.2 <a href=
-"#extension-instruction">Extension Instructions</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;23.2.1 <a href=
-"#designating-extension-namespace">Designating an Extension
-Namespace</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;23.2.2 <a href=
-"#func-element-available">fn:element-available</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;23.2.3 <a href=
-"#fallback">Fallback</a><br />
-24 <a href="#result-trees">Final Result Trees</a><br />
-&#160;&#160;&#160;&#160;24.1 <a href=
-"#creating-result-trees">Creating Final Result Trees</a><br />
-&#160;&#160;&#160;&#160;24.2 <a href=
-"#result-document-restrictions">Restrictions on the use of
-xsl:result-document</a><br />
-&#160;&#160;&#160;&#160;24.3 <a href="#current-output-uri">The
-Current Output URI</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;24.3.1 <a href=
-"#func-current-output-uri">fn:current-output-uri</a><br />
-&#160;&#160;&#160;&#160;24.4 <a href=
-"#validation">Validation</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;24.4.1 <a href=
-"#validating-constructed-nodes">Validating Constructed Elements and
-Attributes</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;24.4.1.1
-<a href="#validating-using-validation-attribute">Validation using
-the [xsl:]validation Attribute</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;24.4.1.2
-<a href="#validation-xsl-type">Validation using the [xsl:]type
-Attribute</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;24.4.1.3
-<a href="#validation-process">The Validation Process</a><br />
-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;24.4.2 <a href=
-"#validating-document-nodes">Validating Document Nodes</a><br />
-25 <a href="#serialization">Serialization</a><br />
-&#160;&#160;&#160;&#160;25.1 <a href="#character-maps">Character
-Maps</a><br />
-&#160;&#160;&#160;&#160;25.2 <a href=
-"#disable-output-escaping">Disabling Output Escaping</a><br />
-26 <a href="#conformance">Conformance</a><br />
-&#160;&#160;&#160;&#160;26.1 <a href="#basic-conformance">Basic
-XSLT Processor</a><br />
-&#160;&#160;&#160;&#160;26.2 <a href=
-"#schema-aware-conformance">Schema-Awareness Conformance
-Feature</a><br />
-&#160;&#160;&#160;&#160;26.3 <a href=
-"#serialization-feature">Serialization Feature</a><br />
-&#160;&#160;&#160;&#160;26.4 <a href=
-"#backwards-compatibility-feature">Compatibility Features</a><br />
-&#160;&#160;&#160;&#160;26.5 <a href="#streaming-feature">Streaming
-Feature</a><br />
-&#160;&#160;&#160;&#160;26.6 <a href=
-"#dynamic-evaluation-feature">Dynamic Evaluation Feature</a><br />
-&#160;&#160;&#160;&#160;26.7 <a href=
-"#xquery-invocation-feature">XQuery Invocation
-Feature</a><br /></p>
-<h3><a name="appendices" id="appendices"></a>Appendices</h3>
-<p class="toc">A <a href="#references">References</a><br />
-&#160;&#160;&#160;&#160;A.1 <a href=
-"#normative-references">Normative References</a><br />
-&#160;&#160;&#160;&#160;A.2 <a href="#other-references">Other
-References</a><br />
-B <a href="#json-in-xml">XML Representation of JSON</a><br />
-&#160;&#160;&#160;&#160;B.1 <a href="#schema-for-json">Schema for
-the XML Representation of JSON</a><br />
-&#160;&#160;&#160;&#160;B.2 <a href=
-"#xml-to-json-stylesheet">Stylesheet for converting XML to JSON
-(without indentation)</a><br />
-C <a href="#glossary">Glossary</a> (Non-Normative)<br />
-D <a href="#element-syntax-summary">Element Syntax Summary</a>
-(Non-Normative)<br />
-E <a href="#error-summary">Summary of Error Conditions</a>
-(Non-Normative)<br />
-F <a href="#implementation-defined-features">Checklist of
-Implementation-Defined Features</a> (Non-Normative)<br />
-G <a href="#XSLT-defined-functions">List of XSLT-defined
-functions</a> (Non-Normative)<br />
-H <a href="#schema-for-xslt">Schema for XSLT Stylesheets</a>
-(Non-Normative)<br />
-I <a href="#acknowledgements">Acknowledgements</a>
-(Non-Normative)<br />
-J <a href="#changes-since-2.0">Changes since XSLT 2.0</a>
-(Non-Normative)<br />
-&#160;&#160;&#160;&#160;J.1 <a href=
-"#xslt-changes-since-2.0">Changes in this Specification</a><br />
-&#160;&#160;&#160;&#160;J.2 <a href=
-"#xpath-changes-since-2.0">Changes in Other Related
-Specifications</a><br />
-K <a href="#changes-since-july-2012">Changes since the Working
-Draft of 10 July 2012</a> (Non-Normative)<br />
-L <a href="#changes-since-dec-2013">Changes since the Last Call
-Working Draft of 12 December 2013</a> (Non-Normative)<br />
-M <a href="#incompatibilities">Incompatibilities with XSLT 2.0</a>
-(Non-Normative)<br /></p>
+<h2><a name="contents" id="contents" shape="rect"></a>Table of Contents</h2>
+<p class="toc">1 <a href="#introduction" shape="rect">Introduction</a><br clear="none" />
+    1.1 <a href="#what-is-xslt" shape="rect"><span class="diff-chg">What is XSLT?</span></a><br clear="none" />
+    1.2 <a href="#whats-new-in-xslt3" shape="rect">What’s
+New in XSLT 3.0?</a><br clear="none" />
+2 <a href="#concepts" shape="rect">Concepts</a><br clear="none" />
+    2.1 <a href="#terminology" shape="rect"><span class="diff-chg">Terminology</span></a><br clear="none" />
+    2.2 <a href="#notation" shape="rect"><span class="diff-chg">Notation</span></a><br clear="none" />
+    2.3 <a href="#initiating" shape="rect">Initiating a
+Transformation</a><br clear="none" />
+        2.3.1 <a href="#info-for-static-analysis" shape="rect">Information needed for Static
+Analysis</a><br clear="none" />
+        2.3.2 <a href="#priming-stylesheet" shape="rect">Priming a Stylesheet</a><br clear="none" />
+        2.3.3 <a href="#invoking-initial-mode" shape="rect">Apply-Templates Invocation</a><br clear="none" />
+        2.3.4 <a href="#invoking-initial-template" shape="rect">Call-Template Invocation</a><br clear="none" />
+        2.3.5 <a href="#invoking-initial-function" shape="rect">Function Call Invocation</a><br clear="none" />
+        2.3.6 <a href="#post-processing" shape="rect">Post-processing the Raw Result</a><br clear="none" />
+    2.4 <a href="#executing-a-transformation" shape="rect">Executing a Transformation</a><br clear="none" />
+    2.5 <a href="#context" shape="rect">The Evaluation
+Context</a><br clear="none" />
+    2.6 <a href="#parsing-and-serialization" shape="rect"><span class="diff-chg">Parsing and
+Serialization</span></a><br clear="none" />
+    2.7 <a href="#packages-and-modules" shape="rect">Packages and Modules</a><br clear="none" />
+    2.8 <a href="#extensibility" shape="rect">Extensibility</a><br clear="none" />
+    2.9 <a href="#stylesheets-and-schemas" shape="rect"><span class="diff-chg">Stylesheets and
+XML Schemas</span></a><br clear="none" />
+    2.10 <a href="#streaming-concepts" shape="rect"><span class="diff-chg">Streaming</span></a><br clear="none" />
+    2.11 <a href="#errors" shape="rect"><span class="diff-chg">Error Handling</span></a><br clear="none" />
+3 <a href="#stylesheet-structure" shape="rect">Stylesheet Structure</a><br clear="none" />
+    3.1 <a href="#xslt-namespace" shape="rect">XSLT
+Namespace</a><br clear="none" />
+    3.2 <a href="#reserved-namespaces" shape="rect">Reserved
+Namespaces</a><br clear="none" />
+    3.3 <a href="#extension-attributes" shape="rect"><span class="diff-chg">Extension
+Attributes</span></a><br clear="none" />
+    3.4 <a href="#xslt-media-type" shape="rect">XSLT Media
+Type</a><br clear="none" />
+    3.5 <a href="#standard-attributes" shape="rect">Standard
+Attributes</a><br clear="none" />
+    3.6 <a href="#packages" shape="rect">Packages</a><br clear="none" />
+        3.6.1 <a href="#package-versions" shape="rect"><span class="diff-chg">Versions of a
+Package</span></a><br clear="none" />
+        3.6.2 <a href="#package-dependencies" shape="rect">Dependencies between Packages</a><br clear="none" />
+        3.6.3 <a href="#named-components" shape="rect"><span class="diff-chg">Named Components in
+Packages</span></a><br clear="none" />
+            3.6.3.1
+<a href="#visibility" shape="rect"><span class="diff-chg">Visibility of
+Components</span></a><br clear="none" />
+            3.6.3.2
+<a href="#accepting-components" shape="rect">Accepting Components</a><br clear="none" />
+            3.6.3.3
+<a href="#package-overriding-components" shape="rect"><span class="diff-chg">Overriding Named Components from a Used
+Package</span></a><br clear="none" />
+            3.6.3.4
+<a href="#component-references" shape="rect">Binding References to
+Components</a><br clear="none" />
+            3.6.3.5
+<a href="#dynamic-component-references" shape="rect"><span class="diff-chg">Dynamic References to Components</span></a><br clear="none" />
+        3.6.4 <a href="#modes-and-packages" shape="rect">Overriding Template Rules from a Used
+Package</a><br clear="none" />
+            3.6.4.1
+<a href="#requiring-explicit-modes" shape="rect">Requiring Explicit Mode
+Declarations</a><br clear="none" />
+        3.6.5 <a href="#package-local-declarations" shape="rect"><span class="diff-chg">Declarations
+Local to a Package</span></a><br clear="none" />
+        3.6.6 <a href="#declaring-global-context-item" shape="rect"><span class="diff-chg">Declaring
+the Global Context Item</span></a><br clear="none" />
+        3.6.7 <a href="#xquery-packages" shape="rect">Using an XQuery Library Package</a><br clear="none" />
+    3.7 <a href="#stylesheet-modules" shape="rect">Stylesheet Modules</a><br clear="none" />
+    3.8 <a href="#stylesheet-element" shape="rect">Stylesheet Element</a><br clear="none" />
+        3.8.1 <a href="#default-collation-attribute" shape="rect">The default-collation
+Attribute</a><br clear="none" />
+        3.8.2 <a href="#default-mode" shape="rect">The [xsl:]default-mode Attribute</a><br clear="none" />
+        3.8.3 <a href="#user-defined-top-level" shape="rect">User-defined Data Elements</a><br clear="none" />
+    3.9 <a href="#simplified-stylesheet" shape="rect">Simplified Stylesheet Modules</a><br clear="none" />
+    3.10 <a href="#backwards" shape="rect">Backwards
+Compatible Processing</a><br clear="none" />
+        3.10.1 <a href="#backwards-1.0" shape="rect">XSLT 1.0 Compatibility Mode</a><br clear="none" />
+        3.10.2 <a href="#backwards-2.0" shape="rect">XSLT 2.0 Compatibility Mode</a><br clear="none" />
+    3.11 <a href="#forwards" shape="rect">Forwards
+Compatible Processing</a><br clear="none" />
+    3.12 <a href="#combining-modules" shape="rect">Combining
+Stylesheet Modules</a><br clear="none" />
+        3.12.1 <a href="#locating-modules" shape="rect">Locating Stylesheet Modules</a><br clear="none" />
+        3.12.2 <a href="#include" shape="rect">Stylesheet Inclusion</a><br clear="none" />
+        3.12.3 <a href="#import" shape="rect">Stylesheet Import</a><br clear="none" />
+    3.13 <a href="#embedded" shape="rect">Embedded
+Stylesheet Modules</a><br clear="none" />
+    3.14 <a href="#preprocessing" shape="rect">Stylesheet
+Preprocessing</a><br clear="none" />
+        3.14.1 <a href="#conditional-inclusion" shape="rect"><span class="diff-chg">Conditional Element
+Inclusion</span></a><br clear="none" />
+        3.14.2 <a href="#shadow-attributes" shape="rect"><span class="diff-chg">Shadow
+Attributes</span></a><br clear="none" />
+    3.15 <a href="#built-in-types" shape="rect">Built-in
+Types</a><br clear="none" />
+    3.16 <a href="#import-schema" shape="rect">Importing
+Schema Components</a><br clear="none" />
+4 <a href="#data-model" shape="rect">Data Model</a><br clear="none" />
+    4.1 <a href="#xml-versions" shape="rect">XML
+Versions</a><br clear="none" />
+    4.2 <a href="#stylesheet-stripping" shape="rect">Stripping Whitespace from the
+Stylesheet</a><br clear="none" />
+    4.3 <a href="#stripping-annotations" shape="rect">Stripping Type Annotations from a Source
+Tree</a><br clear="none" />
+    4.4 <a href="#strip" shape="rect">Stripping Whitespace
+from a Source Tree</a><br clear="none" />
+    4.5 <a href="#id-in-data-model" shape="rect">Attribute
+Types and DTD Validation</a><br clear="none" />
+    4.6 <a href="#model-for-streaming" shape="rect"><span class="diff-chg">Data Model for
+Streaming</span></a><br clear="none" />
+    4.7 <a href="#limits" shape="rect">Limits</a><br clear="none" />
+    4.8 <a href="#d-o-e-in-data-model" shape="rect">Disable
+Output Escaping</a><br clear="none" />
+5 <a href="#constructs" shape="rect">Features of the XSLT Language</a><br clear="none" />
+    5.1 <a href="#qname" shape="rect">Qualified
+Names</a><br clear="none" />
+    5.2 <a href="#unprefixed-qnames" shape="rect">Unprefixed
+Lexical QNames in Expressions and Patterns</a><br clear="none" />
+    5.3 <a href="#expressions" shape="rect">Expressions</a><br clear="none" />
+    5.4 <a href="#static-and-dynamic-context" shape="rect">The Static and Dynamic
+Context</a><br clear="none" />
+        5.4.1 <a href="#static-context" shape="rect"><span class="diff-chg">Initializing the Static
+Context</span></a><br clear="none" />
+        5.4.2 <a href="#additional-static-context" shape="rect">Additional Static Context Components
+used by XSLT</a><br clear="none" />
+        5.4.3 <a href="#xpath-dynamic-context" shape="rect">Initializing the Dynamic Context</a><br clear="none" />
+            5.4.3.1
+<a href="#focus" shape="rect">Maintaining Position: the Focus</a><br clear="none" />
+            5.4.3.2
+<a href="#evaluation-context" shape="rect">Other Components of the XPath Dynamic
+Context</a><br clear="none" />
+        5.4.4 <a href="#additional-dynamic-context" shape="rect"><span class="diff-chg">Additional
+Dynamic Context Components used by XSLT</span></a><br clear="none" />
+    5.5 <a href="#defining-decimal-format" shape="rect">Defining a Decimal Format</a><br clear="none" />
+    5.6 <a href="#patterns" shape="rect">Patterns</a><br clear="none" />
+        5.6.1 <a href="#pattern-examples" shape="rect">Examples of Patterns</a><br clear="none" />
+        5.6.2 <a href="#pattern-syntax" shape="rect"><span class="diff-chg">Syntax of
+Patterns</span></a><br clear="none" />
+        5.6.3 <a href="#pattern-semantics" shape="rect"><span class="diff-chg">The Meaning of a
+Pattern</span></a><br clear="none" />
+        5.6.4 <a href="#pattern-errors" shape="rect">Errors in Patterns</a><br clear="none" />
+    5.7 <a href="#value-templates" shape="rect">Value
+Templates</a><br clear="none" />
+        5.7.1 <a href="#attribute-value-templates" shape="rect">Attribute Value Templates</a><br clear="none" />
+        5.7.2 <a href="#text-value-templates" shape="rect">Text Value Templates</a><br clear="none" />
+    5.8 <a href="#sequence-constructors" shape="rect"><span class="diff-chg">Sequence
+Constructors</span></a><br clear="none" />
+        5.8.1 <a href="#constructing-complex-content" shape="rect">Constructing Complex
+Content</a><br clear="none" />
+        5.8.2 <a href="#constructing-simple-content" shape="rect">Constructing Simple
+Content</a><br clear="none" />
+        5.8.3 <a href="#namespace-fixup" shape="rect">Namespace Fixup</a><br clear="none" />
+    5.9 <a href="#uri-references" shape="rect">URI
+References</a><br clear="none" />
+6 <a href="#rules" shape="rect">Template Rules</a><br clear="none" />
+    6.1 <a href="#defining-templates" shape="rect">Defining
+Templates</a><br clear="none" />
+    6.2 <a href="#defining-template-rules" shape="rect">Defining Template Rules</a><br clear="none" />
+    6.3 <a href="#applying-templates" shape="rect">Applying
+Template Rules</a><br clear="none" />
+    6.4 <a href="#conflict" shape="rect">Conflict Resolution
+for Template Rules</a><br clear="none" />
+    6.5 <a href="#default-priority" shape="rect">Default
+Priority for Template Rules</a><br clear="none" />
+    6.6 <a href="#modes" shape="rect"><span class="diff-chg">Modes</span></a><br clear="none" />
+        6.6.1 <a href="#declaring-modes" shape="rect"><span class="diff-chg">Declaring
+Modes</span></a><br clear="none" />
+        6.6.2 <a href="#using-modes" shape="rect">Using Modes</a><br clear="none" />
+        6.6.3 <a href="#xsl-mode-typed" shape="rect">Declaring the Type of Nodes Processed by a
+Mode</a><br clear="none" />
+        6.6.4 <a href="#streamable-templates" shape="rect"><span class="diff-chg">Streamable
+Templates</span></a><br clear="none" />
+    6.7 <a href="#built-in-rule" shape="rect">Built-in
+Template Rules</a><br clear="none" />
+        6.7.1 <a href="#built-in-templates-text-only-copy" shape="rect">Built-in Templates: Text-only
+Copy</a><br clear="none" />
+        6.7.2 <a href="#built-in-templates-deep-copy" shape="rect">Built-in Templates: Deep
+Copy</a><br clear="none" />
+        6.7.3 <a href="#built-in-templates-shallow-copy" shape="rect">Built-in Templates: Shallow
+Copy</a><br clear="none" />
+        6.7.4 <a href="#built-in-templates-deep-skip" shape="rect">Built-in Templates: Deep
+Skip</a><br clear="none" />
+        6.7.5 <a href="#built-in-templates-shallow-skip" shape="rect">Built-in Templates: Shallow
+Skip</a><br clear="none" />
+        6.7.6 <a href="#built-in-templates-fail" shape="rect">Built-in Templates: Fail</a><br clear="none" />
+    6.8 <a href="#apply-imports" shape="rect">Overriding
+Template Rules</a><br clear="none" />
+    6.9 <a href="#parameters-to-template-rules" shape="rect">Passing Parameters to Template
+Rules</a><br clear="none" />
+7 <a href="#repetition" shape="rect">Repetition</a><br clear="none" />
+    7.1 <a href="#for-each" shape="rect">The xsl:for-each
+instruction</a><br clear="none" />
+    7.2 <a href="#iterate" shape="rect">The xsl:iterate
+Instruction</a><br clear="none" />
+8 <a href="#conditionals" shape="rect">Conditional Processing</a><br clear="none" />
+    8.1 <a href="#xsl-if" shape="rect">Conditional
+Processing with xsl:if</a><br clear="none" />
+    8.2 <a href="#xsl-choose" shape="rect">Conditional
+Processing with xsl:choose</a><br clear="none" />
+    8.3 <a href="#try-catch" shape="rect"><span class="diff-chg">Try/Catch</span></a><br clear="none" />
+        8.3.1 <a href="#recovery" shape="rect">Recovery of Result Trees</a><br clear="none" />
+        8.3.2 <a href="#try-catch-examples" shape="rect">Try/Catch Examples</a><br clear="none" />
+    8.4 <a href="#conditional-content-construction" shape="rect"><span class="diff-chg">Conditional Content Construction</span></a><br clear="none" />
+        8.4.1 <a href="#conditional-content" shape="rect">The xsl:conditional-content
+instruction</a><br clear="none" />
+        8.4.2 <a href="#on-empty" shape="rect">The xsl:on-empty instruction</a><br clear="none" />
+        8.4.3 <a href="#on-non-empty" shape="rect">The xsl:on-non-empty instruction</a><br clear="none" />
+        8.4.4 <a href="#evaluating-on-empty" shape="rect">Evaluating xsl:on-empty and xsl:on-non-empty
+Instructions</a><br clear="none" />
+        8.4.5 <a href="#conditional-content-example" shape="rect">A More Complex Example</a><br clear="none" />
+9 <a href="#variables-and-parameters" shape="rect">Variables and
+Parameters</a><br clear="none" />
+    9.1 <a href="#variables" shape="rect">Variables</a><br clear="none" />
+    9.2 <a href="#parameters" shape="rect">Parameters</a><br clear="none" />
+        9.2.1 <a href="#parameter-type" shape="rect">The Required Type of a Parameter</a><br clear="none" />
+        9.2.2 <a href="#default-values-of-parameters" shape="rect">Default Values of
+Parameters</a><br clear="none" />
+    9.3 <a href="#variable-values" shape="rect">Values of
+Variables and Parameters</a><br clear="none" />
+    9.4 <a href="#temporary-trees" shape="rect"><span class="diff-chg">Creating Implicit Document Nodes</span></a><br clear="none" />
+    9.5 <a href="#global-variables" shape="rect">Global
+Variables and Parameters</a><br clear="none" />
+    9.6 <a href="#static-params" shape="rect">Static
+Variables and Parameters</a><br clear="none" />
+    9.7 <a href="#static-expression" shape="rect"><span class="diff-chg">Static
+Expressions</span></a><br clear="none" />
+    9.8 <a href="#local-variables" shape="rect">Local
+Variables and Parameters</a><br clear="none" />
+    9.9 <a href="#scope-of-variables" shape="rect">Scope of
+Variables</a><br clear="none" />
+    9.10 <a href="#with-param" shape="rect">Setting
+Parameter Values</a><br clear="none" />
+    9.11 <a href="#circularity" shape="rect">Circular
+Definitions</a><br clear="none" />
+10 <a href="#callable-components" shape="rect">Callable Components</a><br clear="none" />
+    10.1 <a href="#named-templates" shape="rect">Named
+Templates</a><br clear="none" />
+        10.1.1 <a href="#declaring-context-item" shape="rect"><span class="diff-chg">Declaring the
+Context Item for a Template</span></a><br clear="none" />
+        10.1.2 <a href="#call-template-params" shape="rect">Passing Parameters to Named
+Templates</a><br clear="none" />
+        10.1.3 <a href="#tunnel-params" shape="rect">Tunnel Parameters</a><br clear="none" />
+    10.2 <a href="#attribute-sets" shape="rect">Named
+Attribute Sets</a><br clear="none" />
+        10.2.1 <a href="#using-attribute-sets" shape="rect"><span class="diff-chg">Using Attribute
+Sets</span></a><br clear="none" />
+        10.2.2 <a href="#attribute-set-cycles" shape="rect"><span class="diff-chg">Cycles in Attribute
+Sets</span></a><br clear="none" />
+        10.2.3 <a href="#visibility-of-attribute-sets" shape="rect">Visibility of Attribute
+Sets</a><br clear="none" />
+        10.2.4 <a href="#streamability-of-attribute-sets" shape="rect"><span class="diff-chg">Streamability of Attribute Sets</span></a><br clear="none" />
+        10.2.5 <a href="#evaluating-attribute-sets" shape="rect">Evaluating Attribute Sets</a><br clear="none" />
+        10.2.6 <a href="#attribute-sets-examples" shape="rect">Attribute Sets: Examples</a><br clear="none" />
+    10.3 <a href="#stylesheet-functions" shape="rect">Stylesheet Functions</a><br clear="none" />
+        10.3.1 <a href="#xsl-function-name" shape="rect">Function Name and Arity</a><br clear="none" />
+        10.3.2 <a href="#function-arguments" shape="rect">Arguments</a><br clear="none" />
+        10.3.3 <a href="#function-result" shape="rect">Function Result</a><br clear="none" />
+        10.3.4 <a href="#function-visibility-and-overriding" shape="rect">Visibility and Overriding of
+Functions</a><br clear="none" />
+        10.3.5 <a href="#streamability-of-stylesheet-functions" shape="rect"><span class="diff-chg">Streamability of Stylesheet Functions</span></a><br clear="none" />
+        10.3.6 <a href="#function-lookup" shape="rect">Dynamic Access to Functions</a><br clear="none" />
+        10.3.7 <a href="#function-determinism" shape="rect">Determinism of Functions</a><br clear="none" />
+        10.3.8 <a href="#memoization" shape="rect">Memoization</a><br clear="none" />
+        10.3.9 <a href="#function-examples" shape="rect">Examples of Stylesheet Functions</a><br clear="none" />
+    10.4 <a href="#dynamic-xpath" shape="rect">Dynamic XPath
+Evaluation</a><br clear="none" />
+        10.4.1 <a href="#evaluate-static-context" shape="rect">Static context for the target
+expression</a><br clear="none" />
+        10.4.2 <a href="#evaluate-dynamic-context" shape="rect">Dynamic context for the target
+expression</a><br clear="none" />
+        10.4.3 <a href="#evaluate-effect" shape="rect">The effect of the xsl:evaluate
+instruction</a><br clear="none" />
+        10.4.4 <a href="#evaluation-as-optional-feature" shape="rect">xsl:evaluate as an optional
+feature</a><br clear="none" />
+        10.4.5 <a href="#evaluate-examples" shape="rect">Examples of xsl:evaluate</a><br clear="none" />
+11 <a href="#creating-new-nodes" shape="rect">Creating Nodes and
+Sequences</a><br clear="none" />
+    11.1 <a href="#literal-result-element" shape="rect">Literal Result Elements</a><br clear="none" />
+        11.1.1 <a href="#setting-annotation-for-lre" shape="rect">Setting the Type Annotation for
+Literal Result Elements</a><br clear="none" />
+        11.1.2 <a href="#attributes-for-lres" shape="rect">Attribute Nodes for Literal Result
+Elements</a><br clear="none" />
+        11.1.3 <a href="#lre-namespaces" shape="rect"><span class="diff-chg">Namespace Nodes for
+Literal Result Elements</span></a><br clear="none" />
+        11.1.5 <a href="#namespace-aliasing" shape="rect">Namespace Aliasing</a><br clear="none" />
+    11.2 <a href="#xsl-element" shape="rect">Creating
+Element Nodes Using xsl:element</a><br clear="none" />
+        11.2.1 <a href="#xsl-element-content" shape="rect">The Content of the Constructed Element
+Node</a><br clear="none" />
+        11.2.2 <a href="#xsl-element-name" shape="rect">The Name of the Constructed Element
+Node</a><br clear="none" />
+        11.2.3 <a href="#xsl-element-properties" shape="rect"><span class="diff-chg">Other Properties
+of the Constructed Element Node</span></a><br clear="none" />
+        11.2.4 <a href="#annotation-for-constructed-element" shape="rect">The Type Annotation of the
+Constructed Element Node</a><br clear="none" />
+    11.3 <a href="#creating-attributes" shape="rect">Creating Attribute Nodes Using
+xsl:attribute</a><br clear="none" />
+        11.3.1 <a href="#annotation-for-constructed-attribute" shape="rect">Setting the Type Annotation
+for a Constructed Attribute Node</a><br clear="none" />
+    11.4 <a href="#creating-text-nodes" shape="rect">Creating Text Nodes</a><br clear="none" />
+        11.4.1 <a href="#literal-text-nodes" shape="rect">Literal Text Nodes</a><br clear="none" />
+        11.4.2 <a href="#xsl-text" shape="rect">Creating Text Nodes Using xsl:text</a><br clear="none" />
+        11.4.3 <a href="#value-of" shape="rect">Generating Text with xsl:value-of</a><br clear="none" />
+    11.5 <a href="#creating-document-nodes" shape="rect"><span class="diff-chg">Creating Document
+Nodes</span></a><br clear="none" />
+    11.6 <a href="#creating-processing-instructions" shape="rect">Creating Processing
+Instructions</a><br clear="none" />
+    11.7 <a href="#creating-namespace-nodes" shape="rect">Creating Namespace Nodes</a><br clear="none" />
+    11.8 <a href="#creating-comments" shape="rect">Creating
+Comments</a><br clear="none" />
+    11.9 <a href="#copying" shape="rect">Copying
+Nodes</a><br clear="none" />
+        11.9.1 <a href="#shallow-copy" shape="rect">Shallow Copy</a><br clear="none" />
+        11.9.2 <a href="#copy-of" shape="rect">Deep Copy</a><br clear="none" />
+    11.10 <a href="#constructing-sequences" shape="rect">Constructing Sequences</a><br clear="none" />
+12 <a href="#number" shape="rect">Numbering</a><br clear="none" />
+    12.1 <a href="#start-at" shape="rect"><span class="diff-chg">The start-at attribute</span></a><br clear="none" />
+    12.2 <a href="#formatting-supplied-number" shape="rect"><span class="diff-chg">Formatting a
+Supplied Number</span></a><br clear="none" />
+    12.3 <a href="#numbering-based-on-position" shape="rect"><span class="diff-chg">Numbering
+based on Position in a Document</span></a><br clear="none" />
+    12.4 <a href="#convert" shape="rect">Number to String
+Conversion Attributes</a><br clear="none" />
+13 <a href="#sorting" shape="rect">Sorting</a><br clear="none" />
+    13.1 <a href="#xsl-sort" shape="rect">The xsl:sort
+Element</a><br clear="none" />
+        13.1.1 <a href="#sorting-process" shape="rect">The Sorting Process</a><br clear="none" />
+        13.1.2 <a href="#comparing-sort-keys" shape="rect">Comparing Sort Key Values</a><br clear="none" />
+        13.1.3 <a href="#collating-sequences" shape="rect"><span class="diff-chg">Sorting Using
+Collations</span></a><br clear="none" />
+    13.2 <a href="#creating-sorted-sequence" shape="rect">Creating a Sorted Sequence</a><br clear="none" />
+    13.3 <a href="#sorted-iteration" shape="rect">Processing
+a Sequence in Sorted Order</a><br clear="none" />
+    13.4 <a href="#uca-collations" shape="rect">The Unicode
+Collation Algorithm</a><br clear="none" />
+14 <a href="#grouping" shape="rect">Grouping</a><br clear="none" />
+    14.1 <a href="#xsl-for-each-group" shape="rect">The
+xsl:for-each-group Element</a><br clear="none" />
+    14.2 <a href="#information-about-group" shape="rect">Accessing Information about the Current
+Group Value</a><br clear="none" />
+        14.2.1 <a href="#func-current-group" shape="rect">fn:current-group</a><br clear="none" />
+        14.2.2 <a href="#func-current-grouping-key" shape="rect">fn:current-grouping-key</a><br clear="none" />
+    14.3 <a href="#order-of-groups" shape="rect">Ordering
+among Groups</a><br clear="none" />
+    14.4 <a href="#grouping-examples" shape="rect">Examples
+of Grouping</a><br clear="none" />
+    14.5 <a href="#non-transitivity" shape="rect">Non-Transitivity</a><br clear="none" />
+15 <a href="#merging" shape="rect">Merging</a><br clear="none" />
+    15.1 <a href="#merge-terminology" shape="rect">Terminology for Merging</a><br clear="none" />
+    15.2 <a href="#merge-instruction" shape="rect">The
+xsl:merge Instruction</a><br clear="none" />
+    15.3 <a href="#merge-input-sequences" shape="rect"><span class="diff-chg">Selecting the
+Sequences to be Merged</span></a><br clear="none" />
+    15.4 <a href="#streamable-merging" shape="rect"><span class="diff-chg">Streamable
+Merging</span></a><br clear="none" />
+    15.5 <a href="#merge-keys" shape="rect">Defining the
+Merge Keys</a><br clear="none" />
+    15.6 <a href="#current-merge-group-and-key" shape="rect">The Current Merge Group and
+Key</a><br clear="none" />
+        15.6.1 <a href="#func-current-merge-group" shape="rect">fn:current-merge-group</a><br clear="none" />
+        15.6.2 <a href="#func-current-merge-key" shape="rect">fn:current-merge-key</a><br clear="none" />
+    15.7 <a href="#merge-action" shape="rect"><span class="diff-chg">The xsl:merge-action Element</span></a><br clear="none" />
+    15.8 <a href="#merge-examples" shape="rect">Examples of
+xsl:merge</a><br clear="none" />
+16 <a href="#splitting" shape="rect">Splitting</a><br clear="none" />
+    16.1 <a href="#fork-instruction" shape="rect">The
+xsl:fork Instruction</a><br clear="none" />
+    16.2 <a href="#splitting-examples" shape="rect"><span class="diff-chg">Examples of Splitting
+with Streamed Data</span></a><br clear="none" />
+17 <a href="#regular-expressions" shape="rect">Regular Expressions</a><br clear="none" />
+    17.1 <a href="#analyze-string" shape="rect">The
+xsl:analyze-string Instruction</a><br clear="none" />
+    17.2 <a href="#func-regex-group" shape="rect">fn:regex-group</a><br clear="none" />
+    17.3 <a href="#regex-examples" shape="rect">Examples of
+Regular Expression Matching</a><br clear="none" />
+18 <a href="#streaming" shape="rect">Streaming</a><br clear="none" />
+    18.1 <a href="#stream-instruction" shape="rect"><span class="diff-chg">The xsl:stream
+Instruction</span></a><br clear="none" />
+        18.1.1 <a href="#stream-validation" shape="rect">Validation of Streamed Documents</a><br clear="none" />
+        18.1.2 <a href="#stream-examples" shape="rect"><span class="diff-chg">Examples of
+xsl:stream</span></a><br clear="none" />
+        18.1.3 <a href="#func-stream-available" shape="rect">fn:stream-available</a><br clear="none" />
+    18.2 <a href="#accumulators" shape="rect"><span class="diff-chg">Accumulators</span></a><br clear="none" />
+        18.2.1 <a href="#accumulator-declaration" shape="rect"><span class="diff-chg">Declaring an
+Accumulator</span></a><br clear="none" />
+        18.2.2 <a href="#applicability-of-accumulators" shape="rect"><span class="diff-chg">Applicability of Accumulators</span></a><br clear="none" />
+        18.2.3 <a href="#accumulator-informal-rules" shape="rect"><span class="diff-chg">Informal Model
+for Accumulators</span></a><br clear="none" />
+        18.2.4 <a href="#accumulator-formal-rules" shape="rect"><span class="diff-chg">Formal Model for
+Accumulators</span></a><br clear="none" />
+        18.2.5 <a href="#func-accumulator-before" shape="rect"><span class="diff-chg">fn:accumulator-before</span></a><br clear="none" />
+        18.2.6 <a href="#func-accumulator-after" shape="rect"><span class="diff-chg">fn:accumulator-after</span></a><br clear="none" />
+        18.2.7 <a href="#accumulators-visibility-and-overriding" shape="rect"><span class="diff-chg">Importing of Accumulators</span></a><br clear="none" />
+        18.2.8 <a href="#streamability-of-accumulators" shape="rect"><span class="diff-chg">Streamability of Accumulators</span></a><br clear="none" />
+        18.2.9 <a href="#accumulator-examples" shape="rect"><span class="diff-chg">Examples of
+Accumulators</span></a><br clear="none" />
+    18.3 <a href="#func-copy-of" shape="rect">fn:copy-of</a><br clear="none" />
+    18.4 <a href="#func-snapshot" shape="rect">fn:snapshot</a><br clear="none" />
+19 <a href="#streamability" shape="rect"><span class="diff-chg">Streamability</span></a><br clear="none" />
+    19.2 <a href="#determining-static-type" shape="rect"><span class="diff-chg">Determining the
+Static Type of a Construct</span></a><br clear="none" />
+    19.3 <a href="#determining-context-item-type" shape="rect">Determining the Context Item
+Type</a><br clear="none" />
+    19.4 <a href="#operand-roles" shape="rect">Operand
+Roles</a><br clear="none" />
+        19.4.1 <a href="#operand-usage-examples" shape="rect"><span class="diff-chg">Examples showing
+the Effect of Operand Usage</span></a><br clear="none" />
+    19.5 <a href="#posture" shape="rect"><span class="diff-chg">Determining the Posture of a Construct</span></a><br clear="none" />
+    19.6 <a href="#determining-context-posture" shape="rect">Determining the Context
+Posture</a><br clear="none" />
+    19.7 <a href="#sweep" shape="rect"><span class="diff-chg">The Sweep of a Construct</span></a><br clear="none" />
+    19.8 <a href="#classifying-constructs" shape="rect">Classifying Constructs</a><br clear="none" />
+        19.8.1 <a href="#general-streamability-rules" shape="rect"><span class="diff-chg">General Rules
+for Streamability</span></a><br clear="none" />
+        19.8.2 <a href="#general-streamability-examples" shape="rect"><span class="diff-chg">Examples
+of the General Streamability Rules</span></a><br clear="none" />
+        19.8.3 <a href="#classifying-sequence-constructors" shape="rect"><span class="diff-chg">Classifying Sequence Constructors</span></a><br clear="none" />
+        19.8.4 <a href="#classifying-instructions" shape="rect">Classifying Instructions</a><br clear="none" />
+            19.8.4.1
+<a href="#streamability-literal-result-elements" shape="rect">Streamability of
+Literal Result Elements</a><br clear="none" />
+            19.8.4.2
+<a href="#streamability-extension-instructions" shape="rect">Streamability of
+extension instructions</a><br clear="none" />
+            19.8.4.3
+<a href="#streamability-xsl-analyze-string" shape="rect">Streamability of
+xsl:analyze-string</a><br clear="none" />
+            19.8.4.4
+<a href="#streamability-xsl-apply-imports" shape="rect">Streamability of
+xsl:apply-imports</a><br clear="none" />
+            19.8.4.5
+<a href="#streamability-xsl-apply-templates" shape="rect">Streamability of
+xsl:apply-templates</a><br clear="none" />
+            19.8.4.6
+<a href="#streamability-xsl-assert" shape="rect">Streamability of
+xsl:assert</a><br clear="none" />
+            19.8.4.7
+<a href="#streamability-xsl-attribute" shape="rect">Streamability of
+xsl:attribute</a><br clear="none" />
+            19.8.4.8
+<a href="#streamability-xsl-break" shape="rect">Streamability of
+xsl:break</a><br clear="none" />
+            19.8.4.9
+<a href="#streamability-xsl-call-template" shape="rect">Streamability of
+xsl:call-template</a><br clear="none" />
+            19.8.4.10
+<a href="#streamability-xsl-choose" shape="rect">Streamability of
+xsl:choose</a><br clear="none" />
+            19.8.4.11
+<a href="#streamability-xsl-comment" shape="rect">Streamability of
+xsl:comment</a><br clear="none" />
+            19.8.4.12
+<a href="#streamability-xsl-copy" shape="rect"><span class="diff-chg">Streamability of xsl:copy</span></a><br clear="none" />
+            19.8.4.13
+<a href="#streamability-xsl-copy-of" shape="rect">Streamability of
+xsl:copy-of</a><br clear="none" />
+            19.8.4.14
+<a href="#streamability-xsl-document" shape="rect">Streamability of
+xsl:document</a><br clear="none" />
+            19.8.4.15
+<a href="#streamability-xsl-element" shape="rect"><span class="diff-chg">Streamability of xsl:element</span></a><br clear="none" />
+            19.8.4.16
+<a href="#streamability-xsl-evaluate" shape="rect">Streamability of
+xsl:evaluate</a><br clear="none" />
+            19.8.4.17
+<a href="#streamability-xsl-fallback" shape="rect">Streamability of
+xsl:fallback</a><br clear="none" />
+            19.8.4.18
+<a href="#streamability-xsl-for-each" shape="rect"><span class="diff-chg">Streamability of xsl:for-each</span></a><br clear="none" />
+            19.8.4.19
+<a href="#streamability-xsl-for-each-group" shape="rect"><span class="diff-chg">Streamability of xsl:for-each-group</span></a><br clear="none" />
+            19.8.4.20
+<a href="#streamability-xsl-fork" shape="rect">Streamability of
+xsl:fork</a><br clear="none" />
+            19.8.4.21
+<a href="#streamability-xsl-if" shape="rect">Streamability of xsl:if</a><br clear="none" />
+            19.8.4.22
+<a href="#streamability-xsl-iterate" shape="rect"><span class="diff-chg">Streamability of xsl:iterate</span></a><br clear="none" />
+            19.8.4.23
+<a href="#streamability-xsl-map" shape="rect">Streamability of xsl:map</a><br clear="none" />
+            19.8.4.24
+<a href="#streamability-xsl-map-entry" shape="rect">Streamability of
+xsl:map-entry</a><br clear="none" />
+            19.8.4.25
+<a href="#streamability-xsl-merge" shape="rect">Streamability of
+xsl:merge</a><br clear="none" />
+            19.8.4.26
+<a href="#streamability-xsl-message" shape="rect">Streamability of
+xsl:message</a><br clear="none" />
+            19.8.4.27
+<a href="#streamability-xsl-namespace" shape="rect">Streamability of
+xsl:namespace</a><br clear="none" />
+            19.8.4.28
+<a href="#streamability-xsl-next-iteration" shape="rect">Streamability of
+xsl:next-iteration</a><br clear="none" />
+            19.8.4.29
+<a href="#streamability-xsl-next-match" shape="rect">Streamability of
+xsl:next-match</a><br clear="none" />
+            19.8.4.30
+<a href="#streamability-xsl-number" shape="rect"><span class="diff-chg">Streamability of xsl:number</span></a><br clear="none" />
+            19.8.4.31
+<a href="#streamability-xsl-perform-sort" shape="rect">Streamability of
+xsl:perform-sort</a><br clear="none" />
+            19.8.4.32
+<a href="#streamability-xsl-processing-instruction" shape="rect">Streamability
+of xsl:processing-instruction</a><br clear="none" />
+            19.8.4.33
+<a href="#streamability-xsl-result-document" shape="rect">Streamability of
+xsl:result-document</a><br clear="none" />
+            19.8.4.34
+<a href="#streamability-xsl-sequence" shape="rect">Streamability of
+xsl:sequence</a><br clear="none" />
+            19.8.4.35
+<a href="#streamability-xsl-stream" shape="rect">Streamability of
+xsl:stream</a><br clear="none" />
+            19.8.4.36
+<a href="#streamability-xsl-text" shape="rect">Streamability of
+xsl:text</a><br clear="none" />
+            19.8.4.37
+<a href="#streamability-xsl-try" shape="rect">Streamability of xsl:try</a><br clear="none" />
+            19.8.4.38
+<a href="#streamability-xsl-value-of" shape="rect">Streamability of
+xsl:value-of</a><br clear="none" />
+            19.8.4.39
+<a href="#streamability-xsl-variable" shape="rect">Streamability of
+xsl:variable</a><br clear="none" />
+        19.8.5 <a href="#streamable-stylesheet-functions" shape="rect"><span class="diff-chg">Classifying Stylesheet Functions</span></a><br clear="none" />
+            19.8.5.1
+<a href="#category-unclassified" shape="rect">Streamability Category:
+unclassified</a><br clear="none" />
+            19.8.5.2
+<a href="#category-absorbing" shape="rect">Streamability Category:
+absorbing</a><br clear="none" />
+            19.8.5.3
+<a href="#category-inspection" shape="rect">Streamability Category:
+inspection</a><br clear="none" />
+            19.8.5.4
+<a href="#category-filter" shape="rect">Streamability Category: filter</a><br clear="none" />
+            19.8.5.5
+<a href="#category-shallow-descent" shape="rect">Streamability Category:
+shallow-descent</a><br clear="none" />
+            19.8.5.6
+<a href="#category-deep-descent" shape="rect">Streamability Category:
+deep-descent</a><br clear="none" />
+            19.8.5.7
+<a href="#category-ascent" shape="rect">Streamability Category: ascent</a><br clear="none" />
+        19.8.6 <a href="#classifying-attribute-sets" shape="rect">Classifying Attribute Sets</a><br clear="none" />
+        19.8.7 <a href="#classifying-vts" shape="rect">Classifying Value Templates</a><br clear="none" />
+        19.8.8 <a href="#classifying-expressions" shape="rect">Classifying Expressions</a><br clear="none" />
+            19.8.8.1
+<a href="#streamability-of-for-expressions" shape="rect"><span class="diff-chg">Streamability of for expressions</span></a><br clear="none" />
+            19.8.8.2
+<a href="#streamability-of-quantified-expressions" shape="rect">Streamability of
+Quantified Expressions</a><br clear="none" />
+            19.8.8.3
+<a href="#streamability-of-if-expressions" shape="rect">Streamability of if
+expressions</a><br clear="none" />
+            19.8.8.4
+<a href="#streamability-of-union-expressions" shape="rect"><span class="diff-chg">Streamability of union, intersect, and except
+expressions</span></a><br clear="none" />
+            19.8.8.5
+<a href="#streamability-of-instance-of-expressions" shape="rect"><span class="diff-chg">Streamability of instance of
+Expressions</span></a><br clear="none" />
+            19.8.8.6
+<a href="#streamability-of-simple-mapping-expressions" shape="rect">Streamability of
+Simple Mapping Expressions</a><br clear="none" />
+            19.8.8.7
+<a href="#streamability-of-path-expressions" shape="rect"><span class="diff-chg">Streamability of Path Expressions</span></a><br clear="none" />
+            19.8.8.8
+<a href="#streamability-of-axis-steps" shape="rect"><span class="diff-chg">Streamability of Axis Steps</span></a><br clear="none" />
+            19.8.8.9
+<a href="#streamability-of-filter-expressions" shape="rect"><span class="diff-chg">Streamability of Filter Expressions</span></a><br clear="none" />
+            19.8.8.10
+<a href="#streamability-of-dynamic-function-calls" shape="rect">Streamability of
+Dynamic Function Calls</a><br clear="none" />
+            19.8.8.11
+<a href="#streamability-of-variable-references" shape="rect"><span class="diff-chg">Streamability of Variable References</span></a><br clear="none" />
+            19.8.8.12
+<a href="#streamability-of-context-item-expression" shape="rect">Streamability
+of the Context Item Expression</a><br clear="none" />
+            19.8.8.13
+<a href="#streamability-of-function-calls" shape="rect"><span class="diff-chg">Streamability of Static Function Calls</span></a><br clear="none" />
+            19.8.8.14
+<a href="#streamability-of-named-function-ref" shape="rect">Streamability of
+Named Function References</a><br clear="none" />
+            19.8.8.15
+<a href="#streamability-of-inline-functions" shape="rect"><span class="diff-chg">Streamability of Inline Function
+Declarations</span></a><br clear="none" />
+            19.8.8.16
+<a href="#streamability-of-map-expressions" shape="rect">Streamability of map
+expressions</a><br clear="none" />
+        19.8.9 <a href="#classifying-built-in-functions" shape="rect">Classifying Calls to Built-In
+Functions</a><br clear="none" />
+            19.8.9.1
+<a href="#streamability-fn-accumulator-after" shape="rect"><span class="diff-chg">Streamability of the accumulator-after
+function</span></a><br clear="none" />
+            19.8.9.2
+<a href="#streamability-fn-accumulator-before" shape="rect">Streamability of the
+accumulator-before function</a><br clear="none" />
+            19.8.9.3
+<a href="#streamability-fn-current" shape="rect">Streamability of the current
+function</a><br clear="none" />
+            19.8.9.4
+<a href="#streamability-fn-current-group" shape="rect">Streamability of the
+current-group function</a><br clear="none" />
+            19.8.9.5
+<a href="#streamability-fn-current-grouping-key" shape="rect">Streamability of
+the current-grouping-key function</a><br clear="none" />
+            19.8.9.6
+<a href="#streamability-fn-current-merge-group" shape="rect">Streamability of
+the current-merge-group function</a><br clear="none" />
+            19.8.9.7
+<a href="#streamability-fn-current-merge-key" shape="rect">Streamability of the
+current-merge-key function</a><br clear="none" />
+            19.8.9.8
+<a href="#streamability-fn-fold-left" shape="rect">Streamability of the
+fold-left function</a><br clear="none" />
+            19.8.9.9
+<a href="#streamability-fn-fold-right" shape="rect">Streamability of the
+fold-right function</a><br clear="none" />
+            19.8.9.10
+<a href="#streamability-fn-for-each" shape="rect">Streamability of the for-each
+function</a><br clear="none" />
+            19.8.9.11
+<a href="#streamability-fn-for-each-pair" shape="rect">Streamability of the
+for-each-pair function</a><br clear="none" />
+            19.8.9.12
+<a href="#streamability-fn-function-lookup" shape="rect">Streamability of the
+function-lookup function</a><br clear="none" />
+            19.8.9.13
+<a href="#streamability-fn-innermost" shape="rect">Streamability of the
+innermost function</a><br clear="none" />
+            19.8.9.14
+<a href="#streamability-fn-last" shape="rect">Streamability of the last
+function</a><br clear="none" />
+            19.8.9.15
+<a href="#streamability-fn-outermost" shape="rect">Streamability of the
+outermost function</a><br clear="none" />
+            19.8.9.16
+<a href="#streamability-fn-position" shape="rect">Streamability of the position
+function</a><br clear="none" />
+            19.8.9.17
+<a href="#streamability-fn-reverse" shape="rect">Streamability of the reverse
+function</a><br clear="none" />
+            19.8.9.18
+<a href="#streamability-fn-root" shape="rect">Streamability of the root
+function</a><br clear="none" />
+        19.8.10 <a href="#classifying-patterns" shape="rect"><span class="diff-chg">Classifying
+Patterns</span></a><br clear="none" />
+    19.9 <a href="#streamability-analysis-examples" shape="rect"><span class="diff-chg">Examples
+of Streamability Analysis</span></a><br clear="none" />
+    19.10 <a href="#streamability-guarantees" shape="rect"><span class="diff-chg">Streamability
+Guarantees</span></a><br clear="none" />
+20 <a href="#add-func" shape="rect">Additional Functions</a><br clear="none" />
+    20.1 <a href="#func-document" shape="rect"><span class="diff-chg">fn:document</span></a><br clear="none" />
+    20.2 <a href="#key" shape="rect">Keys</a><br clear="none" />
+        20.2.1 <a href="#xsl-key" shape="rect">The xsl:key Declaration</a><br clear="none" />
+        20.2.2 <a href="#func-key" shape="rect">fn:key</a><br clear="none" />
+    20.3 <a href="#misc-func" shape="rect">Miscellaneous
+Additional Functions</a><br clear="none" />
+        20.3.1 <a href="#func-current" shape="rect">fn:current</a><br clear="none" />
+        20.3.2 <a href="#func-unparsed-entity-uri" shape="rect"><span class="diff-chg">fn:unparsed-entity-uri</span></a><br clear="none" />
+        20.3.3 <a href="#func-unparsed-entity-public-id" shape="rect"><span class="diff-chg">fn:unparsed-entity-public-id</span></a><br clear="none" />
+        20.3.4 <a href="#func-system-property" shape="rect">fn:system-property</a><br clear="none" />
+21 <a href="#additional-types" shape="rect">XPath Extensions</a><br clear="none" />
+    21.1 <a href="#map" shape="rect"><span class="diff-chg">Maps</span></a><br clear="none" />
+        21.1.1 <a href="#map-type" shape="rect">The Type of a Map</a><br clear="none" />
+        21.1.2 <a href="#map-functions" shape="rect">Functions that Operate on Maps</a><br clear="none" />
+            21.1.2.1
+<a href="#func-map-merge" shape="rect"><span class="diff-chg">map:merge</span></a><br clear="none" />
+            21.1.2.2
+<a href="#func-map-size" shape="rect">map:size</a><br clear="none" />
+            21.1.2.3
+<a href="#func-map-keys" shape="rect">map:keys</a><br clear="none" />
+            21.1.2.4
+<a href="#func-map-contains" shape="rect">map:contains</a><br clear="none" />
+            21.1.2.5
+<a href="#func-map-get" shape="rect">map:get</a><br clear="none" />
+            21.1.2.6
+<a href="#func-map-put" shape="rect"><span class="diff-chg">map:put</span></a><br clear="none" />
+            21.1.2.7
+<a href="#func-map-entry" shape="rect"><span class="diff-chg">map:entry</span></a><br clear="none" />
+            21.1.2.8
+<a href="#func-map-remove" shape="rect"><span class="diff-chg">map:remove</span></a><br clear="none" />
+            21.1.2.9
+<a href="#func-map-for-each" shape="rect">map:for-each</a><br clear="none" />
+            21.1.2.10
+<a href="#func-collation-key" shape="rect">fn:collation-key</a><br clear="none" />
+            21.1.2.12
+<a href="#func-deep-equal" shape="rect">fn:deep-equal</a><br clear="none" />
+        21.1.3 <a href="#map-instructions" shape="rect">Map Instructions</a><br clear="none" />
+        21.1.4 <a href="#map-expressions" shape="rect"><span class="diff-chg">Map
+Expressions</span></a><br clear="none" />
+        21.1.5 <a href="#maps-streaming" shape="rect">Maps and Streaming</a><br clear="none" />
+        21.1.6 <a href="#map-examples" shape="rect">Examples using Maps</a><br clear="none" />
+    21.2 <a href="#json" shape="rect">Processing JSON
+Data</a><br clear="none" />
+        21.2.1 <a href="#json-to-xml-mapping" shape="rect">XML Representation of JSON</a><br clear="none" />
+        21.2.2 <a href="#func-json-to-xml" shape="rect"><span class="diff-chg">fn:json-to-xml</span></a><br clear="none" />
+        21.2.3 <a href="#func-xml-to-json" shape="rect">fn:xml-to-json</a><br clear="none" />
+        21.2.4 <a href="#xml-to-json-transformation" shape="rect">Transforming XML to JSON</a><br clear="none" />
+22 <a href="#diagnostics" shape="rect">Diagnostics</a><br clear="none" />
+    22.1 <a href="#message" shape="rect">Messages</a><br clear="none" />
+    22.2 <a href="#assertions" shape="rect">Assertions</a><br clear="none" />
+23 <a href="#extension" shape="rect">Extensibility and Fallback</a><br clear="none" />
+    23.1 <a href="#extension-functions" shape="rect">Extension Functions</a><br clear="none" />
+        23.1.1 <a href="#func-function-available" shape="rect">fn:function-available</a><br clear="none" />
+        23.1.2 <a href="#calling-extension-functions" shape="rect">Calling Extension
+Functions</a><br clear="none" />
+        23.1.3 <a href="#external-objects" shape="rect">External Objects</a><br clear="none" />
+        23.1.4 <a href="#func-type-available" shape="rect">fn:type-available</a><br clear="none" />
+    23.2 <a href="#extension-instruction" shape="rect">Extension Instructions</a><br clear="none" />
+        23.2.1 <a href="#designating-extension-namespace" shape="rect">Designating an Extension
+Namespace</a><br clear="none" />
+        23.2.2 <a href="#func-element-available" shape="rect">fn:element-available</a><br clear="none" />
+        23.2.3 <a href="#fallback" shape="rect">Fallback</a><br clear="none" />
+24 <a href="#result-trees" shape="rect"><span class="diff-chg">Transformation
+Results</span></a><br clear="none" />
+    24.1 <a href="#creating-result-trees" shape="rect"><span class="diff-chg">Creating Secondary
+Results</span></a><br clear="none" />
+    24.2 <a href="#result-document-restrictions" shape="rect">Restrictions on the use of
+xsl:result-document</a><br clear="none" />
+    24.3 <a href="#current-output-uri" shape="rect"><span class="diff-chg">The Current Output
+URI</span></a><br clear="none" />
+        24.3.1 <a href="#func-current-output-uri" shape="rect">fn:current-output-uri</a><br clear="none" />
+    24.4 <a href="#validation" shape="rect">Validation</a><br clear="none" />
+        24.4.1 <a href="#validating-constructed-nodes" shape="rect">Validating Constructed Elements and
+Attributes</a><br clear="none" />
+            24.4.1.1
+<a href="#validating-using-validation-attribute" shape="rect">Validation using
+the [xsl:]validation Attribute</a><br clear="none" />
+            24.4.1.2
+<a href="#validation-xsl-type" shape="rect">Validation using the [xsl:]type
+Attribute</a><br clear="none" />
+            24.4.1.3
+<a href="#validation-process" shape="rect">The Validation Process</a><br clear="none" />
+        24.4.2 <a href="#validating-document-nodes" shape="rect">Validating Document Nodes</a><br clear="none" />
+25 <a href="#serialization" shape="rect"><span class="diff-chg">Serialization</span></a><br clear="none" />
+    25.1 <a href="#character-maps" shape="rect">Character
+Maps</a><br clear="none" />
+    25.2 <a href="#disable-output-escaping" shape="rect">Disabling Output Escaping</a><br clear="none" />
+26 <a href="#conformance" shape="rect">Conformance</a><br clear="none" />
+    26.1 <a href="#basic-conformance" shape="rect">Basic
+XSLT Processor</a><br clear="none" />
+    26.2 <a href="#schema-aware-conformance" shape="rect"><span class="diff-chg">Schema-Awareness
+Conformance Feature</span></a><br clear="none" />
+    26.3 <a href="#serialization-feature" shape="rect">Serialization Feature</a><br clear="none" />
+    26.4 <a href="#backwards-compatibility-feature" shape="rect">Compatibility Features</a><br clear="none" />
+    26.5 <a href="#streaming-feature" shape="rect">Streaming
+Feature</a><br clear="none" />
+    26.6 <a href="#dynamic-evaluation-feature" shape="rect">Dynamic Evaluation Feature</a><br clear="none" />
+    26.7 <a href="#xquery-invocation-feature" shape="rect">XQuery Invocation
+Feature</a><br clear="none" /></p>
+<h3><a name="appendices" id="appendices" shape="rect"></a>Appendices</h3>
+<p class="toc">A <a href="#references" shape="rect">References</a><br clear="none" />
+    A.1 <a href="#normative-references" shape="rect">Normative References</a><br clear="none" />
+    A.2 <a href="#other-references" shape="rect">Other
+References</a><br clear="none" />
+B <a href="#json-in-xml" shape="rect">XML Representation of JSON</a><br clear="none" />
+    B.1 <a href="#schema-for-json" shape="rect">Schema for
+the XML Representation of JSON</a><br clear="none" />
+    B.2 <a href="#xml-to-json-stylesheet" shape="rect">Stylesheet for converting XML to JSON
+(without indentation)</a><br clear="none" />
+C <a href="#glossary" shape="rect">Glossary</a> (Non-Normative)<br clear="none" />
+D <a href="#element-syntax-summary" shape="rect">Element Syntax Summary</a>
+(Non-Normative)<br clear="none" />
+E <a href="#error-summary" shape="rect">Summary of Error Conditions</a>
+(Non-Normative)<br clear="none" />
+F <a href="#implementation-defined-features" shape="rect">Checklist of
+Implementation-Defined Features</a> (Non-Normative)<br clear="none" />
+G <a href="#XSLT-defined-functions" shape="rect">List of XSLT-defined
+functions</a> (Non-Normative)<br clear="none" />
+H <a href="#schema-for-xslt" shape="rect">Schema for XSLT Stylesheets</a>
+(Non-Normative)<br clear="none" />
+I <a href="#acknowledgements" shape="rect">Acknowledgements</a>
+(Non-Normative)<br clear="none" />
+J <a href="#changes-since-2.0" shape="rect">Changes since XSLT 2.0</a>
+(Non-Normative)<br clear="none" />
+    J.1 <a href="#xslt-changes-since-2.0" shape="rect"><span class="diff-chg">Changes in this
+Specification</span></a><br clear="none" />
+    J.2 <a href="#xpath-changes-since-2.0" shape="rect">Changes in Other Related
+Specifications</a><br clear="none" />
+K <a href="#changes-since-july-2012" shape="rect"><span class="diff-chg">Changes
+since the Working Draft of 10 July 2012</span></a>
+(Non-Normative)<br clear="none" />
+L <a href="#changes-since-oct-2014" shape="rect">Changes since the Last Call
+Working Draft of 2 October 2014</a> (Non-Normative)<br clear="none" />
+M <a href="#incompatibilities" shape="rect"><span class="diff-chg">Incompatibilities with XSLT 2.0</span></a>
+(Non-Normative)<br clear="none" /></p>
 </div>
 <hr />
 <div class="body">
 <div class="div1">
-<h2><a name="introduction" id="introduction"></a>1 <a href=
-"#introduction" style="text-decoration: none">Introduction</a></h2>
-<div class="div2">
-<h3><a name="what-is-xslt" id="what-is-xslt"></a>1.1 <a href=
-"#what-is-xslt" style="text-decoration: none">What is
+<h2><a name="introduction" id="introduction" shape="rect"></a>1 <a href="#introduction" style="text-decoration: none" shape="rect">Introduction</a></h2>
+<div class="div2">
+<h3><a name="what-is-xslt" id="what-is-xslt" shape="rect"></a>1.1 <a href="#what-is-xslt" style="text-decoration: none" shape="rect">What is
 XSLT?</a></h3>
 <p>This specification defines the syntax and semantics of the XSLT
 <span>3.0</span> language.</p>
 <p>A transformation in the XSLT language is expressed in the form
 of a <b>stylesheet</b>. A stylesheet is made up of one or more
-well-formed XML <a href="#REC-xml">[XML 1.0]</a> documents
-conforming to the Namespaces in XML Recommendation <a href=
-"#xml-names">[Namespaces in XML]</a>.</p>
+well-formed XML <a href="#REC-xml" shape="rect">[XML 1.0]</a> documents
+conforming to the Namespaces in XML Recommendation <a href="#xml-names" shape="rect">[Namespaces in XML]</a>.</p>
 <p>A stylesheet generally includes elements that are defined by
 XSLT as well as elements that are not defined by XSLT. XSLT-defined
 elements are distinguished by use of the namespace
-<code>http://www.w3.org/1999/XSL/Transform</code> (see <a href=
-"#xslt-namespace"><i>3.1 XSLT Namespace</i></a>), which is referred
-to in this specification as the <a title="XSLT namespace" class=
-"termref" href="#dt-xslt-namespace">XSLT namespace</a>. Thus this
+<code>http://www.w3.org/1999/XSL/Transform</code> (see <a href="#xslt-namespace" shape="rect"><i>3.1 XSLT Namespace</i></a>), which is referred
+to in this specification as the <a title="XSLT namespace" class="termref" href="#dt-xslt-namespace" shape="rect">XSLT namespace</a>. Thus this
 specification is a definition of the syntax and semantics of the
 XSLT namespace.</p>
-<p>The term <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> reflects the fact that one of the
+<p>The term <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> reflects the fact that one of the
 important roles of XSLT is to add styling information to an XML
 source document, by transforming it into a document consisting of
-XSL formatting objects (see <a href="#xsl11">[XSL-FO]</a>), or into
+XSL formatting objects (see <a href="#xsl11" shape="rect">[XSL-FO]</a>), or into
 another presentation-oriented format such as HTML, XHTML, or SVG.
 However, XSLT is used for a wide range of transformation tasks, not
 exclusively for formatting and presentation applications.</p>
 <p>A transformation expressed in XSLT describes rules for
-transforming zero or more source trees into one or more result
-trees. The structure of these trees is described in <a href=
-"#xpath-datamodel-30">[Data Model]</a>. The transformation is
-achieved by a set of <a title="template rule" class="termref" href=
-"#dt-template-rule">template rules</a>. A template rule associates
-a <a title="pattern" class="termref" href=
-"#dt-pattern">pattern</a>, which matches nodes in the source
-document, with a <a title="sequence constructor" class="termref"
-href="#dt-sequence-constructor">sequence constructor</a>. In many
-cases, evaluating the sequence constructor will cause new nodes to
-be constructed, which can be used to produce part of a result tree.
+transforming <span class="diff-add" id="bug27258b" title="Bug 27258"><span>input data into output data. The inputs and
+outputs will all be instances of the XDM data model, described in
+<a href="#xpath-datamodel-30" shape="rect">[Data Model]</a>. In the simplest and
+most common case, the input is an XML document referred to as the
+source tree, and the output is an XML document referred to as the
+result tree. It is also possible to process multiple source
+documents, to generate multiple result documents, and to handle
+formats other than XML.</span></span> <span class="diff-del"><span class="diff-del"><span>zero or more source trees
+into one or more result trees. The structure of these trees is
+described in <a href="#xpath-datamodel-30" shape="rect">[Data
+Model]</a>.</span></span></span> The transformation is achieved by
+a set of <a title="template rule" class="termref" href="#dt-template-rule" shape="rect">template rules</a>. A template rule associates
+a <a title="pattern" class="termref" href="#dt-pattern" shape="rect">pattern</a>, which <span class="diff-add" id="bug27258c" title="Bug 27258"><span>typically</span></span> matches
+nodes in the source document, with a <a title="sequence constructor" class="termref" href="#dt-sequence-constructor" shape="rect">sequence constructor</a>. In many cases,
+evaluating the sequence constructor will cause new nodes to be
+constructed, which can be used to produce part of a result tree.
 The structure of the result trees can be completely different from
 the structure of the source trees. In constructing a result tree,
 nodes from the source trees can be filtered and reordered, and
-arbitrary structure can be added. This mechanism allows a <a title=
-"stylesheet" class="termref" href="#dt-stylesheet">stylesheet</a>
+arbitrary structure can be added. This mechanism allows a <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>
 to be applicable to a wide class of documents that have similar
 source tree structures.</p>
-<div class="note">
-<p class="prefix"><b>Note:</b></p>
-<p>The use of the term <b>tree</b> in this document does not imply
-the use of a data structure in memory that holds the entire
-contents of the document at one time. It implies rather a logical
-view of the XML input and output in which elements have a
-hierarchic relationship to each other. When a source document is
-being processed in a streaming manner, access to the nodes in this
-tree is constrained, but it is still viewed and described as a
-tree.</p>
-</div>
 <p>Stylesheets have a modular structure; they may contain several
 packages developed independently of each other, and each package
 may consist of several stylesheet modules.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-stylesheet" id="dt-stylesheet" title="stylesheet"></a>A
+<p><span class="definition">[Definition: </span><a name="dt-stylesheet" id="dt-stylesheet" title="stylesheet" shape="rect"></a>A
 <b>stylesheet</b> consists of one or more packages: specifically,
-one <a title="top-level package" class="termref" href=
-"#dt-top-level-package">top-level package</a> and zero or more
-<a title="library package" class="termref" href=
-"#dt-library-package">library packages</a>.<span class=
-"definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-top-level-package" id="dt-top-level-package" title=
-"top-level package"></a>For a given transformation, one <a title=
-"package" class="termref" href="#dt-package">package</a> functions
-as the <b>top-level package</b>. The complete <a title="stylesheet"
-class="termref" href="#dt-stylesheet">stylesheet</a> is assembled
+one <a title="top-level package" class="termref" href="#dt-top-level-package" shape="rect">top-level package</a> and zero or more
+<a title="library package" class="termref" href="#dt-library-package" shape="rect">library packages</a>.<span class="definition">]</span></p>
+<p><span class="definition">[Definition: </span><a name="dt-top-level-package" id="dt-top-level-package" title="top-level package" shape="rect"></a>For a given transformation, one <a title="package" class="termref" href="#dt-package" shape="rect">package</a> functions
+as the <b>top-level package</b>. The complete <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> is assembled
 by finding the packages referenced directly or indirectly from the
-top-level package using <a href=
-"#element-use-package"><code>xsl:use-package</code></a>
-declarations: see <a href="#package-dependencies"><i>3.6.2
-Dependencies between Packages</i></a>.<span class=
-"definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-library-package" id="dt-library-package" title=
-"library package"></a>Every <a title="package" class="termref"
-href="#dt-package">package</a> within a <a title="stylesheet"
-class="termref" href="#dt-stylesheet">stylesheet</a>, other than
-the <a title="top-level package" class="termref" href=
-"#dt-top-level-package">top-level package</a>, is referred to as a
+top-level package using <a href="#element-use-package" shape="rect"><code>xsl:use-package</code></a>
+declarations: see <a href="#package-dependencies" shape="rect"><i>3.6.2
+Dependencies between Packages</i></a>.<span class="definition">]</span></p>
+<p><span class="definition">[Definition: </span><a name="dt-library-package" id="dt-library-package" title="library package" shape="rect"></a>Every <a title="package" class="termref" href="#dt-package" shape="rect">package</a> within a <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>, other than
+the <a title="top-level package" class="termref" href="#dt-top-level-package" shape="rect">top-level package</a>, is referred to as a
 <b>library package</b>.<span class="definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-principal-stylesheet-module" id=
-"dt-principal-stylesheet-module" title=
-"principal stylesheet module"></a>Within a <a title="package"
-class="termref" href="#dt-package">package</a>, one <a title=
-"stylesheet module" class="termref" href=
-"#dt-stylesheet-module">stylesheet module</a> functions as the
+<p><span class="definition">[Definition: </span><a name="dt-principal-stylesheet-module" id="dt-principal-stylesheet-module" title="principal stylesheet module" shape="rect"></a>Within a <a title="package" class="termref" href="#dt-package" shape="rect">package</a>, one <a title="stylesheet module" class="termref" href="#dt-stylesheet-module" shape="rect">stylesheet module</a> functions as the
 <b>principal stylesheet module</b>. The complete package is
 assembled by finding the stylesheet modules referenced directly or
-indirectly from the principal stylesheet module using <a href=
-"#element-include"><code>xsl:include</code></a> and <a href=
-"#element-import"><code>xsl:import</code></a> elements: see
-<a href="#include"><i>3.12.2 Stylesheet Inclusion</i></a> and
-<a href="#import"><i>3.12.3 Stylesheet Import</i></a>.<span class=
-"definition">]</span></p>
-</div>
-<div class="div2">
-<h3><a name="whats-new-in-xslt3" id="whats-new-in-xslt3"></a>1.2
-<a href="#whats-new-in-xslt3" style="text-decoration: none">What's
+indirectly from the principal stylesheet module using <a href="#element-include" shape="rect"><code>xsl:include</code></a> and <a href="#element-import" shape="rect"><code>xsl:import</code></a> elements: see
+<a href="#include" shape="rect"><i>3.12.2 Stylesheet Inclusion</i></a> and
+<a href="#import" shape="rect"><i>3.12.3 Stylesheet Import</i></a>.<span class="definition">]</span></p>
+</div>
+<div class="div2">
+<h3><a name="whats-new-in-xslt3" id="whats-new-in-xslt3" shape="rect"></a>1.2
+<a href="#whats-new-in-xslt3" style="text-decoration: none" shape="rect">What’s
 New in XSLT 3.0?</a></h3>
 <p>A major focus for enhancements in XSLT 3.0 is the requirement to
 enable streaming of source documents. This is needed when source
@@ -1395,41 +1149,32 @@
 makes it easier for the processor to adopt a streaming execution
 plan.</p>
 <p>Capabilities provided in this category include:</p>
-<ul>
-<li>
-<p>A new <a href="#element-stream"><code>xsl:stream</code></a>
+<ul><li>
+<p>A new <a href="#element-stream" shape="rect"><code>xsl:stream</code></a>
 instruction, which reads and processes a source document in
 streaming mode;</p>
-</li>
-<li>
-<p>The ability to declare that a <a title="mode" class="termref"
-href="#dt-mode">mode</a> is a streaming mode, in which case all the
+</li><li>
+<p>The ability to declare that a <a title="mode" class="termref" href="#dt-mode" shape="rect">mode</a> is a streaming mode, in which case all the
 template rules using that mode must be streamable;</p>
-</li>
-<li>
-<p>A new <a href="#element-iterate"><code>xsl:iterate</code></a>
+</li><li>
+<p>A new <a href="#element-iterate" shape="rect"><code>xsl:iterate</code></a>
 instruction, which iterates over the items in a sequence, allowing
 parameters for the processing of one item to be set during the
 processing of the previous item;</p>
-</li>
-<li>
-<p>A new <a href="#element-merge"><code>xsl:merge</code></a>
+</li><li>
+<p>A new <a href="#element-merge" shape="rect"><code>xsl:merge</code></a>
 instruction, allowing multiple input streams to be merged into a
 single output stream;</p>
-</li>
-<li>
-<p>A new <a href="#element-fork"><code>xsl:fork</code></a>
+</li><li>
+<p>A new <a href="#element-fork" shape="rect"><code>xsl:fork</code></a>
 instruction, allowing multiple computations to be performed in
 parallel during a single pass through an input document.</p>
-</li>
-<li>
-<p><a title="accumulator function" class="termref" href=
-"#dt-accumulator-function">Accumulators</a>, which allow a value to
+</li><li>
+<p><a title="accumulator function" class="termref" href="#dt-accumulator-function" shape="rect">Accumulators</a>, which allow a value to
 be computed progressively during streamed processing of a document,
 and accessed as a function of a node in the document, without
 compromise to the functional nature of the XSLT language.</p>
-</li>
-</ul>
+</li></ul>
 <p>A second focus for enhancements in XSLT 3.0 is the introduction
 of a new mechanism for stylesheet modularity, called the package.
 Unlike the stylesheet modules of XSLT 1.0 and 2.0 (which remain
@@ -1443,150 +1188,150 @@
 independently of each other, and compiled instances of packages to
 be shared between multiple applications.</p>
 <p>Other significant features in XSLT 3.0 include:</p>
-<ul>
-<li>
-<p>An <a href="#element-evaluate"><code>xsl:evaluate</code></a>
+<ul><li>
+<p>An <a href="#element-evaluate" shape="rect"><code>xsl:evaluate</code></a>
 instruction allowing evaluation of XPath expressions that are
 dynamically constructed as strings, or that are read from a source
 document;</p>
-</li>
-<li>
-<p>Enhancements to the syntax of <a title="pattern" class="termref"
-href="#dt-pattern">patterns</a>, in particular enabling the
+</li><li>
+<p>Enhancements to the syntax of <a title="pattern" class="termref" href="#dt-pattern" shape="rect">patterns</a>, in particular enabling the
 matching of atomic values as well as nodes;</p>
-</li>
-<li>
-<p>An <a href="#element-try"><code>xsl:try</code></a> instruction
+</li><li>
+<p>An <a href="#element-try" shape="rect"><code>xsl:try</code></a> instruction
 to allow recovery from dynamic errors;</p>
-</li>
-<li>
-<p>The element <a href=
-"#element-global-context-item"><code>xsl:global-context-item</code></a>,
-used to declare the stylesheet's expectations of the global context
+</li><li>
+<p>The element <a href="#element-global-context-item" shape="rect"><code>xsl:global-context-item</code></a>,
+used to declare the stylesheet’s expectations of the global context
 item (notably, its type).</p>
-</li>
-<li>
-<p>A new instruction <a href=
-"#element-assert"><code>xsl:assert</code></a> to assist developers
+</li><li>
+<p>A new instruction <a href="#element-assert" shape="rect"><code>xsl:assert</code></a> to assist developers
 in producing correct and robust code.</p>
-</li>
-</ul>
+</li></ul>
 <p>XSLT 3.0 also delivers enhancements made to the XPath language
 and to the standard function library, including the following:</p>
-<ul>
-<li>
+<ul><li>
 <p>Variables can now be bound in XPath using the <code>let</code>
 expression.</p>
-</li>
-<li>
+</li><li>
 <p>Functions are now first class values, and can be passed as
 arguments to other (higher-order) functions, making XSLT a
 fully-fledged functional programming language.</p>
-</li>
-<li>
+</li><li>
 <p>A number of new functions are available, for example
-trigonometric functions, and the functions <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-parse-xml"><code>parse-xml</code></a><sup><small>FO30</small></sup>
-and <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-serialize"><code>serialize</code></a><sup><small>FO30</small></sup>
+trigonometric functions, and the functions <a href="http://www.w3.org/TR/xpath-functions-30/#func-parse-xml" shape="rect"><code>parse-xml</code></a><sup><small>FO30</small></sup>
+and <a href="http://www.w3.org/TR/xpath-functions-30/#func-serialize" shape="rect"><code>serialize</code></a><sup><small>FO30</small></sup>
 to convert between lexical and tree representations of XML.</p>
-</li>
-</ul>
-<p>This Working Draft includes support for maps (a data structure
+</li></ul>
+<p>XSLT 3.0 also includes support for maps (a data structure
 consisting of key/value pairs, sometimes referred to in other
 programming languages as dictionaries, hashes, or associative
 arrays). This feature extends the data model, provides new syntax
-in XPath, and adds a number of new functions and operators. The XSL
-Working Group intends that these changes should eventually become
-part of XPath: however, this has not yet been agreed with all
-interested parties.</p>
-<p>A full list of changes is at <a href="#changes-since-2.0"><i>J
+in XPath, and adds a number of new functions and operators. The
+XSLT Working Group intends that these changes should eventually
+become part of XPath, and a version of XPath that includes these
+features is under development.</p>
+<p>A full list of changes is at <a href="#changes-since-2.0" shape="rect"><i>J
 Changes since XSLT 2.0</i></a>.</p>
 </div>
 </div>
 <div class="div1">
-<h2><a name="concepts" id="concepts"></a>2 <a href="#concepts"
-style="text-decoration: none">Concepts</a></h2>
-<div class="div2">
-<h3><a name="terminology" id="terminology"></a>2.1 <a href=
-"#terminology" style="text-decoration: none">Terminology</a></h3>
-<p>For a full glossary of terms, see <a href="#glossary"><i>C
+<h2><a name="concepts" id="concepts" shape="rect"></a>2 <a href="#concepts" style="text-decoration: none" shape="rect">Concepts</a></h2>
+<div class="div2">
+<h3><a name="terminology" id="terminology" shape="rect"></a>2.1 <a href="#terminology" style="text-decoration: none" shape="rect">Terminology</a></h3>
+<p>For a full glossary of terms, see <a href="#glossary" shape="rect"><i>C
 Glossary</i></a>.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-processor" id="dt-processor" title="processor"></a>The software
+<p><span class="definition">[Definition: </span><a name="dt-processor" id="dt-processor" title="processor" shape="rect"></a>The software
 responsible for transforming source trees into result trees using
 an XSLT stylesheet is referred to as the <b>processor</b>. This is
 sometimes expanded to <em>XSLT processor</em> to avoid any
 confusion with other processors, for example an XML
 processor.<span class="definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-implementation" id="dt-implementation" title=
-"implementation"></a>A specific product that performs the functions
-of an <a title="processor" class="termref" href=
-"#dt-processor">XSLT processor</a> is referred to as an
+<p><span class="definition">[Definition: </span><a name="dt-implementation" id="dt-implementation" title="implementation" shape="rect"></a>A specific product that performs the functions
+of an <a title="processor" class="termref" href="#dt-processor" shape="rect">XSLT processor</a> is referred to as an
 <b>implementation</b>. <span class="definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-result-tree" id="dt-result-tree" title="result tree"></a>The
-term <b>result tree</b> is used to refer to any tree constructed by
-<a title="instruction" class="termref" href=
-"#dt-instruction">instructions</a> in the stylesheet. A result tree
-is either a <a title="final result tree" class="termref" href=
-"#dt-final-result-tree">final result tree</a> or a <a title=
-"temporary tree" class="termref" href=
-"#dt-temporary-tree">temporary tree</a>.<span class=
-"definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-final-result-tree" id="dt-final-result-tree" title=
-"final result tree"></a>A <b>final result tree</b> is a <a title=
-"result tree" class="termref" href="#dt-result-tree">result
-tree</a> that forms part of the final output of a transformation.
-Once created, the contents of a final result tree are not
-accessible within the stylesheet itself.<span class=
-"definition">]</span> The <a href=
-"#element-result-document"><code>xsl:result-document</code></a>
+<div class="diff-add" id="bug27258d" title="Bug 27258">
+<p><span class="definition">[Definition: </span><a name="dt-tree" id="dt-tree" title="tree" shape="rect"></a>The term <b>tree</b> is
+used (as in <a href="#xpath-datamodel-30" shape="rect">[Data Model]</a>) to
+refer to the aggregate consisting of a parentless node together
+with all its descendant nodes, plus all their attributes and
+namespaces.<span class="definition">]</span></p>
+<div class="note">
+<p class="prefix"><b>Note:</b></p>
+<p>The use of the term <b>tree</b> in this document does not imply
+the use of a data structure in memory that holds the entire
+contents of the document at one time. It implies rather a logical
+view of the XML input and output in which elements have a
+hierarchic relationship to each other. When a source document is
+being processed in a streaming manner, access to the nodes in this
+tree is constrained, but it is still viewed and described as a
+tree.</p>
+</div>
+</div>
+<div class="diff-add" id="bug27258e" title="Bug 27258">
+<p>The output of a transformation consists of the following:</p>
+</div>
+<div class="diff-add" id="bug27258f" title="Bug 27258">
+<ol class="enumar"><li>
+<p><span class="definition">[Definition: </span><a name="dt-principal-result" id="dt-principal-result" title="principal result" shape="rect"></a>A <b>principal result</b>: this can be any
+sequence of items (as defined in <a href="#xpath-datamodel-30" shape="rect">[Data Model]</a>).<span class="definition">]</span> The principal result is the value returned by
+the function or template in the stylesheet that is nominated as the
+entry point, as described in <a href="#initiating" shape="rect"><i>2.3
+Initiating a Transformation</i></a>.</p>
+</li><li>
+<p><span class="definition">[Definition: </span><a name="dt-secondary-result" id="dt-secondary-result" title="secondary result" shape="rect"></a>Zero or more <b>secondary results</b>: each
+secondary result can be any sequence of items (as defined in
+<a href="#xpath-datamodel-30" shape="rect">[Data Model]</a>).<span class="definition">]</span> A secondary result is the value returned by
+evaluating the body of an <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
+instruction.</p>
+</li><li>
+<p>Zero or more messages. Messages are generated by the <a href="#element-message" shape="rect"><code>xsl:message</code></a> instruction, and
+are described in <a href="#message" shape="rect"><i>22.1 Messages</i></a>.</p>
+</li><li>
+<p>Static or dynamic errors: see <a href="#errors" shape="rect"><i>2.11 Error
+Handling</i></a>.</p>
+</li></ol>
+</div>
+<div class="diff-add" id="bug27258g" title="Bug 27258">
+<p>The <a title="principal result" class="termref" href="#dt-principal-result" shape="rect">principal result</a> and the <a title="secondary result" class="termref" href="#dt-secondary-result" shape="rect">secondary results</a> may be post-processed
+as described in <a href="#post-processing" shape="rect"><i>2.3.6 Post-processing
+the Raw Result</i></a>.</p>
+</div>
+<p><span class="definition">[Definition: </span><a name="dt-result-tree" id="dt-result-tree" title="result tree" shape="rect"></a>The
+term <b>result tree</b> is used to refer to any <a title="tree" class="termref" href="#dt-tree" shape="rect">tree</a> constructed by <a title="instruction" class="termref" href="#dt-instruction" shape="rect">instructions</a> in the stylesheet. A result tree
+is either a <a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result tree</a> or a <a title="temporary tree" class="termref" href="#dt-temporary-tree" shape="rect">temporary tree</a>.<span class="definition">]</span></p>
+<p><span class="definition">[Definition: </span><a name="dt-final-result-tree" id="dt-final-result-tree" title="final result tree" shape="rect"></a>A <b>final result tree</b> is a <a title="result tree" class="termref" href="#dt-result-tree" shape="rect">result
+tree</a> that forms part of the output of a transformation:
+<span class="diff-add" id="bug27258h" title="Bug 27258"><span>specifically, a tree built by post-processing the
+items in the <a title="principal result" class="termref" href="#dt-principal-result" shape="rect">principal result</a> or in a <a title="secondary result" class="termref" href="#dt-secondary-result" shape="rect">secondary result</a></span></span>. Once
+created, the contents of a final result tree are not accessible
+within the stylesheet itself.<span class="definition">]</span>
+<span class="diff-del" id="bug27258i" title="Bug 27258"><span>The
+<a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
 instruction always creates a final result tree, and a final result
 tree may also be created implicitly by post-processing the
-<a title="raw result" class="termref" href="#dt-raw-result">raw
+<a title="raw result" class="termref" href="#dt-raw-result" shape="rect">raw
 result</a> of a stylesheet evaluation. The conditions under which
-this happens are described in <a href=
-"#executing-a-transformation"><i>2.4 Executing a
-Transformation</i></a>. Any final result tree <span class=
-"verb">may</span> be serialized as described in <a href=
-"#serialization"><i>25 Serialization</i></a>.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-source-tree" id="dt-source-tree" title="source tree"></a>The
+this happens are described in <a href="#executing-a-transformation" shape="rect"><i>2.4 Executing a
+Transformation</i></a>.</span></span> Any final result tree
+<span class="verb">may</span> be serialized as described in
+<a href="#serialization" shape="rect"><i>25 Serialization</i></a>.</p>
+<p><span class="definition">[Definition: </span><a name="dt-source-tree" id="dt-source-tree" title="source tree" shape="rect"></a>The
 term <b>source tree</b> means any tree provided as input to the
 transformation. This includes the document containing the
-<span><a title="global context item" class="termref" href=
-"#dt-global-context-item">global context item</a></span> if any,
-<span>documents containing nodes present in the <a title=
-"initial match selection" class="termref" href=
-"#dt-initial-match-selection">initial match selection</a></span>,
-documents containing nodes supplied as the values of <a title=
-"stylesheet parameter" class="termref" href=
-"#dt-stylesheet-parameter">stylesheet parameters</a>, documents
-obtained from the results of functions such as <a href=
-"#func-document"><code>document</code></a>, <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-doc"><code>doc</code></a><sup><small>FO30</small></sup>,
-and <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-collection"><code>collection</code></a><sup><small>FO30</small></sup>,
-<span>documents read using the <a href=
-"#element-stream"><code>xsl:stream</code></a> instruction,</span>
+<span><a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context item</a></span> if any,
+<span>documents containing nodes present in the <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match selection</a></span>,
+documents containing nodes supplied as the values of <a title="stylesheet parameter" class="termref" href="#dt-stylesheet-parameter" shape="rect">stylesheet parameters</a>, documents
+obtained from the results of functions such as <a href="#func-document" shape="rect"><code>document</code></a>, <a href="http://www.w3.org/TR/xpath-functions-30/#func-doc" shape="rect"><code>doc</code></a><sup><small>FO30</small></sup>,
+and <a href="http://www.w3.org/TR/xpath-functions-30/#func-collection" shape="rect"><code>collection</code></a><sup><small>FO30</small></sup>,
+<span>documents read using the <a href="#element-stream" shape="rect"><code>xsl:stream</code></a> instruction,</span>
 and documents returned by extension functions or extension
 instructions. In the context of a particular XSLT instruction, the
 term <b>source tree</b> means any tree provided as input to that
 instruction; this may be a source tree of the transformation as a
-whole, or it may be a <a title="temporary tree" class="termref"
-href="#dt-temporary-tree">temporary tree</a> produced during the
+whole, or it may be a <a title="temporary tree" class="termref" href="#dt-temporary-tree" shape="rect">temporary tree</a> produced during the
 course of the transformation.<span class="definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-temporary-tree" id="dt-temporary-tree" title=
-"temporary tree"></a>The term <b>temporary tree</b> means any tree
-that is neither a <a title="source tree" class="termref" href=
-"#dt-source-tree">source tree</a> nor a <a title=
-"final result tree" class="termref" href=
-"#dt-final-result-tree">final result tree</a>.<span class=
-"definition">]</span> Temporary trees are used to hold intermediate
+<p><span class="definition">[Definition: </span><a name="dt-temporary-tree" id="dt-temporary-tree" title="temporary tree" shape="rect"></a>The term <b>temporary tree</b> means any tree
+that is neither a <a title="source tree" class="termref" href="#dt-source-tree" shape="rect">source tree</a> nor a <a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result tree</a>.<span class="definition">]</span> Temporary trees are used to hold intermediate
 results during the execution of the transformation.</p>
 <p>The use of the term "tree" in phrases such as <b>source
 tree</b>, <b>result tree</b>, and <b>temporary tree</b> is not
@@ -1601,42 +1346,30 @@
 stated, the term "tree" refers to a tree rooted at a parentless
 node: that is, the term does not include subtrees of larger trees.
 Every node therefore belongs to exactly one tree.</span></p>
-<p>In this specification the phrases <span class=
-"verb">must</span>, <span class="verb">must not</span>,
+<p>In this specification the phrases <span class="verb">must</span>, <span class="verb">must not</span>,
 <span class="verb">should</span>, <span class="verb">should
-not</span>, <span class="verb">may</span>, <span class=
-"verb">required</span>, and <span class="verb">recommended</span>,
+not</span>, <span class="verb">may</span>, <span class="verb">required</span>, and <span class="verb">recommended</span>,
 <span>when used in normative text and rendered in capitals,</span>
-are to be interpreted as described in <a href=
-"#rfc2119">[RFC2119]</a>.</p>
-<p>Where the phrase <span class="verb">must</span>, <span class=
-"verb">must not</span>, or <span class="verb">required</span>
+are to be interpreted as described in <a href="#rfc2119" shape="rect">[RFC2119]</a>.</p>
+<p>Where the phrase <span class="verb">must</span>, <span class="verb">must not</span>, or <span class="verb">required</span>
 relates to the behavior of the XSLT processor, then an
 implementation is not conformant unless it behaves as specified,
-subject to the more detailed rules in <a href="#conformance"><i>26
+subject to the more detailed rules in <a href="#conformance" shape="rect"><i>26
 Conformance</i></a>.</p>
-<p>Where the phrase <span class="verb">must</span>, <span class=
-"verb">must not</span>, or <span class="verb">required</span>
-relates to a stylesheet then the processor <span class=
-"verb">must</span> enforce this constraint on stylesheets by
+<p>Where the phrase <span class="verb">must</span>, <span class="verb">must not</span>, or <span class="verb">required</span>
+relates to a stylesheet then the processor <span class="verb">must</span> enforce this constraint on stylesheets by
 reporting an error if the constraint is not satisfied.</p>
-<p>Where the phrase <span class="verb">should</span>, <span class=
-"verb">should not</span>, or <span class="verb">recommended</span>
-relates to a stylesheet then a processor <span class=
-"verb">may</span> produce warning messages if the constraint is not
+<p>Where the phrase <span class="verb">should</span>, <span class="verb">should not</span>, or <span class="verb">recommended</span>
+relates to a stylesheet then a processor <span class="verb">may</span> produce warning messages if the constraint is not
 satisfied, but <span class="verb">must not</span> treat this as an
 error.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-implementation-defined" id="dt-implementation-defined" title=
-"implementation-defined"></a>In this specification, the term
+<p><span class="definition">[Definition: </span><a name="dt-implementation-defined" id="dt-implementation-defined" title="implementation-defined" shape="rect"></a>In this specification, the term
 <b>implementation-defined</b> refers to a feature where the
 implementation is allowed some flexibility, and where the choices
 made by the implementation <span class="verb">must</span> be
 described in documentation that accompanies any conformance
 claim.<span class="definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-implementation-dependent" id="dt-implementation-dependent"
-title="implementation-dependent"></a>The term
+<p><span class="definition">[Definition: </span><a name="dt-implementation-dependent" id="dt-implementation-dependent" title="implementation-dependent" shape="rect"></a>The term
 <b>implementation-dependent</b> refers to a feature where the
 behavior <span class="verb">may</span> vary from one implementation
 to another, and where the vendor is not expected to provide a full
@@ -1650,59 +1383,39 @@
 <p>A paragraph labeled as a <b>Note</b> or described as an
 <b>example</b> is non-normative.</p>
 <p>Many terms used in this document are defined in the XPath
-specification <a href="#xpath-30">[XPath 3.0]</a> or the XDM
-specification <a href="#xpath-datamodel-30">[Data Model]</a>.
+specification <a href="#xpath-30" shape="rect">[XPath 3.0]</a> or the XDM
+specification <a href="#xpath-datamodel-30" shape="rect">[Data Model]</a>.
 Particular attention is drawn to the following:</p>
-<ul>
-<li>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-atomization" id="dt-atomization" title="atomize"></a>The term
-<b>atomization</b> is defined in <a href=
-"http://www.w3.org/TR/xpath-30/#id-atomization">Section 2.4.2
+<ul><li>
+<p><span class="definition">[Definition: </span><a name="dt-atomization" id="dt-atomization" title="atomize" shape="rect"></a>The term
+<b>atomization</b> is defined in <a href="http://www.w3.org/TR/xpath-30/#id-atomization" shape="rect">Section 2.4.2
 Atomization</a> <sup><small>XP30</small></sup>. It is a process
 that takes as input a sequence of <span>items</span>, and returns a
 sequence of atomic values, in which the nodes are replaced by their
-typed values as defined in <a href="#xpath-datamodel-30">[Data
+typed values as defined in <a href="#xpath-datamodel-30" shape="rect">[Data
 Model]</a>.<span class="definition">]</span> For some
 <span>items</span> (for example, elements with element-only
 content, <span>and function items</span>), atomization generates a
-<a title="dynamic error" class="termref" href=
-"#dt-dynamic-error">dynamic error</a>.</p>
-</li>
-<li>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-typed-value" id="dt-typed-value" title="typed value"></a>The
-term <b>typed value</b> is defined in <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dm-typed-value">Section
+<a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a>.</p>
+</li><li>
+<p><span class="definition">[Definition: </span><a name="dt-typed-value" id="dt-typed-value" title="typed value" shape="rect"></a>The
+term <b>typed value</b> is defined in <a href="http://www.w3.org/TR/xpath-datamodel-30/#dm-typed-value" shape="rect">Section
 5.15 typed-value Accessor</a> <sup><small>DM30</small></sup>. Every
 node, <span>other than an element whose type annotation identifies
-it as having</span> element-only content, has a <a title=
-"string value" class="termref" href="#dt-string-value">typed
-value</a>. For example, the <a title="typed value" class="termref"
-href="#dt-typed-value">typed value</a> of an attribute of type
+it as having</span> element-only content, has a <a title="string value" class="termref" href="#dt-string-value" shape="rect">typed
+value</a>. For example, the <a title="typed value" class="termref" href="#dt-typed-value" shape="rect">typed value</a> of an attribute of type
 <code>xs:IDREFS</code> is a sequence of zero or more
 <code>xs:IDREF</code> values.<span class="definition">]</span></p>
-</li>
-<li>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-string-value" id="dt-string-value" title="string value"></a>The
-term <b>string value</b> is defined in <a href=
-"http://www.w3.org/TR/xpath-datamodel-30/#dm-string-value">Section
+</li><li>
+<p><span class="definition">[Definition: </span><a name="dt-string-value" id="dt-string-value" title="string value" shape="rect"></a>The
+term <b>string value</b> is defined in <a href="http://www.w3.org/TR/xpath-datamodel-30/#dm-string-value" shape="rect">Section
 5.13 string-value Accessor</a> <sup><small>DM30</small></sup>.
-Every node has a <a title="string value" class="termref" href=
-"#dt-string-value">string value</a>. For example, the <a title=
-"string value" class="termref" href="#dt-string-value">string
-value</a> of an element is the concatenation of the <a title=
-"string value" class="termref" href="#dt-string-value">string
-values</a> of all its descendant text nodes.<span class=
-"definition">]</span></p>
-</li>
-<li>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-xpath-compat-mode" id="dt-xpath-compat-mode" title=
-"XPath 1.0 compatibility mode"></a>The term <b>XPath 1.0
-compatibility mode</b> is defined in <a href=
-"http://www.w3.org/TR/xpath-30/#static_context">Section 2.1.1
+Every node has a <a title="string value" class="termref" href="#dt-string-value" shape="rect">string value</a>. For example, the <a title="string value" class="termref" href="#dt-string-value" shape="rect">string
+value</a> of an element is the concatenation of the <a title="string value" class="termref" href="#dt-string-value" shape="rect">string
+values</a> of all its descendant text nodes.<span class="definition">]</span></p>
+</li><li>
+<p><span class="definition">[Definition: </span><a name="dt-xpath-compat-mode" id="dt-xpath-compat-mode" title="XPath 1.0 compatibility mode" shape="rect"></a>The term <b>XPath 1.0
+compatibility mode</b> is defined in <a href="http://www.w3.org/TR/xpath-30/#static_context" shape="rect">Section 2.1.1
 Static Context</a> <sup><small>XP30</small></sup>. This is a
 setting in the static context of an XPath expression; it has two
 values, <code>true</code> and <code>false</code>. When the value is
@@ -1710,74 +1423,46 @@
 operations are adjusted to give a greater degree of backwards
 compatibility between <span>XPath 3.0</span> and XPath
 1.0.<span class="definition">]</span></p>
-</li>
-</ul>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-core-function" id="dt-core-function" title=
-"core function"></a>The <b>core functions</b> are: functions
-specified in <a href="#xpath-functions-30">[Functions and
-Operators]</a> in either the <a title="standard function namespace"
-class="termref" href="#dt-standard-function-namespace">standard
+</li></ul>
+<p><span class="definition">[Definition: </span><a name="dt-core-function" id="dt-core-function" title="core function" shape="rect"></a>The <b>core functions</b> are: functions
+specified in <a href="#xpath-functions-30" shape="rect">[Functions and
+Operators]</a> in either the <a title="standard function namespace" class="termref" href="#dt-standard-function-namespace" shape="rect">standard
 function namespace</a> <span>or the namespace
 <code>http://www.w3.org/2005/xpath-functions/math</code>; plus
 functions defined in this specification in namespace
 <code>http://www.w3.org/2005/xpath-functions/map</code></span>.<span class="definition">]</span></p>
 </div>
 <div class="div2">
-<h3><a name="notation" id="notation"></a>2.2 <a href="#notation"
-style="text-decoration: none">Notation</a></h3>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-xslt-element" id="dt-xslt-element" title="XSLT element"></a>An
-<b>XSLT element</b> is an element in the <a title="XSLT namespace"
-class="termref" href="#dt-xslt-namespace">XSLT namespace</a> whose
-syntax and semantics are defined in this specification.<span class=
-"definition">]</span> For a non-normative list of XSLT elements,
-see <a href="#element-syntax-summary"><i>D Element Syntax
+<h3><a name="notation" id="notation" shape="rect"></a>2.2 <a href="#notation" style="text-decoration: none" shape="rect">Notation</a></h3>
+<p><span class="definition">[Definition: </span><a name="dt-xslt-element" id="dt-xslt-element" title="XSLT element" shape="rect"></a>An
+<b>XSLT element</b> is an element in the <a title="XSLT namespace" class="termref" href="#dt-xslt-namespace" shape="rect">XSLT namespace</a> whose
+syntax and semantics are defined in this specification.<span class="definition">]</span> For a non-normative list of XSLT elements,
+see <a href="#element-syntax-summary" shape="rect"><i>D Element Syntax
 Summary</i></a>.</p>
-<p>In this document the specification of each <a title=
-"XSLT element" class="termref" href="#dt-xslt-element">XSLT
+<p>In this document the specification of each <a title="XSLT element" class="termref" href="#dt-xslt-element" shape="rect">XSLT
 element</a> is preceded by a summary of its syntax in the form of a
 model for elements of that element type. A full list of all these
-specifications can be found in <a href=
-"#element-syntax-summary"><i>D Element Syntax Summary</i></a>. The
+specifications can be found in <a href="#element-syntax-summary" shape="rect"><i>D Element Syntax Summary</i></a>. The
 meaning of the syntax summary notation is as follows:</p>
-<ul>
-<li>
+<ul><li>
 <p>An attribute that is <span class="verb">required</span> is shown
 with its name in bold. An attribute that may be omitted is shown
 with a question mark following its name.</p>
-</li>
-<li>
-<p>An attribute that is <a title="deprecated" class="termref" href=
-"#dt-deprecated">deprecated</a> is shown in a grayed font within
+</li><li>
+<p>An attribute that is <a title="deprecated" class="termref" href="#dt-deprecated" shape="rect">deprecated</a> is shown in a grayed font within
 square brackets.</p>
-</li>
-<li>
+</li><li>
 <p>The string that occurs in the place of an attribute value
 specifies the allowed values of the attribute. If this is
 surrounded by curly brackets (<code>{...}</code>), then the
-attribute value is treated as an <a title=
-"attribute value template" class="termref" href=
-"#dt-attribute-value-template">attribute value template</a>, and
+attribute value is treated as an <a title="attribute value template" class="termref" href="#dt-attribute-value-template" shape="rect">attribute value template</a>, and
 the string occurring within curly brackets specifies the allowed
 values of the result of evaluating the attribute value template.
 Alternative allowed values are separated by <code>|</code>. A
 quoted string indicates a value equal to that specific string. An
 unquoted, italicized name specifies a particular type of value.</p>
 <p>The types used are as follows:</p>
-<table summary=
-"Types used in element syntax summaries, and their meaning" border=
-"1" cellpadding="5" width="100%">
-<thead>
-<tr>
-<th colspan="1" align="left" valign="top">Type name</th>
-<th colspan="1" align="left" valign="top">Meaning</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top">boolean</td>
-<td align="left" valign="top">One of the strings
+<table summary="Types used in element syntax summaries, and their meaning" border="1" cellpadding="5" width="100%"><thead><tr><th colspan="1" align="left" valign="top" rowspan="1">Type name</th><th colspan="1" align="left" valign="top" rowspan="1">Meaning</th></tr></thead><tbody><tr><td align="left" valign="top" rowspan="1" colspan="1">boolean</td><td align="left" valign="top" rowspan="1" colspan="1">One of the strings
 <code>"yes"</code>, <code>"true"</code>, or <code>"1"</code> to
 indicate the value <code>true</code>, or one of the strings
 <code>"no"</code>, <code>"false"</code>, or <code>"0"</code> to
@@ -1787,235 +1472,116 @@
 interpreted as meaning "If the attribute named
 <code>required</code> is present, and has the value
 <code>yes</code>, <code>true</code>, or <code>1</code> (after
-stripping leading and trailing whitespace) ...".</td>
-</tr>
-<tr>
-<td align="left" valign="top">string</td>
-<td align="left" valign="top">Any string</td>
-</tr>
-<tr>
-<td align="left" valign="top">expression</td>
-<td align="left" valign="top">An XPath <a title="expression" class=
-"termref" href="#dt-expression">expression</a></td>
-</tr>
-<tr>
-<td align="left" valign="top">pattern</td>
-<td align="left" valign="top">A <a title="pattern" class="termref"
-href="#dt-pattern">pattern</a> as described in <a href=
-"#patterns"><i>5.6 Patterns</i></a>.</td>
-</tr>
-<tr>
-<td align="left" valign="top">sequence-type</td>
-<td align="left" valign="top">A <a href=
-"http://www.w3.org/TR/xpath-30/#prod-xpath30-SequenceType">SequenceType</a><sup><small>XP30</small></sup>
-as defined in the XPath specification</td>
-</tr>
-<tr>
-<td align="left" valign="top">uri; uris</td>
-<td align="left" valign="top">A URI, for example a namespace URI or
-a collation URI; a whitespace-separated list of URIs</td>
-</tr>
-<tr>
-<td align="left" valign="top">qname</td>
-<td align="left" valign="top">A <a title="lexical QName" class=
-"termref" href="#dt-lexical-qname">lexical QName</a> as defined in
-<a href="#qname"><i>5.1 Qualified Names</i></a></td>
-</tr>
-<tr>
-<td align="left" valign="top">eqname; eqnames</td>
-<td align="left" valign="top">An <a title="EQName" class="termref"
-href="#dt-eqname">EQName</a> as defined in <a href="#qname"><i>5.1
+stripping leading and trailing whitespace) ...".</td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">string</td><td align="left" valign="top" rowspan="1" colspan="1">Any string</td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">expression</td><td align="left" valign="top" rowspan="1" colspan="1">An XPath <a title="expression" class="termref" href="#dt-expression" shape="rect">expression</a></td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">pattern</td><td align="left" valign="top" rowspan="1" colspan="1">A <a title="pattern" class="termref" href="#dt-pattern" shape="rect">pattern</a> as described in <a href="#patterns" shape="rect"><i>5.6 Patterns</i></a>.</td></tr><tr><td class="diff-add" rowspan="1" colspan="1" align="left" valign="top" id="bug27806a" title="Bug 27806">item-type</td><td class="diff-add" rowspan="1" colspan="1" align="left" valign="top" id="bug27806b" title="Bug 27806">An <a href="http://www.w3.org/TR/xpath-30/#prod-xpath30-ItemType" shape="rect">ItemType</a><sup><small>XP30</small></sup>
+as defined in the XPath specification</td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">sequence-type</td><td align="left" valign="top" rowspan="1" colspan="1">A <a href="http://www.w3.org/TR/xpath-30/#prod-xpath30-SequenceType" shape="rect">SequenceType</a><sup><small>XP30</small></sup>
+as defined in the XPath specification</td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">uri; uris</td><td align="left" valign="top" rowspan="1" colspan="1">A URI, for example a namespace URI or
+a collation URI; a whitespace-separated list of URIs</td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">qname</td><td align="left" valign="top" rowspan="1" colspan="1">A <a title="lexical QName" class="termref" href="#dt-lexical-qname" shape="rect">lexical QName</a> as defined in
+<a href="#qname" shape="rect"><i>5.1 Qualified Names</i></a></td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">eqname; eqnames</td><td align="left" valign="top" rowspan="1" colspan="1">An <a title="EQName" class="termref" href="#dt-eqname" shape="rect">EQName</a> as defined in <a href="#qname" shape="rect"><i>5.1
 Qualified Names</i></a>; a whitespace-separated list of
-EQNames</td>
-</tr>
-<tr>
-<td align="left" valign="top">token; tokens</td>
-<td align="left" valign="top">A string containing no significant
-whitespace; a whitespace-separated list of such strings</td>
-</tr>
-<tr>
-<td align="left" valign="top">nmtoken; nmtokens</td>
-<td align="left" valign="top">A string conforming to the XML schema
+EQNames</td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">token; tokens</td><td align="left" valign="top" rowspan="1" colspan="1">A string containing no significant
+whitespace; a whitespace-separated list of such strings</td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">nmtoken; nmtokens</td><td align="left" valign="top" rowspan="1" colspan="1">A string conforming to the XML schema
 rules for the type <code>xs:NMTOKEN</code>; a whitespace-separated
-list of such strings.</td>
-</tr>
-<tr>
-<td align="left" valign="top">char</td>
-<td align="left" valign="top">A string comprising a single Unicode
-character</td>
-</tr>
-<tr>
-<td align="left" valign="top">integer</td>
-<td align="left" valign="top">An integer, that is a string in the
-lexical space of the schema type <code>xs:integer</code></td>
-</tr>
-<tr>
-<td align="left" valign="top">decimal</td>
-<td align="left" valign="top">A decimal value, that is a string in
-the lexical space of the schema type <code>xs:decimal</code></td>
-</tr>
-<tr>
-<td align="left" valign="top">ncname</td>
-<td align="left" valign="top">An unprefixed name: a string in the
-value space of the schema type <code>xs:NCName</code></td>
-</tr>
-<tr>
-<td align="left" valign="top">prefix</td>
-<td align="left" valign="top">An <code>xs:NCName</code>
+list of such strings.</td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">char</td><td align="left" valign="top" rowspan="1" colspan="1">A string comprising a single Unicode
+character</td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">integer</td><td align="left" valign="top" rowspan="1" colspan="1">An integer, that is a string in the
+lexical space of the schema type <code>xs:integer</code></td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">decimal</td><td align="left" valign="top" rowspan="1" colspan="1">A decimal value, that is a string in
+the lexical space of the schema type <code>xs:decimal</code></td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">ncname</td><td align="left" valign="top" rowspan="1" colspan="1">An unprefixed name: a string in the
+value space of the schema type <code>xs:NCName</code></td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">prefix</td><td align="left" valign="top" rowspan="1" colspan="1">An <code>xs:NCName</code>
 representing a namespace prefix, which must be in scope for the
-element on which it appears</td>
-</tr>
-<tr>
-<td align="left" valign="top">id</td>
-<td align="left" valign="top">An <code>xs:NCName</code> used as a
+element on which it appears</td></tr><tr><td align="left" valign="top" rowspan="1" colspan="1">id</td><td align="left" valign="top" rowspan="1" colspan="1">An <code>xs:NCName</code> used as a
 unique identifier for an element in the containing XML
-document</td>
-</tr>
-</tbody>
-</table>
+document</td></tr></tbody></table>
 <p>Except where the set of allowed values of an attribute is
 specified using the italicized name <em>string</em> or
 <em>char</em>, leading and trailing whitespace in the attribute
-value is ignored. In the case of an <a title=
-"attribute value template" class="termref" href=
-"#dt-attribute-value-template">attribute value template</a>, this
-applies to the <a title="effective value" class="termref" href=
-"#dt-effective-value">effective value</a> obtained when the
+value is ignored. In the case of an <a title="attribute value template" class="termref" href="#dt-attribute-value-template" shape="rect">attribute value template</a>, this
+applies to the <a title="effective value" class="termref" href="#dt-effective-value" shape="rect">effective value</a> obtained when the
 attribute value template is expanded.</p>
-</li>
-<li>
+</li><li>
 <p>Unless the element is <span class="verb">required</span> to be
 empty, the model element contains a comment specifying the allowed
 content. The allowed content is specified in a similar way to an
 element type declaration in XML; <em>sequence constructor</em>
-means that any mixture of text nodes, <a title=
-"literal result element" class="termref" href=
-"#dt-literal-result-element">literal result elements</a>, <a title=
-"extension instruction" class="termref" href=
-"#dt-extension-instruction">extension instructions</a>, and
-<a title="XSLT element" class="termref" href=
-"#dt-xslt-element">XSLT elements</a> from the <a title=
-"instruction" class="termref" href=
-"#dt-instruction">instruction</a> category is allowed;
+means that any mixture of text nodes, <a title="literal result element" class="termref" href="#dt-literal-result-element" shape="rect">literal result elements</a>, <a title="extension instruction" class="termref" href="#dt-extension-instruction" shape="rect">extension instructions</a>, and
+<a title="XSLT element" class="termref" href="#dt-xslt-element" shape="rect">XSLT elements</a> from the <a title="instruction" class="termref" href="#dt-instruction" shape="rect">instruction</a> category is allowed;
 <em>other-declarations</em> means that any mixture of XSLT elements
-from the <a title="declaration" class="termref" href=
-"#dt-declaration">declaration</a> category is allowed, together
-with <a title="user-defined data element" class="termref" href=
-"#dt-data-element">user-defined data elements</a>.</p>
-</li>
-<li>
+from the <a title="declaration" class="termref" href="#dt-declaration" shape="rect">declaration</a> category is allowed, together
+with <a title="user-defined data element" class="termref" href="#dt-data-element" shape="rect">user-defined data elements</a>.</p>
+</li><li>
 <p>The element is prefaced by comments indicating if it belongs to
 the <code>instruction</code> category or <code>declaration</code>
 category or both. The category of an element only affects whether
-it is allowed in the content of elements that allow a <a title=
-"sequence constructor" class="termref" href=
-"#dt-sequence-constructor">sequence constructor</a> or
+it is allowed in the content of elements that allow a <a title="sequence constructor" class="termref" href="#dt-sequence-constructor" shape="rect">sequence constructor</a> or
 <em>other-declarations</em>.</p>
-</li>
-</ul>
-<div class="example">
-<div class="exampleHeader"><a name="d7e1093" id=
-"d7e1093"></a>Example: Syntax Notation</div>
-<p>This example illustrates the notation used to describe <a title=
-"XSLT element" class="termref" href="#dt-xslt-element">XSLT
+</li></ul>
+<div class="example">
+<div class="exampleHeader"><a name="d7e1188" id="d7e1188" shape="rect"></a>Example: Syntax Notation</div>
+<p>This example illustrates the notation used to describe <a title="XSLT element" class="termref" href="#dt-xslt-element" shape="rect">XSLT
 elements</a>.</p>
-<p class="element-syntax"><a name="element-example-element" id=
-"element-example-element"></a><code>&lt;!-- Category: instruction
---&gt;<br />
-&lt;xsl:example-element<br />
-&#160;&#160;<b>select</b> = <var>expression</var><br />
-&#160;&#160;debug? = <var>boolean</var><br />
-&#160;&#160;validation? = { "strict" | "lax" }&#160;&gt;<br />
-&#160;&#160;&lt;!-- Content: ((<a href=
-"#element-variable">xsl:variable</a> | <a href=
-"#element-param">xsl:param</a>)*, <a href=
-"#element-sequence">xsl:sequence</a>) --&gt;<br />
+<p class="element-syntax"><a name="element-example-element" id="element-example-element" shape="rect"></a><code>&lt;!-- Category: instruction
+--&gt;<br clear="none" />
+&lt;xsl:example-element<br clear="none" />
+  <b>select</b> = <var>expression</var><br clear="none" />
+  debug? = <var>boolean</var><br clear="none" />
+  validation? = { "strict" | "lax" } &gt;<br clear="none" />
+  &lt;!-- Content: ((<a href="#element-variable" shape="rect">xsl:variable</a> | <a href="#element-param" shape="rect">xsl:param</a>)*, <a href="#element-sequence" shape="rect">xsl:sequence</a>) --&gt;<br clear="none" />
 &lt;/xsl:example-element&gt;</code></p>
 <p>This example defines a (non-existent) element
 <code>xsl:example-element</code>. The element is classified as an
 instruction. It takes the following attributes:</p>
-<ol class="enumar">
-<li>
+<ol class="enumar"><li>
 <p>A mandatory <code>select</code> attribute, whose value is an
-XPath <a title="expression" class="termref" href=
-"#dt-expression">expression</a></p>
-</li>
-<li>
+XPath <a title="expression" class="termref" href="#dt-expression" shape="rect">expression</a></p>
+</li><li>
 <p>An optional <code>debug</code> attribute, whose value
 <span class="verb">must</span> be <code>yes</code>,
 <code>true</code>, or <code>1</code> to indicate <code>true</code>,
 or <code>no</code>, <code>false</code>, or <code>0</code> to
 indicate <code>false</code>.</p>
-</li>
-<li>
+</li><li>
 <p>An optional <code>validation</code> attribute, whose value must
 be <code>strict</code> or <code>lax</code>; the curly brackets
-indicate that the value can be defined as an <a title=
-"attribute value template" class="termref" href=
-"#dt-attribute-value-template">attribute value template</a>,
+indicate that the value can be defined as an <a title="attribute value template" class="termref" href="#dt-attribute-value-template" shape="rect">attribute value template</a>,
 allowing a value such as <code>validation="{$val}"</code>, where
-the <a title="variable" class="termref" href=
-"#dt-variable">variable</a> <code>val</code> is evaluated to yield
+the <a title="variable" class="termref" href="#dt-variable" shape="rect">variable</a> <code>val</code> is evaluated to yield
 <code>"strict"</code> or <code>"lax"</code> at run-time.</p>
-</li>
-</ol>
+</li></ol>
 <p>The content of an <code>xsl:example-element</code> instruction
-is defined to be a sequence of zero or more <a href=
-"#element-variable"><code>xsl:variable</code></a> and <a href=
-"#element-param"><code>xsl:param</code></a> elements, followed by
-an <a href="#element-sequence"><code>xsl:sequence</code></a>
+is defined to be a sequence of zero or more <a href="#element-variable" shape="rect"><code>xsl:variable</code></a> and <a href="#element-param" shape="rect"><code>xsl:param</code></a> elements, followed by
+an <a href="#element-sequence" shape="rect"><code>xsl:sequence</code></a>
 element.</p>
 </div>
-<p><a name="err-XTSE0010" id="err-XTSE0010"><span class=
-"error">[ERR XTSE0010]</span></a> It is a <a title="static error"
-class="termref" href="#dt-static-error">static error</a> if an
+<p><a name="err-XTSE0010" id="err-XTSE0010" shape="rect"><span class="error">[ERR XTSE0010]</span></a> It is a <a title="static error" class="termref" href="#dt-static-error" shape="rect">static error</a> if an
 XSLT-defined element is used in a context where it is not
 permitted, if a <span class="verb">required</span> attribute is
 omitted, or if the content of the element does not correspond to
 the content that is allowed for the element.</p>
 <p>The rules in the element syntax summary (both for the element
 structure and for its attributes) apply to the stylesheet content
-after preprocessing as described in <a href=
-"#preprocessing"><i>3.14 Stylesheet Preprocessing</i></a>.</p>
+after preprocessing as described in <a href="#preprocessing" shape="rect"><i>3.14 Stylesheet Preprocessing</i></a>.</p>
 <p>Attributes are validated as follows. These rules apply to the
 value of the attribute after removing leading and trailing
 whitespace.</p>
-<ul>
-<li>
-<p><a name="err-XTSE0020" id="err-XTSE0020"><span class=
-"error">[ERR XTSE0020]</span></a> It is a <a title="static error"
-class="termref" href="#dt-static-error">static error</a> if an
+<ul><li>
+<p><a name="err-XTSE0020" id="err-XTSE0020" shape="rect"><span class="error">[ERR XTSE0020]</span></a> It is a <a title="static error" class="termref" href="#dt-static-error" shape="rect">static error</a> if an
 attribute (other than an attribute written using curly brackets in
-a position where an <a title="attribute value template" class=
-"termref" href="#dt-attribute-value-template">attribute value
+a position where an <a title="attribute value template" class="termref" href="#dt-attribute-value-template" shape="rect">attribute value
 template</a> is permitted) contains a value that is not one of the
 permitted values for that attribute.</p>
-</li>
-<li>
-<p><a name="err-XTDE0030" id="err-XTDE0030"><span class=
-"error">[ERR XTDE0030]</span></a> It is a <a title="dynamic error"
-class="termref" href="#dt-dynamic-error">dynamic error</a> if the
-<a title="effective value" class="termref" href=
-"#dt-effective-value">effective value</a> of an attribute written
-using curly brackets, in a position where an <a title=
-"attribute value template" class="termref" href=
-"#dt-attribute-value-template">attribute value template</a> is
+</li><li>
+<p><a name="err-XTDE0030" id="err-XTDE0030" shape="rect"><span class="error">[ERR XTDE0030]</span></a> It is a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> if the
+<a title="effective value" class="termref" href="#dt-effective-value" shape="rect">effective value</a> of an attribute written
+using curly brackets, in a position where an <a title="attribute value template" class="termref" href="#dt-attribute-value-template" shape="rect">attribute value template</a> is
 permitted, is a value that is not one of the permitted values for
 that attribute. If the processor is able to detect the error
 statically (for example, when any XPath expressions within the
 curly brackets can be evaluated statically), then the processor may
 optionally signal this as a static error.</p>
-</li>
-</ul>
+</li></ul>
 <p>Special rules apply if the construct appears in part of the
-<a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> that is processed with <a title=
-"forwards compatible behavior" class="termref" href=
-"#dt-forwards-compatible-behavior">forwards compatible
-behavior</a>: see <a href="#forwards"><i>3.11 Forwards Compatible
+<a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> that is processed with <a title="forwards compatible behavior" class="termref" href="#dt-forwards-compatible-behavior" shape="rect">forwards compatible
+behavior</a>: see <a href="#forwards" shape="rect"><i>3.11 Forwards Compatible
 Processing</i></a>.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-deprecated" id="dt-deprecated" title="deprecated"></a>Some
+<p><span class="definition">[Definition: </span><a name="dt-deprecated" id="dt-deprecated" title="deprecated" shape="rect"></a>Some
 constructs defined in this specification are described as being
 <b>deprecated</b>. The use of this term implies that stylesheet
 authors <span class="verb">should not</span> use the construct, and
@@ -2024,71 +1590,56 @@
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
 <p>This working draft includes a non-normative XML Schema for XSLT
-<a title="stylesheet module" class="termref" href=
-"#dt-stylesheet-module">stylesheet modules</a> (see <a href=
-"#schema-for-xslt"><i>H Schema for XSLT Stylesheets</i></a>). The
+<a title="stylesheet module" class="termref" href="#dt-stylesheet-module" shape="rect">stylesheet modules</a> (see <a href="#schema-for-xslt" shape="rect"><i>H Schema for XSLT Stylesheets</i></a>). The
 syntax summaries described in this section are normative.</p>
 </div>
 <p>XSLT defines a set of standard functions which are additional to
-those defined in <a href="#xpath-functions-30">[Functions and
-Operators]</a>. <span>A list of these functions appears in <a href=
-"#XSLT-defined-functions"><i>G List of XSLT-defined
+those defined in <a href="#xpath-functions-30" shape="rect">[Functions and
+Operators]</a>. <span>A list of these functions appears in <a href="#XSLT-defined-functions" shape="rect"><i>G List of XSLT-defined
 functions</i></a>.</span> The signatures of these functions are
-described using the same notation as used in <a href=
-"#xpath-functions-30">[Functions and Operators]</a>. The names of
-<span>many of</span> these functions are in the <a title=
-"standard function namespace" class="termref" href=
-"#dt-standard-function-namespace">standard function
+described using the same notation as used in <a href="#xpath-functions-30" shape="rect">[Functions and Operators]</a>. The names of
+<span>many of</span> these functions are in the <a title="standard function namespace" class="termref" href="#dt-standard-function-namespace" shape="rect">standard function
 namespace</a>.</p>
 </div>
 <div class="div2">
-<h3><a name="initiating" id="initiating"></a>2.3 <a href=
-"#initiating" style="text-decoration: none">Initiating a
+<h3><a name="initiating" id="initiating" shape="rect"></a>2.3 <a href="#initiating" style="text-decoration: none" shape="rect">Initiating a
 Transformation</a></h3>
 <p>This document does not specify any application programming
 interfaces or other interfaces for initiating a transformation.
 This section, however, describes the information that is supplied
 when a transformation is initiated. Except where otherwise
-indicated, the information is <span class=
-"verb">required</span>.</p>
+indicated, the information is <span class="verb">required</span>.</p>
 <p>The execution of a stylesheet necessarily involves two
 activities: static analysis and dynamic evaluation. Static analysis
 consists of those tasks that can be performed by inspection of the
-stylesheet alone, including <span>the binding of <a title=
-"static variable" class="termref" href="#dt-static-variable">static
+stylesheet alone, including <span>the binding of <a title="static variable" class="termref" href="#dt-static-variable" shape="rect">static
 variables</a>,</span> the evaluation of <code>[xsl:]use-when</code>
-expressions (see <a href="#conditional-inclusion"><i>3.14.1
+expressions (see <a href="#conditional-inclusion" shape="rect"><i>3.14.1
 Conditional Element Inclusion</i></a>), <span>and shadow attributes
-(see <a href="#shadow-attributes"><i>3.14.2 Shadow
-Attributes</i></a>)</span> and detection of <a title="static error"
-class="termref" href="#dt-static-error">static errors</a>. Dynamic
+(see <a href="#shadow-attributes" shape="rect"><i>3.14.2 Shadow
+Attributes</i></a>)</span> and detection of <a title="static error" class="termref" href="#dt-static-error" shape="rect">static errors</a>. Dynamic
 evaluation consists of tasks which in general cannot be carried out
 until a source document is available.</p>
 <p>Dynamic evaluation is further divided into two activities:
 <b>priming</b> the stylesheet, and <b>invoking</b> a selected
 component.</p>
-<ul>
-<li>
+<ul><li>
 <p>Priming the stylesheet provides the dynamic context for
 evaluation, and supplies all the information needed to establish
 the values of global variables.</p>
-</li>
-<li>
+</li><li>
 <p>Invoking a component (such as a template or function) causes
 evaluation of that template or function to produce a result, which
 is an arbitrary XDM value.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-raw-result" id="dt-raw-result" title="raw result"></a>The
+<p><span class="definition">[Definition: </span><a name="dt-raw-result" id="dt-raw-result" title="raw result" shape="rect"></a>The
 result of invoking the selected component, after any required
 conversion to the declared result type of the component, is
-referred to as the <b>raw result</b>.<span class=
-"definition">]</span></p>
+referred to as the <b>raw result</b>.<span class="definition">]</span></p>
 <p>This raw result may optionally be post-processed to construct a
 result tree, to serialize the result, or both, as described in
-<a href="#post-processing"><i>2.3.6 Post-processing the Raw
+<a href="#post-processing" shape="rect"><i>2.3.6 Post-processing the Raw
 Result</i></a>.</p>
-</li>
-</ul>
+</li></ul>
 <p>Implementations <span class="verb">may</span> allow static
 analysis and dynamic evaluation to be initiated independently, so
 that the cost of static analysis can be amortized over multiple
@@ -2102,7 +1653,7 @@
 proceed, information that is needed to prime the stylesheet, and
 information that is needed when invoking components.</span></p>
 <p>The language is designed to allow the static analysis of each
-<a title="package" class="termref" href="#dt-package">package</a>
+<a title="package" class="termref" href="#dt-package" shape="rect">package</a>
 to be performed independently of other packages, with only basic
 knowledge of the properties of components made available by used
 packages. Beyond this, the specification leaves it to
@@ -2110,54 +1661,35 @@
 packages are not used explicitly, the entire stylesheet is treated
 as a single package.</p>
 <div class="div3">
-<h4><a name="info-for-static-analysis" id=
-"info-for-static-analysis"></a>2.3.1 <a href=
-"#info-for-static-analysis" style=
-"text-decoration: none">Information needed for Static
+<h4><a name="info-for-static-analysis" id="info-for-static-analysis" shape="rect"></a>2.3.1 <a href="#info-for-static-analysis" style="text-decoration: none" shape="rect">Information needed for Static
 Analysis</a></h4>
 <p>The following information is needed prior to static analysis
 <span>of a package</span>:</p>
-<ul>
-<li>
-<p>The location of the <a title="package manifest" class="termref"
-href="#dt-package-manifest">package manifest</a>, or in the absence
-of a package manifest, the <a title="stylesheet module" class=
-"termref" href="#dt-stylesheet-module">stylesheet module</a> that
-is to act as the <a title="principal stylesheet module" class=
-"termref" href="#dt-principal-stylesheet-module">principal
-stylesheet module</a> <span>of the <a title="package" class=
-"termref" href="#dt-package">package</a></span>. The complete
-<a title="package" class="termref" href="#dt-package">package</a>
-is assembled by recursively expanding the <a href=
-"#element-import"><code>xsl:import</code></a> and <a href=
-"#element-include"><code>xsl:include</code></a> declarations in the
-principal stylesheet module, as described in <a href=
-"#include"><i>3.12.2 Stylesheet Inclusion</i></a> and <a href=
-"#import"><i>3.12.3 Stylesheet Import</i></a>.</p>
-</li>
-<li>
+<ul><li>
+<p>The location of the <a title="package manifest" class="termref" href="#dt-package-manifest" shape="rect">package manifest</a>, or in the absence
+of a package manifest, the <a title="stylesheet module" class="termref" href="#dt-stylesheet-module" shape="rect">stylesheet module</a> that
+is to act as the <a title="principal stylesheet module" class="termref" href="#dt-principal-stylesheet-module" shape="rect">principal
+stylesheet module</a> <span>of the <a title="package" class="termref" href="#dt-package" shape="rect">package</a></span>. The complete
+<a title="package" class="termref" href="#dt-package" shape="rect">package</a>
+is assembled by recursively expanding the <a href="#element-import" shape="rect"><code>xsl:import</code></a> and <a href="#element-include" shape="rect"><code>xsl:include</code></a> declarations in the
+principal stylesheet module, as described in <a href="#include" shape="rect"><i>3.12.2 Stylesheet Inclusion</i></a> and <a href="#import" shape="rect"><i>3.12.3 Stylesheet Import</i></a>.</p>
+</li><li>
 <p>Information about the packages referenced from this package
-using <a href=
-"#element-use-package"><code>xsl:use-package</code></a>
+using <a href="#element-use-package" shape="rect"><code>xsl:use-package</code></a>
 declarations. The information needed will include the names and
 signatures of public components exported by the referenced
 package.</p>
-</li>
-<li>
-<p>A set (possibly empty) of values for <a title="static parameter"
-class="termref" href="#dt-static-parameter">static parameters</a>
-(see <a href="#global-variables"><i>9.5 Global Variables and
+</li><li>
+<p>A set (possibly empty) of values for <a title="static parameter" class="termref" href="#dt-static-parameter" shape="rect">static parameters</a>
+(see <a href="#global-variables" shape="rect"><i>9.5 Global Variables and
 Parameters</i></a>). These values are available for use within
-<a title="static expression" class="termref" href=
-"#dt-static-expression">static expressions</a> (notably in
+<a title="static expression" class="termref" href="#dt-static-expression" shape="rect">static expressions</a> (notably in
 <code>[xsl:]use-when</code> expressions and shadow attributes) as
-well as non-static expressions in the <a title="stylesheet" class=
-"termref" href="#dt-stylesheet">stylesheet</a>. As a minimum,
+well as non-static expressions in the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>. As a minimum,
 values <span class="verb">must</span> be supplied for any static
 parameters declared with the attribute
 <code>required="yes"</code>.</p>
-</li>
-</ul>
+</li></ul>
 <p>Conceptually, the output of the static analysis of a package is
 an object which might be referred to (without constraining the
 implementation) as a compiled package. Prior to dynamic evaluation,
@@ -2167,28 +1699,21 @@
 implementation, as linking.</p>
 </div>
 <div class="div3">
-<h4><a name="priming-stylesheet" id="priming-stylesheet"></a>2.3.2
-<a href="#priming-stylesheet" style="text-decoration: none">Priming
+<h4><a name="priming-stylesheet" id="priming-stylesheet" shape="rect"></a>2.3.2
+<a href="#priming-stylesheet" style="text-decoration: none" shape="rect">Priming
 a Stylesheet</a></h4>
 <p>The information needed when priming a stylesheet is as
 follows:</p>
-<ul>
-<li>
+<ul><li>
 <p>A set (possibly empty) of values for <span>non-static</span>
-<a title="stylesheet parameter" class="termref" href=
-"#dt-stylesheet-parameter">stylesheet parameters</a> (see <a href=
-"#global-variables"><i>9.5 Global Variables and
+<a title="stylesheet parameter" class="termref" href="#dt-stylesheet-parameter" shape="rect">stylesheet parameters</a> (see <a href="#global-variables" shape="rect"><i>9.5 Global Variables and
 Parameters</i></a>). These values are available for use within
-<a title="expression" class="termref" href=
-"#dt-expression">expressions</a> in the <a title="stylesheet"
-class="termref" href="#dt-stylesheet">stylesheet</a>. As a minimum,
+<a title="expression" class="termref" href="#dt-expression" shape="rect">expressions</a> in the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>. As a minimum,
 values <span class="verb">must</span> be supplied for any
 parameters declared with the attribute
 <code>required="yes"</code>.</p>
 <p>A supplied value is converted if necessary to the declared type
-of the stylesheet parameter using the <a title=
-"function conversion rules" class="termref" href=
-"#dt-function-conversion-rules">function conversion rules</a>.</p>
+of the stylesheet parameter using the <a title="function conversion rules" class="termref" href="#dt-function-conversion-rules" shape="rect">function conversion rules</a>.</p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
 <p>Non-static stylesheet parameters must be <code>public</code>,
@@ -2198,95 +1723,60 @@
 contrast, can have names that are duplicated across different
 packages.</p>
 </div>
-</li>
-<li>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-global-context-item" id="dt-global-context-item" title=
-"global context item"></a><span>An item that acts as the <b>global
+</li><li>
+<p><span class="definition">[Definition: </span><a name="dt-global-context-item" id="dt-global-context-item" title="global context item" shape="rect"></a><span>An item that acts as the <b>global
 context item</b> for the transformation.</span> This item is
-accessible as the initial value of the XPath <a title="expression"
-class="termref" href="#dt-expression">expressions</a>
+accessible as the initial value of the XPath <a title="expression" class="termref" href="#dt-expression" shape="rect">expressions</a>
 <code>.</code> (dot) and <code>self::node()</code> <span>appearing
 within the <code>select</code> expression or sequence constructor
-of a <a title="global variable" class="termref" href=
-"#dt-global-variable">global variable</a> declaration</span>
-<span>within the <a title="top-level package" class="termref" href=
-"#dt-top-level-package">top-level package</a></span>, as described
-in <a href="#focus"><i>5.4.3.1 Maintaining Position: the
+of a <a title="global variable" class="termref" href="#dt-global-variable" shape="rect">global variable</a> declaration</span>
+<span>within the <a title="top-level package" class="termref" href="#dt-top-level-package" shape="rect">top-level package</a></span>, as described
+in <a href="#focus" shape="rect"><i>5.4.3.1 Maintaining Position: the
 Focus</i></a>. <span class="definition">]</span></p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
 <p>In previous releases of this specification, a single node was
 typically supplied to represent the source document for the
 transformation. This node was used as the target node for the
-implicit call on <a href=
-"#element-apply-templates"><code>xsl:apply-templates</code></a>
-used to start the transformation process (now called the <a title=
-"initial match selection" class="termref" href=
-"#dt-initial-match-selection">initial match selection</a>), and the
+implicit call on <a href="#element-apply-templates" shape="rect"><code>xsl:apply-templates</code></a>
+used to start the transformation process (now called the <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match selection</a>), and the
 root node of the containing tree was used as the context item for
-evaluation of global variables (now called the <a title=
-"global context item" class="termref" href=
-"#dt-global-context-item">global context item</a>). This
-relationship between the <a title="initial match selection" class=
-"termref" href="#dt-initial-match-selection">initial match
-selection</a> and the <a title="global context item" class=
-"termref" href="#dt-global-context-item">global context item</a> is
+evaluation of global variables (now called the <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context item</a>). This
+relationship between the <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match
+selection</a> and the <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context item</a> is
 likely to be found for compatibility reasons in a transformation
 API designed to work with earlier versions of this specification,
 but it is no longer a necessary relationship; the two values can in
 principle be completely independent of each other.</p>
 <p>Stylesheet authors wanting to write code that can be invoked
 using legacy APIs should not rely on the caller being able to
-supply different values for the <a title="initial match selection"
-class="termref" href="#dt-initial-match-selection">initial match
-selection</a> and the <a title="global context item" class=
-"termref" href="#dt-global-context-item">global context
+supply different values for the <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match
+selection</a> and the <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context
 item</a>.</p>
 </div>
-<p>The <a title="global context item" class="termref" href=
-"#dt-global-context-item">global context item</a> is potentially
+<p>The <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context item</a> is potentially
 used when initializing global variables and parameters. If the
-initialization of any <a title="global variable" class="termref"
-href="#dt-global-variable">global variables</a> or <a title=
-"stylesheet parameter" class="termref" href=
-"#dt-stylesheet-parameter">parameter</a> depends on the context
+initialization of any <a title="global variable" class="termref" href="#dt-global-variable" shape="rect">global variables</a> or <a title="stylesheet parameter" class="termref" href="#dt-stylesheet-parameter" shape="rect">parameter</a> depends on the context
 item, a dynamic error can occur if the context item is absent. It
-is <a title="implementation-defined" class="termref" href=
-"#dt-implementation-defined">implementation-defined</a> whether
+is <a title="implementation-defined" class="termref" href="#dt-implementation-defined" shape="rect">implementation-defined</a> whether
 this error occurs during priming of the stylesheet or subsequently
-when the variable is referenced; and it is <a title=
-"implementation-defined" class="termref" href=
-"#dt-implementation-defined">implementation-defined</a> whether the
+when the variable is referenced; and it is <a title="implementation-defined" class="termref" href="#dt-implementation-defined" shape="rect">implementation-defined</a> whether the
 error occurs at all if the variable or parameter is never
-referenced. The error can be suppressed by use of <a href=
-"#element-try"><code>xsl:try</code></a> and <a href=
-"#element-catch"><code>xsl:catch</code></a> within the
+referenced. The error can be suppressed by use of <a href="#element-try" shape="rect"><code>xsl:try</code></a> and <a href="#element-catch" shape="rect"><code>xsl:catch</code></a> within the
 <span>sequence constructor used to initialize the variable or
-parameter. It cannot be suppressed by use of <a href=
-"#element-try"><code>xsl:try</code></a> around a reference to the
+parameter. It cannot be suppressed by use of <a href="#element-try" shape="rect"><code>xsl:try</code></a> around a reference to the
 global variable.</span></p>
-<p><span>In a <a title="library package" class="termref" href=
-"#dt-library-package">library package</a>, the <a title=
-"context item" class="termref" href="#dt-context-item">context
-item</a>, <a title="context position" class="termref" href=
-"#dt-context-position">context position</a>, and <a title=
-"context size" class="termref" href="#dt-context-size">context
-size</a> used for evaluation of global variables will be <a title=
-"absent" class="termref" href="#dt-absent">absent</a>, and the
+<p><span>In a <a title="library package" class="termref" href="#dt-library-package" shape="rect">library package</a>, the <a title="context item" class="termref" href="#dt-context-item" shape="rect">context
+item</a>, <a title="context position" class="termref" href="#dt-context-position" shape="rect">context position</a>, and <a title="context size" class="termref" href="#dt-context-size" shape="rect">context
+size</a> used for evaluation of global variables will be <a title="absent" class="termref" href="#dt-absent" shape="rect">absent</a>, and the
 evaluation of any expression that references these values will
 result in a dynamic error.</span> <span>This will also be the case
-in the <a title="top-level package" class="termref" href=
-"#dt-top-level-package">top-level package</a> if no <a title=
-"global context item" class="termref" href=
-"#dt-global-context-item">global context item</a> is
+in the <a title="top-level package" class="termref" href="#dt-top-level-package" shape="rect">top-level package</a> if no <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context item</a> is
 supplied.</span></p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
 <p>If a context item is available within a global variable
-declaration, then the <a title="context position" class="termref"
-href="#dt-context-position">context position</a> and <a title=
-"context size" class="termref" href="#dt-context-size">context
+declaration, then the <a title="context position" class="termref" href="#dt-context-position" shape="rect">context position</a> and <a title="context size" class="termref" href="#dt-context-size" shape="rect">context
 size</a> will always be 1 (one).</p>
 </div>
 <div class="note">
@@ -2294,200 +1784,139 @@
 <p>For maximum reusability of code, it is best to avoid use of the
 context item when initializing global variables and parameters.
 Instead, all external information should be supplied using named
-<a title="stylesheet parameter" class="termref" href=
-"#dt-stylesheet-parameter">stylesheet parameters</a>. Especially
+<a title="stylesheet parameter" class="termref" href="#dt-stylesheet-parameter" shape="rect">stylesheet parameters</a>. Especially
 when these use namespaces to avoid conflicts, there is then no risk
 of confusion between the information supplied externally to
 different packages.</p>
 <p>When a stylesheet parameter is defined in a library package, it
 is possible for a using package to supply a value for the parameter
-by overriding the parameter declaration within an <a href=
-"#element-override"><code>xsl:override</code></a> element. If the
-using package is the <a title="top-level package" class="termref"
-href="#dt-top-level-package">top-level package</a> then the
-overriding declaration can refer to the <a title=
-"global context item" class="termref" href=
-"#dt-global-context-item">global context item</a>.</p>
-</div>
-</li>
-<li>
+by overriding the parameter declaration within an <a href="#element-override" shape="rect"><code>xsl:override</code></a> element. If the
+using package is the <a title="top-level package" class="termref" href="#dt-top-level-package" shape="rect">top-level package</a> then the
+overriding declaration can refer to the <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context item</a>.</p>
+</div>
+</li><li>
 <p>A mechanism for obtaining a document node and a media type,
 given an absolute URI. The total set of available documents
 (modeled as a mapping from URIs to document nodes) forms part of
 the context for evaluating XPath expressions, specifically the
-<a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-doc"><code>doc</code></a><sup><small>FO30</small></sup>
-function. The XSLT <a href=
-"#func-document"><code>document</code></a> function additionally
+<a href="http://www.w3.org/TR/xpath-functions-30/#func-doc" shape="rect"><code>doc</code></a><sup><small>FO30</small></sup>
+function. The XSLT <a href="#func-document" shape="rect"><code>document</code></a> function additionally
 requires the media type of the resource representation, for use in
 interpreting any fragment identifier present within a URI
 Reference.</p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
 <p>The set of documents that are available to the stylesheet is
-<a title="implementation-dependent" class="termref" href=
-"#dt-implementation-dependent">implementation-dependent</a>, as is
+<a title="implementation-dependent" class="termref" href="#dt-implementation-dependent" shape="rect">implementation-dependent</a>, as is
 the processing that is carried out to construct a tree representing
 the resource retrieved using a given URI. Some possible ways of
 constructing a document (specifically, rules for constructing a
-document from an Infoset or from a PSVI) are described in <a href=
-"#xpath-datamodel-30">[Data Model]</a>.</p>
-</div>
-</li>
-</ul>
+document from an Infoset or from a PSVI) are described in <a href="#xpath-datamodel-30" shape="rect">[Data Model]</a>.</p>
+</div>
+</li></ul>
 <p>Once a stylesheet is primed, the values of global variables
 remain stable through all component invocations. In addition,
-priming a stylesheet creates an <a href=
-"http://www.w3.org/TR/xpath-functions-30/#execution-scope">execution
+priming a stylesheet creates an <a href="http://www.w3.org/TR/xpath-functions-30/#execution-scope" shape="rect">execution
 scope</a><sup><small>FO30</small></sup> during which the dynamic
-context and all <span>calls on <a href=
-"http://www.w3.org/TR/xpath-functions-30/#dt-deterministic">deterministic</a><sup><small>FO30</small></sup>
+context and all <span>calls on <a href="http://www.w3.org/TR/xpath-functions-30/#dt-deterministic" shape="rect">deterministic</a><sup><small>FO30</small></sup>
 functions</span> remain stable; for example two calls on the
-<a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-current-dateTime"><code>
+<a href="http://www.w3.org/TR/xpath-functions-30/#func-current-dateTime" shape="rect"><code>
 current-dateTime</code></a><sup><small>FO30</small></sup> function
 within an execution scope are defined to return the same
 result.</p>
 <p>Parameters passed to the transformation by the client
 application <span>when a stylesheet is primed</span> are matched
-against <a title="stylesheet parameter" class="termref" href=
-"#dt-stylesheet-parameter">stylesheet parameters</a> (see <a href=
-"#global-variables"><i>9.5 Global Variables and
-Parameters</i></a>), not against the <a title="template parameter"
-class="termref" href="#dt-template-parameter">template
+against <a title="stylesheet parameter" class="termref" href="#dt-stylesheet-parameter" shape="rect">stylesheet parameters</a> (see <a href="#global-variables" shape="rect"><i>9.5 Global Variables and
+Parameters</i></a>), not against the <a title="template parameter" class="termref" href="#dt-template-parameter" shape="rect">template
 parameters</a> of any template executed during the course of the
 transformation.</p>
-<p><a name="err-XTDE0050" id="err-XTDE0050"><span class=
-"error">[ERR XTDE0050]</span></a> It is a <a title="dynamic error"
-class="termref" href="#dt-dynamic-error">dynamic error</a> if a
-stylesheet declares a visible <a title="stylesheet parameter"
-class="termref" href="#dt-stylesheet-parameter">stylesheet
+<p><a name="err-XTDE0050" id="err-XTDE0050" shape="rect"><span class="error">[ERR XTDE0050]</span></a> It is a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> if a
+stylesheet declares a visible <a title="stylesheet parameter" class="termref" href="#dt-stylesheet-parameter" shape="rect">stylesheet
 parameter</a> with <code>required="yes"</code> and no value for
 this parameter is supplied when the stylesheet is primed. A
 stylesheet parameter is visible if it is not masked by another
 global variable or parameter with the same name and higher
-<a title="import precedence" class="termref" href=
-"#dt-import-precedence">import precedence</a>. <span>If the
-parameter is a <a title="static parameter" class="termref" href=
-"#dt-static-parameter">static parameter</a> then the value
+<a title="import precedence" class="termref" href="#dt-import-precedence" shape="rect">import precedence</a>. <span>If the
+parameter is a <a title="static parameter" class="termref" href="#dt-static-parameter" shape="rect">static parameter</a> then the value
 <span class="verb">must</span> be supplied prior to the static
 analysis phase.</span></p>
 </div>
 <div class="div3">
-<h4><a name="invoking-initial-mode" id=
-"invoking-initial-mode"></a>2.3.3 <a href="#invoking-initial-mode"
-style="text-decoration: none">Apply-Templates Invocation</a></h4>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-initial-match-selection" id="dt-initial-match-selection" title=
-"initial match selection"></a>A stylesheet may be evaluated by
-supplying a value to be processed, together with an <a title=
-"initial mode" class="termref" href="#dt-initial-mode">initial
+<h4><a name="invoking-initial-mode" id="invoking-initial-mode" shape="rect"></a>2.3.3 <a href="#invoking-initial-mode" style="text-decoration: none" shape="rect">Apply-Templates Invocation</a></h4>
+<p><span class="definition">[Definition: </span><a name="dt-initial-match-selection" id="dt-initial-match-selection" title="initial match selection" shape="rect"></a>A stylesheet may be evaluated by
+supplying a value to be processed, together with an <a title="initial mode" class="termref" href="#dt-initial-mode" shape="rect">initial
 mode</a>. The value (which can be any sequence of items) is
 referred to as the <b>initial match selection</b>. The processing
-then corresponds to the effect of the <a href=
-"#element-apply-templates"><code>xsl:apply-templates</code></a>
+then corresponds to the effect of the <a href="#element-apply-templates" shape="rect"><code>xsl:apply-templates</code></a>
 instruction.<span class="definition">]</span></p>
-<p>The <a title="initial match selection" class="termref" href=
-"#dt-initial-match-selection">initial match selection</a> will
+<p>The <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match selection</a> will
 often be a single document node, traditionally called the source
 document of the transformation; but in general, it can be any
-sequence.</p>
-<p>Processing proceeds by finding the <a title="template rule"
-class="termref" href="#dt-template-rule">template rules</a> that
-match the items in the <a title="initial match selection" class=
-"termref" href="#dt-initial-match-selection">initial match
-selection</a>, and evaluating these template rules with a <a title=
-"focus" class="termref" href="#dt-focus">focus</a> based on the
-<a title="initial match selection" class="termref" href=
-"#dt-initial-match-selection">initial match selection</a>. The
-template rules are evaluated in <a title="final output state"
-class="termref" href="#dt-final-output-state">final output
+sequence. <span>If the initial match selection is an empty
+sequence, the result of the transformation will be empty, since no
+template rules are evaluated.</span></p>
+<p>Processing proceeds by finding the <a title="template rule" class="termref" href="#dt-template-rule" shape="rect">template rules</a> that
+match the items in the <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match
+selection</a>, and evaluating these template rules with a <a title="focus" class="termref" href="#dt-focus" shape="rect">focus</a> based on the
+<a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match selection</a>. The
+template rules are evaluated in <a title="final output state" class="termref" href="#dt-final-output-state" shape="rect">final output
 state</a>.</p>
 <p>The following information is needed when dynamic evaluation is
-to start with a <a title="template rule" class="termref" href=
-"#dt-template-rule">template rule</a>:</p>
-<ul>
-<li>
-<p>The <a title="initial match selection" class="termref" href=
-"#dt-initial-match-selection">initial match selection</a>. An API
+to start with a <a title="template rule" class="termref" href="#dt-template-rule" shape="rect">template rule</a>:</p>
+<ul><li>
+<p>The <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match selection</a>. An API
 that chooses to maintain compatibility with previous versions of
 this specification <span class="verb">should</span> allow a
 singleton node to be provided, which is then used in two ways: the
-node itself acts as the <a title="initial match selection" class=
-"termref" href="#dt-initial-match-selection">initial match
+node itself acts as the <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match
 selection</a>, and the document node of the containing document
-acts as the <a title="global context item" class="termref" href=
-"#dt-global-context-item">global context item</a>.</p>
-</li>
-<li>
-<p>Optionally, an initial <a title="mode" class="termref" href=
-"#dt-mode">mode</a>.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-initial-mode" id="dt-initial-mode" title="initial mode"></a>The
+acts as the <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context item</a>.</p>
+</li><li>
+<p>Optionally, an initial <a title="mode" class="termref" href="#dt-mode" shape="rect">mode</a>.</p>
+<p><span class="definition">[Definition: </span><a name="dt-initial-mode" id="dt-initial-mode" title="initial mode" shape="rect"></a>The
 initial mode, if specified, <span class="verb">must</span> either
 be the <span>unnamed</span> mode, or a mode that is explicitly
-named <span>either in an <a href=
-"#element-mode"><code>xsl:mode</code></a> declaration, or</span> in
-the <code>mode</code> attribute of an <a href=
-"#element-template"><code>xsl:template</code></a> declaration
+named <span>either in an <a href="#element-mode" shape="rect"><code>xsl:mode</code></a> declaration, or</span> in
+the <code>mode</code> attribute of an <a href="#element-template" shape="rect"><code>xsl:template</code></a> declaration
 within the stylesheet. If an initial mode is supplied, then in
-searching for the <a title="template rule" class="termref" href=
-"#dt-template-rule">template rule</a> that best matches the
-<span>items in the <a title="initial match selection" class=
-"termref" href="#dt-initial-match-selection">initial match
+searching for the <a title="template rule" class="termref" href="#dt-template-rule" shape="rect">template rule</a> that best matches the
+<span>items in the <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match
 selection</a></span>, the processor considers only those rules that
 apply to the initial mode. If no initial mode is supplied, then the
 mode used is that named in the <code>default-mode</code> attribute
-of the <span>(explicit or implicit) <a href=
-"#element-package"><code>xsl:package</code></a> element of the
-<a title="top-level package" class="termref" href=
-"#dt-top-level-package">top-level package</a></span> or in the
-absence of such an attribute, the <a title="unnamed mode" class=
-"termref" href="#dt-unnamed-mode">unnamed mode</a>.<span class=
-"definition">]</span></p>
-</li>
-<li>
+of the <span>(explicit or implicit) <a href="#element-package" shape="rect"><code>xsl:package</code></a> element of the
+<a title="top-level package" class="termref" href="#dt-top-level-package" shape="rect">top-level package</a></span> or in the
+absence of such an attribute, the <a title="unnamed mode" class="termref" href="#dt-unnamed-mode" shape="rect">unnamed mode</a>.<span class="definition">]</span></p>
+</li><li>
 <p>Parameters, which will be passed to the template rules used to
 process items in the input sequence. The parameters consist of two
-sets of (QName, value) pairs, one set for <a title=
-"tunnel parameter" class="termref" href=
-"#dt-tunnel-parameter">tunnel parameters</a> and one for non-tunnel
+sets of (QName, value) pairs, one set for <a title="tunnel parameter" class="termref" href="#dt-tunnel-parameter" shape="rect">tunnel parameters</a> and one for non-tunnel
 parameters, in which the QName identifies the name of a parameter
 and the value provides the value of the parameter. Either or both
 sets of parameters may be empty. The effect is the same as when a
-template is invoked using <a href=
-"#element-apply-templates"><code>xsl:apply-templates</code></a>
-with an <a href=
-"#element-with-param"><code>xsl:with-param</code></a> child
+template is invoked using <a href="#element-apply-templates" shape="rect"><code>xsl:apply-templates</code></a>
+with an <a href="#element-with-param" shape="rect"><code>xsl:with-param</code></a> child
 specifying <code>tunnel="yes"</code> or <code>tunnel="no"</code> as
 appropriate. If a parameter is supplied that is not declared or
 used, the value is simply ignored. These parameters are
-<em>not</em> used to set <a title="stylesheet parameter" class=
-"termref" href="#dt-stylesheet-parameter">stylesheet
+<em>not</em> used to set <a title="stylesheet parameter" class="termref" href="#dt-stylesheet-parameter" shape="rect">stylesheet
 parameters</a>.</p>
 <p>A supplied value is converted if necessary to the declared type
-of the template parameter using the <a title=
-"function conversion rules" class="termref" href=
-"#dt-function-conversion-rules">function conversion rules</a>.</p>
-</li>
-</ul>
-<p>The <a title="raw result" class="termref" href=
-"#dt-raw-result">raw result</a> of the invocation is the result of
-processing the supplied input sequence as if by a call on <a href=
-"#element-apply-templates"><code>xsl:apply-templates</code></a> in
+of the template parameter using the <a title="function conversion rules" class="termref" href="#dt-function-conversion-rules" shape="rect">function conversion rules</a>.</p>
+</li></ul>
+<p>The <a title="raw result" class="termref" href="#dt-raw-result" shape="rect">raw result</a> of the invocation is the result of
+processing the supplied input sequence as if by a call on <a href="#element-apply-templates" shape="rect"><code>xsl:apply-templates</code></a> in
 the specified mode: specifically, each item in the input sequence
 is processed by selecting and evaluating the best matching template
 rule, and converting the result (if necessary) to the type declared
 in the <code>as</code> attribute of that template using the
-<a title="function conversion rules" class="termref" href=
-"#dt-function-conversion-rules">function conversion rules</a>; and
+<a title="function conversion rules" class="termref" href="#dt-function-conversion-rules" shape="rect">function conversion rules</a>; and
 the results of processing each item are then concatenated into a
 single sequence, respecting the order of items in the input
 sequence.</p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
-<p>If the initial mode is a <a title="streamable mode" class=
-"termref" href="#dt-streamable-mode">streamable mode,</a> then
+<p>If the initial mode is a <a title="streamable mode" class="termref" href="#dt-streamable-mode" shape="rect">streamable mode,</a> then
 streaming will only be possible if nodes in the input sequence are
 supplied in a form that allows such processing: for example, as a
 reference to a stream of parsing events.</p>
@@ -2495,186 +1924,106 @@
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
 <p>The design of the API for invoking a transformation should
-provide some means for users to designate the <a title=
-"unnamed mode" class="termref" href="#dt-unnamed-mode">unnamed
-mode</a> as the <a title="initial mode" class="termref" href=
-"#dt-initial-mode">initial mode</a> in cases where it is not the
+provide some means for users to designate the <a title="unnamed mode" class="termref" href="#dt-unnamed-mode" shape="rect">unnamed
+mode</a> as the <a title="initial mode" class="termref" href="#dt-initial-mode" shape="rect">initial mode</a> in cases where it is not the
 default mode.</p>
 </div>
-<p><a name="err-XTDE0044" id="err-XTDE0044"><span class=
-"error">[ERR XTDE0044]</span></a> It is a <a title="dynamic error"
-class="termref" href="#dt-dynamic-error">dynamic error</a> if the
-invocation of the <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> specifies an initial <a title=
-"mode" class="termref" href="#dt-mode">mode</a> and if no
-<span><a title="initial match selection" class="termref" href=
-"#dt-initial-match-selection">initial match selection</a> is
-supplied (either explicitly, or defaulted to the <a title=
-"global context item" class="termref" href=
-"#dt-global-context-item">global context item</a>)</span>.</p>
-<p><a name="err-XTDE0045" id="err-XTDE0045"><span class=
-"error">[ERR XTDE0045]</span></a> It is a <a title="dynamic error"
-class="termref" href="#dt-dynamic-error">dynamic error</a> if the
-invocation of the <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> specifies an initial <a title=
-"mode" class="termref" href="#dt-mode">mode</a> (other than the
-unnamed mode) that does not match <span>either the <a title=
-"expanded QName" class="termref" href="#dt-expanded-qname">expanded
-QName</a> in the <code>name</code> attribute of an <a href=
-"#element-mode"><code>xsl:mode</code></a> declaration, or</span>
-the <a title="expanded QName" class="termref" href=
-"#dt-expanded-qname">expanded QName</a> in the <code>mode</code>
-attribute of any template defined in the <a title="stylesheet"
-class="termref" href="#dt-stylesheet">stylesheet</a>.</p>
-<p>It is a <a title="dynamic error" class="termref" href=
-"#dt-dynamic-error">dynamic error</a> <span class="error">[see
-<a href="#err-XTDE0700">ERR XTDE0700</a>]</span> if the <a title=
-"template rule" class="termref" href="#dt-template-rule">template
-rule</a> selected for processing any item in the <a title=
-"initial match selection" class="termref" href=
-"#dt-initial-match-selection">initial match selection</a> defines a
-<a title="template parameter" class="termref" href=
-"#dt-template-parameter">template parameter</a> that specifies
+<p><a name="err-XTDE0044" id="err-XTDE0044" shape="rect"><span class="error">[ERR XTDE0044]</span></a> It is a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> if the
+invocation of the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> specifies an initial <a title="mode" class="termref" href="#dt-mode" shape="rect">mode</a> and if no
+<span><a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match selection</a> is
+supplied (either explicitly, or defaulted to the <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context item</a>)</span>.</p>
+<p><a name="err-XTDE0045" id="err-XTDE0045" shape="rect"><span class="error">[ERR XTDE0045]</span></a> It is a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> if the
+invocation of the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> specifies an initial <a title="mode" class="termref" href="#dt-mode" shape="rect">mode</a> (other than the
+unnamed mode) that does not match <span>either the <a title="expanded QName" class="termref" href="#dt-expanded-qname" shape="rect">expanded
+QName</a> in the <code>name</code> attribute of an <a href="#element-mode" shape="rect"><code>xsl:mode</code></a> declaration, or</span>
+the <a title="expanded QName" class="termref" href="#dt-expanded-qname" shape="rect">expanded QName</a> in the <code>mode</code>
+attribute of any template defined in the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>.</p>
+<p>It is a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> <span class="error">[see
+<a href="#err-XTDE0700" shape="rect">ERR XTDE0700</a>]</span> if the <a title="template rule" class="termref" href="#dt-template-rule" shape="rect">template
+rule</a> selected for processing any item in the <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match selection</a> defines a
+<a title="template parameter" class="termref" href="#dt-template-parameter" shape="rect">template parameter</a> that specifies
 <code>required="yes"</code> <span>and no value is supplied for that
 parameter.</span></p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
-<p>A <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> can process further source
+<p>A <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> can process further source
 documents in addition to those supplied when the transformation is
 invoked. These additional documents can be loaded using the
-functions <a href="#func-document"><code>document</code></a> (see
-<a href="#func-document"><i>20.1 fn:document</i></a>) or <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-doc"><code>doc</code></a><sup><small>FO30</small></sup>
-or <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-collection"><code>collection</code></a><sup><small>FO30</small></sup>
-(see <a href="#xpath-functions-30">[Functions and Operators]</a>),
-<span>or using the <a href=
-"#element-stream"><code>xsl:stream</code></a> instruction</span>;
-alternatively, they can be supplied as <a title=
-"stylesheet parameter" class="termref" href=
-"#dt-stylesheet-parameter">stylesheet parameters</a> (see <a href=
-"#global-variables"><i>9.5 Global Variables and
-Parameters</i></a>), or returned as the result of an <a title=
-"extension function" class="termref" href=
-"#dt-extension-function">extension function</a> (see <a href=
-"#extension-functions"><i>23.1 Extension Functions</i></a>).</p>
-</div>
-</div>
-<div class="div3">
-<h4><a name="invoking-initial-template" id=
-"invoking-initial-template"></a>2.3.4 <a href=
-"#invoking-initial-template" style=
-"text-decoration: none">Call-Template Invocation</a></h4>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-initial-named-template" id="dt-initial-named-template" title=
-"initial named template"></a>A stylesheet may be evaluated by
+functions <a href="#func-document" shape="rect"><code>document</code></a> (see
+<a href="#func-document" shape="rect"><i>20.1 fn:document</i></a>) or <a href="http://www.w3.org/TR/xpath-functions-30/#func-doc" shape="rect"><code>doc</code></a><sup><small>FO30</small></sup>
+or <a href="http://www.w3.org/TR/xpath-functions-30/#func-collection" shape="rect"><code>collection</code></a><sup><small>FO30</small></sup>
+(see <a href="#xpath-functions-30" shape="rect">[Functions and Operators]</a>),
+<span>or using the <a href="#element-stream" shape="rect"><code>xsl:stream</code></a> instruction</span>;
+alternatively, they can be supplied as <a title="stylesheet parameter" class="termref" href="#dt-stylesheet-parameter" shape="rect">stylesheet parameters</a> (see <a href="#global-variables" shape="rect"><i>9.5 Global Variables and
+Parameters</i></a>), or returned as the result of an <a title="extension function" class="termref" href="#dt-extension-function" shape="rect">extension function</a> (see <a href="#extension-functions" shape="rect"><i>23.1 Extension Functions</i></a>).</p>
+</div>
+</div>
+<div class="div3">
+<h4><a name="invoking-initial-template" id="invoking-initial-template" shape="rect"></a>2.3.4 <a href="#invoking-initial-template" style="text-decoration: none" shape="rect">Call-Template Invocation</a></h4>
+<p><span class="definition">[Definition: </span><a name="dt-initial-named-template" id="dt-initial-named-template" title="initial named template" shape="rect"></a>A stylesheet may be evaluated by
 selecting a named template to be evaluated; this is referred to as
 the <b>initial named template</b>.<span class="definition">]</span>
-The effect is analogous to the effect of executing an <a href=
-"#element-call-template"><code>xsl:call-template</code></a>
+The effect is analogous to the effect of executing an <a href="#element-call-template" shape="rect"><code>xsl:call-template</code></a>
 instruction. The following information is needed in this case:</p>
-<ul>
-<li>
-<p>Optionally, the name of the <a title="initial named template"
-class="termref" href="#dt-initial-named-template">initial named
+<ul><li>
+<p>Optionally, the name of the <a title="initial named template" class="termref" href="#dt-initial-named-template" shape="rect">initial named
 template</a> which is to be executed as the entry point to the
 transformation. <span>If no template name is supplied, the default
 template name is <code>xsl:initial-template</code>.</span> The
 selected template <span class="verb">must</span> exist within the
-<a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a>.</p>
-</li>
-<li>
+<a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>.</p>
+</li><li>
 <p>Optionally, a context item for evaluation of this named
-template, defaulting to the <a title="global context item" class=
-"termref" href="#dt-global-context-item">global context item</a> if
-it exists. <span>This is constrained by any <a href=
-"#element-context-item"><code>xsl:context-item</code></a> element
-appearing within the selected <a href=
-"#element-template"><code>xsl:template</code></a> element. The
-initial named template is evaluated with a <a title=
-"singleton focus" class="termref" href=
-"#dt-singleton-focus">singleton focus</a> based on this context
-item if it exists, or with an <a title="absent" class="termref"
-href="#dt-absent">absent</a> focus otherwise.</span></p>
-</li>
-<li>
+template, defaulting to the <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context item</a> if
+it exists. <span>This is constrained by any <a href="#element-context-item" shape="rect"><code>xsl:context-item</code></a> element
+appearing within the selected <a href="#element-template" shape="rect"><code>xsl:template</code></a> element. The
+initial named template is evaluated with a <a title="singleton focus" class="termref" href="#dt-singleton-focus" shape="rect">singleton focus</a> based on this context
+item if it exists, or with an <a title="absent" class="termref" href="#dt-absent" shape="rect">absent</a> focus otherwise.</span></p>
+</li><li>
 <p>Parameters, which will be passed to the selected template rule.
 The parameters consist of two sets of (QName, value) pairs, one set
-for <a title="tunnel parameter" class="termref" href=
-"#dt-tunnel-parameter">tunnel parameters</a> and one for non-tunnel
+for <a title="tunnel parameter" class="termref" href="#dt-tunnel-parameter" shape="rect">tunnel parameters</a> and one for non-tunnel
 parameters, in which the QName identifies the name of a parameter
 and the value provides the value of the parameter. Either or both
 sets of parameters may be empty. The effect is the same as when a
-template is invoked using <a href=
-"#element-call-template"><code>xsl:call-template</code></a> with an
-<a href="#element-with-param"><code>xsl:with-param</code></a> child
+template is invoked using <a href="#element-call-template" shape="rect"><code>xsl:call-template</code></a> with an
+<a href="#element-with-param" shape="rect"><code>xsl:with-param</code></a> child
 specifying <code>tunnel="yes"</code> or <code>tunnel="no"</code> as
 appropriate. If a parameter is supplied that is not declared or
 used, the value is simply ignored. These parameters are
-<em>not</em> used to set <a title="stylesheet parameter" class=
-"termref" href="#dt-stylesheet-parameter">stylesheet
+<em>not</em> used to set <a title="stylesheet parameter" class="termref" href="#dt-stylesheet-parameter" shape="rect">stylesheet
 parameters</a>.</p>
 <p>A supplied value is converted if necessary to the declared type
-of the template parameter using the <a title=
-"function conversion rules" class="termref" href=
-"#dt-function-conversion-rules">function conversion rules</a>.</p>
-</li>
-</ul>
-<p>The <a title="raw result" class="termref" href=
-"#dt-raw-result">raw result</a> of the invocation is the result of
-evaluating the <a title="initial named template" class="termref"
-href="#dt-initial-named-template">initial named template</a>, after
+of the template parameter using the <a title="function conversion rules" class="termref" href="#dt-function-conversion-rules" shape="rect">function conversion rules</a>.</p>
+</li></ul>
+<p>The <a title="raw result" class="termref" href="#dt-raw-result" shape="rect">raw result</a> of the invocation is the result of
+evaluating the <a title="initial named template" class="termref" href="#dt-initial-named-template" shape="rect">initial named template</a>, after
 conversion of the result to the type declared in the
-<code>as</code> attribute of that template using the <a title=
-"function conversion rules" class="termref" href=
-"#dt-function-conversion-rules">function conversion rules</a>, if
+<code>as</code> attribute of that template using the <a title="function conversion rules" class="termref" href="#dt-function-conversion-rules" shape="rect">function conversion rules</a>, if
 such conversion is necessary.</p>
-<p>The <a title="initial named template" class="termref" href=
-"#dt-initial-named-template">initial named template</a> is
-evaluated in <a title="final output state" class="termref" href=
-"#dt-final-output-state">final output state</a>.</p>
-<p><a name="err-XTDE0040" id="err-XTDE0040"><span class=
-"error">[ERR XTDE0040]</span></a> It is a <a title="dynamic error"
-class="termref" href="#dt-dynamic-error">dynamic error</a> if the
-invocation of the <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> specifies a template name that does
-not match the <a title="expanded QName" class="termref" href=
-"#dt-expanded-qname">expanded QName</a> of a named template defined
-in the <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a>, <span>whose visibility is
+<p>The <a title="initial named template" class="termref" href="#dt-initial-named-template" shape="rect">initial named template</a> is
+evaluated in <a title="final output state" class="termref" href="#dt-final-output-state" shape="rect">final output state</a>.</p>
+<p><a name="err-XTDE0040" id="err-XTDE0040" shape="rect"><span class="error">[ERR XTDE0040]</span></a> It is a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> if the
+invocation of the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> specifies a template name that does
+not match the <a title="expanded QName" class="termref" href="#dt-expanded-qname" shape="rect">expanded QName</a> of a named template defined
+in the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>, <span>whose visibility is
 <code>public</code> or <code>final</code></span>.</p>
-<p>It is a <a title="dynamic error" class="termref" href=
-"#dt-dynamic-error">dynamic error</a> <span><span class=
-"error">[see <a href="#err-XTDE0700">ERR
-XTDE0700</a>]</span></span> if the <a title=
-"initial named template" class="termref" href=
-"#dt-initial-named-template">initial named template</a>, or any of
-the template rules invoked to process items in the <a title=
-"initial match selection" class="termref" href=
-"#dt-initial-match-selection">initial match selection</a>, defines
-a <a title="template parameter" class="termref" href=
-"#dt-template-parameter">template parameter</a> that specifies
+<p>It is a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> <span><span class="error">[see <a href="#err-XTDE0700" shape="rect">ERR
+XTDE0700</a>]</span></span> if the <a title="initial named template" class="termref" href="#dt-initial-named-template" shape="rect">initial named template</a>, or any of
+the template rules invoked to process items in the <a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match selection</a>, defines
+a <a title="template parameter" class="termref" href="#dt-template-parameter" shape="rect">template parameter</a> that specifies
 <code>required="yes"</code> <span>and no value is supplied for that
 parameter.</span></p>
 </div>
 <div class="div3">
-<h4><a name="invoking-initial-function" id=
-"invoking-initial-function"></a>2.3.5 <a href=
-"#invoking-initial-function" style="text-decoration: none">Function
+<h4><a name="invoking-initial-function" id="invoking-initial-function" shape="rect"></a>2.3.5 <a href="#invoking-initial-function" style="text-decoration: none" shape="rect">Function
 Call Invocation</a></h4>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-initial-function" id="dt-initial-function" title=
-"initial function"></a>A stylesheet may be evaluated by calling a
-named <a title="stylesheet function" class="termref" href=
-"#dt-stylesheet-function">stylesheet function</a>, referred to as
+<p><span class="definition">[Definition: </span><a name="dt-initial-function" id="dt-initial-function" title="initial function" shape="rect"></a>A stylesheet may be evaluated by calling a
+named <a title="stylesheet function" class="termref" href="#dt-stylesheet-function" shape="rect">stylesheet function</a>, referred to as
 the <b>initial function</b>.<span class="definition">]</span> The
 following additional information is needed in this case:</p>
-<ul>
-<li>
-<p>The name and arity of a <a title="stylesheet function" class=
-"termref" href="#dt-stylesheet-function">stylesheet function</a>
+<ul><li>
+<p>The name and arity of a <a title="stylesheet function" class="termref" href="#dt-stylesheet-function" shape="rect">stylesheet function</a>
 which is to be executed as the entry point to the
 transformation.</p>
 <div class="note">
@@ -2682,75 +2031,49 @@
 <p>In the design of a concrete API, the arity may be inferred from
 the length of the parameter list.</p>
 </div>
-</li>
-<li>
-<p>A list of values to act as parameters to the <a title=
-"initial function" class="termref" href=
-"#dt-initial-function">initial function</a>. The number of values
+</li><li>
+<p>A list of values to act as parameters to the <a title="initial function" class="termref" href="#dt-initial-function" shape="rect">initial function</a>. The number of values
 in the list must be the same as the arity of the function.</p>
 <p>A supplied value is converted if necessary to the declared type
-of the function parameter using the <a title=
-"function conversion rules" class="termref" href=
-"#dt-function-conversion-rules">function conversion rules</a>.</p>
-</li>
-</ul>
-<p>The <a title="raw result" class="termref" href=
-"#dt-raw-result">raw result</a> of the invocation is the result of
-evaluating the <a title="initial function" class="termref" href=
-"#dt-initial-function">initial function</a>, after conversion of
+of the function parameter using the <a title="function conversion rules" class="termref" href="#dt-function-conversion-rules" shape="rect">function conversion rules</a>.</p>
+</li></ul>
+<p>The <a title="raw result" class="termref" href="#dt-raw-result" shape="rect">raw result</a> of the invocation is the result of
+evaluating the <a title="initial function" class="termref" href="#dt-initial-function" shape="rect">initial function</a>, after conversion of
 the result to the type declared in the <code>as</code> attribute of
-that function using the <a title="function conversion rules" class=
-"termref" href="#dt-function-conversion-rules">function conversion
+that function using the <a title="function conversion rules" class="termref" href="#dt-function-conversion-rules" shape="rect">function conversion
 rules</a>, if such conversion is necessary.</p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
-<p>The <a title="initial function" class="termref" href=
-"#dt-initial-function">initial function</a> (like all stylesheet
-functions) is evaluated with an <a title="absent" class="termref"
-href="#dt-absent">absent</a> <a title="focus" class="termref" href=
-"#dt-focus">focus</a>.</p>
-</div>
-<p><a name="err-XTDE0041" id="err-XTDE0041"><span class=
-"error">[ERR XTDE0041]</span></a> It is a <a title="dynamic error"
-class="termref" href="#dt-dynamic-error">dynamic error</a> if the
-invocation of the <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> specifies a function name and arity
-that does not match the <a title="expanded QName" class="termref"
-href="#dt-expanded-qname">expanded QName</a> and arity of a named
-<a title="stylesheet function" class="termref" href=
-"#dt-stylesheet-function">stylesheet function</a> defined in the
-<a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a>, whose visibility is
+<p>The <a title="initial function" class="termref" href="#dt-initial-function" shape="rect">initial function</a> (like all stylesheet
+functions) is evaluated with an <a title="absent" class="termref" href="#dt-absent" shape="rect">absent</a> <a title="focus" class="termref" href="#dt-focus" shape="rect">focus</a>.</p>
+</div>
+<p><a name="err-XTDE0041" id="err-XTDE0041" shape="rect"><span class="error">[ERR XTDE0041]</span></a> It is a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> if the
+invocation of the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> specifies a function name and arity
+that does not match the <a title="expanded QName" class="termref" href="#dt-expanded-qname" shape="rect">expanded QName</a> and arity of a named
+<a title="stylesheet function" class="termref" href="#dt-stylesheet-function" shape="rect">stylesheet function</a> defined in the
+<a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>, whose visibility is
 <code>public</code> or <code>final</code>.</p>
-<p>When a transformation is invoked by calling an <a title=
-"initial function" class="termref" href=
-"#dt-initial-function">initial function</a>, the entire
-transformation executes in <a title="temporary output state" class=
-"termref" href="#dt-temporary-output-state">temporary output
-state</a>, which means that calls on <a href=
-"#element-result-document"><code>xsl:result-document</code></a> are
+<p>When a transformation is invoked by calling an <a title="initial function" class="termref" href="#dt-initial-function" shape="rect">initial function</a>, the entire
+transformation executes in <a title="temporary output state" class="termref" href="#dt-temporary-output-state" shape="rect">temporary output
+state</a>, which means that calls on <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a> are
 not permitted.</p>
 </div>
 <div class="div3">
-<h4><a name="post-processing" id="post-processing"></a>2.3.6
-<a href="#post-processing" style=
-"text-decoration: none">Post-processing the Raw Result</a></h4>
-<p>At user option, the <a title="raw result" class="termref" href=
-"#dt-raw-result">raw result</a> of a component invocation may
+<h4><a name="post-processing" id="post-processing" shape="rect"></a>2.3.6
+<a href="#post-processing" style="text-decoration: none" shape="rect">Post-processing the Raw Result</a></h4>
+<p>At user option, the <a title="raw result" class="termref" href="#dt-raw-result" shape="rect">raw result</a> of a component invocation may
 either be returned to the calling application unchanged, or it may
 be post-processed. Two stages of post-processing are defined, both
 of which are optional:</p>
-<ol class="enumar">
-<li>
+<ol class="enumar"><li>
 <p><b>Result tree construction</b></p>
 <p>If the raw result is non-empty, then it is used to construct an
-implicit <a title="final result tree" class="termref" href=
-"#dt-final-result-tree">final result tree</a>, following the rules
-described in <a href="#constructing-complex-content"><i>5.8.1
+implicit <a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result tree</a>, following the rules
+described in <a href="#constructing-complex-content" shape="rect"><i>5.8.1
 Constructing Complex Content</i></a>: the effect is as if the raw
 result <var>R</var> were processed by the following function:</p>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
 &lt;xsl:function name="construct-result-tree" as="document-node()"&gt;
   &lt;xsl:param name="R" as="item()*"&gt;
   &lt;xsl:document validation="preserve"&gt;
@@ -2759,8 +2082,7 @@
 &lt;/xsl:function&gt;
 </pre></div>
 <p>An implicit result tree is also created when the raw result is
-empty, provided that no <a href=
-"#element-result-document"><code>xsl:result-document</code></a>
+empty, provided that no <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
 instruction has been evaluated during the course of the
 transformation <span>(which will always be the case if the
 stylesheet is invoked by calling an initial function)</span>. In
@@ -2770,44 +2092,31 @@
 <p class="prefix"><b>Note:</b></p>
 <p>This means that there is always at least one result tree. It
 also means that <span>when stylesheet invocation is by supplying an
-<a title="initial mode" class="termref" href=
-"#dt-initial-mode">initial mode</a> (see <a href=
-"#invoking-initial-mode"><i>2.3.3 Apply-Templates
-Invocation</i></a>) or a named template (see <a href=
-"#invoking-initial-template"><i>2.3.4 Call-Template
-Invocation</i></a>), and</span> the content of the <a title=
-"initial named template" class="termref" href=
-"#dt-initial-named-template">initial named template</a> is a single
-<a href=
-"#element-result-document"><code>xsl:result-document</code></a>
+<a title="initial mode" class="termref" href="#dt-initial-mode" shape="rect">initial mode</a> (see <a href="#invoking-initial-mode" shape="rect"><i>2.3.3 Apply-Templates
+Invocation</i></a>) or a named template (see <a href="#invoking-initial-template" shape="rect"><i>2.3.4 Call-Template
+Invocation</i></a>), and</span> the content of the <a title="initial named template" class="termref" href="#dt-initial-named-template" shape="rect">initial named template</a> is a single
+<a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
 instruction, as in the example <span>template with
-<code>name="IMPLICIT"</code> shown in <a href=
-"#executing-a-transformation"><i>2.4 Executing a
+<code>name="IMPLICIT"</code> shown in <a href="#executing-a-transformation" shape="rect"><i>2.4 Executing a
 Transformation</i></a></span>, then only one result tree is
 produced, not two. It is useful to make the result document
 explicit as this is a convenient way of invoking document-level
 validation. (Validation of the implicit result document can also be
-achieved by adding an <a href=
-"#element-document"><code>xsl:document</code></a> instruction to
+achieved by adding an <a href="#element-document" shape="rect"><code>xsl:document</code></a> instruction to
 the initial template.)</p>
-<p>If the result of the <a title="initial named template" class=
-"termref" href="#dt-initial-named-template">initial named
-template</a> is non-empty, and an explicit <a href=
-"#element-result-document"><code>xsl:result-document</code></a>
+<p>If the result of the <a title="initial named template" class="termref" href="#dt-initial-named-template" shape="rect">initial named
+template</a> is non-empty, and an explicit <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
 instruction has been evaluated with the empty attribute
-<code>href=""</code>, then an error will occur <span class=
-"error">[see <a href="#err-XTDE1490">ERR XTDE1490</a>]</span>,
+<code>href=""</code>, then an error will occur <span class="error">[see <a href="#err-XTDE1490" shape="rect">ERR XTDE1490</a>]</span>,
 since it is not possible to create two final result trees with the
 same URI.</p>
 </div>
-</li>
-<li>
+</li><li>
 <p><b>Serialization</b></p>
-<p>See <a href="#parsing-and-serialization"><i>2.6 Parsing and
+<p>See <a href="#parsing-and-serialization" shape="rect"><i>2.6 Parsing and
 Serialization</i></a>.</p>
 <p>Either the raw result, or a result tree produced as described
-above, may optionally be serialized as described in <a href=
-"#serialization"><i>25 Serialization</i></a>.</p>
+above, may optionally be serialized as described in <a href="#serialization" shape="rect"><i>25 Serialization</i></a>.</p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
 <p>The first phase of serialization, called <b>sequence
@@ -2821,25 +2130,17 @@
 strings returned by invoking a stylesheet function to be output
 with newline separators.</p>
 </div>
-</li>
-</ol>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-base-output-uri" id="dt-base-output-uri" title=
-"base output URI"></a> The <b>base output URI</b> is a URI to be
+</li></ol>
+<p><span class="definition">[Definition: </span><a name="dt-base-output-uri" id="dt-base-output-uri" title="base output URI" shape="rect"></a> The <b>base output URI</b> is a URI to be
 used as the base URI when resolving a relative URI
-<span>reference</span> allocated to a <a title="final result tree"
-class="termref" href="#dt-final-result-tree">final result tree</a>.
+<span>reference</span> allocated to a <a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result tree</a>.
 If the transformation generates more than one final result tree,
 then typically each one will be allocated a URI relative to this
 base URI.<span class="definition">]</span> The way in which a base
-output URI is established is <a title="implementation-defined"
-class="termref" href=
-"#dt-implementation-defined">implementation-defined</a>. Each
+output URI is established is <a title="implementation-defined" class="termref" href="#dt-implementation-defined" shape="rect">implementation-defined</a>. Each
 invocation of the stylesheet may supply a different base output
-URI. It is acceptable for the base output URI to be <a title=
-"absent" class="termref" href="#dt-absent">absent</a>, provided no
-constructs (such as <a href=
-"#element-result-document"><code>xsl:result-document</code></a>)
+URI. It is acceptable for the base output URI to be <a title="absent" class="termref" href="#dt-absent" shape="rect">absent</a>, provided no
+constructs (such as <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>)
 are evaluated that depend on the value of the base output URI.</p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
@@ -2860,81 +2161,59 @@
 </div>
 </div>
 <div class="div2">
-<h3><a name="executing-a-transformation" id=
-"executing-a-transformation"></a>2.4 <a href=
-"#executing-a-transformation" style=
-"text-decoration: none">Executing a Transformation</a></h3>
+<h3><a name="executing-a-transformation" id="executing-a-transformation" shape="rect"></a>2.4 <a href="#executing-a-transformation" style="text-decoration: none" shape="rect">Executing a Transformation</a></h3>
 <p>The classic method of executing an XSLT transformation is to
-apply template rules to an input document (see <a href=
-"#invoking-initial-mode"><i>2.3.3 Apply-Templates
+apply template rules to an input document (see <a href="#invoking-initial-mode" shape="rect"><i>2.3.3 Apply-Templates
 Invocation</i></a>), and then delivering the result as a result
-tree which is then optionally serialized (see <a href=
-"#post-processing"><i>2.3.6 Post-processing the Raw
+tree which is then optionally serialized (see <a href="#post-processing" shape="rect"><i>2.3.6 Post-processing the Raw
 Result</i></a>). This processing model is described in this
 section. Other ways of invoking a transformation or processing the
 result are outlined in the previous section.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-template-rule" id="dt-template-rule" title=
-"template rule"></a>A stylesheet contains a set of <b>template
-rules</b> (see <a href="#rules"><i>6 Template Rules</i></a>). A
-template rule has three parts: a <a title="pattern" class="termref"
-href="#dt-pattern">pattern</a> that is matched against nodes, a
-(possibly empty) set of <a title="template parameter" class=
-"termref" href="#dt-template-parameter">template parameters</a>,
-and a <a title="sequence constructor" class="termref" href=
-"#dt-sequence-constructor">sequence constructor</a> that is
-evaluated to produce a sequence of items.<span class=
-"definition">]</span> In many cases these items are newly
-constructed nodes, which are then written to a <a title=
-"result tree" class="termref" href="#dt-result-tree">result
+<p><span class="definition">[Definition: </span><a name="dt-template-rule" id="dt-template-rule" title="template rule" shape="rect"></a>A stylesheet contains a set of <b>template
+rules</b> (see <a href="#rules" shape="rect"><i>6 Template Rules</i></a>). A
+template rule has three parts: a <a title="pattern" class="termref" href="#dt-pattern" shape="rect">pattern</a> that is matched against nodes, a
+(possibly empty) set of <a title="template parameter" class="termref" href="#dt-template-parameter" shape="rect">template parameters</a>,
+and a <a title="sequence constructor" class="termref" href="#dt-sequence-constructor" shape="rect">sequence constructor</a> that is
+evaluated to produce a sequence of items.<span class="definition">]</span> In many cases these items are newly
+constructed nodes, which are then written to a <a title="result tree" class="termref" href="#dt-result-tree" shape="rect">result
 tree</a>.</p>
 <p>A source document is typically processed by finding the template
 rule that best matches its root (document) node, and evaluating the
-<a title="sequence constructor" class="termref" href=
-"#dt-sequence-constructor">sequence constructor</a> contained in
-this template rule, as described in <a href=
-"#sequence-constructors"><i>5.8 Sequence Constructors</i></a>.</p>
+<a title="sequence constructor" class="termref" href="#dt-sequence-constructor" shape="rect">sequence constructor</a> contained in
+this template rule, as described in <a href="#sequence-constructors" shape="rect"><i>5.8 Sequence Constructors</i></a>.</p>
 <p>The raw result sequence produced by evaluating this initial
 template is handled as follows:</p>
-<ol class="enumar">
-<li>
+<ol class="enumar"><li>
 <p>If the template has an <code>as</code> attribute, then the raw
 result sequence is checked against the required type in the same
 way as for any other template, and is converted if necessary to the
-required type by applying the <a title="function conversion rules"
-class="termref" href="#dt-function-conversion-rules">function
+required type by applying the <a title="function conversion rules" class="termref" href="#dt-function-conversion-rules" shape="rect">function
 conversion rules</a>.</p>
-</li>
-<li>
+</li><li>
 <p>If the result sequence is non-empty, then it is
-<span>typically</span> post-processed (as described in <a href=
-"#post-processing"><i>2.3.6 Post-processing the Raw Result</i></a>)
-to construct an implicit <a title="final result tree" class=
-"termref" href="#dt-final-result-tree">final result tree</a>,
-following the rules described in <a href=
-"#constructing-complex-content"><i>5.8.1 Constructing Complex
+<span>typically</span> post-processed (as described in <a href="#post-processing" shape="rect"><i>2.3.6 Post-processing the Raw Result</i></a>)
+to construct an implicit <a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result tree</a>,
+following the rules described in <a href="#constructing-complex-content" shape="rect"><i>5.8.1 Constructing Complex
 Content</i></a>: the effect is as if the initial template
 <var>T</var> were called by an implicit template of the form:</p>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
 &lt;xsl:template name="IMPLICIT"&gt;
   &lt;xsl:result-document href=""&gt;
     &lt;xsl:call-template name="T"/&gt;
   &lt;/xsl:result-document&gt;
 &lt;/xsl:template&gt;
 </pre></div>
-</li>
-</ol>
+</li></ol>
 <p>The process of generating a result tree from the raw result of
 the initial template <span class="verb">may</span> be replaced with
 the very similar sequence normalization process described in
-<a href="#serialization"><i>25 Serialization</i></a>. In the latter
+<a href="#serialization" shape="rect"><i>25 Serialization</i></a>. In the latter
 case the serialization parameter <code>item-separator</code> may be
 used to separate items in the raw result with a string other than
 space (for example, newlines).</p>
 <p>An implicit result tree is also created when the result sequence
-is empty, provided that no <a href=
-"#element-result-document"><code>xsl:result-document</code></a>
+is empty, provided that no <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
 instruction has been evaluated during the course of the
 transformation. In this situation the implicit result tree will
 consist of a document node with no children.</p>
@@ -2942,141 +2221,83 @@
 <p class="prefix"><b>Note:</b></p>
 <p>This means that (unless raw output is requested) there is always
 at least one result tree. It also means that if the content of the
-initial template is a single <a href=
-"#element-result-document"><code>xsl:result-document</code></a>
+initial template is a single <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
 instruction, as in the example above, then only one result tree is
 produced, not two. It is useful to make the result document
 explicit as this is the only way of invoking document-level
 validation.</p>
 <p>If the result of the initial template is non-empty, and an
-explicit <a href=
-"#element-result-document"><code>xsl:result-document</code></a>
+explicit <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
 instruction has been evaluated with the empty attribute
-<code>href=""</code>, then an error will occur <span class=
-"error">[see <a href="#err-XTDE1490">ERR XTDE1490</a>]</span>,
+<code>href=""</code>, then an error will occur <span class="error">[see <a href="#err-XTDE1490" shape="rect">ERR XTDE1490</a>]</span>,
 since it is not possible to create two final result trees with the
 same URI.</p>
 </div>
-<p>A <a title="sequence constructor" class="termref" href=
-"#dt-sequence-constructor">sequence constructor</a> is a sequence
+<p>A <a title="sequence constructor" class="termref" href="#dt-sequence-constructor" shape="rect">sequence constructor</a> is a sequence
 of sibling nodes in the stylesheet, each of which is either an
-<a title="XSLT instruction" class="termref" href=
-"#dt-xslt-instruction">XSLT instruction</a>, a <a title=
-"literal result element" class="termref" href=
-"#dt-literal-result-element">literal result element</a>, a text
-node, or an <a title="extension instruction" class="termref" href=
-"#dt-extension-instruction">extension instruction</a>.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-instruction" id="dt-instruction" title="instruction"></a>An
-<b>instruction</b> is either an <a title="XSLT instruction" class=
-"termref" href="#dt-xslt-instruction">XSLT instruction</a> or an
-<a title="extension instruction" class="termref" href=
-"#dt-extension-instruction">extension instruction</a>.<span class=
-"definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-xslt-instruction" id="dt-xslt-instruction" title=
-"XSLT instruction"></a>An <b>XSLT instruction</b> is an <a title=
-"XSLT element" class="termref" href="#dt-xslt-element">XSLT
+<a title="XSLT instruction" class="termref" href="#dt-xslt-instruction" shape="rect">XSLT instruction</a>, a <a title="literal result element" class="termref" href="#dt-literal-result-element" shape="rect">literal result element</a>, a text
+node, or an <a title="extension instruction" class="termref" href="#dt-extension-instruction" shape="rect">extension instruction</a>.</p>
+<p><span class="definition">[Definition: </span><a name="dt-instruction" id="dt-instruction" title="instruction" shape="rect"></a>An
+<b>instruction</b> is either an <a title="XSLT instruction" class="termref" href="#dt-xslt-instruction" shape="rect">XSLT instruction</a> or an
+<a title="extension instruction" class="termref" href="#dt-extension-instruction" shape="rect">extension instruction</a>.<span class="definition">]</span></p>
+<p><span class="definition">[Definition: </span><a name="dt-xslt-instruction" id="dt-xslt-instruction" title="XSLT instruction" shape="rect"></a>An <b>XSLT instruction</b> is an <a title="XSLT element" class="termref" href="#dt-xslt-element" shape="rect">XSLT
 element</a> whose syntax summary in this specification contains the
 annotation <code>&lt;!-- category: instruction
 --&gt;</code>.<span class="definition">]</span></p>
-<p><a title="extension instruction" class="termref" href=
-"#dt-extension-instruction">Extension instructions</a> are
-described in <a href="#extension-instruction"><i>23.2 Extension
+<p><a title="extension instruction" class="termref" href="#dt-extension-instruction" shape="rect">Extension instructions</a> are
+described in <a href="#extension-instruction" shape="rect"><i>23.2 Extension
 Instructions</i></a>.</p>
-<p>The main categories of <a title="XSLT instruction" class=
-"termref" href="#dt-xslt-instruction">XSLT instruction</a> are as
+<p>The main categories of <a title="XSLT instruction" class="termref" href="#dt-xslt-instruction" shape="rect">XSLT instruction</a> are as
 follows:</p>
-<ul>
-<li>
-<p>instructions that create new nodes: <a href=
-"#element-document"><code>xsl:document</code></a>, <a href=
-"#element-element"><code>xsl:element</code></a>, <a href=
-"#element-attribute"><code>xsl:attribute</code></a>, <a href=
-"#element-processing-instruction"><code>xsl:processing-instruction</code></a>,
-<a href="#element-comment"><code>xsl:comment</code></a>, <a href=
-"#element-value-of"><code>xsl:value-of</code></a>, <a href=
-"#element-text"><code>xsl:text</code></a>, <a href=
-"#element-namespace"><code>xsl:namespace</code></a>;</p>
-</li>
-<li>
+<ul><li>
+<p>instructions that create new nodes: <a href="#element-document" shape="rect"><code>xsl:document</code></a>, <a href="#element-element" shape="rect"><code>xsl:element</code></a>, <a href="#element-attribute" shape="rect"><code>xsl:attribute</code></a>, <a href="#element-processing-instruction" shape="rect"><code>xsl:processing-instruction</code></a>,
+<a href="#element-comment" shape="rect"><code>xsl:comment</code></a>, <a href="#element-value-of" shape="rect"><code>xsl:value-of</code></a>, <a href="#element-text" shape="rect"><code>xsl:text</code></a>, <a href="#element-namespace" shape="rect"><code>xsl:namespace</code></a>;</p>
+</li><li>
 <p>an instruction that returns an arbitrary sequence by evaluating
-an XPath expression: <a href=
-"#element-sequence"><code>xsl:sequence</code></a>;</p>
-</li>
-<li>
+an XPath expression: <a href="#element-sequence" shape="rect"><code>xsl:sequence</code></a>;</p>
+</li><li>
 <p>instructions that cause conditional or repeated evaluation of
-nested instructions: <a href="#element-if"><code>xsl:if</code></a>,
-<a href="#element-choose"><code>xsl:choose</code></a>,
-<span><a href="#element-try"><code>xsl:try</code></a>,</span>
-<a href="#element-for-each"><code>xsl:for-each</code></a>, <a href=
-"#element-for-each-group"><code>xsl:for-each-group</code></a>,
-<span><a href="#element-fork"><code>xsl:fork</code></a>, <a href=
-"#element-iterate"><code>xsl:iterate</code></a> and its subordinate
-instructions <a href=
-"#element-next-iteration"><code>xsl:next-iteration</code></a> and
-<a href="#element-break"><code>xsl:break</code></a></span>;</p>
-</li>
-<li>
-<p>instructions that invoke templates: <a href=
-"#element-apply-templates"><code>xsl:apply-templates</code></a>,
-<a href=
-"#element-apply-imports"><code>xsl:apply-imports</code></a>,
-<a href=
-"#element-call-template"><code>xsl:call-template</code></a>,
-<a href="#element-next-match"><code>xsl:next-match</code></a>;</p>
-</li>
-<li>
-<p>Instructions that declare variables: <a href=
-"#element-variable"><code>xsl:variable</code></a>, <a href=
-"#element-param"><code>xsl:param</code></a>;</p>
-</li>
-<li>
-<p>other specialized instructions: <a href=
-"#element-number"><code>xsl:number</code></a>, <a href=
-"#element-analyze-string"><code>xsl:analyze-string</code></a>,
-<span><a href="#element-assert"><code>xsl:assert</code></a>,</span>
-<a href="#element-message"><code>xsl:message</code></a>, <a href=
-"#element-result-document"><code>xsl:result-document</code></a>,
-<span><a href="#element-stream"><code>xsl:stream</code></a>,
-<a href="#element-perform-sort"><code>xsl:perform-sort</code></a>,
-<a href="#element-merge"><code>xsl:merge</code></a></span>.</p>
-</li>
-</ul>
-<p>Often, a <a title="sequence constructor" class="termref" href=
-"#dt-sequence-constructor">sequence constructor</a> will include an
-<a href=
-"#element-apply-templates"><code>xsl:apply-templates</code></a>
+nested instructions: <a href="#element-if" shape="rect"><code>xsl:if</code></a>,
+<a href="#element-choose" shape="rect"><code>xsl:choose</code></a>,
+<span><a href="#element-try" shape="rect"><code>xsl:try</code></a>,</span>
+<a href="#element-for-each" shape="rect"><code>xsl:for-each</code></a>, <a href="#element-for-each-group" shape="rect"><code>xsl:for-each-group</code></a>,
+<span><a href="#element-fork" shape="rect"><code>xsl:fork</code></a>, <a href="#element-iterate" shape="rect"><code>xsl:iterate</code></a> and its subordinate
+instructions <a href="#element-next-iteration" shape="rect"><code>xsl:next-iteration</code></a> and
+<a href="#element-break" shape="rect"><code>xsl:break</code></a></span>;</p>
+</li><li>
+<p>instructions that invoke templates: <a href="#element-apply-templates" shape="rect"><code>xsl:apply-templates</code></a>,
+<a href="#element-apply-imports" shape="rect"><code>xsl:apply-imports</code></a>,
+<a href="#element-call-template" shape="rect"><code>xsl:call-template</code></a>,
+<a href="#element-next-match" shape="rect"><code>xsl:next-match</code></a>;</p>
+</li><li>
+<p>Instructions that declare variables: <a href="#element-variable" shape="rect"><code>xsl:variable</code></a>, <a href="#element-param" shape="rect"><code>xsl:param</code></a>;</p>
+</li><li>
+<p>other specialized instructions: <a href="#element-number" shape="rect"><code>xsl:number</code></a>, <a href="#element-analyze-string" shape="rect"><code>xsl:analyze-string</code></a>,
+<span><a href="#element-assert" shape="rect"><code>xsl:assert</code></a>,</span>
+<a href="#element-message" shape="rect"><code>xsl:message</code></a>, <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>,
+<span><a href="#element-stream" shape="rect"><code>xsl:stream</code></a>,
+<a href="#element-perform-sort" shape="rect"><code>xsl:perform-sort</code></a>,
+<a href="#element-merge" shape="rect"><code>xsl:merge</code></a></span>.</p>
+</li></ul>
+<p>Often, a <a title="sequence constructor" class="termref" href="#dt-sequence-constructor" shape="rect">sequence constructor</a> will include an
+<a href="#element-apply-templates" shape="rect"><code>xsl:apply-templates</code></a>
 instruction, which selects a sequence of nodes to be processed.
 Each of the selected nodes is processed by searching the stylesheet
-for a matching <a title="template rule" class="termref" href=
-"#dt-template-rule">template rule</a> and evaluating the <a title=
-"sequence constructor" class="termref" href=
-"#dt-sequence-constructor">sequence constructor</a> of that
+for a matching <a title="template rule" class="termref" href="#dt-template-rule" shape="rect">template rule</a> and evaluating the <a title="sequence constructor" class="termref" href="#dt-sequence-constructor" shape="rect">sequence constructor</a> of that
 template rule. The resulting sequences of items are concatenated,
-in order, to give the result of the <a href=
-"#element-apply-templates"><code>xsl:apply-templates</code></a>
-instruction, as described in <a href="#applying-templates"><i>6.3
+in order, to give the result of the <a href="#element-apply-templates" shape="rect"><code>xsl:apply-templates</code></a>
+instruction, as described in <a href="#applying-templates" shape="rect"><i>6.3
 Applying Template Rules</i></a>; this sequence is often added to a
-<a title="result tree" class="termref" href=
-"#dt-result-tree">result tree</a>. Since the <a title=
-"sequence constructor" class="termref" href=
-"#dt-sequence-constructor">sequence constructors</a> of the
-selected <a title="template rule" class="termref" href=
-"#dt-template-rule">template rules</a> may themselves contain
-<a href=
-"#element-apply-templates"><code>xsl:apply-templates</code></a>
+<a title="result tree" class="termref" href="#dt-result-tree" shape="rect">result tree</a>. Since the <a title="sequence constructor" class="termref" href="#dt-sequence-constructor" shape="rect">sequence constructors</a> of the
+selected <a title="template rule" class="termref" href="#dt-template-rule" shape="rect">template rules</a> may themselves contain
+<a href="#element-apply-templates" shape="rect"><code>xsl:apply-templates</code></a>
 instructions, this results in a cycle of selecting nodes,
-identifying <a title="template rule" class="termref" href=
-"#dt-template-rule">template rules</a>, constructing sequences, and
-constructing <a title="result tree" class="termref" href=
-"#dt-result-tree">result trees</a>, that recurses through a
-<a title="source tree" class="termref" href=
-"#dt-source-tree">source tree</a>.</p>
-</div>
-<div class="div2">
-<h3><a name="context" id="context"></a>2.5 <a href="#context"
-style="text-decoration: none">The Evaluation Context</a></h3>
+identifying <a title="template rule" class="termref" href="#dt-template-rule" shape="rect">template rules</a>, constructing sequences, and
+constructing <a title="result tree" class="termref" href="#dt-result-tree" shape="rect">result trees</a>, that recurses through a
+<a title="source tree" class="termref" href="#dt-source-tree" shape="rect">source tree</a>.</p>
+</div>
+<div class="div2">
+<h3><a name="context" id="context" shape="rect"></a>2.5 <a href="#context" style="text-decoration: none" shape="rect">The Evaluation Context</a></h3>
 <p>The results of some expressions and instructions in a stylesheet
 may depend on information provided contextually. This context
 information is divided into two categories: the static context,
@@ -3099,11 +2320,9 @@
 results of XPath expressions used in that context. XSLT augments
 the context with additional information: this additional
 information is used firstly by XSLT constructs outside the scope of
-XPath (for example, the <a href=
-"#element-sort"><code>xsl:sort</code></a> element), and secondly,
+XPath (for example, the <a href="#element-sort" shape="rect"><code>xsl:sort</code></a> element), and secondly,
 by functions that are defined in the XSLT specification (such as
-<a href="#func-key"><code>key</code></a> and <a href=
-"#func-current-group"><code>current-group</code></a>) that are
+<a href="#func-key" shape="rect"><code>key</code></a> and <a href="#func-current-group" shape="rect"><code>current-group</code></a>) that are
 available for use in XPath expressions appearing within a
 stylesheet.</p>
 <p>The static context for an expression or other construct in a
@@ -3119,98 +2338,85 @@
 information from the dynamic context always uses the value at the
 top of the stack.</p>
 <p>The most commonly used component of the dynamic context is the
-<a title="context item" class="termref" href=
-"#dt-context-item">context item</a>. This is an implicit variable
+<a title="context item" class="termref" href="#dt-context-item" shape="rect">context item</a>. This is an implicit variable
 whose value is the item currently being processed (it may be a
 node, an atomic value, <span>or a function item</span>). The value
 of the context item can be referenced within an XPath expression
 using the expression <code>.</code> (dot).</p>
 <p>Full details of the static and dynamic context are provided in
-<a href="#static-and-dynamic-context"><i>5.4 The Static and Dynamic
+<a href="#static-and-dynamic-context" shape="rect"><i>5.4 The Static and Dynamic
 Context</i></a>.</p>
 </div>
 <div class="div2">
-<h3><a name="parsing-and-serialization" id=
-"parsing-and-serialization"></a>2.6 <a href=
-"#parsing-and-serialization" style="text-decoration: none">Parsing
+<h3><a name="parsing-and-serialization" id="parsing-and-serialization" shape="rect"></a>2.6 <a href="#parsing-and-serialization" style="text-decoration: none" shape="rect">Parsing
 and Serialization</a></h3>
-<p>An XSLT <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> describes a process that constructs
-a set of <a title="final result tree" class="termref" href=
-"#dt-final-result-tree">final result trees</a> from a set of
-<a title="source tree" class="termref" href=
-"#dt-source-tree">source trees</a>.</p>
-<p>The <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> does not describe how a <a title=
-"source tree" class="termref" href="#dt-source-tree">source
+<div class="diff-del" id="bug27258j" title="Bug 27258">
+<p>An XSLT <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> describes a process that constructs
+a set of <a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result trees</a> from a set of
+<a title="source tree" class="termref" href="#dt-source-tree" shape="rect">source trees</a>.</p>
+</div>
+<div class="diff-add" id="bug27258k" title="Bug 27258">
+<p>An XSLT <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> describes a process that constructs
+a set of results from a set of inputs. The inputs are the data
+provided at stylesheet invocation, as described in <a href="#initiating" shape="rect"><i>2.3 Initiating a Transformation</i></a>. The
+results include the <a title="principal result" class="termref" href="#dt-principal-result" shape="rect">principal result</a> (an arbitrary
+sequence), which is the result of the initial component invocation,
+together with any <a title="secondary result" class="termref" href="#dt-secondary-result" shape="rect">secondary results</a> produced using
+<a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
+instructions.</p>
+</div>
+<p>The <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> does not describe how a <a title="source tree" class="termref" href="#dt-source-tree" shape="rect">source
 tree</a> is constructed. Some possible ways of constructing source
-trees are described in <a href="#xpath-datamodel-30">[Data
-Model]</a>. Frequently an <a title="implementation" class="termref"
-href="#dt-implementation">implementation</a> will operate in
+trees are described in <a href="#xpath-datamodel-30" shape="rect">[Data
+Model]</a>. Frequently an <a title="implementation" class="termref" href="#dt-implementation" shape="rect">implementation</a> will operate in
 conjunction with an XML parser (or more strictly, in the
-terminology of <a href="#REC-xml">[XML 1.0]</a>, an <em>XML
+terminology of <a href="#REC-xml" shape="rect">[XML 1.0]</a>, an <em>XML
 processor</em>), to build a source tree from an input XML document.
 An implementation <span class="verb">may</span> also provide an
 application programming interface allowing the tree to be
 constructed directly, or allowing it to be supplied in the form of
-a DOM Document object (see <a href="#DOM-Level-2-Core">[DOM Level
+a DOM Document object (see <a href="#DOM-Level-2-Core" shape="rect">[DOM Level
 2]</a>). This is outside the scope of this specification. Users
 should be aware, however, that since the input to the
 transformation is a tree conforming to the XDM data model as
-described in <a href="#xpath-datamodel-30">[Data Model]</a>,
+described in <a href="#xpath-datamodel-30" shape="rect">[Data Model]</a>,
 constructs that might exist in the original XML document, or in the
 DOM, but which are not within the scope of the data model, cannot
-be processed by the <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> and cannot be guaranteed to remain
+be processed by the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> and cannot be guaranteed to remain
 unchanged in the transformation output. Such constructs include
 CDATA section boundaries, the use of entity references, and the
 DOCTYPE declaration and internal DTD subset.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-serialization" id="dt-serialization" title=
-"serialization"></a>A frequent requirement is to output a <a title=
-"final result tree" class="termref" href=
-"#dt-final-result-tree">final result tree</a> as an XML document
+<p><span class="definition">[Definition: </span><a name="dt-serialization" id="dt-serialization" title="serialization" shape="rect"></a>A frequent requirement is to output a <a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result tree</a> as an XML document
 (or in other formats such as HTML). This process is referred to as
 <b>serialization</b>.<span class="definition">]</span></p>
 <p>Like parsing, serialization is not part of the transformation
 process, and it is not <span class="verb">required</span> that an
 XSLT processor <span class="verb">must</span> be able to perform
 serialization. However, for pragmatic reasons, this specification
-describes declarations (the <a href=
-"#element-output"><code>xsl:output</code></a> element and the
-<a href="#element-character-map"><code>xsl:character-map</code></a>
-declarations, see <a href="#serialization"><i>25
-Serialization</i></a>), and attributes on the <a href=
-"#element-result-document"><code>xsl:result-document</code></a>
-instruction, that allow a <a title="stylesheet" class="termref"
-href="#dt-stylesheet">stylesheet</a> to specify the desired
+describes declarations (the <a href="#element-output" shape="rect"><code>xsl:output</code></a> element and the
+<a href="#element-character-map" shape="rect"><code>xsl:character-map</code></a>
+declarations, see <a href="#serialization" shape="rect"><i>25
+Serialization</i></a>), and attributes on the <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
+instruction, that allow a <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> to specify the desired
 properties of a serialized output file. When serialization is not
 being performed, either because the implementation does not support
 the serialization option, or because the user is executing the
 transformation in a way that does not invoke serialization, then
-the content of the <a href=
-"#element-output"><code>xsl:output</code></a> and <a href=
-"#element-character-map"><code>xsl:character-map</code></a>
+the content of the <a href="#element-output" shape="rect"><code>xsl:output</code></a> and <a href="#element-character-map" shape="rect"><code>xsl:character-map</code></a>
 declarations has no effect. Under these circumstances the processor
-<span class="verb">may</span> report any errors in an <a href=
-"#element-output"><code>xsl:output</code></a> or <a href=
-"#element-character-map"><code>xsl:character-map</code></a>
-declaration, or in the serialization attributes of <a href=
-"#element-result-document"><code>xsl:result-document</code></a>,
+<span class="verb">may</span> report any errors in an <a href="#element-output" shape="rect"><code>xsl:output</code></a> or <a href="#element-character-map" shape="rect"><code>xsl:character-map</code></a>
+declaration, or in the serialization attributes of <a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>,
 but is not <span class="verb">required</span> to do so.</p>
 </div>
 <div class="div2">
-<h3><a name="packages-and-modules" id=
-"packages-and-modules"></a>2.7 <a href="#packages-and-modules"
-style="text-decoration: none">Packages and Modules</a></h3>
+<h3><a name="packages-and-modules" id="packages-and-modules" shape="rect"></a>2.7 <a href="#packages-and-modules" style="text-decoration: none" shape="rect">Packages and Modules</a></h3>
 <p>In previous versions of the XSLT language, it has been possible
 to structure a stylesheet as a collection of modules, using the
-<a href="#element-include"><code>xsl:include</code></a> and
-<a href="#element-import"><code>xsl:import</code></a> declarations
+<a href="#element-include" shape="rect"><code>xsl:include</code></a> and
+<a href="#element-import" shape="rect"><code>xsl:import</code></a> declarations
 to express the dependency of on module on others.</p>
 <p>In XSLT 3.0 an additional layer of modularization of stylesheet
-code is enabled through the introduction of <a title="package"
-class="termref" href="#dt-package">packages</a>. A package is a
+code is enabled through the introduction of <a title="package" class="termref" href="#dt-package" shape="rect">packages</a>. A package is a
 collection of stylesheet modules with a controlled interface to the
 packages that use it: for example, it defines which functions and
 templates defined in the package are visible to callers, which are
@@ -3219,20 +2425,17 @@
 package.</p>
 <p>Packages are introduced with several motivations, which broadly
 divide into two categories:</p>
-<ol class="enumar">
-<li>
+<ol class="enumar"><li>
 <p>Software engineering benefits: greater re-use of code, greater
 robustness through ease of testing, controlled evolution of code in
 response to new requirements, ability to deliver code that users
 cannot see or modify.</p>
-</li>
-<li>
+</li><li>
 <p>Efficiency benefits: the ability to avoid compiling libraries
 repeatedly when they are used in multiple stylesheets, and to avoid
 holding multiple copies of the same library in memory
 simultaneously.</p>
-</li>
-</ol>
+</li></ol>
 <p>Packages are designed to allow separate compilation: that is, a
 package can be compiled independently of the packages that use it.
 This specification does not define a process model for compilation,
@@ -3241,67 +2444,45 @@
 feature along these lines. It merely defines language features that
 are designed to make separate compilation of packages possible.</p>
 <p>To achieve this, packages (unlike modules):</p>
-<ul>
-<li>
+<ul><li>
 <p>Must not contain unresolved references to functions, templates,
 or variables declared in other packages;</p>
-</li>
-<li>
+</li><li>
 <p>Have strict rules governing the ability to override declarations
-in a <a title="library package" class="termref" href=
-"#dt-library-package">library package</a> with declarations in a
+in a <a title="library package" class="termref" href="#dt-library-package" shape="rect">library package</a> with declarations in a
 package that uses the library;</p>
-</li>
-<li>
+</li><li>
 <p>Constrain the visibility of component names and of context
 declarations such as the declarations of keys and decimal
 formats;</p>
-</li>
-<li>
+</li><li>
 <p>Can declare a mode (a collection of template rules) as final,
 which disallows the addition of new overriding template rules in a
 using package;</p>
-</li>
-<li>
+</li><li>
 <p>Require explicit disambiguation where naming conflicts arise,
 for example when a package uses two other packages that both export
 like-named components;</p>
-</li>
-<li>
+</li><li>
 <p>Allow multiple specializations of library components to coexist
 in the same application.</p>
-</li>
-</ul>
+</li></ul>
 <p>A package is defined by means of an XML document whose outermost
-element is an <a href=
-"#element-package"><code>xsl:package</code></a> element. This is
-referred to as the <a title="package manifest" class="termref"
-href="#dt-package-manifest">package manifest</a>. The <a href=
-"#element-package"><code>xsl:package</code></a> element has
-optional child elements <a href=
-"#element-use-package"><code>xsl:use-package</code></a>, <a href=
-"#element-expose"><code>xsl:expose</code></a>, and <a href=
-"#element-global-context-item"><code>xsl:global-context-item</code></a>
+element is an <a href="#element-package" shape="rect"><code>xsl:package</code></a> element. This is
+referred to as the <a title="package manifest" class="termref" href="#dt-package-manifest" shape="rect">package manifest</a>. The <a href="#element-package" shape="rect"><code>xsl:package</code></a> element has
+optional child elements <a href="#element-use-package" shape="rect"><code>xsl:use-package</code></a>, <a href="#element-expose" shape="rect"><code>xsl:expose</code></a>, and <a href="#element-global-context-item" shape="rect"><code>xsl:global-context-item</code></a>
 describing properties of the package. The package manifest may
-refer to an external top-level stylesheet module using an <a href=
-"#element-include"><code>xsl:include</code></a> or <a href=
-"#element-import"><code>xsl:import</code></a> declaration, or it
+refer to an external top-level stylesheet module using an <a href="#element-include" shape="rect"><code>xsl:include</code></a> or <a href="#element-import" shape="rect"><code>xsl:import</code></a> declaration, or it
 may contain the body of a stylesheet module inline (the two
 approaches can also be mixed).</p>
 <p>When no packages are explicitly defined, the entire stylesheet
-is treated as a single package; the effect is as if the <a href=
-"#element-stylesheet"><code>xsl:stylesheet</code></a> or <a href=
-"#element-transform"><code>xsl:transform</code></a> element of the
-<a title="principal stylesheet module" class="termref" href=
-"#dt-principal-stylesheet-module">principal stylesheet module</a>
-were replaced by an <a href=
-"#element-package"><code>xsl:package</code></a> element with no
+is treated as a single package; the effect is as if the <a href="#element-stylesheet" shape="rect"><code>xsl:stylesheet</code></a> or <a href="#element-transform" shape="rect"><code>xsl:transform</code></a> element of the
+<a title="principal stylesheet module" class="termref" href="#dt-principal-stylesheet-module" shape="rect">principal stylesheet module</a>
+were replaced by an <a href="#element-package" shape="rect"><code>xsl:package</code></a> element with no
 other information in the package manifest.</p>
 </div>
 <div class="div2">
-<h3><a name="extensibility" id="extensibility"></a>2.8 <a href=
-"#extensibility" style=
-"text-decoration: none">Extensibility</a></h3>
+<h3><a name="extensibility" id="extensibility" shape="rect"></a>2.8 <a href="#extensibility" style="text-decoration: none" shape="rect">Extensibility</a></h3>
 <p>XSLT defines a number of features that allow the language to be
 extended by implementers, or, if implementers choose to provide the
 capability, by users. These features have been designed, so far as
@@ -3313,93 +2494,62 @@
 not clash with those of a different implementer.</p>
 <p>The most common way of extending the language is by providing
 additional functions, which can be invoked from XPath expressions.
-These are known as <a title="extension function" class="termref"
-href="#dt-extension-function">extension functions</a>, and are
-described in <a href="#extension-functions"><i>23.1 Extension
+These are known as <a title="extension function" class="termref" href="#dt-extension-function" shape="rect">extension functions</a>, and are
+described in <a href="#extension-functions" shape="rect"><i>23.1 Extension
 Functions</i></a>.</p>
 <p>It is also permissible to extend the language by providing new
-<a title="instruction" class="termref" href=
-"#dt-instruction">instructions</a>. These are referred to as
-<a title="extension instruction" class="termref" href=
-"#dt-extension-instruction">extension instructions</a>, and are
-described in <a href="#extension-instruction"><i>23.2 Extension
+<a title="instruction" class="termref" href="#dt-instruction" shape="rect">instructions</a>. These are referred to as
+<a title="extension instruction" class="termref" href="#dt-extension-instruction" shape="rect">extension instructions</a>, and are
+described in <a href="#extension-instruction" shape="rect"><i>23.2 Extension
 Instructions</i></a>. A stylesheet that uses extension instructions
 in a particular namespace must declare that it is doing so by using
 the <code>[xsl:]extension-element-prefixes</code> attribute.</p>
 <p>Extension instructions and extension functions defined according
 to these rules <span class="verb">may</span> be provided by the
-implementer of the XSLT processor, and the implementer <span class=
-"verb">may</span> also provide facilities to allow users to create
+implementer of the XSLT processor, and the implementer <span class="verb">may</span> also provide facilities to allow users to create
 further extension instructions and extension functions.</p>
 <p>This specification defines how extension instructions and
 extension functions are invoked, but the facilities for creating
-new extension instructions and extension functions are <a title=
-"implementation-defined" class="termref" href=
-"#dt-implementation-defined">implementation-defined</a>. For
-further details, see <a href="#extension"><i>23 Extensibility and
+new extension instructions and extension functions are <a title="implementation-defined" class="termref" href="#dt-implementation-defined" shape="rect">implementation-defined</a>. For
+further details, see <a href="#extension" shape="rect"><i>23 Extensibility and
 Fallback</i></a>.</p>
-<p>The XSLT language can also be extended by the use of <a title=
-"extension attribute" class="termref" href=
-"#dt-extension-attribute">extension attributes</a> (see <a href=
-"#extension-attributes"><i>3.3 Extension Attributes</i></a>), and
-by means of <a title="user-defined data element" class="termref"
-href="#dt-data-element">user-defined data elements</a> (see
-<a href="#user-defined-top-level"><i>3.8.3 User-defined Data
+<p>The XSLT language can also be extended by the use of <a title="extension attribute" class="termref" href="#dt-extension-attribute" shape="rect">extension attributes</a> (see <a href="#extension-attributes" shape="rect"><i>3.3 Extension Attributes</i></a>), and
+by means of <a title="user-defined data element" class="termref" href="#dt-data-element" shape="rect">user-defined data elements</a> (see
+<a href="#user-defined-top-level" shape="rect"><i>3.8.3 User-defined Data
 Elements</i></a>).</p>
 </div>
 <div class="div2">
-<h3><a name="stylesheets-and-schemas" id=
-"stylesheets-and-schemas"></a>2.9 <a href=
-"#stylesheets-and-schemas" style=
-"text-decoration: none">Stylesheets and XML Schemas</a></h3>
-<p>An XSLT <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> can make use of information from a
+<h3><a name="stylesheets-and-schemas" id="stylesheets-and-schemas" shape="rect"></a>2.9 <a href="#stylesheets-and-schemas" style="text-decoration: none" shape="rect">Stylesheets and XML Schemas</a></h3>
+<p>An XSLT <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> can make use of information from a
 schema. An XSLT transformation can take place in the absence of a
 schema (and, indeed, in the absence of a DTD), but where the source
 document has undergone schema validity assessment, the XSLT
 processor has access to the type information associated with
 individual nodes, not merely to the untyped text.</p>
 <p>Information from a schema can be used both statically (when the
-<a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> is compiled), and dynamically
+<a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> is compiled), and dynamically
 (during evaluation of the stylesheet to transform a source
 document).</p>
-<p>There are places within a <a title="stylesheet" class="termref"
-href="#dt-stylesheet">stylesheet</a>, and within XPath <a title=
-"expression" class="termref" href="#dt-expression">expressions</a>
-and <a title="pattern" class="termref" href=
-"#dt-pattern">patterns</a> in a <a title="stylesheet" class=
-"termref" href="#dt-stylesheet">stylesheet</a>, where it is
+<p>There are places within a <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>, and within XPath <a title="expression" class="termref" href="#dt-expression" shape="rect">expressions</a>
+and <a title="pattern" class="termref" href="#dt-pattern" shape="rect">patterns</a> in a <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>, where it is
 possible to refer to named type definitions in a schema, or to
 element and attribute declarations. For example, it is possible to
 declare the types expected for the parameters of a function. This
-is done using the <a href=
-"http://www.w3.org/TR/xpath-30/#prod-xpath30-SequenceType">SequenceType</a><sup><small>XP30</small></sup>
-syntax defined in <a href="#xpath-30">[XPath 3.0]</a>.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-schema-component" id="dt-schema-component" title=
-"schema component"></a>Type definitions and element and attribute
+is done using the <a href="http://www.w3.org/TR/xpath-30/#prod-xpath30-SequenceType" shape="rect">SequenceType</a><sup><small>XP30</small></sup>
+syntax defined in <a href="#xpath-30" shape="rect">[XPath 3.0]</a>.</p>
+<p><span class="definition">[Definition: </span><a name="dt-schema-component" id="dt-schema-component" title="schema component" shape="rect"></a>Type definitions and element and attribute
 declarations are referred to collectively as <b>schema
 components</b>.<span class="definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-in-scope-schema-component" id="dt-in-scope-schema-component"
-title="in-scope schema component"></a>The <a title=
-"schema component" class="termref" href=
-"#dt-schema-component">schema components</a> that may be referenced
-by name in a <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> are referred to as the <b>in-scope
+<p><span class="definition">[Definition: </span><a name="dt-in-scope-schema-component" id="dt-in-scope-schema-component" title="in-scope schema component" shape="rect"></a>The <a title="schema component" class="termref" href="#dt-schema-component" shape="rect">schema components</a> that may be referenced
+by name in a <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> are referred to as the <b>in-scope
 schema components</b>. This set is the same throughout all the
 modules of a stylesheet.<span class="definition">]</span></p>
 <p>The conformance rules for XSLT <span>3.0</span>, defined in
-<a href="#conformance"><i>26 Conformance</i></a>, distinguish
-between a <a title="basic XSLT processor" class="termref" href=
-"#dt-basic-xslt-processor">basic XSLT processor</a> and a <a title=
-"schema-aware XSLT processor" class="termref" href=
-"#dt-schema-aware-xslt-processor">schema-aware XSLT processor</a>.
+<a href="#conformance" shape="rect"><i>26 Conformance</i></a>, distinguish
+between a <a title="basic XSLT processor" class="termref" href="#dt-basic-xslt-processor" shape="rect">basic XSLT processor</a> and a <a title="schema-aware XSLT processor" class="termref" href="#dt-schema-aware-xslt-processor" shape="rect">schema-aware XSLT processor</a>.
 As the names suggest, a basic XSLT processor does not support the
 features of XSLT that require access to schema information, either
-statically or dynamically. A <a title="stylesheet" class="termref"
-href="#dt-stylesheet">stylesheet</a> that works with a basic XSLT
+statically or dynamically. A <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> that works with a basic XSLT
 processor will produce the same results with a schema-aware XSLT
 processor provided that the source documents are untyped (that is,
 they are not validated against a schema). However, if source
@@ -3407,8 +2557,7 @@
 different from the case where they are not validated. Some
 constructs that work on untyped data may fail with typed data (for
 example, an attribute of type <code>xs:date</code> cannot be used
-as an argument of the <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-substring"><code>substring</code></a><sup><small>FO30</small></sup>
+as an argument of the <a href="http://www.w3.org/TR/xpath-functions-30/#func-substring" shape="rect"><code>substring</code></a><sup><small>FO30</small></sup>
 function) and other constructs may produce different results
 depending on the datatype (for example, given the element
 <code>&lt;product price="10.00" discount="2.00"/&gt;</code>, the
@@ -3416,64 +2565,49 @@
 attributes have type <code>xs:decimal</code>, but will return false
 if they are untyped).</p>
 <p>There is a standard set of type definitions that are always
-available as <a title="in-scope schema component" class="termref"
-href="#dt-in-scope-schema-component">in-scope schema components</a>
-in every stylesheet. These are defined in <a href=
-"#built-in-types"><i>3.15 Built-in Types</i></a>.</p>
+available as <a title="in-scope schema component" class="termref" href="#dt-in-scope-schema-component" shape="rect">in-scope schema components</a>
+in every stylesheet. These are defined in <a href="#built-in-types" shape="rect"><i>3.15 Built-in Types</i></a>.</p>
 <p>The remainder of this section describes facilities that are
-available only with a <a title="schema-aware XSLT processor" class=
-"termref" href="#dt-schema-aware-xslt-processor">schema-aware XSLT
+available only with a <a title="schema-aware XSLT processor" class="termref" href="#dt-schema-aware-xslt-processor" shape="rect">schema-aware XSLT
 processor</a>.</p>
-<p>Additional <a title="schema component" class="termref" href=
-"#dt-schema-component">schema components</a> (type definitions,
+<p>Additional <a title="schema component" class="termref" href="#dt-schema-component" shape="rect">schema components</a> (type definitions,
 element declarations, and attribute declarations) may be added to
-the <a title="in-scope schema component" class="termref" href=
-"#dt-in-scope-schema-component">in-scope schema components</a> by
-means of the <a href=
-"#element-import-schema"><code>xsl:import-schema</code></a>
+the <a title="in-scope schema component" class="termref" href="#dt-in-scope-schema-component" shape="rect">in-scope schema components</a> by
+means of the <a href="#element-import-schema" shape="rect"><code>xsl:import-schema</code></a>
 declaration in a stylesheet.</p>
-<p>The <a href=
-"#element-import-schema"><code>xsl:import-schema</code></a>
+<p>The <a href="#element-import-schema" shape="rect"><code>xsl:import-schema</code></a>
 declaration may reference an external schema document by means of a
 URI, or it may contain an inline <code>xs:schema</code>
 element.</p>
 <p>It is only necessary to import a schema explicitly if one or
-more of its <a title="schema component" class="termref" href=
-"#dt-schema-component">schema components</a> are referenced
-explicitly by name in the <a title="stylesheet" class="termref"
-href="#dt-stylesheet">stylesheet</a>; it is not necessary to import
+more of its <a title="schema component" class="termref" href="#dt-schema-component" shape="rect">schema components</a> are referenced
+explicitly by name in the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>; it is not necessary to import
 a schema merely because the stylesheet is used to process a source
 document that has been assessed against that schema. It is possible
 to make use of the information resulting from schema assessment
 (for example, the fact that a particular attribute holds a date)
 even if no schema has been imported by the stylesheet.</p>
 <p>Importing a schema does not of itself say anything about the
-type of the source document that the <a title="stylesheet" class=
-"termref" href="#dt-stylesheet">stylesheet</a> is expected to
+type of the source document that the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> is expected to
 process. The imported type definitions can be used for temporary
-nodes or for nodes on a <a title="result tree" class="termref"
-href="#dt-result-tree">result tree</a> just as much as for nodes in
+nodes or for nodes on a <a title="result tree" class="termref" href="#dt-result-tree" shape="rect">result tree</a> just as much as for nodes in
 source documents. It is possible to make assertions about the type
-of an input document by means of tests within the <a title=
-"stylesheet" class="termref" href="#dt-stylesheet">stylesheet</a>.
+of an input document by means of tests within the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>.
 For example:</p>
-<div class="example">
-<div class="exampleHeader"><a name="d7e3172" id=
-"d7e3172"></a>Example: Asserting the Required Type of the Source
+<div class="diff-chg" id="bug27152a" title="Bug 27152">
+<div class="example-chg">
+<div class="exampleHeader"><a name="d7e3296" id="d7e3296" shape="rect"></a>Example: Asserting the Required Type of the Source
 Document</div>
 <div class="exampleInner">
-<pre>
-&lt;xsl:mode typed="lax"&gt;
-  &lt;xsl:context-item use="required"
-                    as="document-node(schema-element(my:invoice))"/&gt;
-&lt;/xsl:mode&gt;
+<pre xml:space="preserve">
+&lt;xsl:mode typed="lax"/&gt;
+&lt;xsl:global-context-item use="required"
+            as="document-node(schema-element(my:invoice))"/&gt;
 </pre></div>
 <p>This example will cause the transformation to fail with an error
-message when the <a title="initial mode" class="termref" href=
-"#dt-initial-mode">initial mode</a> is the unnamed mode, unless the
-document element of the source document is valid against the
-top-level element declaration <code>my:invoice</code>, and has been
-annotated as such.</p>
+message, unless the <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context item</a> is valid
+against the top-level element declaration <code>my:invoice</code>,
+and has been annotated as such.</p>
 <p>The setting <code>typed="lax"</code> further ensures that in any
 match pattern for a template rule in this mode, an element name
 that corresponds to the name of an element declaration in the
@@ -3486,18 +2620,17 @@
 expressions contain misspelt element names, or confuse an element
 with an attribute.</p>
 </div>
+</div>
 <p>It is also true that importing a schema does not of itself say
 anything about the structure of the result tree. It is possible to
 request validation of a result tree against the schema by using the
-<a href=
-"#element-result-document"><code>xsl:result-document</code></a>
+<a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>
 instruction, for example:</p>
-<div class="example">
-<div class="exampleHeader"><a name="d7e3200" id=
-"d7e3200"></a>Example: Requesting Validation of the Result
+<div class="example-chg">
+<div class="exampleHeader"><a name="d7e3324" id="d7e3324" shape="rect"></a>Example: Requesting Validation of the Result
 Document</div>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
 &lt;xsl:template match="/"&gt;
   &lt;xsl:result-document validation="strict"&gt;
     &lt;xhtml:html&gt;
@@ -3513,169 +2646,116 @@
 <code>xhtml:html</code>.</p>
 </div>
 <p>It is possible that a source document may contain nodes whose
-<a title="type annotation" class="termref" href=
-"#dt-type-annotation">type annotation</a> is not one of the types
+<a title="type annotation" class="termref" href="#dt-type-annotation" shape="rect">type annotation</a> is not one of the types
 imported by the stylesheet. This creates a potential problem
 because in the case of an expression such as <code>data(.) instance
 of xs:integer</code> the system needs to know whether the type
 named in the type annotation of the context node is derived by
 restriction from the type <code>xs:integer</code>. This information
-is not explicitly available in an XDM tree, as defined in <a href=
-"#xpath-datamodel-30">[Data Model]</a>. The implementation may
+is not explicitly available in an XDM tree, as defined in <a href="#xpath-datamodel-30" shape="rect">[Data Model]</a>. The implementation may
 choose one of several strategies for dealing with this
 situation:</p>
-<ol class="enumar">
-<li>
-<p>The processor may signal a <a title="dynamic error" class=
-"termref" href="#dt-dynamic-error">dynamic error</a> if a source
-document is found to contain a <a title="type annotation" class=
-"termref" href="#dt-type-annotation">type annotation</a> that is
+<ol class="enumar"><li>
+<p>The processor may signal a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> if a source
+document is found to contain a <a title="type annotation" class="termref" href="#dt-type-annotation" shape="rect">type annotation</a> that is
 not known to the processor.</p>
-</li>
-<li>
+</li><li>
 <p>The processor may maintain additional metadata, beyond that
-described in <a href="#xpath-datamodel-30">[Data Model]</a>, that
+described in <a href="#xpath-datamodel-30" shape="rect">[Data Model]</a>, that
 allows the source document to be processed as if all the necessary
-schema information had been imported using <a href=
-"#element-import-schema"><code>xsl:import-schema</code></a>. Such
+schema information had been imported using <a href="#element-import-schema" shape="rect"><code>xsl:import-schema</code></a>. Such
 metadata might be held in the data structure representing the
 source document itself, or it might be held in a system catalog or
 repository.</p>
-</li>
-<li>
+</li><li>
 <p>The processor may be configured to use a fixed set of schemas,
 which are automatically used to validate all source documents
 before they can be supplied as input to a transformation. In this
-case it is impossible for a source document to have a <a title=
-"type annotation" class="termref" href="#dt-type-annotation">type
+case it is impossible for a source document to have a <a title="type annotation" class="termref" href="#dt-type-annotation" shape="rect">type
 annotation</a> that the processor is not aware of.</p>
-</li>
-<li>
+</li><li>
 <p>The processor may be configured to treat the source document as
 if no schema processing had been performed, that is, effectively to
 strip all type annotations from elements and attributes on input,
 marking them instead as having type <code>xs:untyped</code> and
 <code>xs:untypedAtomic</code> respectively.</p>
-</li>
-</ol>
+</li></ol>
 <p>Where a stylesheet author chooses to make assertions about the
-types of nodes or of <a title="variable" class="termref" href=
-"#dt-variable">variables</a> and <a title="parameter" class=
-"termref" href="#dt-parameter">parameters</a>, it is possible for
-an XSLT processor to perform static analysis of the <a title=
-"stylesheet" class="termref" href="#dt-stylesheet">stylesheet</a>
+types of nodes or of <a title="variable" class="termref" href="#dt-variable" shape="rect">variables</a> and <a title="parameter" class="termref" href="#dt-parameter" shape="rect">parameters</a>, it is possible for
+an XSLT processor to perform static analysis of the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>
 (that is, analysis in the absence of any source document). Such
 analysis <span class="verb">may</span> reveal errors that would
 otherwise not be discovered until the transformation is actually
-executed. An XSLT processor is not <span class=
-"verb">required</span> to perform such static type-checking. Under
-some circumstances (see <a href="#errors"><i>2.11 Error
-Handling</i></a>) type errors that are detected early <span class=
-"verb">may</span> be reported as static errors. In addition an
+executed. An XSLT processor is not <span class="verb">required</span> to perform such static type-checking. Under
+some circumstances (see <a href="#errors" shape="rect"><i>2.11 Error
+Handling</i></a>) type errors that are detected early <span class="verb">may</span> be reported as static errors. In addition an
 implementation <span class="verb">may</span> report any condition
 found during static analysis as a warning, provided that this does
 not prevent the stylesheet being evaluated as described by this
 specification.</p>
-<p>A <a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> can also control the <a title=
-"type annotation" class="termref" href="#dt-type-annotation">type
-annotations</a> of nodes that it constructs in a <a title=
-"final result tree" class="termref" href=
-"#dt-final-result-tree">final result tree</a>, or in <a title=
-"temporary tree" class="termref" href=
-"#dt-temporary-tree">temporary trees</a>. This can be done in a
-number of ways.</p>
-<ul>
-<li>
+<p>A <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> can also control the <a title="type annotation" class="termref" href="#dt-type-annotation" shape="rect">type
+annotations</a> of nodes that it constructs in a <span class="diff-chg" id="bug27258l" title="Bug 27258"><span><a title="result tree" class="termref" href="#dt-result-tree" shape="rect">result
+tree</a></span></span>. This can be done in a number of ways.</p>
+<ul><li>
 <p>It is possible to request explicit validation of a complete
-document, that is, a tree rooted at a document node. This applies
-both to temporary trees constructed using the <a href=
-"#element-document"><code>xsl:document</code></a> (or <a href=
-"#element-copy"><code>xsl:copy</code></a>) instruction and also to
-<a title="final result tree" class="termref" href=
-"#dt-final-result-tree">final result trees</a> constructed using
-<a href=
-"#element-result-document"><code>xsl:result-document</code></a>.
-Validation is either strict or lax, as described in <a href=
-"#xmlschema-1">[XML Schema Part 1]</a>. If validation of a
-<a title="result tree" class="termref" href=
-"#dt-result-tree">result tree</a> fails (strictly speaking, if the
+document, that is, a <span class="diff-chg" id="bug27258m" title="Bug 27258"><span><a title="result tree" class="termref" href="#dt-result-tree" shape="rect">result tree</a></span></span> rooted at a
+document node. <span class="diff-del" id="bug27258n" title="Bug 27258"><span>This applies both to temporary trees constructed
+using the <a href="#element-document" shape="rect"><code>xsl:document</code></a>
+(or <a href="#element-copy" shape="rect"><code>xsl:copy</code></a>) instruction
+and also to <a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result trees</a> constructed using
+<a href="#element-result-document" shape="rect"><code>xsl:result-document</code></a>.</span></span>
+Validation is either strict or lax, as described in <a href="#xmlschema-1" shape="rect">[XML Schema Part 1]</a>. If validation of a
+<a title="result tree" class="termref" href="#dt-result-tree" shape="rect">result tree</a> fails (strictly speaking, if the
 outcome of the validity assessment is <code>invalid</code>), then
 the transformation fails, but in all other cases, the element and
 attribute nodes of the tree will be annotated with the names of the
-types to which these nodes conform. These <a title=
-"type annotation" class="termref" href="#dt-type-annotation">type
+types to which these nodes conform. These <a title="type annotation" class="termref" href="#dt-type-annotation" shape="rect">type
 annotations</a> will be discarded if the result tree is serialized
 as an XML document, but they remain available when the result tree
-is passed to an application (perhaps another <a title="stylesheet"
-class="termref" href="#dt-stylesheet">stylesheet</a>) for further
+is passed to an application (perhaps another <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>) for further
 processing.</p>
-</li>
-<li>
+</li><li>
 <p>It is also possible to validate individual element and attribute
 nodes as they are constructed. This is done using the
 <code>type</code> and <code>validation</code> attributes of the
-<a href="#element-element"><code>xsl:element</code></a>, <a href=
-"#element-attribute"><code>xsl:attribute</code></a>, <a href=
-"#element-copy"><code>xsl:copy</code></a>, and <a href=
-"#element-copy-of"><code>xsl:copy-of</code></a> instructions, or
+<a href="#element-element" shape="rect"><code>xsl:element</code></a>, <a href="#element-attribute" shape="rect"><code>xsl:attribute</code></a>, <a href="#element-copy" shape="rect"><code>xsl:copy</code></a>, and <a href="#element-copy-of" shape="rect"><code>xsl:copy-of</code></a> instructions, or
 the <code>xsl:type</code> and <code>xsl:validation</code>
 attributes of a literal result element.</p>
-</li>
-<li>
+</li><li>
 <p>When elements, attributes, or document nodes are copied, either
-explicitly using the <a href=
-"#element-copy"><code>xsl:copy</code></a> or <a href=
-"#element-copy-of"><code>xsl:copy-of</code></a> instructions, or
+explicitly using the <a href="#element-copy" shape="rect"><code>xsl:copy</code></a> or <a href="#element-copy-of" shape="rect"><code>xsl:copy-of</code></a> instructions, or
 implicitly when nodes in a sequence are attached to a new parent
 node, the options <code>validation="strip"</code> and
 <code>validation="preserve"</code> are available, to control
-whether existing <a title="type annotation" class="termref" href=
-"#dt-type-annotation">type annotations</a> are to be retained or
+whether existing <a title="type annotation" class="termref" href="#dt-type-annotation" shape="rect">type annotations</a> are to be retained or
 not.</p>
-</li>
-</ul>
-<p>When nodes in a <a title="temporary tree" class="termref" href=
-"#dt-temporary-tree">temporary tree</a> are validated, type
+</li></ul>
+<p>When nodes in a <a title="temporary tree" class="termref" href="#dt-temporary-tree" shape="rect">temporary tree</a> are validated, type
 information is available for use by operations carried out on the
 temporary tree, in the same way as for a source document that has
 undergone schema assessment.</p>
 <p>For details of how validation of element and attribute nodes
-works, see <a href="#validation"><i>24.4 Validation</i></a>.</p>
-</div>
-<div class="div2">
-<h3><a name="streaming-concepts" id="streaming-concepts"></a>2.10
-<a href="#streaming-concepts" style=
-"text-decoration: none">Streaming</a></h3>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-streaming" id="dt-streaming" title="streaming"></a>The term
+works, see <a href="#validation" shape="rect"><i>24.4 Validation</i></a>.</p>
+</div>
+<div class="div2">
+<h3><a name="streaming-concepts" id="streaming-concepts" shape="rect"></a>2.10
+<a href="#streaming-concepts" style="text-decoration: none" shape="rect">Streaming</a></h3>
+<p><span class="definition">[Definition: </span><a name="dt-streaming" id="dt-streaming" title="streaming" shape="rect"></a>The term
 <b>streaming</b> refers to a manner of processing in which
 documents (such as source and result documents) are not represented
 by a complete tree of nodes occupying memory proportional to
 document size, but instead are processed "on the fly" as a sequence
 of events, similar in concept to the stream of events notified by
-an XML parser to represent markup in lexical XML.<span class=
-"definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-streamed-document" id="dt-streamed-document" title=
-"streamed document"></a>A <b>streamed document</b> is a <a title=
-"source tree" class="termref" href="#dt-source-tree">source
+an XML parser to represent markup in lexical XML.<span class="definition">]</span></p>
+<p><span class="definition">[Definition: </span><a name="dt-streamed-document" id="dt-streamed-document" title="streamed document" shape="rect"></a>A <b>streamed document</b> is a <a title="source tree" class="termref" href="#dt-source-tree" shape="rect">source
 tree</a> that is processed using streaming, that is, without
-constructing a complete tree of nodes in memory.<span class=
-"definition">]</span></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-streamed-document-node" id="dt-streamed-document-node" title=
-"streamed node"></a>A <b>streamed node</b> is a node in a <a title=
-"streamed document" class="termref" href=
-"#dt-streamed-document">streamed document</a>.<span class=
-"definition">]</span></p>
+constructing a complete tree of nodes in memory.<span class="definition">]</span></p>
+<p><span class="definition">[Definition: </span><a name="dt-streamed-document-node" id="dt-streamed-document-node" title="streamed node" shape="rect"></a>A <b>streamed node</b> is a node in a <a title="streamed document" class="termref" href="#dt-streamed-document" shape="rect">streamed document</a>.<span class="definition">]</span></p>
 <p>Many processors implementing earlier versions of this
 specification have adopted an architecture that allows streaming of
-the <a title="result tree" class="termref" href=
-"#dt-result-tree">result tree</a> directly to a serializer, without
+the <a title="result tree" class="termref" href="#dt-result-tree" shape="rect">result tree</a> directly to a serializer, without
 first materializing the complete result tree in memory. Streaming
-of the <a title="source tree" class="termref" href=
-"#dt-source-tree">source tree</a>, however, has proved to be more
+of the <a title="source tree" class="termref" href="#dt-source-tree" shape="rect">source tree</a>, however, has proved to be more
 difficult without subsetting the language. This has created a
 situation where documents exceeding the capacity of virtual memory
 could not be transformed. XSLT 3.0 therefore introduces facilities
@@ -3699,8 +2779,7 @@
 attempt to describe the algorithms that the processor should
 actually use, or to impose quantitative constraints on the
 resources that these algorithms should consume.</p>
-<p>Nothing in this specification, nor in its predecessors <a href=
-"#xslt">[XSLT 1.0]</a> and <a href="#xslt20">[XSLT 2.0]</a>,
+<p>Nothing in this specification, nor in its predecessors <a href="#xslt" shape="rect">[XSLT 1.0]</a> and <a href="#xslt20" shape="rect">[XSLT 2.0]</a>,
 prevents a processor using streaming whenever it sees an
 opportunity to do so. However, experience has shown that in order
 to achieve streaming, it is often necessary to write stylesheet
@@ -3712,8 +2791,7 @@
 <p>A processor that claims conformance with the streaming option
 offers a guarantee that when streaming is requested for a source
 document, and when the stylesheet conforms to the rules that make
-the processing <a title="guaranteed-streamable" class="termref"
-href="#dt-guaranteed-streamable">guaranteed-streamable</a>, then an
+the processing <a title="guaranteed-streamable" class="termref" href="#dt-guaranteed-streamable" shape="rect">guaranteed-streamable</a>, then an
 algorithm will be adopted in which memory consumption is either
 completely independent of document size, or increases only very
 slowly as document size increases, allowing documents to be
@@ -3735,53 +2813,41 @@
 environment.</p>
 <p>Streamed processing of a document can be initiated in one of
 <span>three</span> ways:</p>
-<ul>
-<li>
-<p>The <a title="initial mode" class="termref" href=
-"#dt-initial-mode">initial mode</a> can be declared as a <a title=
-"streamable mode" class="termref" href=
-"#dt-streamable-mode">streamable mode</a>. In this case the
-<span><a title="initial match selection" class="termref" href=
-"#dt-initial-match-selection">initial match selection</a> will
+<ul><li>
+<p>The <a title="initial mode" class="termref" href="#dt-initial-mode" shape="rect">initial mode</a> can be declared as a <a title="streamable mode" class="termref" href="#dt-streamable-mode" shape="rect">streamable mode</a>. In this case the
+<span><a title="initial match selection" class="termref" href="#dt-initial-match-selection" shape="rect">initial match selection</a> will
 generally be a document node (or sequence of document
 nodes),</span> supplied by the calling application in a form that
 allows streaming (that is, in some form other than a tree in
 memory; for example, as a reference to a push or pull XML parser
 primed to deliver a stream of events). <span>The type of these
 nodes can be constrained by using the attribute
-<code>on-no-match="fail"</code> on the <a title="initial mode"
-class="termref" href="#dt-initial-mode">initial mode</a>, and using
+<code>on-no-match="fail"</code> on the <a title="initial mode" class="termref" href="#dt-initial-mode" shape="rect">initial mode</a>, and using
 this mode only for processing the top-level nodes.</span></p>
-</li>
-<li>
+</li><li>
 <p>Streamed processing of any document can be initiated using the
-<a href="#element-stream"><code>xsl:stream</code></a> instruction.
+<a href="#element-stream" shape="rect"><code>xsl:stream</code></a> instruction.
 This has an attribute <code>href</code> whose value is the URI of a
 document to be processed using streaming, and the actual processing
 to be applied is defined by the instructions written as children of
-the <a href="#element-stream"><code>xsl:stream</code></a>
-instruction.</p>
-</li>
-<li>
-<p>Streamed merging of a set of input documents can be initiated
-using the <a href="#element-merge"><code>xsl:merge</code></a>
+the <a href="#element-stream" shape="rect"><code>xsl:stream</code></a>
 instruction.</p>
-</li>
-</ul>
+</li><li>
+<p>Streamed merging of a set of input documents can be initiated
+using the <a href="#element-merge" shape="rect"><code>xsl:merge</code></a>
+instruction.</p>
+</li></ul>
 <p>The rules for streamability, which are defined in detail in
-<a href="#streamability"><i>19 Streamability</i></a>, impose two
+<a href="#streamability" shape="rect"><i>19 Streamability</i></a>, impose two
 main constraints:</p>
-<ul>
-<li>
+<ul><li>
 <p>The only nodes reachable from the node that is currently being
 processed are its attributes and namespaces, its ancestors and
 their attributes and namespaces, and its descendants and their
 attributes and namespaces. The siblings of the node, and the
 siblings of its ancestors, are not reachable in the tree, and any
-attempt to use their values is a <a title="static error" class=
-"termref" href="#dt-static-error">static error</a>.</p>
-</li>
-<li>
+attempt to use their values is a <a title="static error" class="termref" href="#dt-static-error" shape="rect">static error</a>.</p>
+</li><li>
 <p>When processing a given node in the tree, each descendant node
 can only be visited once. Essentially this allows two styles of
 processing: either visit each of the children once, and then
@@ -3789,8 +2855,7 @@
 all the descendants in a single pass, in which case it is not
 possible while processing a descendant to make any further downward
 selection.</p>
-</li>
-</ul>
+</li></ul>
 <p>The second restriction, that only one visit to the children is
 allowed, means that XSLT code that was not designed with streaming
 in mind will often need to be rewritten to make it streamable. In
@@ -3804,14 +2869,11 @@
 transformation that takes a snapshot of each element in turn,
 processing the snapshot using the full power of the XSLT language.
 Each snapshot is a tree built in memory and is therefore fully
-navigable. For details see the <a href=
-"#func-snapshot"><code>snapshot</code></a> and <a href=
-"#func-copy-of"><code>copy-of</code></a> functions.</p>
+navigable. For details see the <a href="#func-snapshot" shape="rect"><code>snapshot</code></a> and <a href="#func-copy-of" shape="rect"><code>copy-of</code></a> functions.</p>
 <p>The new facility of <em>accumulators</em> allows applications
 complete control over how much information is retained (and by
 implication, how much memory is required) in the course of a pass
-over a <a title="streamed document" class="termref" href=
-"#dt-streamed-document">streamed document</a>. An accumulator
+over a <a title="streamed document" class="termref" href="#dt-streamed-document" shape="rect">streamed document</a>. An accumulator
 computes a value for every node in a streamed document: or more
 accurately, two values, one for the first visit to a node (before
 visiting its descendants), and a second value for the second visit
@@ -3824,51 +2886,44 @@
 the convenience and economy of mutable variables while remaining
 within the constraints of a purely declarative processing
 model.</p>
+<div class="diff-add" id="bug27660a" title="Bug 27660">
+<p>When streaming is initiated, for example using the <a href="#element-stream" shape="rect"><code>xsl:stream</code></a> instruction, it is
+necessary to declare which accumulators are applicable to the
+streamed document.</p>
+</div>
 <p>Streaming applications often fall into one of the following
 categories:</p>
-<ul>
-<li>
+<ul><li>
 <p>Aggregation applications, where a single aggregation operation
-(perhaps <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-count"><code>count</code></a><sup><small>FO30</small></sup>,
-<a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-sum"><code>sum</code></a><sup><small>FO30</small></sup>,
-<a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-exists"><code>exists</code></a><sup><small>FO30</small></sup>,
-or <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-distinct-values"><code>
+(perhaps <a href="http://www.w3.org/TR/xpath-functions-30/#func-count" shape="rect"><code>count</code></a><sup><small>FO30</small></sup>,
+<a href="http://www.w3.org/TR/xpath-functions-30/#func-sum" shape="rect"><code>sum</code></a><sup><small>FO30</small></sup>,
+<a href="http://www.w3.org/TR/xpath-functions-30/#func-exists" shape="rect"><code>exists</code></a><sup><small>FO30</small></sup>,
+or <a href="http://www.w3.org/TR/xpath-functions-30/#func-distinct-values" shape="rect"><code>
 distinct-values</code></a><sup><small>FO30</small></sup>) is
 applied to a set of elements selected from the streamed source
 document by means of a path expression.</p>
-</li>
-<li>
+</li><li>
 <p>Record-at-a-time applications, where the source document
 consists of a long sequence of elements with similar structure
 ("records"), and each "record" is processed using the same logic,
 independently of any other "records". This kind of processing is
-facilitated using the <a href=
-"#func-snapshot"><code>snapshot</code></a> and <a href=
-"#func-copy-of"><code>copy-of</code></a> function mentioned
+facilitated using the <a href="#func-snapshot" shape="rect"><code>snapshot</code></a> and <a href="#func-copy-of" shape="rect"><code>copy-of</code></a> function mentioned
 earlier.</p>
-</li>
-<li>
+</li><li>
 <p>Grouping applications, where the output follows the structure of
 the input, except that an extra layer of hierarchy is added. For
 example, the input might be a flat series of banking transactions
 in date/time order, and the output might contain the same
 transactions grouped by date.</p>
-</li>
-<li>
+</li><li>
 <p>Accumulator applications, which are the same as record-at-a-time
 applications, except that the processing of one "record" might
 depend on data encountered earlier in the document. A classic
 example is processing a sequence of banking transactions in which
 the input transaction contains a debit or credit amount, and the
-output adds a running total (the account balance). The <a href=
-"#element-iterate"><code>xsl:iterate</code></a> instruction has
+output adds a running total (the account balance). The <a href="#element-iterate" shape="rect"><code>xsl:iterate</code></a> instruction has
 been introduced to facilitate this style of processing.</p>
-</li>
-<li>
+</li><li>
 <p>Isomorphic transformations, in which there is an ordered (often
 largely one-to-one) relationship between the nodes of the source
 tree and the nodes of the result tree: for example, transformations
@@ -3880,137 +2935,101 @@
 constraints required for streamability. To enforce these rules,
 while still allowing unrestricted processing of other documents
 within the same transformation, all streaming evaluation must be
-carried out using a specific <a title="mode" class="termref" href=
-"#dt-mode">mode</a>, which is declared to be a streaming mode by
-means of an <a href="#element-mode"><code>xsl:mode</code></a>
+carried out using a specific <a title="mode" class="termref" href="#dt-mode" shape="rect">mode</a>, which is declared to be a streaming mode by
+means of an <a href="#element-mode" shape="rect"><code>xsl:mode</code></a>
 declaration in the stylesheet.</p>
-</li>
-</ul>
+</li></ul>
 <p>There are important classes of application in which streaming is
 possible only if multiple streams can be processed in parallel.
 This specification therefore provides facilities:</p>
-<ol class="enumar">
-<li>
+<ol class="enumar"><li>
 <p>allowing multiple sorted input sequences to be merged into one
-sorted output sequence (the <a href=
-"#element-merge"><code>xsl:merge</code></a> instruction)</p>
-</li>
-<li>
+sorted output sequence (the <a href="#element-merge" shape="rect"><code>xsl:merge</code></a> instruction)</p>
+</li><li>
 <p>allowing multiple output sequences to be generated during a
-single pass of an input sequence (the <a href=
-"#element-fork"><code>xsl:fork</code></a> instruction).</p>
-</li>
-</ol>
+single pass of an input sequence (the <a href="#element-fork" shape="rect"><code>xsl:fork</code></a> instruction).</p>
+</li></ol>
 <p>These facilities have been designed in such a way that they can
 readily be implemented using streaming, that is, without
 materializing the input or output sequences in memory.</p>
 </div>
 <div class="div2">
-<h3><a name="errors" id="errors"></a>2.11 <a href="#errors" style=
-"text-decoration: none">Error Handling</a></h3>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-static-error" id="dt-static-error" title="static error"></a>An
-error that can be detected by examining a <a title="stylesheet"
-class="termref" href="#dt-stylesheet">stylesheet</a> before
+<h3><a name="errors" id="errors" shape="rect"></a>2.11 <a href="#errors" style="text-decoration: none" shape="rect">Error Handling</a></h3>
+<p><span class="definition">[Definition: </span><a name="dt-static-error" id="dt-static-error" title="static error" shape="rect"></a>An
+error that can be detected by examining a <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> before
 execution starts (that is, before the source document and values of
 stylesheet parameters are available) is referred to as a <b>static
 error</b>.<span class="definition">]</span></p>
 <p>Errors classified in this specification as static errors
 <span class="verb">must</span> be signaled by all implementations:
-that is, the <a title="processor" class="termref" href=
-"#dt-processor">processor</a> <span class="verb">must</span>
-indicate that the error is present. A static error <span class=
-"verb">must</span> be signaled even if it occurs in a part of the
-<a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> that is never evaluated. Static
+that is, the <a title="processor" class="termref" href="#dt-processor" shape="rect">processor</a> <span class="verb">must</span>
+indicate that the error is present. A static error <span class="verb">must</span> be signaled even if it occurs in a part of the
+<a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> that is never evaluated. Static
 errors are never recoverable. After signaling a static error, a
 processor <span class="verb">may</span> continue for the purpose of
 signaling additional errors, but it <span class="verb">must</span>
-eventually terminate abnormally without producing any <a title=
-"final result tree" class="termref" href=
-"#dt-final-result-tree">final result tree</a>.</p>
+eventually terminate abnormally without producing <span class="diff-add" id="bug27258o" title="Bug 27258"><span>a <a title="principal result" class="termref" href="#dt-principal-result" shape="rect">principal result</a></span></span>
+<span class="diff-del" id="bug27258p" title="Bug 27258"><span>any
+<a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result tree</a></span></span>.</p>
 <p>There is an exception to this rule when the stylesheet specifies
-<a title="forwards compatible behavior" class="termref" href=
-"#dt-forwards-compatible-behavior">forwards compatible behavior</a>
-(see <a href="#forwards"><i>3.11 Forwards Compatible
+<a title="forwards compatible behavior" class="termref" href="#dt-forwards-compatible-behavior" shape="rect">forwards compatible behavior</a>
+(see <a href="#forwards" shape="rect"><i>3.11 Forwards Compatible
 Processing</i></a>).</p>
-<p>Generally, errors in the structure of the <a title="stylesheet"
-class="termref" href="#dt-stylesheet">stylesheet</a>, or in the
-syntax of XPath <a title="expression" class="termref" href=
-"#dt-expression">expressions</a> contained in the stylesheet, are
-classified as <a title="static error" class="termref" href=
-"#dt-static-error">static errors</a>. Where this specification
-states that an element in the stylesheet <span class=
-"verb">must</span> or <span class="verb">must not</span> appear in
+<p>Generally, errors in the structure of the <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>, or in the
+syntax of XPath <a title="expression" class="termref" href="#dt-expression" shape="rect">expressions</a> contained in the stylesheet, are
+classified as <a title="static error" class="termref" href="#dt-static-error" shape="rect">static errors</a>. Where this specification
+states that an element in the stylesheet <span class="verb">must</span> or <span class="verb">must not</span> appear in
 a certain position, or that it <span class="verb">must</span> or
 <span class="verb">must not</span> have a particular attribute, or
-that an attribute <span class="verb">must</span> or <span class=
-"verb">must not</span> have a value satisfying specified
+that an attribute <span class="verb">must</span> or <span class="verb">must not</span> have a value satisfying specified
 conditions, then any contravention of this rule is a static error
 unless otherwise specified.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-dynamic-error" id="dt-dynamic-error" title=
-"dynamic error"></a>An error that is not detected until a source
+<p><span class="definition">[Definition: </span><a name="dt-dynamic-error" id="dt-dynamic-error" title="dynamic error" shape="rect"></a>An error that is not detected until a source
 document is being transformed is referred to as a <b>dynamic
 error</b>.<span class="definition">]</span></p>
-<p>When a <a title="dynamic error" class="termref" href=
-"#dt-dynamic-error">dynamic error</a> occurs, and is not caught
-using <a href="#element-catch"><code>xsl:catch</code></a>, the
-<a title="processor" class="termref" href=
-"#dt-processor">processor</a> <span class="verb">must</span> signal
+<p>When a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> occurs, and is not caught
+using <a href="#element-catch" shape="rect"><code>xsl:catch</code></a>, the
+<a title="processor" class="termref" href="#dt-processor" shape="rect">processor</a> <span class="verb">must</span> signal
 the error, and the transformation fails.</p>
 <p>Because different implementations may optimize execution of the
-<a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> in different ways, the detection of
-dynamic errors is to some degree <a title=
-"implementation-dependent" class="termref" href=
-"#dt-implementation-dependent">implementation-dependent</a>. In
-cases where an implementation is able to produce the <a title=
-"final result tree" class="termref" href=
-"#dt-final-result-tree">final result trees</a> without evaluating a
-particular construct, the implementation is never <span class=
-"verb">required</span> to evaluate that construct solely in order
-to determine whether doing so causes a dynamic error. For example,
-if a <a title="variable" class="termref" href=
-"#dt-variable">variable</a> is declared but never referenced, an
+<a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> in different ways, the detection of
+dynamic errors is to some degree <a title="implementation-dependent" class="termref" href="#dt-implementation-dependent" shape="rect">implementation-dependent</a>. In
+cases where an implementation is able to produce <span class="diff-add" id="bug27258q" title="Bug 27258"><span>a <a title="principal result" class="termref" href="#dt-principal-result" shape="rect">principal result</a> or <a title="secondary result" class="termref" href="#dt-secondary-result" shape="rect">secondary result</a></span></span>
+<span class="diff-del" id="bug27258r" title="Bug 27258"><span>the
+<a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result trees</a></span></span>
+without evaluating a particular construct, the implementation is
+never <span class="verb">required</span> to evaluate that construct
+solely in order to determine whether doing so causes a dynamic
+error. For example, if a <a title="variable" class="termref" href="#dt-variable" shape="rect">variable</a> is declared but never referenced, an
 implementation <span class="verb">may</span> choose whether or not
 to evaluate the variable declaration, which means that if
 evaluating the variable declaration causes a dynamic error, some
 implementations will signal this error and others will not.</p>
 <p>There are some cases where this specification requires that a
 construct <span class="verb">must not</span> be evaluated: for
-example, the content of an <a href=
-"#element-if"><code>xsl:if</code></a> instruction <span class=
-"verb">must not</span> be evaluated if the test condition is false.
+example, the content of an <a href="#element-if" shape="rect"><code>xsl:if</code></a> instruction <span class="verb">must not</span> be evaluated if the test condition is false.
 This means that an implementation <span class="verb">must
 not</span> signal any dynamic errors that would arise if the
 construct were evaluated.</p>
 <p>An implementation <span class="verb">may</span> signal a
-<a title="dynamic error" class="termref" href=
-"#dt-dynamic-error">dynamic error</a> before any source document is
+<a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> before any source document is
 available, but only if it can determine that the error would be
 signaled for every possible source document and every possible set
-of parameter values. For example, some <a title="circularity"
-class="termref" href="#dt-circularity">circularity</a> errors fall
-into this category: see <a href="#circularity"><i>9.11 Circular
+of parameter values. For example, some <a title="circularity" class="termref" href="#dt-circularity" shape="rect">circularity</a> errors fall
+into this category: see <a href="#circularity" shape="rect"><i>9.11 Circular
 Definitions</i></a>.</p>
-<p>There are also some <a title="dynamic error" class="termref"
-href="#dt-dynamic-error">dynamic errors</a> where the specification
+<p>There are also some <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic errors</a> where the specification
 gives a processor license to signal the error during the analysis
 phase even if the construct might never be executed; an example is
 the use of an invalid QName as a literal argument to a function
-such as <a href="#func-key"><code>key</code></a>, or the use of an
+such as <a href="#func-key" shape="rect"><code>key</code></a>, or the use of an
 invalid regular expression in the <code>regex</code> attribute of
-the <a href=
-"#element-analyze-string"><code>xsl:analyze-string</code></a>
+the <a href="#element-analyze-string" shape="rect"><code>xsl:analyze-string</code></a>
 instruction.</p>
-<p>A <a title="dynamic error" class="termref" href=
-"#dt-dynamic-error">dynamic error</a> may also be signaled during
-the static analysis phase if the error occurs during evaluation of
-a <a title="static expression" class="termref" href=
-"#dt-static-expression">static expression</a>.</p>
-<p>The XPath specification states (see <a href=
-"http://www.w3.org/TR/xpath-30/#id-kinds-of-errors">Section 2.3.1
+<p>A <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a> <span class="diff-chg" id="bug28205a" title="Bug 28205"><span>is also</span></span> signaled
+during the static analysis phase if the error occurs during
+evaluation of a <a title="static expression" class="termref" href="#dt-static-expression" shape="rect">static expression</a>.</p>
+<p>The XPath specification states (see <a href="http://www.w3.org/TR/xpath-30/#id-kinds-of-errors" shape="rect">Section 2.3.1
 Kinds of Errors</a> <sup><small>XP30</small></sup>) that if any
 expression (at any level) can be evaluated during the analysis
 phase (because all its explicit operands are known and it has no
@@ -4023,14 +3042,13 @@
 be signaled as dynamic errors, and signaled only if the XPath
 expression is actually evaluated.</p>
 <div class="example">
-<div class="exampleHeader"><a name="d7e3846" id=
-"d7e3846"></a>Example: Errors in Constant Subexpressions</div>
+<div class="exampleHeader"><a name="d7e3997" id="d7e3997" shape="rect"></a>Example: Errors in Constant Subexpressions</div>
 <p>An XPath processor may report statically that the expression
 <code>1 div 0</code> fails with a "divide by zero" error. But
 suppose this XPath expression occurs in an XSLT construct such
 as:</p>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
 &lt;xsl:choose&gt;
   &lt;xsl:when test="system-property('xsl:version') = '1.0'"&gt;
     &lt;xsl:value-of select="1 div 0"/&gt;
@@ -4047,50 +3065,42 @@
 positive infinity, because it uses double arithmetic rather than
 decimal arithmetic.)</p>
 </div>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-type-error" id="dt-type-error" title="type error"></a>Certain
+<p><span class="definition">[Definition: </span><a name="dt-type-error" id="dt-type-error" title="type error" shape="rect"></a>Certain
 errors are classified as <b>type errors</b>. A type error occurs
 when the value supplied as input to an operation is of the wrong
 type for that operation, for example when an integer is supplied to
 an operation that expects a node.<span class="definition">]</span>
 If a type error occurs in an instruction that is actually
 evaluated, then it <span class="verb">must</span> be signaled in
-the same way as a <a title="dynamic error" class="termref" href=
-"#dt-dynamic-error">dynamic error</a>. Alternatively, an
+the same way as a <a title="dynamic error" class="termref" href="#dt-dynamic-error" shape="rect">dynamic error</a>. Alternatively, an
 implementation <span class="verb">may</span> signal a type error
-during the analysis phase in the same way as a <a title=
-"static error" class="termref" href="#dt-static-error">static
+during the analysis phase in the same way as a <a title="static error" class="termref" href="#dt-static-error" shape="rect">static
 error</a>, even if it occurs in part of the stylesheet that is
 never evaluated, provided it can establish that execution of a
 particular construct would never succeed.</p>
-<p>It is <a title="implementation-defined" class="termref" href=
-"#dt-implementation-defined">implementation-defined</a> whether
+<p>It is <a title="implementation-defined" class="termref" href="#dt-implementation-defined" shape="rect">implementation-defined</a> whether
 type errors are signaled statically.</p>
 <div class="example">
-<div class="exampleHeader"><a name="d7e3892" id=
-"d7e3892"></a>Example: A Type Error</div>
+<div class="exampleHeader"><a name="d7e4043" id="d7e4043" shape="rect"></a>Example: A Type Error</div>
 <p>The following construct contains a type error, because
 <code>42</code> is not allowed as the value of the
-<code>select</code> expression of the <a href=
-"#element-number"><code>xsl:number</code></a> instruction (it must
+<code>select</code> expression of the <a href="#element-number" shape="rect"><code>xsl:number</code></a> instruction (it must
 be a node). An implementation <span class="verb">may</span>
 optionally signal this as a static error, even though the offending
 instruction will never be evaluated, and the type error would
 therefore never be signaled as a dynamic error.</p>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
 &lt;xsl:if test="false()"&gt;
   &lt;xsl:number select="42"/&gt;
 &lt;/xsl:if&gt;
 </pre></div>
 <p>On the other hand, in the following example it is not possible
-to determine statically whether the operand of <span><a href=
-"#element-number"><code>xsl:number</code></a></span> will have a
-suitable dynamic type. An implementation <span class=
-"verb">may</span> produce a warning in such cases, but it
+to determine statically whether the operand of <span><a href="#element-number" shape="rect"><code>xsl:number</code></a></span> will have a
+suitable dynamic type. An implementation <span class="verb">may</span> produce a warning in such cases, but it
 <span class="verb">must not</span> treat it as an error.</p>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
 &lt;xsl:template match="para"&gt;
   &lt;xsl:param name="p" as="item()"/&gt;
   &lt;xsl:number select="$p"/&gt;
@@ -4099,9 +3109,7 @@
 </div>
 <p>If more than one error arises, an implementation is not
 <span class="verb">required</span> to signal any errors other than
-the first one that it detects. It is <a title=
-"implementation-dependent" class="termref" href=
-"#dt-implementation-dependent">implementation-dependent</a> which
+the first one that it detects. It is <a title="implementation-dependent" class="termref" href="#dt-implementation-dependent" shape="rect">implementation-dependent</a> which
 of the several errors is signaled. This applies both to static
 errors and to dynamic errors. An implementation is allowed to
 signal more than one error, but if any errors have been signaled,
@@ -4109,34 +3117,28 @@
 transformation were successful.</p>
 <p>When a transformation signals one or more dynamic errors, the
 final state of any persistent resources updated by the
-transformation is <a title="implementation-dependent" class=
-"termref" href=
-"#dt-implementation-dependent">implementation-dependent</a>.
+transformation is <a title="implementation-dependent" class="termref" href="#dt-implementation-dependent" shape="rect">implementation-dependent</a>.
 Implementations are not <span class="verb">required</span> to
 restore such resources to their initial state. In particular, where
 a transformation produces multiple result documents, it is possible
-that one or more serialized result documents <span class=
-"verb">may</span> be written successfully before the transformation
+that one or more serialized result documents <span class="verb">may</span> be written successfully before the transformation
 terminates, but the application cannot rely on this behavior.</p>
 <p>Everything said above about error handling applies equally to
 errors in evaluating XSLT instructions, and errors in evaluating
-XPath <a title="expression" class="termref" href=
-"#dt-expression">expressions</a>. Static errors and dynamic errors
+XPath <a title="expression" class="termref" href="#dt-expression" shape="rect">expressions</a>. Static errors and dynamic errors
 may occur in both cases.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-serialization-error" id="dt-serialization-error" title=
-"serialization error"></a>If a transformation has successfully
-produced a <a title="final result tree" class="termref" href=
-"#dt-final-result-tree">final result tree</a>, it is still possible
-that errors may occur in serializing the result tree. For example,
-it may be impossible to serialize the result tree using the
-encoding selected by the user. Such an error is referred to as a
-<b>serialization error</b>.<span class="definition">]</span> If the
-processor performs serialization, then it <span class=
-"verb">must</span> do so as specified in <a href=
-"#serialization"><i>25 Serialization</i></a>, and in particular it
-<span class="verb">must</span> signal any serialization errors that
-occur.</p>
+<p><span class="definition">[Definition: </span><a name="dt-serialization-error" id="dt-serialization-error" title="serialization error" shape="rect"></a>If a transformation has successfully
+produced a <span class="diff-add" id="bug27258s" title="Bug 27258"><span><a title="principal result" class="termref" href="#dt-principal-result" shape="rect">principal result</a> or <a title="secondary result" class="termref" href="#dt-secondary-result" shape="rect">secondary result</a>, it is still possible
+that errors may occur in serializing that result</span></span>
+<span class="diff-del" id="bug27258t" title="Bug 27258"><span><a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result tree</a>, it is still
+possible that errors may occur in serializing the result
+tree</span></span>. For example, it may be impossible to serialize
+the result <span class="diff-del" id="bug27258u" title="Bug 27258"><span>tree</span></span> using the encoding selected by
+the user. Such an error is referred to as a <b>serialization
+error</b>.<span class="definition">]</span> If the processor
+performs serialization, then it <span class="verb">must</span> do
+so as specified in <a href="#serialization" shape="rect"><i>25
+Serialization</i></a>, and in particular it <span class="verb">must</span> signal any serialization errors that occur.</p>
 <p>Errors are identified by a QName. For errors defined in this
 specification, the namespace of the QName is always
 <code>http://www.w3.org/2005/xqt-errors</code> (and is therefore
@@ -4150,12 +3152,9 @@
 implications about the way the error is handled. Many errors, for
 example, can be reported either dynamically or statically. These
 error codes are used to label error conditions in this
-specification, and are summarized in <a href="#error-summary"><i>E
+specification, and are summarized in <a href="#error-summary" shape="rect"><i>E
 Summary of Error Conditions</i></a>.</p>
-<p>Errors defined in related specifications (<a href=
-"#xpath-30">[XPath 3.0]</a>, <a href=
-"#xpath-functions-30">[Functions and Operators]</a> <a href=
-"#xslt-xquery-serialization-30">[XSLT and XQuery
+<p>Errors defined in related specifications (<a href="#xpath-30" shape="rect">[XPath 3.0]</a>, <a href="#xpath-functions-30" shape="rect">[Functions and Operators]</a> <a href="#xslt-xquery-serialization-30" shape="rect">[XSLT and XQuery
 Serialization]</a>) use QNames with a similar structure, in the
 same namespace. When errors occur in processing XPath expressions,
 an XSLT processor <span class="verb">should</span> use the original
@@ -4163,7 +3162,7 @@
 XSLT error code is available.</p>
 <p><span>Implementations <span class="verb">must</span> use the
 codes defined in these specifications when signaling errors, to
-ensure that <a href="#element-catch"><code>xsl:catch</code></a>
+ensure that <a href="#element-catch" shape="rect"><code>xsl:catch</code></a>
 behaves in an interoperable way across implementations. Stylesheet
 authors should note, however, that there are many examples of
 errors where more than one rule in this specification is violated,
@@ -4178,50 +3177,38 @@
 </div>
 </div>
 <div class="div1">
-<h2><a name="stylesheet-structure" id="stylesheet-structure"></a>3
-<a href="#stylesheet-structure" style=
-"text-decoration: none">Stylesheet Structure</a></h2>
+<h2><a name="stylesheet-structure" id="stylesheet-structure" shape="rect"></a>3
+<a href="#stylesheet-structure" style="text-decoration: none" shape="rect">Stylesheet Structure</a></h2>
 <p>This section describes the overall structure of a stylesheet as
 a collection of XML documents.</p>
 <div class="div2">
-<h3><a name="xslt-namespace" id="xslt-namespace"></a>3.1 <a href=
-"#xslt-namespace" style="text-decoration: none">XSLT
+<h3><a name="xslt-namespace" id="xslt-namespace" shape="rect"></a>3.1 <a href="#xslt-namespace" style="text-decoration: none" shape="rect">XSLT
 Namespace</a></h3>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-xslt-namespace" id="dt-xslt-namespace" title=
-"XSLT namespace"></a>The <b>XSLT namespace</b> has the URI
+<p><span class="definition">[Definition: </span><a name="dt-xslt-namespace" id="dt-xslt-namespace" title="XSLT namespace" shape="rect"></a>The <b>XSLT namespace</b> has the URI
 <code>http://www.w3.org/1999/XSL/Transform</code>. It is used to
 identify elements, attributes, and other names that have a special
-meaning defined in this specification.<span class=
-"definition">]</span></p>
+meaning defined in this specification.<span class="definition">]</span></p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
 <p>The <code>1999</code> in the URI indicates the year in which the
 URI was allocated by the W3C. It does not indicate the version of
-XSLT being used, which is specified by attributes (see <a href=
-"#stylesheet-element"><i>3.8 Stylesheet Element</i></a> and
-<a href="#simplified-stylesheet"><i>3.9 Simplified Stylesheet
+XSLT being used, which is specified by attributes (see <a href="#stylesheet-element" shape="rect"><i>3.8 Stylesheet Element</i></a> and
+<a href="#simplified-stylesheet" shape="rect"><i>3.9 Simplified Stylesheet
 Modules</i></a>).</p>
 </div>
-<p>XSLT <a title="processor" class="termref" href=
-"#dt-processor">processors</a> <span class="verb">must</span> use
-the XML namespaces mechanism <a href="#xml-names">[Namespaces in
+<p>XSLT <a title="processor" class="termref" href="#dt-processor" shape="rect">processors</a> <span class="verb">must</span> use
+the XML namespaces mechanism <a href="#xml-names" shape="rect">[Namespaces in
 XML]</a> to recognize elements and attributes from this namespace.
 Elements from the XSLT namespace are recognized only in the
-<a title="stylesheet" class="termref" href=
-"#dt-stylesheet">stylesheet</a> and not in the source document. The
-complete list of XSLT-defined elements is specified in <a href=
-"#element-syntax-summary"><i>D Element Syntax Summary</i></a>.
-<a title="implementation" class="termref" href=
-"#dt-implementation">Implementations</a> <span class="verb">must
+<a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> and not in the source document. The
+complete list of XSLT-defined elements is specified in <a href="#element-syntax-summary" shape="rect"><i>D Element Syntax Summary</i></a>.
+<a title="implementation" class="termref" href="#dt-implementation" shape="rect">Implementations</a> <span class="verb">must
 not</span> extend the XSLT namespace with additional elements or
 attributes. Instead, any extension <span class="verb">must</span>
 be in a separate namespace. Any namespace that is used for
 additional instruction elements <span class="verb">must</span> be
-identified by means of the <a title="extension instruction" class=
-"termref" href="#dt-extension-instruction">extension
-instruction</a> mechanism specified in <a href=
-"#extension-instruction"><i>23.2 Extension
+identified by means of the <a title="extension instruction" class="termref" href="#dt-extension-instruction" shape="rect">extension
+instruction</a> mechanism specified in <a href="#extension-instruction" shape="rect"><i>23.2 Extension
 Instructions</i></a>.</p>
 <p>This specification uses a prefix of <code>xsl:</code> for
 referring to elements in the XSLT namespace. However, XSLT
@@ -4231,136 +3218,94 @@
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
 <p>Throughout this specification, an element or attribute that is
-in no namespace, or an <a title="expanded QName" class="termref"
-href="#dt-expanded-qname">expanded QName</a> whose namespace part
+in no namespace, or an <a title="expanded QName" class="termref" href="#dt-expanded-qname" shape="rect">expanded QName</a> whose namespace part
 is an empty sequence, is referred to as having a <b>null namespace
 URI</b>.</p>
 </div>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
-<p>The conventions used for the names of <a title="XSLT element"
-class="termref" href="#dt-xslt-element">XSLT elements</a>,
+<p>The conventions used for the names of <a title="XSLT element" class="termref" href="#dt-xslt-element" shape="rect">XSLT elements</a>,
 attributes and functions are that names are all lower-case, use
 hyphens to separate words, and use abbreviations only if they
 already appear in the syntax of a related language such as XML or
 HTML. Names of types defined in XML Schema are regarded as single
 words and are capitalized exactly as in XML Schema. This sometimes
-leads to composite function names such as <a href=
-"http://www.w3.org/TR/xpath-functions-30/#func-current-dateTime"><code>
+leads to composite function names such as <a href="http://www.w3.org/TR/xpath-functions-30/#func-current-dateTime" shape="rect"><code>
 current-dateTime</code></a><sup><small>FO30</small></sup>.</p>
 </div>
 </div>
 <div class="div2">
-<h3><a name="reserved-namespaces" id="reserved-namespaces"></a>3.2
-<a href="#reserved-namespaces" style=
-"text-decoration: none">Reserved Namespaces</a></h3>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-reserved-namespace" id="dt-reserved-namespace" title=
-"reserved namespace"></a>The XSLT namespace, together with certain
+<h3><a name="reserved-namespaces" id="reserved-namespaces" shape="rect"></a>3.2
+<a href="#reserved-namespaces" style="text-decoration: none" shape="rect">Reserved Namespaces</a></h3>
+<p><span class="definition">[Definition: </span><a name="dt-reserved-namespace" id="dt-reserved-namespace" title="reserved namespace" shape="rect"></a>The XSLT namespace, together with certain
 other namespaces recognized by an XSLT processor, are classified as
 <b>reserved namespaces</b> and <span class="verb">must</span> be
 used only as specified in this and related
 specifications.<span class="definition">]</span> The reserved
 namespaces are those listed below.</p>
-<ul>
-<li>
-<p>The <a title="XSLT namespace" class="termref" href=
-"#dt-xslt-namespace">XSLT namespace</a>, described in <a href=
-"#xslt-namespace"><i>3.1 XSLT Namespace</i></a>, is reserved.</p>
-</li>
-<li>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-standard-function-namespace" id=
-"dt-standard-function-namespace" title=
-"standard function namespace"></a>The <b>standard function
+<ul><li>
+<p>The <a title="XSLT namespace" class="termref" href="#dt-xslt-namespace" shape="rect">XSLT namespace</a>, described in <a href="#xslt-namespace" shape="rect"><i>3.1 XSLT Namespace</i></a>, is reserved.</p>
+</li><li>
+<p><span class="definition">[Definition: </span><a name="dt-standard-function-namespace" id="dt-standard-function-namespace" title="standard function namespace" shape="rect"></a>The <b>standard function
 namespace</b> <code>http://www.w3.org/2005/xpath-functions</code>
-is used for functions in the function library defined in <a href=
-"#xpath-functions-30">[Functions and Operators]</a> and for
-standard functions defined in this specification.<span class=
-"definition">]</span></p>
-</li>
-<li>
+is used for functions in the function library defined in <a href="#xpath-functions-30" shape="rect">[Functions and Operators]</a> and for
+standard functions defined in this specification.<span class="definition">]</span></p>
+</li><li>
 <p>The namespace
 <code>http://www.w3.org/2005/xpath-functions/math</code> is used
 for mathematical functions in the function library defined in
-<a href="#xpath-functions-30">[Functions and Operators]</a>.</p>
-</li>
-<li>
+<a href="#xpath-functions-30" shape="rect">[Functions and Operators]</a>.</p>
+</li><li>
 <p>The namespace
 <code>http://www.w3.org/2005/xpath-functions/map</code> is used for
 functions defined in this specification relating to the
-manipulation of <a title="map" class="termref" href=
-"#dt-map">maps</a>.</p>
-</li>
-<li>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"xml-namespace" id="xml-namespace" title="XML namespace"></a>The
-<b>XML namespace</b>, defined in <a href="#xml-names">[Namespaces
+manipulation of <a title="map" class="termref" href="#dt-map" shape="rect">maps</a>.</p>
+</li><li>
+<p><span class="definition">[Definition: </span><a name="xml-namespace" id="xml-namespace" title="XML namespace" shape="rect"></a>The
+<b>XML namespace</b>, defined in <a href="#xml-names" shape="rect">[Namespaces
 in XML]</a> as <code>http://www.w3.org/XML/1998/namespace</code>,
 is used for attributes such as <code>xml:lang</code>,
-<code>xml:space</code>, and <code>xml:id</code>.<span class=
-"definition">]</span></p>
-</li>
-<li>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-schema-namespace" id="dt-schema-namespace" title=
-"schema namespace"></a>The <b>schema namespace</b>
+<code>xml:space</code>, and <code>xml:id</code>.<span class="definition">]</span></p>
+</li><li>
+<p><span class="definition">[Definition: </span><a name="dt-schema-namespace" id="dt-schema-namespace" title="schema namespace" shape="rect"></a>The <b>schema namespace</b>
 <code>http://www.w3.org/2001/XMLSchema</code> is used as defined in
-<a href="#xmlschema-1">[XML Schema Part 1]</a><span class=
-"definition">]</span>. In a <a title="stylesheet" class="termref"
-href="#dt-stylesheet">stylesheet</a> this namespace may be used to
+<a href="#xmlschema-1" shape="rect">[XML Schema Part 1]</a><span class="definition">]</span>. In a <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a> this namespace may be used to
 refer to built-in schema datatypes and to the constructor functions
 associated with those datatypes.</p>
-</li>
-<li>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-schema-instance-namespace" id="dt-schema-instance-namespace"
-title="schema instance namespace"></a>The <b>schema instance
+</li><li>
+<p><span class="definition">[Definition: </span><a name="dt-schema-instance-namespace" id="dt-schema-instance-namespace" title="schema instance namespace" shape="rect"></a>The <b>schema instance
 namespace</b>
 <code>http://www.w3.org/2001/XMLSchema-instance</code> is used as
-defined in <a href="#xmlschema-1">[XML Schema Part
+defined in <a href="#xmlschema-1" shape="rect">[XML Schema Part
 1]</a><span class="definition">]</span>. Attributes in this
-namespace, if they appear in a <a title="stylesheet" class=
-"termref" href="#dt-stylesheet">stylesheet</a>, are treated by the
+namespace, if they appear in a <a title="stylesheet" class="termref" href="#dt-stylesheet" shape="rect">stylesheet</a>, are treated by the
 XSLT processor in the same way as any other attributes.</p>
-</li>
-<li>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-standard-error-namespace" id="dt-standard-error-namespace"
-title="standard error namespace"></a>The <b>standard error
+</li><li>
+<p><span class="definition">[Definition: </span><a name="dt-standard-error-namespace" id="dt-standard-error-namespace" title="standard error namespace" shape="rect"></a>The <b>standard error
 namespace</b> <code>http://www.w3.org/2005/xqt-errors</code> is
 used for error codes defined in this specification and related
 specifications. It is also used for the names of certain predefined
-variables accessible within the scope of an <a href=
-"#element-catch"><code>xsl:catch</code></a> element.<span class=
-"definition">]</span></p>
-</li>
-<li>
+variables accessible within the scope of an <a href="#element-catch" shape="rect"><code>xsl:catch</code></a> element.<span class="definition">]</span></p>
+</li><li>
 <p>The namespace <code>http://www.w3.org/2000/xmlns/</code> is
-reserved for use as described in <a href="#xml-names">[Namespaces
+reserved for use as described in <a href="#xml-names" shape="rect">[Namespaces
 in XML]</a>. No element or attribute node can have a name in this
 namespace, and although the prefix <code>xmlns</code> is implicitly
 bound to this namespace, no namespace node will ever define this
 binding.</p>
-</li>
-</ul>
+</li></ul>
 <p>Reserved namespaces may be used without restriction to refer to
 the names of elements and attributes in source documents and result
 documents. As far as the XSLT processor is concerned, reserved
 namespaces other than the XSLT namespace may be used without
-restriction in the names of <a title="literal result element"
-class="termref" href="#dt-literal-result-element">literal result
-elements</a> and <a title="user-defined data element" class=
-"termref" href="#dt-data-element">user-defined data elements</a>,
+restriction in the names of <a title="literal result element" class="termref" href="#dt-literal-result-element" shape="rect">literal result
+elements</a> and <a title="user-defined data element" class="termref" href="#dt-data-element" shape="rect">user-defined data elements</a>,
 and in the names of attributes of literal result elements or of
-<a title="XSLT element" class="termref" href=
-"#dt-xslt-element">XSLT elements</a>: but other processors
+<a title="XSLT element" class="termref" href="#dt-xslt-element" shape="rect">XSLT elements</a>: but other processors
 <span class="verb">may</span> impose restrictions or attach special
 meaning to them. Reserved namespaces <span class="verb">must
 not</span> be used, however, in the names of stylesheet-defined
-objects such as <a title="variable" class="termref" href=
-"#dt-variable">variables</a> and <a title="stylesheet function"
-class="termref" href="#dt-stylesheet-function">stylesheet
+objects such as <a title="variable" class="termref" href="#dt-variable" shape="rect">variables</a> and <a title="stylesheet function" class="termref" href="#dt-stylesheet-function" shape="rect">stylesheet
 functions</a>.</p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
@@ -4370,90 +3315,56 @@
 prefixes are used for these namespaces in this specification, any
 prefix may be used in a user stylesheet.</p>
 </div>
-<p><a name="err-XTSE0080" id="err-XTSE0080"><span class=
-"error">[ERR XTSE0080]</span></a> It is a <a title="static error"
-class="termref" href="#dt-static-error">static error</a> to use a
-<a title="reserved namespace" class="termref" href=
-"#dt-reserved-namespace">reserved namespace</a> in the name of a
-<a title="named template" class="termref" href=
-"#dt-named-template">named template</a>, a <a title="mode" class=
-"termref" href="#dt-mode">mode</a>, an <a title="attribute set"
-class="termref" href="#dt-attribute-set">attribute set</a>, a
-<a title="key" class="termref" href="#dt-key">key</a>, a <a title=
-"decimal format" class="termref" href=
-"#dt-decimal-format">decimal-format</a>, a <a title="variable"
-class="termref" href="#dt-variable">variable</a> or <a title=
-"parameter" class="termref" href="#dt-parameter">parameter</a>, a
-<a title="stylesheet function" class="termref" href=
-"#dt-stylesheet-function">stylesheet function</a>, a named
-<a title="output definition" class="termref" href=
-"#dt-output-definition">output definition</a>, <span>an
-accumulator,</span> or a <a title="character map" class="termref"
-href="#dt-character-map">character map</a><span>; except that the
+<p><a name="err-XTSE0080" id="err-XTSE0080" shape="rect"><span class="error">[ERR XTSE0080]</span></a> It is a <a title="static error" class="termref" href="#dt-static-error" shape="rect">static error</a> to use a
+<a title="reserved namespace" class="termref" href="#dt-reserved-namespace" shape="rect">reserved namespace</a> in the name of a
+<a title="named template" class="termref" href="#dt-named-template" shape="rect">named template</a>, a <a title="mode" class="termref" href="#dt-mode" shape="rect">mode</a>, an <a title="attribute set" class="termref" href="#dt-attribute-set" shape="rect">attribute set</a>, a
+<a title="key" class="termref" href="#dt-key" shape="rect">key</a>, a <a title="decimal format" class="termref" href="#dt-decimal-format" shape="rect">decimal-format</a>, a <a title="variable" class="termref" href="#dt-variable" shape="rect">variable</a> or <a title="parameter" class="termref" href="#dt-parameter" shape="rect">parameter</a>, a
+<a title="stylesheet function" class="termref" href="#dt-stylesheet-function" shape="rect">stylesheet function</a>, a named
+<a title="output definition" class="termref" href="#dt-output-definition" shape="rect">output definition</a>, <span>an
+accumulator,</span> or a <a title="character map" class="termref" href="#dt-character-map" shape="rect">character map</a><span>; except that the
 name <code>xsl:initial-template</code> is permitted as a template
 name.</span></p>
 </div>
 <div class="div2">
-<h3><a name="extension-attributes" id=
-"extension-attributes"></a>3.3 <a href="#extension-attributes"
-style="text-decoration: none">Extension Attributes</a></h3>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-extension-attribute" id="dt-extension-attribute" title=
-"extension attribute"></a>An element from the XSLT namespace may
+<h3><a name="extension-attributes" id="extension-attributes" shape="rect"></a>3.3 <a href="#extension-attributes" style="text-decoration: none" shape="rect">Extension Attributes</a></h3>
+<p><span class="definition">[Definition: </span><a name="dt-extension-attribute" id="dt-extension-attribute" title="extension attribute" shape="rect"></a>An element from the XSLT namespace may
 have any attribute not from the XSLT namespace, provided that the
-<a title="expanded QName" class="termref" href=
-"#dt-expanded-qname">expanded QName</a> (see <a href=
-"#xpath-30">[XPath 3.0]</a>) of the attribute has a non-null
+<a title="expanded QName" class="termref" href="#dt-expanded-qname" shape="rect">expanded QName</a> (see <a href="#xpath-30" shape="rect">[XPath 3.0]</a>) of the attribute has a non-null
 namespace URI. These attributes are referred to as <b>extension
 attributes</b>.<span class="definition">]</span> The presence of an
 extension attribute <span class="verb">must not</span> cause the
-<a title="final result tree" class="termref" href=
-"#dt-final-result-tree">final result trees</a> produced by the
-transformation to be different from the result trees that a
-conformant XSLT <span>3.0</span> processor might produce. They
-<span class="verb">must not</span> cause the processor to fail to
-signal an error that a conformant processor is required to signal.
-This means that an extension attribute <span class="verb">must
-not</span> change the effect of any <a title="instruction" class=
-"termref" href="#dt-instruction">instruction</a> except to the
-extent that the effect is <a title="implementation-defined" class=
-"termref" href=
-"#dt-implementation-defined">implementation-defined</a> or
-<a title="implementation-dependent" class="termref" href=
-"#dt-implementation-dependent">implementation-dependent</a>.</p>
+<span class="diff-add" id="bug27258v" title="Bug 27258"><span><a title="principal result" class="termref" href="#dt-principal-result" shape="rect">principal result</a> or any <a title="secondary result" class="termref" href="#dt-secondary-result" shape="rect">secondary result</a> of the transformation
+to be different from the results</span></span> <span class="diff-del" id="bug27258w" title="Bug 27258"><span><a title="final result tree" class="termref" href="#dt-final-result-tree" shape="rect">final result trees</a> produced by the
+transformation to be different from the result trees</span></span>
+that a conformant XSLT <span>3.0</span> processor might produce.
+They <span class="verb">must not</span> cause the processor to fail
+to signal an error that a conformant processor is required to
+signal. This means that an extension attribute <span class="verb">must not</span> change the effect of any <a title="instruction" class="termref" href="#dt-instruction" shape="rect">instruction</a> except to the extent that the
+effect is <a title="implementation-defined" class="termref" href="#dt-implementation-defined" shape="rect">implementation-defined</a> or
+<a title="implementation-dependent" class="termref" href="#dt-implementation-dependent" shape="rect">implementation-dependent</a>.</p>
 <p>Furthermore, if serialization is performed using one of the
-serialization methods <code>xml</code>, <code>xhtml</code>,
-<code>html</code>, or <code>text</code> described in <a href=
-"#xslt-xquery-serialization-30">[XSLT and XQuery
+serialization methods <span class="diff-del" id="bug27258x" title="Bug 27258"><span><code>xml</code>, <code>xhtml</code>,
+<code>html</code>, or <code>text</code></span></span> described in
+<a href="#xslt-xquery-serialization-30" shape="rect">[XSLT and XQuery
 Serialization]</a>, the presence of an extension attribute must not
 cause the serializer to behave in a way that is inconsistent with
 the mandatory provisions of that specification.</p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
-<p><a title="extension attribute" class="termref" href=
-"#dt-extension-attribute">Extension attributes</a> may be used to
-modify the behavior of <a title="extension function" class=
-"termref" href="#dt-extension-function">extension functions</a> and
-<a title="extension instruction" class="termref" href=
-"#dt-extension-instruction">extension instructions</a>. They may be
+<p><a title="extension attribute" class="termref" href="#dt-extension-attribute" shape="rect">Extension attributes</a> may be used to
+modify the behavior of <a title="extension function" class="termref" href="#dt-extension-function" shape="rect">extension functions</a> and
+<a title="extension instruction" class="termref" href="#dt-extension-instruction" shape="rect">extension instructions</a>. They may be
 used to select processing options in cases where the specification
-leaves the behavior <a title="implementation-defined" class=
-"termref" href=
-"#dt-implementation-defined">implementation-defined</a> or
-<a title="implementation-dependent" class="termref" href=
-"#dt-implementation-dependent">implementation-dependent</a>. They
+leaves the behavior <a title="implementation-defined" class="termref" href="#dt-implementation-defined" shape="rect">implementation-defined</a> or
+<a title="implementation-dependent" class="termref" href="#dt-implementation-dependent" shape="rect">implementation-dependent</a>. They
 may also be used for optimization hints, for diagnostics, or for
 documentation.</p>
-<p><a title="extension attribute" class="termref" href=
-"#dt-extension-attribute">Extension attributes</a> may also be used
+<p><a title="extension attribute" class="termref" href="#dt-extension-attribute" shape="rect">Extension attributes</a> may also be used
 to influence the behavior of the serialization methods
 <code>xml</code>, <code>xhtml</code>, <code>html</code>, or
 <code>text</code>, to the extent that the behavior of the
-serialization method is <a title="implementation-defined" class=
-"termref" href=
-"#dt-implementation-defined">implementation-defined</a> or
-<a title="implementation-dependent" class="termref" href=
-"#dt-implementation-dependent">implementation-dependent</a>. For
+serialization method is <a title="implementation-defined" class="termref" href="#dt-implementation-defined" shape="rect">implementation-defined</a> or
+<a title="implementation-dependent" class="termref" href="#dt-implementation-dependent" shape="rect">implementation-dependent</a>. For
 example, an extension attribute might be used to define the amount
 of indentation to be used when <code>indent="yes"</code> is
 specified. If a serialization method other than one of these four
@@ -4471,24 +3382,20 @@
 present. As always, it is permissible to produce warning
 messages.</p>
 <p>The namespace used for an extension attribute will be copied to
-the <a title="result tree" class="termref" href=
-"#dt-result-tree">result tree</a> in the normal way if it is in
-scope for a <a title="literal result element" class="termref" href=
-"#dt-literal-result-element">literal result element</a>. This can
+the <a title="result tree" class="termref" href="#dt-result-tree" shape="rect">result tree</a> in the normal way if it is in
+scope for a <a title="literal result element" class="termref" href="#dt-literal-result-element" shape="rect">literal result element</a>. This can
 be prevented using the <code>[xsl:]exclude-result-prefixes</code>
 attribute.</p>
 </div>
 <div class="example">
-<div class="exampleHeader"><a name="d7e4448" id=
-"d7e4448"></a>Example: An Extension Attribute for
+<div class="exampleHeader"><a name="d7e4619" id="d7e4619" shape="rect"></a>Example: An Extension Attribute for
 <code>xsl:message</code></div>
 <p>The following code might be used to indicate to a particular
-implementation that the <a href=
-"#element-message"><code>xsl:message</code></a> instruction is to
+implementation that the <a href="#element-message" shape="rect"><code>xsl:message</code></a> instruction is to
 ask the user for confirmation before continuing with the
 transformation:</p>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
 &lt;xsl:message abc:pause="yes"
     xmlns:abc="http://vendor.example.com/xslt/extensions"&gt;
        Phase 1 complete
@@ -4496,61 +3403,43 @@
 </pre></div>
 <p>Implementations that do not recognize the namespace
 <code>http://vendor.example.com/xslt/extensions</code> will simply
-ignore the extra attribute, and evaluate the <a href=
-"#element-message"><code>xsl:message</code></a> instruction in the
+ignore the extra attribute, and evaluate the <a href="#element-message" shape="rect"><code>xsl:message</code></a> instruction in the
 normal way.</p>
 </div>
-<p><a name="err-XTSE0090" id="err-XTSE0090"><span class=
-"error">[ERR XTSE0090]</span></a> It is a <a title="static error"
-class="termref" href="#dt-static-error">static error</a> for an
+<p><a name="err-XTSE0090" id="err-XTSE0090" shape="rect"><span class="error">[ERR XTSE0090]</span></a> It is a <a title="static error" class="termref" href="#dt-static-error" shape="rect">static error</a> for an
 element from the XSLT namespace to have an attribute whose
 namespace is either null (that is, an attribute with an unprefixed
 name) or the XSLT namespace, other than attributes defined for the
 element in this document.</p>
 </div>
 <div class="div2">
-<h3><a name="xslt-media-type" id="xslt-media-type"></a>3.4 <a href=
-"#xslt-media-type" style="text-decoration: none">XSLT Media
+<h3><a name="xslt-media-type" id="xslt-media-type" shape="rect"></a>3.4 <a href="#xslt-media-type" style="text-decoration: none" shape="rect">XSLT Media
 Type</a></h3>
 <p>The media type <code>application/xslt+xml</code> <span>has
 been</span> registered for XSLT stylesheet modules.</p>
-<p>The definition of the media type is at <a href=
-"#XSLT-Mime-Type">[XSLT Media Type]</a>.</p>
+<p>The definition of the media type is at <a href="#XSLT-Mime-Type" shape="rect">[XSLT Media Type]</a>.</p>
 <p>This media type <span class="verb">should</span> be used for an
-XML document containing a <a title="standard stylesheet module"
-class="termref" href="#dt-standard-stylesheet-module">standard
-stylesheet module</a> at its top level, and it <span class=
-"verb">may</span> also be used for a <a title=
-"simplified stylesheet" class="termref" href=
-"#dt-simplified-stylesheet-module">simplified stylesheet
+XML document containing a <a title="standard stylesheet module" class="termref" href="#dt-standard-stylesheet-module" shape="rect">standard
+stylesheet module</a> at its top level, and it <span class="verb">may</span> also be used for a <a title="simplified stylesheet" class="termref" href="#dt-simplified-stylesheet-module" shape="rect">simplified stylesheet
 module</a>. It <span class="verb">should not</span> be used for an
-XML document containing an <a title="embedded stylesheet module"
-class="termref" href="#dt-embedded-stylesheet-module">embedded
+XML document containing an <a title="embedded stylesheet module" class="termref" href="#dt-embedded-stylesheet-module" shape="rect">embedded
 stylesheet module</a>.</p>
 </div>
 <div class="div2">
-<h3><a name="standard-attributes" id="standard-attributes"></a>3.5
-<a href="#standard-attributes" style=
-"text-decoration: none">Standard Attributes</a></h3>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-standard-attributes" id="dt-standard-attributes" title=
-"standard attributes"></a>There are a number of <b>standard
-attributes</b> that may appear on any <a title="XSLT element"
-class="termref" href="#dt-xslt-element">XSLT element</a>:
+<h3><a name="standard-attributes" id="standard-attributes" shape="rect"></a>3.5
+<a href="#standard-attributes" style="text-decoration: none" shape="rect">Standard Attributes</a></h3>
+<p><span class="definition">[Definition: </span><a name="dt-standard-attributes" id="dt-standard-attributes" title="standard attributes" shape="rect"></a>There are a number of <b>standard
+attributes</b> that may appear on any <a title="XSLT element" class="termref" href="#dt-xslt-element" shape="rect">XSLT element</a>:
 specifically <code>default-collation</code>,
 <code>default-mode</code>, <code>default-validation</code>,
 <code>exclude-result-prefixes</code>,
 <span><code>expand-text</code>,</span>
 <code>extension-element-prefixes</code>, <code>use-when</code>,
 <code>version</code>, and
-<code>xpath-default-namespace</code>.<span class=
-"definition">]</span></p>
-<p>These attributes may also appear on a <a title=
-"literal result element" class="termref" href=
-"#dt-literal-result-element">literal result element</a>, but in
+<code>xpath-default-namespace</code>.<span class="definition">]</span></p>
+<p>These attributes may also appear on a <a title="literal result element" class="termref" href="#dt-literal-result-element" shape="rect">literal result element</a>, but in
 this case, to distinguish them from user-defined attributes, the
-names of the attributes are in the <a title="XSLT namespace" class=
-"termref" href="#dt-xslt-namespace">XSLT namespace</a>. They are
+names of the attributes are in the <a title="XSLT namespace" class="termref" href="#dt-xslt-namespace" shape="rect">XSLT namespace</a>. They are
 thus typically written as <code>xsl:default-collation</code>,
 <code>xsl:default-mode</code>, <code>xsl:default-validation</code>,
 <code>xsl:exclude-result-prefixes</code>,
@@ -4559,13 +3448,9 @@
 <code>xsl:use-when</code>, <code>xsl:version</code>, or
 <code>xsl:xpath-default-namespace</code>.</p>
 <p>It is <span class="verb">recommended</span> that all these
-attributes should also be permitted on <a title=
-"extension instruction" class="termref" href=
-"#dt-extension-instruction">extension instructions</a>, but this is
+attributes should also be permitted on <a title="extension instruction" class="termref" href="#dt-extension-instruction" shape="rect">extension instructions</a>, but this is
 at the discretion of the implementer of each extension instruction.
-They <span class="verb">may</span> also be permitted on <a title=
-"user-defined data element" class="termref" href=
-"#dt-data-element">user-defined data elements</a>, though they will
+They <span class="verb">may</span> also be permitted on <a title="user-defined data element" class="termref" href="#dt-data-element" shape="rect">user-defined data elements</a>, though they will
 only have any useful effect in the case of data elements that are
 designed to behave like XSLT declarations or instructions.</p>
 <p>In the following descriptions, these attributes are referred to
@@ -4584,10 +3469,8 @@
 a descendant element. The effective value of the attribute for a
 particular stylesheet element is determined by the innermost
 ancestor-or-self element on which the attribute appears.</p>
-<p>In an <a title="embedded stylesheet module" class="termref"
-href="#dt-embedded-stylesheet-module">embedded stylesheet
-module</a>, <a title="standard attributes" class="termref" href=
-"#dt-standard-attributes">standard attributes</a> appearing on
+<p>In an <a title="embedded stylesheet module" class="termref" href="#dt-embedded-stylesheet-module" shape="rect">embedded stylesheet
+module</a>, <a title="standard attributes" class="termref" href="#dt-standard-attributes" shape="rect">standard attributes</a> appearing on
 ancestors of the outermost element of the stylesheet module have no
 effect.</p>
 <p>In the case of <code>[xsl:]exclude-result-prefixes</code> and
@@ -4599,152 +3482,107 @@
 element and any of its ancestor elements. Again, the two forms with
 and without the XSLT namespace are equivalent.</p>
 <p>The effect of the <code>[xsl:]use-when</code> attribute is
-described in <a href="#conditional-inclusion"><i>3.14.1 Conditional
+described in <a href="#conditional-inclusion" shape="rect"><i>3.14.1 Conditional
 Element Inclusion</i></a>.</p>
-<p>Because these attributes may appear on any <a title=
-"XSLT element" class="termref" href="#dt-xslt-element">XSLT
+<p>Because these attributes may appear on any <a title="XSLT element" class="termref" href="#dt-xslt-element" shape="rect">XSLT
 element</a>, they are not listed in the syntax summary of each
 individual element. Instead they are listed and described in the
-entry for the <a href=
-"#element-stylesheet"><code>xsl:stylesheet</code></a>, <a href=
-"#element-transform"><code>xsl:transform</code></a>, <span>and
-<a href="#element-package"><code>xsl:package</code></a></span>
+entry for the <a href="#element-stylesheet" shape="rect"><code>xsl:stylesheet</code></a>, <a href="#element-transform" shape="rect"><code>xsl:transform</code></a>, <span>and
+<a href="#element-package" shape="rect"><code>xsl:package</code></a></span>
 elements only. This reflects the fact that these attributes are
 often used on the <span>outermost element of the stylesheet</span>,
-in which case they apply to the entire <a title="stylesheet module"
-class="termref" href="#dt-stylesheet-module">stylesheet module</a>
-<span>or <a title="package manifest" class="termref" href=
-"#dt-package-manifest">package manifest</a></span>.</p>
+in which case they apply to the entire <a title="stylesheet module" class="termref" href="#dt-stylesheet-module" shape="rect">stylesheet module</a>
+<span>or <a title="package manifest" class="termref" href="#dt-package-manifest" shape="rect">package manifest</a></span>.</p>
 <p>Note that the effect of these attributes does <em>not</em>
-extend to <a title="stylesheet module" class="termref" href=
-"#dt-stylesheet-module">stylesheet modules</a> referenced by
-<a href="#element-include"><code>xsl:include</code></a> or <a href=
-"#element-import"><code>xsl:import</code></a> declarations,
-<span>nor to packages referenced using <a href=
-"#element-use-package"><code>xsl:use-package</code></a></span>.</p>
+extend to <a title="stylesheet module" class="termref" href="#dt-stylesheet-module" shape="rect">stylesheet modules</a> referenced by
+<a href="#element-include" shape="rect"><code>xsl:include</code></a> or <a href="#element-import" shape="rect"><code>xsl:import</code></a> declarations,
+<span>nor to packages referenced using <a href="#element-use-package" shape="rect"><code>xsl:use-package</code></a></span>.</p>
 <p>For the detailed effect of each attribute, see the following
 sections:</p>
-<dl>
-<dt class="label"><code>[xsl:]default-collation</code></dt>
-<dd>
-<p>see <a href="#default-collation-attribute"><i>3.8.1 The
+<dl><dt class="label"><code>[xsl:]default-collation</code></dt><dd>
+<p>see <a href="#default-collation-attribute" shape="rect"><i>3.8.1 The
 default-collation Attribute</i></a></p>
-</dd>
-<dt class="label"><code>[xsl:]default-mode</code></dt>
-<dd>
-<p>see <a href="#default-mode"><i>3.8.2 The [xsl:]default-mode
+</dd><dt class="label"><code>[xsl:]default-mode</code></dt><dd>
+<p>see <a href="#default-mode" shape="rect"><i>3.8.2 The [xsl:]default-mode
 Attribute</i></a></p>
-</dd>
-<dt class="label"><code>[xsl:]default-validation</code></dt>
-<dd>
-<p>see <a href="#validation"><i>24.4 Validation</i></a></p>
-</dd>
-<dt class="label"><code>[xsl:]exclude-result-prefixes</code></dt>
-<dd>
-<p>see <a href="#lre-namespaces"><i>11.1.3 Namespace Nodes for
+</dd><dt class="label"><code>[xsl:]default-validation</code></dt><dd>
+<p>see <a href="#validation" shape="rect"><i>24.4 Validation</i></a></p>
+</dd><dt class="label"><code>[xsl:]exclude-result-prefixes</code></dt><dd>
+<p>see <a href="#lre-namespaces" shape="rect"><i>11.1.3 Namespace Nodes for
 Literal Result Elements</i></a></p>
-</dd>
-<dt class="label"><code>[xsl:]expand-text</code></dt>
-<dd>
-<p>see <a href="#text-value-templates"><i>5.7.2 Text Value
+</dd><dt class="label"><code>[xsl:]expand-text</code></dt><dd>
+<p>see <a href="#text-value-templates" shape="rect"><i>5.7.2 Text Value
 Templates</i></a></p>
-</dd>
-<dt class="label">
-<code>[xsl:]extension-element-prefixes</code></dt>
-<dd>
-<p>see <a href="#extension-instruction"><i>23.2 Extension
+</dd><dt class="label">
+<code>[xsl:]extension-element-prefixes</code></dt><dd>
+<p>see <a href="#extension-instruction" shape="rect"><i>23.2 Extension
 Instructions</i></a></p>
-</dd>
-<dt class="label"><code>[xsl:]use-when</code></dt>
-<dd>
-<p>see <a href="#conditional-inclusion"><i>3.14.1 Conditional
+</dd><dt class="label"><code>[xsl:]use-when</code></dt><dd>
+<p>see <a href="#conditional-inclusion" shape="rect"><i>3.14.1 Conditional
 Element Inclusion</i></a></p>
-</dd>
-<dt class="label"><code>[xsl:]version</code></dt>
-<dd>
-<p>see <a href="#backwards"><i>3.10 Backwards Compatible
-Processing</i></a> and <a href="#forwards"><i>3.11 Forwards
+</dd><dt class="label"><code>[xsl:]version</code></dt><dd>
+<p>see <a href="#backwards" shape="rect"><i>3.10 Backwards Compatible
+Processing</i></a> and <a href="#forwards" shape="rect"><i>3.11 Forwards
 Compatible Processing</i></a></p>
-</dd>
-<dt class="label"><code>[xsl:]xpath-default-namespace</code></dt>
-<dd>
-<p>see <a href="#unprefixed-qnames"><i>5.2 Unprefixed Lexical
+</dd><dt class="label"><code>[xsl:]xpath-default-namespace</code></dt><dd>
+<p>see <a href="#unprefixed-qnames" shape="rect"><i>5.2 Unprefixed Lexical
 QNames in Expressions and Patterns</i></a></p>
-</dd>
-</dl>
-</div>
-<div class="div2">
-<h3><a name="packages" id="packages"></a>3.6 <a href="#packages"
-style="text-decoration: none">Packages</a></h3>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-package" id="dt-package" title="package"></a>An explicit
-<b>package</b> is represented by an <a href=
-"#element-package"><code>xsl:package</code></a> element, which will
+</dd></dl>
+</div>
+<div class="div2">
+<h3><a name="packages" id="packages" shape="rect"></a>3.6 <a href="#packages" style="text-decoration: none" shape="rect">Packages</a></h3>
+<p><span class="definition">[Definition: </span><a name="dt-package" id="dt-package" title="package" shape="rect"></a>An explicit
+<b>package</b> is represented by an <a href="#element-package" shape="rect"><code>xsl:package</code></a> element, which will
 generally be the outermost element of an XML document. <span>When
-the <a href="#element-package"><code>xsl:package</code></a> element
+the <a href="#element-package" shape="rect"><code>xsl:package</code></a> element
 is not used explicitly, the entire stylesheet comprises a single
 implicit package.</span><span class="definition">]</span> (This
-specification does not preclude the <a href=
-"#element-package"><code>xsl:package</code></a> being embedded in
+specification does not preclude the <a href="#element-package" shape="rect"><code>xsl:package</code></a> being embedded in
 another XML document, but it will never have any other XSLT element
 as an ancestor).</p>
-<p class="element-syntax"><a name="element-package" id=
-"element-package"></a><code>&lt;xsl:package<br />
-&#160;&#160;name? = <var>uri</var><br />
-&#160;&#160;package-version? = <var>string</var><br />
-&#160;&#160;<b>version</b> = <var>decimal</var><br />
-&#160;&#160;input-type-annotations? = "preserve" | "strip" |
-"unspecified"<br />
-&#160;&#160;declared-modes? = <var>boolean</var><br />
-&#160;&#160;default-mode? = <var>eqname</var> | "#unnamed"<br />
-&#160;&#160;default-validation? = "preserve" | "strip"<br />
-&#160;&#160;default-collation? = <var>uris</var><br />
-&#160;&#160;extension-element-prefixes? = <var>prefixes</var><br />
-&#160;&#160;exclude-result-prefixes? = <var>prefixes</var><br />
-&#160;&#160;expand-text? = <var>boolean</var><br />
-&#160;&#160;use-when? = <var>expression</var><br />
-&#160;&#160;xpath-default-namespace? =
-<var>uri</var>&#160;&gt;<br />
-&#160;&#160;&lt;!-- Content: ((<a href=
-"#element-use-package">xsl:use-package</a> | <a href=
-"#element-expose">xsl:expose</a> | <a href=
-"#element-global-context-item">xsl:global-context-item</a> |
-<var>declarations</var>)*) --&gt;<br />
+<p class="element-syntax"><a name="element-package" id="element-package" shape="rect"></a><code>&lt;xsl:package<br clear="none" />
+  name? = <var>uri</var><br clear="none" />
+  package-version? = <var>string</var><br clear="none" />
+  <b>version</b> = <var>decimal</var><br clear="none" />
+  input-type-annotations? = "preserve" | "strip" |
+"unspecified"<br clear="none" />
+  declared-modes? = <var>boolean</var><br clear="none" />
+  default-mode? = <var>eqname</var> | "#unnamed"<br clear="none" />
+  default-validation? = "preserve" | "strip"<br clear="none" />
+  default-collation? = <var>uris</var><br clear="none" />
+  extension-element-prefixes? = <var>prefixes</var><br clear="none" />
+  exclude-result-prefixes? = <var>prefixes</var><br clear="none" />
+  expand-text? = <var>boolean</var><br clear="none" />
+  use-when? = <var>expression</var><br clear="none" />
+  xpath-default-namespace? =
+<var>uri</var> &gt;<br clear="none" />
+  &lt;!-- Content: ((<a href="#element-expose" shape="rect">xsl:expose</a> | <a href="#element-global-context-item" shape="rect">xsl:global-context-item</a> |
+<var>declarations</var>)*) --&gt;<br clear="none" />
 &lt;/xsl:package&gt;</code></p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-package-manifest" id="dt-package-manifest" title=
-"package manifest"></a>The content of the <a href=
-"#element-package"><code>xsl:package</code></a> element is referred
-to as the <b>package manifest</b><span class=
-"definition">]</span>.</p>
+<p><span class="definition">[Definition: </span><a name="dt-package-manifest" id="dt-package-manifest" title="package manifest" shape="rect"></a>The content of the <a href="#element-package" shape="rect"><code>xsl:package</code></a> element is referred
+to as the <b>package manifest</b><span class="definition">]</span>.</p>
 <p>The <span><code>version</code></span> attribute indicates the
 version of the XSLT language specification to which the package
 manifest conforms. <span>The value <span class="verb">should</span>
 normally be <code>3.0</code>. If the value is numerically less than
-<code>3.0</code>, the content of the <a href=
-"#element-package"><code>xsl:package</code></a> element is
-processed using the rules for <a title=
-"backwards compatible behavior" class="termref" href=
-"#dt-backwards-compatible-behavior">backwards compatible
-behavior</a> (see <a href="#backwards"><i>3.10 Backwards Compatible
+<code>3.0</code>, the content of the <a href="#element-package" shape="rect"><code>xsl:package</code></a> element is
+processed using the rules for <a title="backwards compatible behavior" class="termref" href="#dt-backwards-compatible-behavior" shape="rect">backwards compatible
+behavior</a> (see <a href="#backwards" shape="rect"><i>3.10 Backwards Compatible
 Processing</i></a>). If the value is numerically greater than
-<code>3.0</code>, it is processed using the rules for <a title=
-"forwards compatible behavior" class="termref" href=
-"#dt-forwards-compatible-behavior">forwards compatible behavior</a>
-(see <a href="#forwards"><i>3.11 Forwards Compatible
+<code>3.0</code>, it is processed using the rules for <a title="forwards compatible behavior" class="termref" href="#dt-forwards-compatible-behavior" shape="rect">forwards compatible behavior</a>
+(see <a href="#forwards" shape="rect"><i>3.11 Forwards Compatible
 Processing</i></a>).</span></p>
 <p>A package typically has a name, given in its <code>name</code>
 attribute, which <span class="verb">must</span> be an absolute URI.
 Unnamed packages are allowed, but they can only be used as the "top
-level" of an application; they cannot be the target of an <a href=
-"#element-use-package"><code>xsl:use-package</code></a> declaration
+level" of an application; they cannot be the target of an <a href="#element-use-package" shape="rect"><code>xsl:use-package</code></a> declaration
 in another package.</p>
 <p><span>A package may have</span> a version identifier, given in
 its <code>package-version</code> attribute. This is used to
 distinguish different versions of a package. <span>The value of the
 version attribute, after trimming leading and trailing whitespace,
 <span class="verb">must</span> conform to the syntax given in
-<a href="#package-versions"><i>3.6.1 Versions of a Package</i></a>.
+<a href="#package-versions" shape="rect"><i>3.6.1 Versions of a Package</i></a>.
 If no version number is specified for a package, version
 <code>1</code> is assumed.</span></p>
 <p>The attributes <code>default-collation</code>,
@@ -4754,57 +3592,43 @@
 <code>version</code>, and <code>xpath-default-namespace</code> are
 standard attributes that can appear on any XSLT element, and
 potentially affect all descendant elements. Their meaning is
-described in <a href="#standard-attributes"><i>3.5 Standard
+described in <a href="#standard-attributes" shape="rect"><i>3.5 Standard
 Attributes</i></a>.</p>
 <p>The package manifest <span>contains the following elements,
 arbitrarily ordered</span>:</p>
-<ol class="enumar">
-<li>
-<p>Zero or more <a href=
-"#element-use-package"><code>xsl:use-package</code></a> elements
+<ol class="enumar"><li>
+<p>Zero or more <a href="#element-use-package" shape="rect"><code>xsl:use-package</code></a> elements
 which identify the packages used by this package, including
 subsidiary elements that constrain the way in which the components
 contained in those packages are used.</p>
-</li>
-<li>
-<p>An optional <a href=
-"#element-global-context-item"><code>xsl:global-context-item</code></a>
+</li><li>
+<p>An optional <a href="#element-global-context-item" shape="rect"><code>xsl:global-context-item</code></a>
 element; if present this element defines constraints on the
-existence and type of the <a title="global context item" class=
-"termref" href="#dt-global-context-item">global context
+existence and type of the <a title="global context item" class="termref" href="#dt-global-context-item" shape="rect">global context
 item</a>.</p>
-</li>
-<li>
-<p>Zero or more <a href=
-"#element-expose"><code>xsl:expose</code></a> declarations that
+</li><li>
+<p>Zero or more <a href="#element-expose" shape="rect"><code>xsl:expose</code></a> declarations that
 define the interface offered by this package to the outside
 world.</p>
-</li>
-<li>
-<p>Zero or more <a title="declaration" class="termref" href=
-"#dt-declaration">declarations</a>, that is, elements that are
-permitted as children of <a href=
-"#element-stylesheet"><code>xsl:stylesheet</code></a> or <a href=
-"#element-transform"><code>xsl:transform</code></a>. One possible
+</li><li>
+<p>Zero or more <a title="declaration" class="termref" href="#dt-declaration" shape="rect">declarations</a>, that is, elements that are
+permitted as children of <a href="#element-stylesheet" shape="rect"><code>xsl:stylesheet</code></a> or <a href="#element-transform" shape="rect"><code>xsl:transform</code></a>. One possible
 coding style is to include in the package manifest just a single
-<a href="#element-import"><code>xsl:import</code></a> or <a href=
-"#element-include"><code>xsl:include</code></a> declaration as a
+<a href="#element-import" shape="rect"><code>xsl:import</code></a> or <a href="#element-include" shape="rect"><code>xsl:include</code></a> declaration as a
 reference to the effective top-level stylesheet module; this
 approach is particularly suitable when writing code that is
 required to run under earlier releases of XSLT as well as under
 XSLT 3.0. Another approach is to include the substance of the
 top-level stylesheet module inline within the package manifest.</p>
-</li>
-</ol>
-<div class="example">
-<div class="exampleHeader"><a name="d7e5014" id=
-"d7e5014"></a>Example: An example package</div>
+</li></ol>
+<div class="example-chg">
+<div class="exampleHeader"><a name="d7e5184" id="d7e5184" shape="rect"></a>Example: An example package</div>
 <p>The following example shows a package that offers a number of
 functions for manipulating complex numbers. A complex number is
 represented as a map with two entries, the keys being 0 for the
 real part, and 1 for the imaginary part.</p>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
 &lt;xsl:package
   name="http://example.org/complex-arithmetic.xsl"
   package-version="1.0"
@@ -4858,8 +3682,7 @@
 <p>A more complex package might include private or abstract
 functions as well as public functions; it might expose components
 other than functions (for example, templates or global variables),
-and it might contain <a href=
-"#element-use-package"><code>xsl:use-package</code></a> elements to
+and it might contain <a href="#element-use-package" shape="rect"><code>xsl:use-package</code></a> elements to
 allow it to call on the services of other packages.</p>
 <div class="note">
 <p class="prefix"><b>Note:</b></p>
@@ -4871,24 +3694,19 @@
 </div>
 </div>
 <p>A package that does not itself expose any components or use any
-<a title="library package" class="termref" href=
-"#dt-library-package">library packages</a> may be written using a
-simplified syntax: the <a href=
-"#element-package"><code>xsl:package</code></a> element is omitted,
-and the <a href=
-"#element-stylesheet"><code>xsl:stylesheet</code></a> or <a href=
-"#element-transform"><code>xsl:transform</code></a> element is now
+<a title="library package" class="termref" href="#dt-library-package" shape="rect">library packages</a> may be written using a
+simplified syntax: the <a href="#element-package" shape="rect"><code>xsl:package</code></a> element is omitted,
+and the <a href="#element-stylesheet" shape="rect"><code>xsl:stylesheet</code></a> or <a href="#element-transform" shape="rect"><code>xsl:transform</code></a> element is now
 the outermost element of the stylesheet module. For compatibility
 reasons, all the named templates and modes declared in the package
 are made public. More formally, the principal stylesheet module of
-the <a title="top-level package" class="termref" href=
-"#dt-top-level-package">top-level package</a> may be expressed as
+the <a title="top-level package" class="termref" href="#dt-top-level-package" shape="rect">top-level package</a> may be expressed as
 an <code>xsl:stylesheet</code> or <code>xsl:transform</code>
 element, which is equivalent to the package represented by the
 output of the following transformation, preserving the base URI of
 the source:</p>
 <div class="exampleInner">
-<pre>
+<pre class="diff-chg" xml:space="preserve">
  &lt;xsl:transform version="3.0" 
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:t="http://www.w3.org/1999/XSL/TransformAlias"&gt;
@@ -4907,23 +3725,22 @@
        
 </pre></div>
 <p>The effect of the <code>input-type-annotations</code> attribute
-is defined in <a href="#stripping-annotations"><i>4.3 Stripping
+is defined in <a href="#stripping-annotations" shape="rect"><i>4.3 Stripping
 Type Annotations from a Source Tree</i></a>.</p>
 <div class="div3">
-<h4><a name="package-versions" id="package-versions"></a>3.6.1
-<a href="#package-versions" style="text-decoration: none">Versions
+<h4><a name="package-versions" id="package-versions" shape="rect"></a>3.6.1
+<a href="#package-versions" style="text-decoration: none" shape="rect">Versions
 of a Package</a></h4>
 <p>If a package has a version number, the version number must
 conform to the grammar:</p>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
 PackageVersion   ::= NumericPart ( "-" NamePart )?
 NumericPart      ::= IntegerLiteral ( "." IntegerLiteral )*
 NamePart         ::= NCName
                
 </pre></div>
-<p>Here <span><a href=
-"http://www.w3.org/TR/xpath-30/#prod-xpath30-IntegerLiteral">IntegerLiteral</a><sup><small>XP30</small></sup>
+<p>Here <span><a href="http://www.w3.org/TR/xpath-30/#prod-xpath30-IntegerLiteral" shape="rect">IntegerLiteral</a><sup><small>XP30</small></sup>
 and <code>NCName</code> are as defined in the XPath 3.0 grammar
 productions of the same name (including rules on limits)</span>.
 Leading and trailing whitespace is ignored; no other whitespace is
@@ -4933,55 +3750,48 @@
 <p>The integers and optional <code>NCName</code> within the version
 number are referred to as the components of the version number.</p>
 <p>Versions are ordered. When comparing two versions:</p>
-<ol class="enumar">
-<li>
+<ol class="enumar"><li>
 <p>Trailing zero components (that is, any zero-valued integer that
 is not followed by another integer) are discarded.</p>
-</li>
-<li>
+</li><li>
 <p>Comparison proceeds by comparing components pairwise from the
 left.</p>
-</li>
-<li>
+</li><li>
 <p>If both versions have the same number of components and all
 components compare equal <span>(under the rules of the XPath
 <code>eq</code> operator using the Unicode codepoint
 collation)</span>, then the versions compare equal.</p>
-</li>
-<li>
-<p>If the number of components in the two versions <var>V1</var>
-and <var>V2</var> is <var>N1</var> and <var>N2</var>, with
-<var>N1&lt;N2</var>, and if all components in positions 1 to
-<var>N</var> compare equal, then <var>V1</var> is less than
-<var>V2</var> if the component of <var>V2</var> in position
-<var>N1+1</var> is an integer, and is greater than <var>V2</var> if
-this component is an <code>NCName</code>. For example,
-<code>1.2</code> is less than <code>1.2.5</code>, while
-<code>2.0</code> is greater than <code>2.0-rc1</code>.</p>
-</li>
-<li>
+</li><li>
+<p>If the number of components in the two versions
+<var>V<sub>1</sub></var> and <var>V<sub>2</sub></var> is
+<var>N<sub>1</sub></var> and <var>N<sub>2</sub></var>, with
+<var>N<sub>1</sub></var>&lt;<var>N<sub>2</sub></var>, and if all
+components in positions 1 to <var>N</var> compare equal, then
+<var>V<sub>1</sub></var> is less than <var>V<sub>2</sub></var> if
+the component of <var>V<sub>2</sub></var> in position
+<var>N<sub>1</sub></var> is an integer, and is greater than
+<var>V<sub>2</sub></var> if this component is an
+<code>NCName</code>. For example, <code>1.2</code> is less than
+<code>1.2.5</code>, while <code>2.0</code> is greater than
+<code>2.0-rc1</code>.</p>
+</li><li>
 <p>Components are compared as follows:</p>
-<ol class="enumla">
-<li>
+<ol class="enumla"><li>
 <p>If both components are integers, they are compared <span>using
 the rules of XPath value comparisons</span>.</p>
-</li>
-<li>
+</li><li>
 <p>If both components are NCNames, they are compared <span>using
 the rules of XPath value comparisons</span>, using the Unicode
 Codepoint Collation.</p>
-</li>
-<li>
+</li><li>
 <p>If one component is an integer and the other is an NCName, the
 NCName comes first.</p>
-</li>
-</ol>
-</li>
-</ol>
+</li></ol>
+</li></ol>
 <p>For example, the following shows a possible ordered sequence of
 version numbers:</p>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
 0-rc1 &lt; 0-rc2 &lt; 0 &lt; 1 = 1.0 &lt; 1.0.2 &lt; 1.0.3-rc1 &lt; 1.0.3 &lt; 1.0.3.2 &lt; 1.0.10
 </pre></div>
 <div class="note">
@@ -4990,111 +3800,94 @@
 enough to accommodate a variety of conventions in common use, and
 to allow useful semantics for matching of versions and ranges of
 versions, without being over-prescriptive. It is influenced by
-<a href="#SemVer">[SemVer]</a>, but is not as prescriptive, and it
+<a href="#SemVer" shape="rect">[SemVer]</a>, but is not as prescriptive, and it
 imposes no assumptions about backwards compatibility of packages
 between successive versions.</p>
 </div>
 <p>Dependencies between packages may specify a version range (see
-<a href="#package-dependencies"><i>3.6.2 Dependencies between
+<a href="#package-dependencies" shape="rect"><i>3.6.2 Dependencies between
 Packages</i></a>). A version range represents a set of accepted
 versions. <span>The syntax of a version range is shown below.
 Whitespace is permitted only where indicated, using the terminal
 symbol <var>S</var>.</span></p>
 <div class="exampleInner">
-<pre>
+<pre xml:space="preserve">
         PackageVersionRange    ::=  AnyVersion | VersionRanges
         AnyVersion             ::=  "*"
-        VersionRanges          ::=  VersionRange S? "," S? VersionRange
+        VersionRanges          ::=  <span class="diff-chg" id="bug26997a" title="Bug 26997"><span>VersionRange (S? "," S? VersionRange)*</span></span>
         VersionRange           ::=  VersionPrefix | VersionFrom | VersionTo | VersionFromTo
         VersionPrefix          ::=  PackageVersion ".*"
         VersionFrom            ::=  PackageVersion "+"
         VersionTo              ::=  "to" S VersionPrefix
-        VersionFromTo          ::=  PackageVersion S "to" S VersionPrefix     
+        VersionFromTo          ::=  PackageVersion S "to" S <span class="diff-chg" id="bug26997b" title="Bug 26997"><span>(PackageVersion | VersionPrefix)</span></span>     
                
 </pre></div>
 <p>The meanings of the various forms of version range are defined
 below:</p>
-<ul>
-<li>
+<ul><li>
 <p>The range <code>AnyVersion</code> matches any version.</p>
-</li>
-<li>
+</li><li>
 <p>The range <code>VersionRanges</code> matches a version if any
 constituent <code>VersionRange</code> matches that version.</p>
-</li>
-<li>
+</li><li>
 <p>The range <code>VersionPrefix</code> matches any version whose
 leading components are the same as the components listed. For
-example, <code>1.3.*</code> matches <code>1.3</code>,&#160;
-<code>1.3.5</code>,&#160; <code>1.3.10.2</code>,&#160; and
+example, <code>1.3.*</code> matches <code>1.3</code>, 
+<code>1.3.5</code>,  <code>1.3.10.2</code>,  and
 <code>1.3-beta</code>.</p>
-</li>
-<li>
+</li><li>
 <p>The range <code>VersionFrom</code> matches any version that is
 greater than or equal to the version supplied. For example
-<code>1.3+</code> matches <code>1.3</code>,&#160;
-<code>1.3.2</code>,&#160; <code>1.4</code>,&#160; or
+<code>1.3+</code> matches <code>1.3</code>, 
+<code>1.3.2</code>,  <code>1.4</code>,  or
 <code>2.1</code>.</p>
-</li>
-<li>
+</li><li>
 <p>The range <code>VersionTo</code> matches any version that is
 less than or equal to some version that matches the
 <code>VersionPrefix</code>. For example, <code>to 4.0</code>
-matches <code>1.5</code>,&#160; <code>2.3</code>,&#160;
-<code>3.8</code>,&#160; <code>4.0</code>,&#160; and
+matches <code>1.5</code>,  <code>2.3</code>, 
+<code>3.8</code>,  <code>4.0</code>,  and
 <code>4.0-beta</code> (but not <code>4.0.1</code>), while <code>to
 3.3.*</code> matches <code>1.5</code> or <code>2.0.6</code> or
 <code>3.3.4621</code>, but not <code>3.4.0</code> or
 <code>3.4.0-beta</code>.</p>
-</li>
-<li>
+</li><li>
 <p>The range <code>VersionFromTo</code> matches any version that is
 greater than or equal to the starting <code>PackageVersion</code>,
 and less than or equal to some version that matches the
 <code>VersionPrefix</code>. For example, <code>1 to 5</code>
-matches <code>1.1</code>,&#160; <code>2.1</code>,&#160;
-<code>3.1</code>,&#160; or <code>5.0</code> (but not
+matches <code>1.1</code>,  <code>2.1</code>, 
+<code>3.1</code>,  or <code>5.0</code> (but not
 <code>5.1</code>), while <code>1 to 5.*</code> matches all of
 these, plus versions such as <code>5.7.2</code> (but not
 <code>6.0</code> or <code>6.0-beta</code>).</p>
-</li>
-</ul>
-</div>
-<div class="div3">
-<h4><a name="package-dependencies" id=
-"package-dependencies"></a>3.6.2 <a href="#package-dependencies"
-style="text-decoration: none">Dependencies between
+</li></ul>
+</div>
+<div class="div3">
+<h4><a name="package-dependencies" id="package-dependencies" shape="rect"></a>3.6.2 <a href="#package-dependencies" style="text-decoration: none" shape="rect">Dependencies between
 Packages</a></h4>
 <p>When components in one package reference components in another,
 the dependency of the first package on the second must be
-represented by an <a href=
-"#element-use-package"><code>xsl:use-package</code></a> element in
-the <a title="package manifest" class="termref" href=
-"#dt-package-manifest">package manifest</a> of the first
+represented by an <a href="#element-use-package" shape="rect"><code>xsl:use-package</code></a> element in
+the <a title="package manifest" class="termref" href="#dt-package-manifest" shape="rect">package manifest</a> of the first
 package.</p>
-<p><span class="definition">[Definition:&#160;</span><a name=
-"dt-use" id="dt-use" title="use"></a>If a package <var>Q</var>
-contains an <a href=
-"#element-use-package"><code>xsl:use-package</code></a> element
+<p><span class="definition">[Definition: </span><a name="dt-use" id="dt-use" title="use" shape="rect"></a>If a package <var>Q</var>
+contains an <a href="#element-use-package" shape="rect"><code>xsl:use-package</code></a> element
 that references package <var>P</var>, then package <var>Q</var> is
 said to <b>use</b> package <var>P</var>. In this relationship
 package <var>Q</var> is referred to as the <b>using</b> package,
-package <var>P</var> as the <b>used</b> package.<span class=
-"definition">]</span></p>
+package <var>P</var> as the <b>used</b> package.<span class="definition">]</span></p>
 <p>The phrase <b>directly uses</b> is synonymous with <b>uses</b>
 as defined above, while <b>directly or indirectly uses</b> refers
 to the transitive closure of this relationship.</p>
-<p class="element-syntax"><a name="element-use-package" id=
-"element-use-package"></a><code>&lt;xsl:use-package<br />
-&#160;&#160;<b>name</b> = <var>uri</var><br />
-&#160;&#160;package-version? = <var>string</var>&#160;&gt;<br />
-&#160;&#160;&lt;!-- Content: (<a href=
-"#element-accept">xsl:accept</a> | <a href=
-"#element-override">xsl:override</a>)* --&gt;<br />
+<p class="element-syntax"><a name="element-use-package" id="element-use-package" shape="rect"></a><code>&lt;!-- Category: declaration
+--&gt;<br clear="none" />
+&lt;xsl:use-package<br clear="none" />
+  <b>name</b> = <var>uri</var><br clear="none" />
+  package-version? = <var>string</var> &gt;<br clear="none" />
+  &lt;!-- Content: (<a href="#element-accept" shape="rect">xsl:accept</a> | <a href="#element-override" shape="rect">xsl:override</a>)* --&gt;<br clear="none" />
 &lt;/xsl:use-package&gt;</code></p>
-<p>A <a title="package" class="termref" href=
-"#dt-package">package</a> may be <a title="use" class="termref"
-href="#dt-use">used</a> by more than one other package, but the
+<p>A <a title="package" class="termref" href="#dt-package" shape="rect">package</a> may be <a title="use" class="termref" href="#dt-use" shape="rect">used</a> by more than one other package, but the
 relationship must not be cyclic. It is possible, but by no means
 inevitable, that using the same package in more than one place
 within a stylesheet will cause static errors due to the presence of
@@ -5105,8 +3898,7 @@
 <p>The <code>name</code> and <code>package-version</code>
 attributes together identify the used package. <span>The value of
 the <code>package-version</code> attribute, if present, must
-conform to the rules for a version range given in <a href=
-"#package-versions"><i>3.6.1 Versions of a Package</i></a>; if
+conform to the rules for a version range given in <a href="#package-versions" shape="rect"><i>3.6.1 Versions of a Package</i></a>; if
 omitted the value <code>*</code> is assumed, which matches any
 version. The used package must have a name that is an exact match
 for the name in the <code>name</code> attribute (using codepoint
@@ -5118,18 +3910,14 @@
 matching versions of a package are available, it does not define
 which of them is chosen.</span> Nor does it define whether this
 process locates source code or some other representation of the
-package contents. Such mechanisms are <a title=
-"implementation-defined" class="termref" href=
-"#dt-implementation-defined">implementation-defined</a>. Use of the
+package contents. Such mechanisms are <a title="implementation-defined" class="termref" href="#dt-implementation-defined" shape="rect">implementation-defined</a>. Use of the
 package name as a dereferenceable URI is <span class="verb">not
 recommended</span>, because the intent of the packaging feature is
 to allow a package to be distributed as reusable code and therefore
 to exist in many different locations.</p>
-<p><a name="err-XTSE3000" id="err-XTSE3000"><span class=
-"error">[ERR XTSE3000]</span></a> It is a <a title="static error"
-class="termref" href="#dt-static-error">static err