<?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>10176</bug_id>
          
          <creation_ts>2010-07-15 16:06:23 +0000</creation_ts>
          <short_desc>[SER] What does it mean to output an XML island as XML?</short_desc>
          <delta_ts>2013-01-22 18:35:16 +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 1.0</component>
          <version>Recommendation</version>
          <rep_platform>All</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="Henry Zongaro">zongaro</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>36925</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2010-07-15 16:06:23 +0000</bug_when>
    <thetext>Consider the following stylesheet.

&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;2.0&quot;&gt;

&lt;xsl:output method=&quot;html&quot; /&gt;

&lt;xsl:template match=&quot;/&quot;&gt;
&lt;html&gt;
&lt;body&gt;
&lt;my:p title=&quot;&amp;lt;&quot; xmlns:my=&quot;http://example.org&quot;&gt;xml island&lt;/my:p&gt;
&lt;p title=&quot;&amp;lt;&quot;&gt;not an xml island&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;

The first paragraph of section 7.1 of Serialization says, &quot;An element whose expanded QName has a non-null namespace URI MUST be output as XML. This is known as an XML Island.&quot;[1]  The third item in the numbered list then says, &quot;the generic rules for the HTML output method that apply to all elements and attributes, for example the rules for escaping special characters in the text and the rules for indentation, MUST be used also for namespaced elements and attributes.&quot;

Then section 7.2 says, &quot;The HTML output method MUST NOT escape &quot;&lt;&quot; characters occurring in attribute values.&quot;

So, should the serialized result be

&lt;html&gt;
   &lt;body&gt;
      &lt;my:p title=&quot;&lt;&quot; xmlns:my=&quot;http://example.org&quot;&gt;xml island&lt;/my:p&gt;
      &lt;p title=&quot;&lt;&quot;&gt;not an xml island&lt;/p&gt;
   &lt;/body&gt;
&lt;/html&gt;

or

&lt;html&gt;
   &lt;body&gt;
      &lt;my:p title=&quot;&amp;lt;&quot; xmlns:my=&quot;http://example.org&quot;&gt;xml island&lt;/my:p&gt;
      &lt;p title=&quot;&lt;&quot;&gt;not an xml island&lt;/p&gt;
   &lt;/body&gt;
&lt;/html&gt;

The first requirement (that my:p be serialized &quot;as XML&quot;) leads me to expect that &lt; will be escaped, yielding the first result; the second and third requirements lead me to expect that &lt; will not be escaped, yielding the second result.

[1] http://www.w3.org/TR/xslt-xquery-serialization/#HTML_MARKUP
[2] http://www.w3.org/TR/xslt-xquery-serialization/#HTML_ATTRIBS</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48734</commentid>
    <comment_count>1</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2011-05-24 14:42:34 +0000</bug_when>
    <thetext>The only thing that I can think is that the sentences, &quot;An element whose
expanded QName has a non-null namespace URI MUST be output as XML. This is
known as an XML Island,&quot; were intended to mean that such elements are never recognized as HTML elements, even if their local names happen to be the same as those of HTML elements, and that the second result is the correct serialized result.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48739</commentid>
    <comment_count>2</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2011-05-24 16:33:32 +0000</bug_when>
    <thetext>I wrote &quot;the second result&quot; in comment #1 where I meant &quot;the first result.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51552</commentid>
    <comment_count>3</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2011-07-27 13:30:07 +0000</bug_when>
    <thetext>The best that I&apos;ve been able to determine is that the sentences &quot;An element whose
expanded QName has a non-null namespace URI MUST be output as XML. This is
known as an XML Island,&quot; were meant to be a statement of intent, and that the rules that follow describe the actual rules in detail.  The behaviour of implementations that I&apos;ve tested seem to reflect that.

I propose changing those sentences to read &quot;An element whose expanded QName has a non-null namespace URI might be serialized differently from an element that is in no namespace.  An element that has a non-null namespace is known as an XML Island.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51574</commentid>
    <comment_count>4</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2011-07-27 19:36:38 +0000</bug_when>
    <thetext>Liam points out that an XML island is the piece of the serialized HTML result that is formatted as XML - the element node itself is not an XML island.  My proposed rewording in comment #3 implied the latter.

Taking that into account, I propose changing those sentences to read, &quot;An element whose expanded QName has a non-null namespace URI might be serialized differently from an element that is in no namespace.  The portion of the serialized document representing the result of serializing such an element is known as an XML Island.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58041</commentid>
    <comment_count>5</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2011-10-11 10:00:55 +0000</bug_when>
    <thetext>At the joint telecon of the XSLT and XQuery Working Groups,[3] the proposals of comment#4 were accepted, with suitable editorial reworking to eliminate the use of the word &quot;might&quot;.  This will be erratum SE.E20.

The editor&apos;s final revised wording is to change the sentences in question to read, &quot;As is described in detail below, the HTML output method will not output an element differently from the XML output method unless the expanded QName of the element has a null namespace URI. [Definition] The portion of the serialized document representing the result of serializing an element whose expanded QName does not have a null namespace URI is known as an XML Island.&quot;

[3] http://lists.w3.org/Archives/Member/w3c-xsl-query/2011Sep/0250.html (Member-only link)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>