<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="xmlspec.xsl"?>
<spec status="int-review" role="editors-copy" w3c-doctype="wgnote">
  <header>
    <title>Test Cases for C14N 1.1 and XMLDSig Interoperability</title>
    <w3c-doctype>
      Editor's Draft
    </w3c-doctype>
    <pubdate>
      <day>15</day>
      <month>April</month>
      <year>2008</year>
    </pubdate>
    <publoc>
      <loc href="http://www.w3.org/TR/2008/NOTE-xmldsig2ed-tests-20080415/">http://www.w3.org/TR/2008/NOTE-xmldsig2ed-tests-20080415/</loc>
    </publoc>
    <latestloc>
      <loc href="http://www.w3.org/TR/xmldsig2ed-tests/">http://www.w3.org/TR/xmldsig2ed-tests/</loc>
    </latestloc>
    <authlist>
      <author>
        <name>Juan Carlos Cruellas</name>
        <affiliation>UPC </affiliation>
        <email  href="mailto:cruellas@ac.upc.es"   >cruellas@ac.upc.es</email>
      </author>
      <author>
        <name>Konrad Lanz</name>
        <affiliation>A-SIT </affiliation>
        <email  href="mailto:Konrad.Lanz@iaik.tugraz.at"   >Konrad.Lanz@iaik.tugraz.at</email>
      </author>
      <author>
        <name>Sean Mullan</name>
        <affiliation>Sun Microsystems </affiliation>
        <email  href="mailto:Sean.Mullan@Sun.COM"   >Sean.Mullan@Sun.COM</email>
      </author>
    </authlist>
    <abstract>
      <p>This document defines interoperability test cases for Canonical XML 1.1 <bibref
      ref="XML-C14N1.1"/> and XML Signature Syntax and Processing, Second Edition <bibref
      ref="XMLDSIG2"/>. The changes tested include C14N11 handling of attributes in the XML
      namespace, including xml:id and xml:base, appropriate C14N11 nodeset to octet stream transform
      processing, modifications to RFC 3986 dot segment processing for C14N11, and RFC 4514 string
      encoding of Distinguished Names. The tests include standalone C14N11 tests as well as tests
      integrated with XML signature generation and validation. This document also includes earlier
      test cases used in XML Signature <bibref ref="XMLDSIG"/> for regression testing.</p>
    </abstract>
    <status>
      <p><emph>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 <loc
      href="http://www.w3.org/TR/">W3C technical reports index</loc> at
      http://www.w3.org/TR/.</emph></p>
      
      <p>The set of test cases documented in this report was used to provide evidence for
      implementation support for the Canonical XML 1.1 and XML Signature Proposed (Edited)
      Recommendations.  While the Working Group might publish revised versions of this document to
      include mild improvements of the test documentation, there is no expectation that the core
      material in this document will change.  It should be noted that no material in this document
      is normative; in particular, passing the tests documented in this document is neither
      necessary, nor sufficient for a conformance claim against either Canonical XML 1.1 or XML
      Signature 2nd Edition.</p>
      
      <p>This document was developed by the <loc href="http://www.w3.org/2007/xmlsec/">XML Security
      Specifications Maintenance Working Group</loc>.</p>

      <p>Please send comments about this document to public-xmlsec-discuss@w3.org (with <a
      href="http://lists.w3.org/Archives/Public/public-xmlsec-discuss/">public archive</a>).</p>
      
      <p>Publication as a Working Group Note 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 <loc
      href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent
      Policy</loc>.  W3C maintains a <loc rel="disclosure"
      href="http://www.w3.org/2004/01/pp-impl/40279/status">public list of any patent
      disclosures</loc> 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 <loc
      href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
      Claim(s)</loc> must disclose the information in accordance with <loc
      href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the
      W3C Patent Policy</loc>.</p>
    </status>
    <revisiondesc>
      <p>This is version 0.11</p>
    </revisiondesc>
  </header>
  <body>
    <div1 id="Introduction">
      <head>Introduction</head>
      <p>The test cases include standalone C14N 1.1 tests and test cases involving XML signature generation and validation. XML signatures are generated according to the details specified in this document.</p>
      <p>All the test cases are positive (signatures that are valid).</p>
      <p>Applications should validate these signatures and check that they are valid.</p>
      <div2 id="Introduction-TestCaseNotation">
        <head>Test Case Notation</head>
        <p>This section summarizes the notation used for identification of test cases.</p>
        <p>A test case identifier matches the following pattern, and the syntax for describing the pattern is borrowed from <loc  href="http://www.w3.org/TR/xmldsig-core/#sec-Overview"   >section 2.0</loc> of
          <bibref ref="XMLDSIG"/> (where "?" denotes zero or one occurrence; "+" denotes one or more occurrences; "*" denotes zero or more occurrences) and "|" denotes a choice.
				</p>
        <p>
          <eg xml:space="preserve">Rec/(SubRec/)?(SpecificIssue-(SpecificSubIssue-)?)+TestNumber</eg>
        </p>
        <p>The <code>Rec</code> part identifies the source recommendation for the test case.</p>
        <p>The <code>SubRec</code> part identifies a recommendation that is tested in the context of 
				<code>Rec</code>.</p>
        <p>The <code>SpecificIssue</code> part identifies the issue to be tested by the test case. The optional <code>SpecificSubIssue</code> part further refines the issue to be tested.</p>
        <p>The <code>TestNumber</code> part numbers the test case. It must be an integer number or an integer number followed by a lowercase letter.</p>
        <p>The next section identifies codes used throughout this document.</p>
      </div2>
      <div2 id="Introduction.RecommendationRefs">
        <head>Codes for Recommendation References (<code>Rec</code>, <code>SubRec</code>)</head>
        <p>The following codes are used for identifying the source recommendations for the test cases:</p>
        <ulist>
          <item>
            <p>
              <code>c14n11</code> identifies the standalone Canonical XML 1.1 <bibref ref="XML-C14N1.1"/> test cases.</p>
          </item>
          <item>
            <p>
              <code>xmldsig</code> identifies the XML Signature Second Edition <bibref ref="XMLDSIG2"/> test cases.</p>
            <ulist>
              <item>
                <p>
                  <code>c14n11</code> identifies the test cases that test <code>c14n11</code> with <code>xmldsig</code>.</p>
              </item>
              <item>
                <p>
                  <code>dname</code> identifies the test cases that test <bibref ref="RFC-4514"/> versus <bibref ref="RFC-2253"/> with <code>xmldsig</code>.</p>
              </item>
              <item>
                <p>
                  <code>xpointer</code> identifies the test cases that test <bibref ref="XPointer-Framework"/>, <bibref ref="XPointer-Element"/> and <bibref ref="XPointer-xpointer"/> with <code>xmldsig</code>.</p>
              </item>
            </ulist>
          </item>
        </ulist>
        <p id="directory-structure">
				  This structure is reflected in the directories 
				  <loc  href="../c14n11/"   >c14n11/</loc>, 
				  <loc  href="../xmldsig/"   >xmldsig/</loc>,
				  <loc  href="../xmldsig/c14n11/"   >xmldsig/c14n11/</loc>,
				  <loc  href="../xmldsig/dname/"   >xmldsig/dname/</loc>
				  and
				  <loc  href="../xmldsig/xpointer/"   >xmldsig/xpointer/</loc>.
				</p>
      </div2>
      <div2 id="Introduction.IssuesCodes">
        <head>Codes for Issues (<code>SpecificIssue</code>) and Sub-Issues (<code>SpecificSubIssue</code>)</head>
        <p>The following codes are used for identifying the issues and sub-issues for the test cases:</p>
        <ulist>
          <item>
            <p>
              <code>defCan</code> identifies the test cases that test the <bibref ref="XMLDSIG2"/> implicit and explicit rules managing the final canonicalization that precedes the digest computation..</p>
          </item>
          <item>
            <p>
              <code>xmllang</code> identifies the test cases that test the C14N11 handling of the <code>xml:lang</code> attribute.</p>
          </item>
          <item>
            <p>
              <code>xmlspace</code> identifies the test cases that test the C14N11 handling of the <code>xml:space</code> attribute.</p>
          </item>
          <item>
            <p>
              <code>xmlid</code> identifies the test cases that test the C14N11 handling of the <code>xml:id</code> attribute.</p>
          </item>
          <item>
            <p>
              <code>xmlbase</code> identifies the test cases that test the C14N11 handling of the <code>xml:base</code> attribute.</p>
            <p>The following sub-issues are associated with this issue:</p>
            <ulist>
              <item>
                <p>
                  <code>prop</code> identifies the test cases that test the C14N11 propagation of the <code>xml:base</code> attribute through the node tree.</p>
              </item>
              <item>
                <p>
                  <code>annexA</code> identifies the test cases that test the C14N11 Remove Dot Segments examples listed in Appendix A of <bibref ref="XML-C14N1.1"/>.</p>
              </item>
              <item>
                <p>
                  <code>c14n11spec</code> identifies the test cases that test the examples in the <bibref ref="XML-C14N1.1"/> specification.</p>
              </item>
            </ulist>
          </item>
          <item>
            <p>
              <code>dnString</code> identifies the test cases that test the string encoding of Distinguished Names.</p>
          </item>
          <item>
            <p>
              <code>diffRFCs</code> identifies the test cases that test the differences between <bibref ref="RFC-2253"/> and <bibref ref="RFC-4514"/>.</p>
          </item>
          <item>
            <p>
              <code>xpointer</code> identifies the test cases that test the handling of XPointer Reference URIs as specified in <bibref ref="XMLDSIG2"/>
            </p>
          </item>
        </ulist>
      </div2>
    </div1>
    <div1 id="acknowledgements">
      <head>Acknowledgements</head>
      <p>
	Major contributions to this document were received from Juan Carlos Cruellas, UPC; Konrad
	Lanz, A-SIT; Sean Mullan, Sun Microsystems; Pratik Datta, Oracle; Frederick Hirsch, Nokia;
	Bruce Rich, IBM; Thomas Roessler, W3C.  The test cases in this document were reviewed by the
	members of the W3C XML Security Specifications Maintenance Working Group.
      </p>
    </div1>
    <div1 id="TestCases-Spec">
      <head>Test Cases specification</head>
      <p>The following sub-sections describe each of the test cases and are grouped by Recommendation and Issue.</p>
      <div2 id="TestCases-Legacy">
        <head>Legacy XMLDSig Working Group Test Cases</head>
        <p> The IETF/W3C XML-DSig Working Group produced an interoperability test matrix that can be found at <bibref ref="XMLDSIG-interop"/>.
        </p>
      </div2>
      <div2 id="TestCases-C14n11">
        <head>Test Cases for Canonicalization 1.1</head>
        <p>The set of test cases in this section are designed to test the C14N11 handling of attributes in the xml namespace. The input for each of these test cases is an XML document and an XPath document subset expression. Two different sets of tests are included based on the test cases in this section.</p>
        <ulist>
          <item>
            <p>Standalone tests: no XML signature generation or validation is required. The XPath document subset expression is applied to the input document. These tests are used to check that the implementation for <bibref ref="XML-C14N1.1"/> behaves correctly.</p>
          </item>
          <item>
            <p>Integrated tests with XML signatures: In these set of tests, an XML signature is generated based on the input document and a corresponding XPath Filtering Transform as indicated in the tables. For these set of tests, the following rules apply:</p>
            <ulist>
              <item>
                <p>The XML Signature is generated using the HMAC-SHA1 SignatureMethod algorithm and a secret key with the value: <code>"secret".getBytes("ASCII")</code>.</p>
              </item>
              <item>
                <p>The <code>Transforms</code> element contains a sequence of two transforms:</p>
                <ulist>
                  <item>
                    <p>An XPath Filtering Transform that contains an XPath expression that depends on the test case.</p>
                  </item>
                  <item>
                    <p>A Canonical XML 1.1 Transform.</p>
                  </item>
                </ulist>
              </item>
            </ulist>
          </item>
        </ulist>
        <div3 id="XMLLANG">
          <head>Test Cases for <code>xml:lang</code> attribute</head>
          <p>The set of test cases in this section test the C14N11 handling of <code>xml:lang</code> attributes.</p>
          <p>Below is the <loc  href="../c14n11/xmllang-input.xml"   >input document</loc> for the test cases in this section:</p>
          <p>
			<eg xml:space="preserve"><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmllang-input.xml" parse="text"/></eg>
          </p>
          <note>
            <p>Document subset expressions for document subsets computation are defined as in <bibref ref="XML-C14N1.1"/>.</p>
          </note>
          <div5 id="c14n11xmllang-1"><head>Test case c14n11/xmllang-1</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">To-Be-Signed (TBS henceforth) data object with ONLY a <code>xml:lang</code> attribute in a certain element <code>e</code> whose content includes other elements. The <code>ds:Transform</code> contains a XPath expression whose result is a node set that includes element <code>e</code>.</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> handle xml:lang attributes as defined in <bibref ref="XML-C14N1.1"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmllang-1.xpath"   >Document subset expression</loc>
                </th>
				<td rowspan="1" colspan="1"><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmllang-1.xpath" parse="text"/></td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmllang-1.output"   >Output</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmllang-1.output" parse="text"/></pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="c14n11xmllang-2"><head>Test case c14n11/xmllang-2</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">TBS data object with ONLY a <code>xml:lang</code>  attribute in a certain element <code>e</code> whose content includes other elements. The <code>ds:Transform</code> contains a XPath expression whose result is a node set that DOES NOT include neither element <code>e</code> nor any of its children elements.</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> handle xml:lang
		attributes as defined in <bibref ref="XML-C14N1.1"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmllang-2.xpath"   >Document subset expression</loc>
                </th>
                <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmllang-2.xpath" parse="text"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmllang-2.output"   >Output</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmllang-2.output" parse="text"/>
</pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="c14n11xmllang-3"><head>Test case c14n11/xmllang-3</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">TBS with ONLY a <code>xml:lang</code>  attribute in a certain element <code>e</code> whose content includes a sequence of one element. The <code>ds:Transform</code> contains a XPath expression whose result is a node set that DOES NOT include element <code>e</code> but includes one child element.</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> handle xml:lang attributes as defined in <bibref ref="XML-C14N1.1"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmllang-3.xpath"   >Document subset expression</loc>
                </th>
                <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmllang-3.xpath" parse="text"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmllang-3.output"   >Output</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmllang-3.output" parse="text"/>
</pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="c14n11xmllang-4"><head>Test case c14n11/xmllang-4</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">TBS with ONLY a <code>xml:lang</code> attribute in a certain element <code>e</code> whose content includes a sequence of more than one element (these children may in turn contain children elements). The <code>ds:Transform</code> contains a XPath expression whose result is a node set that DOES NOT include element <code>e</code> but includes more than one of its children elements.</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> handle xml:lang attributes as defined in <bibref ref="XML-C14N1.1"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmllang-4.xpath"   >Document subset expression</loc>
                </th>
                <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmllang-4.xpath" parse="text"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmllang-4.output"   >Output</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmllang-4.output" parse="text"/>
</pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
        </div3>
        <div3 id="XMLSPACE">
          <head>Test Cases for <code>xml:space</code> attribute</head>
          <p>The set of test cases in this section test the C14N11 handling of <code>xml:space</code> attributes.</p>
          <p>Below is the <loc  href="../c14n11/xmlspace-input.xml"   >input document</loc> for the test cases in this section:</p>
          <p>
            <eg xml:space="preserve">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlspace-input.xml" parse="text"/>
</eg>
          </p>
          <div5 id="c14n11xmlspace-1"><head>Test case c14n11/xmlspace-1</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">TBS data object with ONLY a <code>xml:space</code> attribute in a certain element <code>e</code> whose content includes other elements. The <code>ds:Transform</code> contains a XPath expression whose result is a node set that includes element <code>e</code>.</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> handle xml:space attributes as defined in <bibref ref="XML-C14N1.1"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlspace-1.xpath"   >Document subset expression</loc>
                </th>
                <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlspace-1.xpath" parse="text"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlspace-1.output"   >Output</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlspace-1.output" parse="text"/>
</pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="c14n11xmlspace-2"><head>Test case c14n11/xmlspace-2</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">TBS data object with ONLY a <code>xml:space</code>  attribute in a certain element <code>e</code> whose content includes other elements. The <code>ds:Transform</code> contains a XPath expression whose result is a node set that DOES NOT include neither element <code>e</code> nor any of its children elements.</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> handle xml:space attributes as defined in <bibref ref="XML-C14N1.1"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlspace-2.xpath"   >Document subset expression</loc>
                </th>
                <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlspace-2.xpath" parse="text"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlspace-2.output"   >Output</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlspace-2.output" parse="text"/>
</pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="c14n11xmlspace-3"><head>Test case c14n11/xmlspace-3</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">TBS with ONLY a <code>xml:space</code>  attribute in a certain element <code>e</code> whose content includes a sequence of one element. The <code>ds:Transform</code> contains a XPath expression whose result is a node set that DOES NOT include element <code>e</code> but includes its child element.</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> handle xml:space attributes as defined in <bibref ref="XML-C14N1.1"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlspace-3.xpath"   >Document subset expression</loc>
                </th>
                <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlspace-3.xpath" parse="text"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlspace-3.output"   >Output</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlspace-3.output" parse="text"/>
</pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="c14n11xmlspace-4"><head>Test case c14n11/xmlspace-4</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">TBS with ONLY a <code>xml:space</code> attribute in a certain element <code>e</code> whose content includes a sequence of more than one element (these children may in turn contain children elements). The <code>ds:Transform</code> contains a XPath expression whose result is a node set that DOES NOT include element <code>e</code> but includes more than one of its children elements.</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> handle xml:space attributes as defined in <bibref ref="XML-C14N1.1"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlspace-4.xpath"   >Document subset expression</loc>
                </th>
                <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlspace-4.xpath" parse="text"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlspace-4.output"   >Output</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlspace-4.output" parse="text"/>
</pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
        </div3>
        <div3 id="XMLID">
          <head>Test Cases for <code>xml:id</code> attribute</head>
          <p>The set of test cases in this section test the C14N11 handling of <code>xml:id</code> attributes.</p>
          <p>Below is the <loc  href="../c14n11/xmlid-input.xml"   >input document</loc> for all the test cases in this section:</p>
          <p>
            <eg xml:space="preserve">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlid-input.xml" parse="text"/>
</eg>
          </p>
          <div5 id="c14n11xmlid-1"><head>Test case c14n11/xmlid-1</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">TBS with ONLY a  <code>xml:id</code> attribute in a certain element <code>e</code> whose content includes other elements. The <code>ds:Transform</code> contains a XPath expression whose result is a node set that includes element <code>e</code>.</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> handle xml:id attributes as defined in <bibref ref="XML-C14N1.1"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlid-1.xpath"   >Document subset expression</loc>
                </th>
                <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlid-1.xpath" parse="text"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlid-1.output"   >Output</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlid-1.output" parse="text"/>
</pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="c14n11xmlid-2"><head>Test case c14n11/xmlid-2</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">TBS with ONLY a  <code>xml:id</code> attribute in a certain element <code>e</code> whose content includes other elements. The <code>ds:Transform</code> contains a XPath expression whose result is a node set that DOES NOT include the element <code>e</code> but some of the children of the element <code>e</code>.</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> handle xml:id attributes as defined in <bibref ref="XML-C14N1.1"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlid-2.xpath"   >Document subset expression</loc>
                </th>
                <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlid-2.xpath" parse="text"/>
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../c14n11/xmlid-2.output"   >Output</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlid-2.output" parse="text"/>
</pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
        </div3>
        <div3 id="XMLBASE">
          <head>Test Cases for <code>xml:base</code> attribute</head>
          <p>The set of test cases in this section test the C14N11 handling of <code>xml:base</code> attributes.</p>
          <p>Three sets of test cases have been defined:</p>
          <ulist>
            <item>
              <p>Tests that check if the implementation correctly propagates the <code>xml:base</code> attributes through the node tree.</p>
            </item>
            <item>
              <p>Tests that check if the implementation correctly processes the examples involving xml:base propagation in the <bibref ref="XML-C14N1.1"/> specification.
              </p>
            </item>
            <item>
              <p>Tests that check if the implementation correctly processes the examples in the Appendix of <bibref ref="XML-C14N1.1"/>
              </p>
            </item>
          </ulist>
          <div4 id="XMLBASE_PROPAGATION">
            <head>Test Cases for checking <code>xml:base</code> attribute propagation</head>
            <p>This section defines test cases that test how implementations propagate <code>xml:base</code> attributes through the tree when the result of the filtering is a document subset.</p>
            <p>Below is the <loc  href="../c14n11/xmlbase-prop-input.xml"   >input document</loc> for the test cases in this section:</p>
            <p>
              <eg xml:space="preserve">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-input.xml" parse="text"/>
</eg>
            </p>
            <p>The document's root element <code>ietf:c14n11XmlBaseDoc1</code> defines an <code>xml:base</code> attribute. This	element contains three children elements.</p>
            <p>The first element <code>ietf:e1</code> has another <code>xml:base</code> attribute. All the <code>ietf:e1</code>'s descendant elements have a <code>xml:base</code> attribute. Transforms that select subsets of <code>ietf:e1</code>'s descendants will test how each level in the tree of elements incorporates its corresponding part to the value of the final <code>xml:base</code>.</p>
            <p>The second element <code>ietf:e2</code> does not have a <code>xml:base</code> attribute, but its child element, <code>ietf:e21</code> has a <code>xml:base</code> attribute. Transforms that select <code>ietf:e21</code> will test how it takes the value of <code>xml:base</code> from an ancestor different than its parent.</p>
            <p>As for the third element, neither it nor any of its descendants have a <code>xml:base</code> attribute. Transforms that select <code>ietf:e3</code> or any of its descendants will test how they inherit the <code>xml:base</code> attribute from the root element without any further processing.</p>
            <div5 id="c14n11xmlbase-prop-1"><head>Test case c14n11/xmlbase-prop-1</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The document shown above.  The <code>ds:Transform</code> contains a XPath expression whose result is a node 	set that includes element <code>ietf:c14n11XmlBaseDoc1</code> and the child <code>ietf:e1</code> and its descendant.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> work properly when the <code>xml:base</code> origin appears in the output document subset and also children with <code>xml:base</code>, which do not require further processing, are also present.
									</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">
                    <loc  href="../c14n11/xmlbase-prop-1.xpath"   >Document subset expression</loc>
                  </th>
                  <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-1.xpath" parse="text"/>
                  </td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">
                    <loc  href="../c14n11/xmlbase-prop-1.output"   >Output</loc>
                  </th>
                  <td rowspan="1" colspan="1">
                    <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-1.output" parse="text"/>
</pre>
                  </td>
                </tr>
              </tbody>
            </table></div5>
            <p/>
            <div5 id="c14n11xmlbase-prop-2"><head>Test case c14n11/xmlbase-prop-2</head><table border="1">
                <tbody>
                  
                  <tr>
                    <th rowspan="1" colspan="1">Input details</th>
                    <td rowspan="1" colspan="1">The document shown above. The <code>ds:Transform</code> contains a XPath expression whose result is a node 	set that includes element <code>ietf:e1</code> and its descendant but not <code>ietf:c14n11XmlBaseDoc1</code>.</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">Rationale</th>
                    <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> properly build the <code>xml:base</code> at the first 	level (<code>ietf:e1</code>).
									</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-2.xpath"   >Document subset expression</loc>
                    </th>
                    <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-2.xpath" parse="text"/>
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-2.output"   >Output</loc>
                    </th>
                    <td rowspan="1" colspan="1">
                      <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-2.output" parse="text"/>
</pre>
                    </td>
                  </tr>
                </tbody>
              </table></div5>
            <div5 id="c14n11xmlbase-prop-3"><head>Test case c14n11/xmlbase-prop-3</head><table border="1">
                <tbody>
                  
                  <tr>
                    <th rowspan="1" colspan="1">Input details</th>
                    <td rowspan="1" colspan="1">The document shown above. The <code>ds:Transform</code> contains a XPath expression whose result is a node 	set that includes element <code>ietf:e11</code> and its descendant. Elements <code>ietf:c14n11XmlBaseDoc1</code> and <code>	ietf:e1</code> do not appear.</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">Rationale</th>
                    <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> properly build the <code>xml:base</code> if one of 	intermediate the levels (<code>ietf:e1</code>) are absent from the document subset.
									</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-3.xpath"   >Document subset expression</loc>
                    </th>
                    <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-3.xpath" parse="text"/>
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-3.output"   >Output</loc>
                    </th>
                    <td rowspan="1" colspan="1">
                      <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-3.output" parse="text"/>
</pre>
                    </td>
                  </tr>
                </tbody>
              </table></div5>
            <div5 id="c14n11xmlbase-prop-4"><head>Test case c14n11/xmlbase-prop-4</head><table border="1">
                <tbody>
                  
                  <tr>
                    <th rowspan="1" colspan="1">Input details</th>
                    <td rowspan="1" colspan="1">The document shown above. The <code>ds:Transform</code> contains a XPath expression whose result is a node 	set that includes element <code>ietf:e111</code> and its descendant. Elements <code>ietf:c14n11XmlBaseDoc1</code>, <code>ietf:e11	</code> and <code>ietf:e1</code> do not appear.</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">Rationale</th>
                    <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> properly build the <code>xml:base</code> if several 	intermediate levels (<code>ietf:e1</code> and <code>ietf:e11</code>) are absent from the document subset.
									</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-4.xpath"   >Document subset expression</loc>
                    </th>
                    <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-4.xpath" parse="text"/>
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-4.output"   >Output</loc>
                    </th>
                    <td rowspan="1" colspan="1">
                      <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-4.output" parse="text"/>
</pre>
                    </td>
                  </tr>
                </tbody>
              </table></div5>
            <div5 id="c14n11xmlbase-prop-5"><head>Test case c14n11/xmlbase-prop-5</head><table border="1">
                <tbody>
                  
                  <tr>
                    <th rowspan="1" colspan="1">Input details</th>
                    <td rowspan="1" colspan="1">The document shown above. The <code>ds:Transform</code> contains a XPath expression whose result is a node 	set that includes element <code>ietf:e2</code> and its descendant. Elements <code>ietf:c14n11XmlBaseDoc1</code>, <code>ietf:e1	</code> and its descendant, and <code>ietf:e3</code> and its descendant do not appear.</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">Rationale</th>
                    <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> properly build the <code>xml:base</code> if one 	intermediate level (<code>ietf:e2</code>) without any <code>xml:base</code> attribute is absent from the document subset.
									</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-5.xpath"   >Document subset expression</loc>
                    </th>
                    <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-5.xpath" parse="text"/>
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-5.output"   >Output</loc>
                    </th>
                    <td rowspan="1" colspan="1">
                      <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-5.output" parse="text"/>
</pre>
                    </td>
                  </tr>
                </tbody>
              </table></div5>
            <div5 id="c14n11xmlbase-prop-6"><head>Test case c14n11/xmlbase-prop-6</head><table border="1">
                <tbody>
                  
                  <tr>
                    <th rowspan="1" colspan="1">Input details</th>
                    <td rowspan="1" colspan="1">The document shown above. The <code>ds:Transform</code> contains a XPath expression whose result is a node set that includes element <code>ietf:e3</code> and its descendant. Elements <code>ietf:c14n11XmlBaseDoc1</code>, <code>ietf:e1</code> and its descendant, and <code>ietf:e2</code> and its descendant do not appear.</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">Rationale</th>
                    <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> properly build the <code>xml:base</code> in one element that originally had no <code>xml:base</code> attribute.
									</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-6.xpath"   >Document subset expression</loc>
                    </th>
                    <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-6.xpath" parse="text"/>
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-6.output"   >Output</loc>
                    </th>
                    <td rowspan="1" colspan="1">
                      <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-6.output" parse="text"/>
</pre>
                    </td>
                  </tr>
                </tbody>
              </table></div5>
            <div5 id="c14n11xmlbase-prop-7"><head>Test case c14n11/xmlbase-prop-7</head><table border="1">
                <tbody>
                  
                  <tr>
                    <th rowspan="1" colspan="1">Input details</th>
                    <td rowspan="1" colspan="1">The document shown above. The <code>ds:Transform</code> contains a XPath expression whose result is a node 	set that includes elements  <code>ietf:c14n11XmlBaseDoc1</code> and <code>ietf:e3</code> and its descendant. Elements  <code>	ietf:e1</code> and its descendant, and <code>ietf:e2</code> and its descendant do not appear.</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">Rationale</th>
                    <td rowspan="1" colspan="1">Check that implementations of <bibref ref="XML-C14N1.1"/> do not pass the <code>xml:base</code> to another 	element when it is not necessary.
									</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-7.xpath"   >Document subset expression</loc>
                    </th>
                    <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-7.xpath" parse="text"/>
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-prop-7.output"   >Output</loc>
                    </th>
                    <td rowspan="1" colspan="1">
                      <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-prop-7.output" parse="text"/>
</pre>
                    </td>
                  </tr>
                </tbody>
              </table></div5>
          </div4>
          <div4 id="XMLBASE_C14N11SPEC">
	    <head>Test Cases for checking XML-C14N1.1 specification tests</head>
	    
            <p>This section defines test cases that are based on the examples in the C14N11
	    specification that propagate <code>xml:base</code> attributes through the tree when the
	    result of the filtering is a document subset.</p>
	    
	    <div5 id="c14n11xmlbase-c14n11spec-102"><head>Test case c14n11/xmlbase-c14n11spec-102</head>
	    <p>Below is the <loc  href="../c14n11/xmlbase-c14n11spec-input.xml"   >input document</loc> from section 3.8 of <bibref ref="XML-C14N1.1"/> for the test case c14n11/xmlbase-c14n11spec-102 below:</p>
	    <p>
              <eg xml:space="preserve">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-c14n11spec-input.xml" parse="text"/>
	      </eg>
	    </p>
	    <table border="1">
                <tbody>
                  
                  <tr>
                    <th rowspan="1" colspan="1">Input details</th>
                    <td rowspan="1" colspan="1">The input document shown above.</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">Rationale</th>
                    <td rowspan="1" colspan="1">Check that correct xml:base fixup is performed. </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-c14n11spec-102.xpath"   >Document subset expression</loc>
                    </th>
                    <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-c14n11spec-102.xpath" parse="text"/>
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-c14n11spec-102.output"   >Output</loc>
                    </th>
                    <td rowspan="1" colspan="1">
                      <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-c14n11spec-102.output" parse="text"/>
</pre>
                    </td>
                  </tr>
                </tbody>
              </table></div5>
            <div5 id="c14n11xmlbase-c14n11spec2-102"><head>Test case c14n11/xmlbase-c14n11spec2-102</head>
            <p>Below is the <loc  href="../c14n11/xmlbase-c14n11spec2-input.xml"   >input document</loc> similar to the example from section 3.8 of <bibref ref="XML-C14N1.1"/> for the test case c14n11/xmlbase-c14n11spec-102 below. The main difference is that the value of the xml:base attribute of the e2 element is "bar/" instead of "../bar".</p>
            <p>
              <eg xml:space="preserve">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-c14n11spec2-input.xml" parse="text"/>
	      </eg>
	    </p>
	    <table border="1">
                <tbody>
                  
                  <tr>
                    <th rowspan="1" colspan="1">Input details</th>
                    <td rowspan="1" colspan="1">The input document shown above.</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">Rationale</th>
                    <td rowspan="1" colspan="1">Check that correct xml:base fixup is performed. </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-c14n11spec2-102.xpath"   >Document subset expression</loc>
                    </th>
                    <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-c14n11spec2-102.xpath" parse="text"/>
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-c14n11spec2-102.output"   >Output</loc>
                    </th>
                    <td rowspan="1" colspan="1">
                      <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-c14n11spec2-102.output" parse="text"/>
		      </pre>
		    </td>
		  </tr>
		</tbody>
	      </table></div5>
            <div5 id="c14n11xmlbase-c14n11spec3-103"><head>Test case
	    c14n11/xmlbase-c14n11spec3-103</head>
	    
	    <p>Below is the <loc href="../c14n11/xmlbase-c14n11spec3-input.xml" >input
	    document</loc> from section 2.4 of <bibref ref="XML-C14N1.1"/> for the test case
	    c14n11/xmlbase-c14n11spec-103 below. </p>
            <p>
              <eg xml:space="preserve">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-c14n11spec3-input.xml" parse="text"/>
	      </eg>
	    </p>
	    
	    <table border="1">
                <tbody>
                  
                  <tr>
                    <th rowspan="1" colspan="1">Input details</th>
                    <td rowspan="1" colspan="1">The input document shown above.</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">Rationale</th>
                    <td rowspan="1" colspan="1">Check that correct xml:base fixup is performed. This test illustrates the modification of the "Remove Dot Segments" algorithm.</td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-c14n11spec3-103.xpath"   >Document subset expression</loc>
                    </th>
                    <td rowspan="1" colspan="1">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-c14n11spec3-103.xpath" parse="text"/>
                    </td>
                  </tr>
                  <tr>
                    <th rowspan="1" colspan="1">
                      <loc  href="../c14n11/xmlbase-c14n11spec3-103.output"   >Output</loc>
                    </th>
                    <td rowspan="1" colspan="1">
                      <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/xmlbase-c14n11spec3-103.output" parse="text"/>
		      </pre>
		    </td>
		  </tr>
		</tbody>
	      </table></div5>
	  </div4>
        </div3>
        <div3 id="XMLBASE_APPENDIXA">
          <head>Test Cases for checking examples in the XML-C14N1.1 Appendix</head>
          <p>This section defines test cases for checking if implementations are compliant with <bibref ref="XML-C14N1.1"/>, specifically the normative rules in the <loc  href="http://www.w3.org/TR/2008/PR-xml-c14n11-20080129/#DocSubsets"   >Document Subsets</loc> section. Informative examples are given in <loc  href="http://www.w3.org/TR/2008/PR-xml-c14n11-20080129/#appendix"   >the Appendix</loc> of C14N11.</p>
          <p>Each test case in this section specifies an input string, representing a URI that must be processed according to the modified Remove Dot Segments algorithm described in Section 2.4 (Document Subsets) of <bibref ref="XML-C14N1.1"/>.</p>
          <p>Each test case appears in a row of the table shown below. The first column identifies the input URI that has to be processed. The second column shows the corresponding output.</p>
          <div5 id="c14n11xmlbase-annexa"><head>Test case c14n11/xmlbase-annexa</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">
                    <loc  href="../c14n11/appendixa/inputs.txt"   >inputs.txt</loc>
                  </th>
                  <th rowspan="1" colspan="1">
                    <loc  href="../c14n11/appendixa/outputs.txt"   >outputs.txt</loc>
                  </th>
                </tr>
                <tr>
                  <td rowspan="1" colspan="1">
                    <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/appendixa/inputs.txt" parse="text"/>
</pre>
                  </td>
                  <td rowspan="1" colspan="1">
                    <pre>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../c14n11/appendixa/outputs.txt" parse="text"/>
</pre>
                  </td>
                </tr>
              </tbody>
            </table></div5>
        </div3>
      </div2>
      <div2 id="TestCases-XMLDSig">
        <head>Test Cases for XMLDSig</head>
        <div3 id="TestCases-XMLDSig-C14n11">
          <head>Test Cases for C14N 1.1 in XMLDSig</head>
          <p>
            The test cases in section <bibref ref="TestCases-C14n11"/> are performed in the context of XMLDSig as well. Here it should be noted that this is performed in a different location (i.e. <loc  href="../xmldsig/c14n11/"   >xmldsig/c14n11/</loc>) and the XPath-Filter expression in the <code>ds:Transform/ds:XPath</code> should be equal to the filter step of the XPath expressions in section <bibref ref="TestCases-C14n11"/> (cf. <loc  href="http://lists.w3.org/Archives/Public/public-xmlsec-maintwg/2007Sep/0017.html"   >explanation</loc>). The test cases are specified by an "unsigned" <code>ds:Signature</code> (without <code>ds:DigestValue</code> and <code>ds:SignatureValue</code>) in files in <loc  href="../xmldsig/c14n11/"   >xmldsig/c14n11/</loc> having the postfix <code>...-template.xml</code>.
          </p>
        </div3>
        <div3 id="TestCases-DefaultCan">
          <head>Test Cases on nodeset to octet-stream conversion by C14n 1.1 explicitly reflected in the chain of transforms</head>
          <p>The set of test cases in this section test the 
            <loc  href="http://www.w3.org/2007/xmlsec/Drafts/xmldsig-core/#sec-ReferenceGeneration"   >Reference Generation </loc> steps of <bibref ref="XMLDSIG2"/> 
          and its rules that manage the contents of the <code>Transforms</code> element when nodeset to
          octet-stream conversions are to be performed by canonicalization.</p>
          <p>General rules for these test cases:</p>
          <ulist>
            <item>
              <p>Test cases contain a <code>ds:Transforms</code> element with one child, containing a XPath filter that depends on the test case.</p>
            </item>
          </ulist>
          <div5 id="xmldsigdefCan-1"><head>Test case xmldsig/defCan-1</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The same <loc  href="../xmldsig/c14n11/xml-base-input.xml"   >input document</loc> as in 
                section <bibref ref="XMLBASE"/>.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check that implementations and APIs of <bibref ref="XMLDSIG2"/> honor the recommendation to use <bibref ref="XML-C14N1.1"/> in section 3.1.1 "Reference Generation" of <bibref ref="XMLDSIG2"/> and make its use explicit as a <code>ds:Transform</code>.
                </td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">
                    <loc  href="../xmldsig/defCan-1-template.xml"   >Template</loc>
                  </th>
                  <td rowspan="1" colspan="1">This <loc  href="../xmldsig/defCan-1-template.xml"   >template</loc> can be used to instruct some API to create a signature with a chain of transforms that would require implicit transformations from a node set to an octet stream. It is expected that c14n11 is inserted at the relevant places.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/defCan-1-signature.xml"   >Signature</loc>
                  </th>
                  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/defCan-1-signature.xml" parse="text"/></pre>
                  </td>
                </tr>
              </tbody>
            </table></div5>
          <div5 id="xmldsigdefCan-2"><head>Test case xmldsig/defCan-2</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The same <loc  href="../xmldsig/c14n11/xml-base-input.xml"   >input document</loc> as in 
                section <bibref ref="XMLBASE"/>.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check that implementations and APIs of <bibref ref="XMLDSIG2"/> honor the recommendation to use <bibref ref="XML-C14N1.1"/> in section 3.1.1 "Reference Generation" of <bibref ref="XMLDSIG2"/> and make it's use explicit as a <code>ds:Transform</code>. It is expected that c14n11 is inserted at the relevant places.
                  </td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">
                    <loc  href="../xmldsig/defCan-2-template.xml"   >Template</loc>
                  </th>
                  <td rowspan="1" colspan="1">This <loc  href="../xmldsig/defCan-2-template.xml"   >template</loc> can be used to instruct some API to create a signature with a chain of transforms that would require implicit transformations from a node set to an octet stream. The focus in this test case is to assure that c14n11 is inserted before transforms requiring an octet stream as input and also at the end of the chain of transforms if necessary because the last transform resulted in a node set.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/defCan-2-signature.xml"   >Signature</loc>
                  </th>
                  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/defCan-2-signature.xml" parse="text"/></pre>
                  </td>
                </tr>
              </tbody>
            </table></div5>
          <div5 id="xmldsigdefCan-3"><head>Test case xmldsig/defCan-3</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The same <loc  href="../xmldsig/c14n11/xml-base-input.xml"   >input document</loc> as in 
                section <bibref ref="XMLBASE"/>.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check that implementations and APIs of <bibref ref="XMLDSIG2"/> honor the recommendation to use <bibref ref="XML-C14N1.1"/> in section 3.1.1 "Reference Generation" of <bibref ref="XMLDSIG2"/> and make it's use explicit as a <code>ds:Transform</code>. It is expected that c14n11 is inserted at the relevant places. The focus in this test case is to assure that c14n11 is inserted before transforms requiring an octet stream as input but not inserted at the end of the chain of transforms, which is not necessary because the last transform resulted in an octet stream.
                  </td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">
                    <loc  href="../xmldsig/defCan-3-template.xml"   >Template</loc>
                  </th>
                  <td rowspan="1" colspan="1">This <loc  href="../xmldsig/defCan-3-template.xml"   >template</loc> can be used to instruct some API to create a signature with a chain of transforms that would require implicit transformations from a node set to an octet stream.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/defCan-3-signature.xml"   >Signature</loc>
                  </th>
                  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/defCan-3-signature.xml" parse="text"/></pre>
                  </td>
                </tr>
              </tbody>
            </table></div5>
        </div3>
        <div3 id="TestCases-SchemaBasedXPointers">
          <head>Test Cases on schema based XPointers and canonicalization </head>
          <p>This section defines test cases that test if implementations behave correctly when processing both schema-based xpointers and short-name xpointers with regards to comments present in the to be signed xml data object.</p>
          <p>The following rules apply to the test cases in this section:</p>
          <ulist>
            <item>
              <p>As the model processing is defined in <bibref ref="XMLDSIG2"/>, the test cases are based on XML signatures. For each test case, an XML signature will be generated and validated. The signatures will be enveloped signatures when the <code>URI</code> attribute is referencing the root element and enveloping when the <code>URI</code> attribute is referencing an element using its Id attribute.</p>
            </item>
            <item>
              <p>The input for the test cases is the to be signed xml data object shown below and the <code>ds:Reference</code>'s <code>URI</code> attribute value (a schema-based xpointer or a short-name pointer).</p>
            </item>
            <item>
              <p>The <code>ds:Reference</code> for enveloped signatures will eventually contain two <code>Transform</code> elements, namely; the enveloped signature transform and the conversion from node set data to octet stream (canonical XML 1.1).</p>
            </item>
          </ulist>
          <p>Below is the input document for the test cases in this section:</p>
          <p>
            <eg xml:space="preserve">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/xpointer/input.xml" parse="text"/>
</eg>
          </p>
          <div5 id="xmldsigxpointer-1"><head>Test case xmldsig/xpointer-1</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">The signature is an enveloped signature. It appears as the last child of the root element. The document enveloping the signature is the one shown at the beginning of this section. The value of the <code>URI</code> attribute is "#xpointer(/)" (find it <a href="../xmldsig/xpointer/xpointer-1.pointervalue">here</a>).</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations, following the rules stated in the <bibref ref="XMLDSIG2"/> model, dereference the URI getting the root element and its descendant, and that comments are preserved before proceeding with the computation of digest.
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/xpointer/xpointer-1-SUN.xml"   >Signature</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/xpointer/xpointer-1-SUN.xml" parse="text"/></pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="xmldsigxpointer-2"><head>Test case xmldsig/xpointer-2</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">The signature is an enveloping signature. The enveloped document is the one shown at the beginning of this section. The value of the <code>URI</code> attribute is "#xpointer(id('e1ID'))" (find it <a href="../xmldsig/xpointer/xpointer-2.pointervalue">here</a>).</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations, following the rules stated in the <bibref ref="XMLDSIG2"/> model, dereference the URI getting an element identified by its id attribute as well as its descendant, and that comments are preserved before proceeding with the computation of digest.
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/xpointer/xpointer-2-SUN.xml"   >Signature</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/xpointer/xpointer-2-SUN.xml" parse="text"/></pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="xmldsigxpointer-3"><head>Test case xmldsig/xpointer-3</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">The signature is an enveloped signature. It appears as the last child of the root element. The document enveloping the signature is the one shown at the beginning of this section. The value of the <code>URI</code> attribute is "".</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations, following the rules stated in the <bibref ref="XMLDSIG2"/> model, dereference the URI getting the root element and its descendant, and that comments are not preserved before proceeding with the computation of digest.
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/xpointer/xpointer-3-SUN.xml"   >Signature</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/xpointer/xpointer-3-SUN.xml" parse="text"/></pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="xmldsigxpointer-4"><head>Test case xmldsig/xpointer-4</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">The signature is an enveloping signature. The enveloped document is the one shown at the beginning of this section. The value of the <code>URI</code> attribute is "#e1ID" (find it <a href="../xmldsig/xpointer/xpointer-4.pointervalue">here</a>).</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check that implementations, following the rules stated in the <bibref ref="XMLDSIG2"/> model, dereference the URI getting an element identified by its id attribute as well as its descendant, and that comments are not preserved before proceeding with the computation of digest.
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/xpointer/xpointer-4-SUN.xml"   >Signature</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/xpointer/xpointer-4-SUN.xml" parse="text"/></pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="xmldsigxpointer-5"><head>Test case xmldsig/xpointer-5</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">The signature is an enveloping signature and signs three elements from the document. The enveloped document is the one shown at the beginning of this section. There are three <code>ds:Reference</code> elements. For the first one the value of the <code>URI</code> attribute is "#xpointer(id('e1ID'))" (find it <a href="../xmldsig/xpointer/xpointer-5-firsturi.pointervalue">here</a>). For the second, it is "#xpointer(id('e2ID'))" (find it <a href="../xmldsig/xpointer/xpointer-5-seconduri.pointervalue">here</a>). For the third one, it is "#xpointer(id('e3ID'))" (find it <a href="../xmldsig/xpointer/xpointer-5-thirduri.pointervalue">here</a>).</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check implementation's behaviour when processing several elements (with and without comments) referenced by its Id attribute using a schema-based xpointer.
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/xpointer/xpointer-5-SUN.xml"   >Signature</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/xpointer/xpointer-5-SUN.xml" parse="text"/></pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
          <div5 id="xmldsigxpointer-6"><head>Test case xmldsig/xpointer-6</head><table border="1">
            <tbody>
              
              <tr>
                <th rowspan="1" colspan="1">Input details</th>
                <td rowspan="1" colspan="1">The signature is an enveloping signature and signs two elements from the document. The enveloped document is the one shown at the beginning of this section. There are three <code>ds:Reference</code> elements. For the first one the value of the <code>URI</code> attribute is "#e1ID" (find it <a href="../xmldsig/xpointer/xpointer-6-firsturi.pointervalue">here</a>). For the second, it is "#e2ID" (find it <a href="../xmldsig/xpointer/xpointer-6-seconduri.pointervalue">here</a>). For the third one, it is "#e3ID" (find it <a href="../xmldsig/xpointer/xpointer-6-thirduri.pointervalue">here</a>).</td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">Rationale</th>
                <td rowspan="1" colspan="1">Check implementation's behaviour when processing several elements (with and without comments) referenced by its Id attribute using a short-name xpointer. 
                </td>
              </tr>
              <tr>
                <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/xpointer/xpointer-6-SUN.xml"   >Signature</loc>
                </th>
                <td rowspan="1" colspan="1">
                  <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/xpointer/xpointer-6-SUN.xml" parse="text"/></pre>
                </td>
              </tr>
            </tbody>
          </table></div5>
          <p/>
        </div3>
        <!--+++++++++++++++++-->
        <div3 id="TestCases-DistinguishedName">
          <head>Test Cases on String encoding of Distinguished Names</head>
          <div4 id="TestCases-DistinguishedName-RFC2253-RFC4514">
            <head>Test Cases on differences identified in RFC 2253 and RFC 4514</head>
            <p>This Working group has identified a number of differences between <bibref ref="RFC-4514"/> and <bibref ref="RFC-2253"/>. They are described in this <loc  href="http://lists.w3.org/Archives/Public/public-xmlsec-maintwg/2007Jul/0024.html"   >e-mail</loc> within the XML Security Specifications Maintenance Working Group e-mail list archive. This section contains test cases designed for checking that applications can parse and generate RFC 4514 Distinguished Names with these differences.</p>
            <p>The following rules apply for the test cases defined in this section:</p>
            <ulist>
              <item>
                <p>The input to each test case is an XML Signature. Each signature contains an X509SubjectName or X509IssuerSerial element with an RFC 4514 Distinguished Name.</p> 
              </item>
              <item>
                <p>To resolve the key, the application must find a certificate containing a matching issuer/serial or subject DN from the certificates that are contained in the "certs" directory. This verifies that the implementation can parse the RFC 4514 DN and find a matching certificate with an equivalent subject or issuer DN.</p>
              </item>
              <item>
                <p>Signature generation is also required. A PKCS#12 KeyStore containing the private keys used to generate the signatures is in the file "certs/keystore.p12". The keystore password is "secret". The key entry name is the same as the corresponding certificate file name (without the ".crt" part). </p>
              </item>
              <item>
                <p>The generated signature should contain an X509SubjectName or X509IssuerSerial element with an RFC 4514 distinguished name as specified in the "[RFC-4514] DN" row of each of the tables in this section. However, if an implementation does not support an optional encoding as specified by RFC 4514, it is acceptable to generate a DN that is not strictly equivalent to those in the table but that is still RFC 4514 compliant.</p>
              </item>
            </ulist>
            <p/>
            <div5 id="xmldsigdnamediffRFCs-1"><head>Test case xmldsig/dname/diffRFCs-1</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains one Relative Distinguished Name whose attribute type keyword is encoded with one alphabetic character, and another Relative Distinguished Name whose attribute type keyword is encoded with two characters. RFC 4514 allows attribute type keywords to be of length 1, whereas RFC 2253 (erroneously) requires them to be at least length 2.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check processing of attribute type keywords by tools implementing <bibref ref="RFC-4514"/>.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1"><bibref ref="RFC-4514"/> DN</th>
		  <td rowspan="1" colspan="1">CN=John,C=US</td>
                </tr>
                <tr>
		  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/dname/diffRFCs-1-SUN.xml"   >Signature</loc>
		  </th>
		  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/dname/diffRFCs-1-SUN.xml" parse="text"/></pre>
		  </td>
                </tr>
              </tbody>
            </table></div5>
            <p/>
            <div5 id="xmldsigdnamediffRFCs-2"><head>Test case xmldsig/dname/diffRFCs-2</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains a Relative Distinguished Name containing space characters. <bibref ref="RFC-2253"/> (erroneously) does not allow escaping, whereas <bibref ref="RFC-4514"/> allows space characters to be escaped.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check escaping of space characters by tools implementing <bibref ref="RFC-4514"/>.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1"><bibref ref="RFC-4514"/> DN</th>
		  <td rowspan="1" colspan="1">CN=\ Spacey\ ,C=US</td>
                </tr>
                <tr>
		  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/dname/diffRFCs-2-SUN.xml"   >Signature</loc>
		  </th>
		  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/dname/diffRFCs-2-SUN.xml" parse="text"/></pre>
		  </td>
                </tr>
              </tbody>
            </table></div5>
            <p/>
            <div5 id="xmldsigdnamediffRFCs-3"><head>Test case xmldsig/dname/diffRFCs-3</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains a Relative Distinguished Name containing a null character. <bibref ref="RFC-2253"/> does not require null characters to be escaped, whereas <bibref ref="RFC-4514"/> requires null characters to be hex escaped.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check escaping of null characters by tools implementing <bibref ref="RFC-4514"/>.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1"><bibref ref="RFC-4514"/> DN</th>
		  <td rowspan="1" colspan="1">CN=\00,C=US</td>
                </tr>
                <tr>
		  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/dname/diffRFCs-3-SUN.xml"   >Signature</loc>
		  </th>
		  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/dname/diffRFCs-3-SUN.xml" parse="text"/></pre>
		  </td>
                </tr>
              </tbody>
            </table></div5>
            <p/>
            <div5 id="xmldsigdnamediffRFCs-4"><head>Test case xmldsig/dname/diffRFCs-4</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains a Relative Distinguished Name containing a non-leading number sign character that is not escaped. <bibref ref="RFC-2253"/> requires escaping of non-leading number sign characters, whereas <bibref ref="RFC-4514"/> does not.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check processing of non-leading number sign characters that are not escaped by tools implementing <bibref ref="RFC-4514"/>.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1"><bibref ref="RFC-4514"/> DN</th>
		  <td rowspan="1" colspan="1">CN=Num#ber,C=US</td>
                </tr>
                <tr>
		  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/dname/diffRFCs-4-SUN.xml"   >Signature</loc>
		  </th>
		  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/dname/diffRFCs-4-SUN.xml" parse="text"/></pre>
		  </td>
                </tr>
              </tbody>
            </table></div5>
            <p/>
            <div5 id="xmldsigdnamediffRFCs-5"><head>Test case xmldsig/dname/diffRFCs-5</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains a Relative Distinguished Name containing an equals sign character that is not escaped. <bibref ref="RFC-2253"/> requires escaping of equals sign characters, whereas <bibref ref="RFC-4514"/> does not.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check processing of equals sign characters that are not escaped by tools implementing <bibref ref="RFC-4514"/>.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1"><bibref ref="RFC-4514"/> DN</th>
		  <td rowspan="1" colspan="1">CN=Eq=uals,C=US</td>
                </tr>
                <tr>
		  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/dname/diffRFCs-5-SUN.xml"   >Signature</loc>
		  </th>
		  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/dname/diffRFCs-5-SUN.xml" parse="text"/></pre>
		  </td>
                </tr>
              </tbody>
            </table></div5>
            <p/>
          </div4>
          <div4 id="TestCases-DistinguishedName-RFC4514">
            <head>Test Cases for RFC 4514</head>
            <p>The set of test cases in this section are designed to test the representation of Distinguished Names as Strings as specified by <bibref ref="RFC-4514"/> and augmented by the optional encoding rules of section 4.4.4.1 of <bibref ref="XMLDSIG2"/>.</p>
            <p>The same rules defined in section 3.3.4.1 apply to the test cases in this section.</p>
            <p>Also, with respect to signature generation, if an implementation does not support an optional encoding as specified by RFC 4514 or XMLDSIG2, it is acceptable to generate a DN that is not strictly equivalent to those in the table but that is still RFC 4514 compliant.</p>
            <p/>
            <div5 id="xmldsigdnamednString-4"><head>Test case xmldsig/dname/dnString-4</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains a Relative Distinguished Name containing trailing space characters that have been escaped as "\20" instead of "\ ", as specified by the optional encoding rules of <bibref ref="XMLDSIG2"/>.
                  </td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check that implementations correctly manage escaping of trailing space characters.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1"><bibref ref="RFC-4514"/> DN</th>
		  <td rowspan="1" colspan="1">CN=Trailing\20\20,C=US</td>
                </tr>
                <tr>
		  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/dname/dnString-4-SUN.xml"   >Signature</loc>
                  </th>
		  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/dname/dnString-4-SUN.xml" parse="text"/></pre>
		  </td>
                </tr>
              </tbody>
            </table></div5>
            <p/>
            <div5 id="xmldsigdnamednString-6"><head>Test case xmldsig/dname/dnString-6</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains a Relative Distinguished Name containing an ASCII control character that has been escaped as "\09" (instead of not escaping it), as specified by the optional encoding rules of <bibref ref="XMLDSIG2"/>.
                  </td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check that implementations correctly handle escaping of an ASCII control character.</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1"><bibref ref="RFC-4514"/> DN</th>
		  <td rowspan="1" colspan="1">CN=Con\09trol,C=US</td>
                </tr>
                <tr>
		  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/dname/dnString-6-SUN.xml"   >Signature</loc>
                  </th>
		  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/dname/dnString-6-SUN.xml" parse="text"/></pre>
		  </td>
                </tr>
              </tbody>
            </table></div5>
            <p/>
            <div5 id="xmldsigdnamednString-8"><head>Test case xmldsig/dname/dnString-8</head><table border="1">
              <tbody>
                
                <tr>
                  <th rowspan="1" colspan="1">Input details</th>
                  <td rowspan="1" colspan="1">The input is an XML Signature containing an X509SubjectName in RFC 4514 format. The DN contains a Relative Distinguished Name containing several characters that must be escaped, as specified by <bibref ref="RFC-4514"/>.
                  </td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1">Rationale</th>
                  <td rowspan="1" colspan="1">Check that implementations correctly manage escaping of the special characters (except '"', 'lt;' and '&gt;').</td>
                </tr>
                <tr>
                  <th rowspan="1" colspan="1"><bibref ref="RFC-4514"/> DN</th>
		  <td rowspan="1" colspan="1">CN=E\+s\,c\;aped,C=US</td>
                </tr>
                <tr>
		  <th rowspan="1" colspan="1">
                  <loc  href="../xmldsig/dname/dnString-8-SUN.xml"   >Signature</loc>
                  </th>
		  <td rowspan="1" colspan="1">
                    <pre><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../xmldsig/dname/dnString-8-SUN.xml" parse="text"/></pre>
		  </td>
                </tr>
              </tbody>
            </table></div5>
            <p/>
          </div4>
        </div3>
        <!-- **************************-->
      </div2>
    </div1>
    <div1 id="References">
      <head>References</head>
      <blist>
        <bibl  id="RFC-2253" key="RFC 2253"   >
          <titleref href="http://www.ietf.org/rfc/rfc2253.txt"   >RFC 2253: Lightweight Directory
          Access Protocol (v3): UTF-8 String Representation of Distinguished
          Names</titleref>. M. Wahl, S. Kille, T. Howes. Ed. December 1997. This document is
	  <loc href="http://www.ietf.org/rfc/rfc2253.txt"   >http://www.ietf.org/rfc/rfc2253.txt</loc>. 
        </bibl>
        <bibl  id="RFC-4514" key="RFC 4514"   >
          <titleref href="http://www.ietf.org/rfc/rfc4514.txt"   >RFC 4514: Lightweight Directory
	  Access Protocol (LDAP): String Representation of Distinguished Names.</titleref>
	  K. Zeilenga, Ed. June 2006.
	  This document is <loc href="http://www.ietf.org/rfc/rfc4514.txt"   >http://www.ietf.org/rfc/rfc4514.txt</loc>.
        </bibl>
        <bibl  id="XML-C14N1.1" key="XML-C14N1.1"   >
	  <titleref href="http://www.w3.org/TR/2008/PR-xml-c14n11-20080129/"   >Canonical XML Version
	  1.1. W3C Proposed Recommendation</titleref>. John Boyer, Glenn Marcy.  January 2008.  This
	  document is <loc href="http://www.w3.org/TR/2008/PR-xml-c14n11-20080129/"   >http://www.w3.org/TR/2008/PR-xml-c14n11-20080129/</loc>.
	  The <loc href="http://www.w3.org/TR/xml-c14n11/"   >latest version</loc> is <loc href="http://www.w3.org/TR/xml-c14n11/"   >http://www.w3.org/TR/xml-c14n11/</loc>.
        </bibl>
        <bibl  id="XMLDSIG" key="XMLDSIG"   >
	  <titleref href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/"   >XML-Signature Syntax and Processing</titleref>. 
	  W3C Recommendation. Donald Eastlake, Joseph Reagle, David Solo. February 2002. This
	  document is <loc href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/"   >http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/</loc>.
	  The latest version is <loc href="http://www.w3.org/TR/xmldsig-core/"   >http://www.w3.org/TR/xmldsig-core</loc>.
        </bibl>
        <bibl  id="XMLDSIG-interop" key="XMLDSIG-interop"   >
          <titleref href="http://www.w3.org/Signature/2001/04/05-xmldsig-interop.html"   >
	    XML-Signature Interoperability</titleref>. Joseph Reagle. April 2001.
        </bibl>
        <bibl  id="XMLDSIG2" key="XMLDSIG2"   >
          <titleref href="http://www.w3.org/TR/2008/PER-xmldsig-core-20080326/"   >XML-Signature Syntax
          and Processing (Second Edition)</titleref>.  W3C Proposed Edited Recommendation (Work in Progress). Donald Eastlake,
          Joseph Reagle, David Solo, Frederick Hirsch, Thomas Roessler. March 2008.  This document
	  is <loc href="http://www.w3.org/TR/2008/PER-xmldsig-core-20080326/"   >http://www.w3.org/TR/2008/PER-xmldsig-core-20080326/</loc>.
	  The latest version is <loc href="http://www.w3.org/TR/xmldsig-core/"   >http://www.w3.org/TR/xmldsig-core</loc>.
        </bibl>
        <bibl  id="XPointer-Element" key="XPointer-Element"   >
	  <titleref href="http://www.w3.org/TR/2003/REC-xptr-element-20030325"   >XPointer element()
	  Scheme</titleref>. W3C Recommendation. P. Grosso, E. Maler, J. Marsh, N. Walsh. March
	  2003. This document is <loc href="http://www.w3.org/TR/2003/REC-xptr-element-20030325"   >http://www.w3.org/TR/2003/REC-xptr-element-20030325</loc>.
	  The <loc href="http://www.w3.org/TR/xptr-element"   >latest version</loc> is <loc href="http://www.w3.org/TR/xptr-element"   >http://www.w3.org/TR/xptr-element</loc>.
        </bibl>
        <bibl  id="XPointer-Framework" key="XPointer-Framework"   >
          <titleref href="http://www.w3.org/TR/2003/REC-xptr-framework-20030325/"   >XPointer
          Framework</titleref>. W3C Recommendation. P. Grosso, E. Maler, J. Marsh, N. Walsh. March
          2003. This document is <loc href="http://www.w3.org/TR/2003/REC-xptr-framework-20030325/"   >http://www.w3.org/TR/2003/REC-xptr-framework-20030325/</loc>.
	  The latest version is <loc href="http://www.w3.org/TR/xptr-framework/"   >http://www.w3.org/TR/xptr-framework/</loc>.
        </bibl>
        <bibl  id="XPointer-xpointer" key="XPointer-xpointer"   >
	  <titleref href="http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/"   >XPointer xpointer()
	  Scheme</titleref>. W3C Working Draft (Work in Progress). S. DeRose, E. Maler,
	  R. Daniel. December 2002.  This document is <loc href="http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/"   >http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/</loc>.
	  The latest version is <loc href="http://www.w3.org/TR/xptr-xpointer/"   >http://www.w3.org/TR/xptr-xpointer/</loc>.
        </bibl>
      </blist>
    </div1>
  </body>
</spec>
