<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20251</bug_id>
          
          <creation_ts>2012-12-05 18:02:14 +0000</creation_ts>
          <short_desc>[SER30] DOCTYPE declaration - prefix in name</short_desc>
          <delta_ts>2013-01-15 15:35:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Serialization 3.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Henry Zongaro">zongaro</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>79485</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-12-05 18:02:14 +0000</bug_when>
    <thetext>Section 6.1.7 para 1 states:

The name following &lt;!DOCTYPE MUST be the same as the local part of the name of the element.

However, XML 1.0 requires:

Validity constraint: Root Element Type

The Name in the document type declaration must match the element type of the root element.

and I believe &quot;element type&quot; here means the lexical QName as written, including any prefix, since XML 1.0 is not namespace-aware.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79487</commentid>
    <comment_count>1</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2012-12-05 18:24:11 +0000</bug_when>
    <thetext>That was intentional.  Item 4 in the second bulleted list in section 6 of serialization states, in part, &quot;If the value of the html-version serialization parameter is 5.0, any element node that has a prefix and is in the XHTML namespace, MathML namespace, or SVG namespace MUST be serialized with an unprefixed element name.&quot;

That&apos;s the &quot;prefix stripping&quot; that the Working Groups requested.  The DOCTYPE for the XHTML output method must strip the prefix from the element name as well.  So if the data model instance was

&lt;xhtml:html xmlns:xhtml=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;xhtml:body/&gt;&lt;/xhtml:html&gt;

and doctype-public and doctype-system are both absent, the serialized result will be

&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;

But now that you&apos;ve drawn my attention to it, I see that if either doctype-system or doctype-public is not absent, the behaviour is defined by the XML output method, which will preserve the prefix, resulting in something like the following for the same example:

&lt;!DOCTYPE xhtml:html &quot;about:legacy-compat&quot;&gt;&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;

which is clearly incorrect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79490</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-12-05 18:38:12 +0000</bug_when>
    <thetext>Thanks - I missed that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81330</commentid>
    <comment_count>3</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2013-01-14 11:03:38 +0000</bug_when>
    <thetext>Michael, at their joint teleconference of 18 December 2012,[1] the XSLT and XQuery Working Groups decided to revise the Serialization 3.0 document to address the issue identified in comment #1.  The revised text will appear in the next working draft of Serialization 3.0.

As you were present when this decision was made, I trust you agree with it, and I will mark the bug as CLOSED.

[1] https://lists.w3.org/Archives/Member/w3c-xsl-query/2012Dec/0054.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81398</commentid>
    <comment_count>4</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2013-01-15 15:35:58 +0000</bug_when>
    <thetext>The changes for this bug have been subsumed by the changes for bug 20261.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>