This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 30120 - Test Serialization-html-19c
Summary: Test Serialization-html-19c
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Recommendation
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-07 19:45 UTC by Alejandro Rojas Cepeda
Modified: 2017-12-19 17:28 UTC (History)
2 users (show)

See Also:


Attachments

Description Alejandro Rojas Cepeda 2017-06-07 19:45:44 UTC
Serialization-html-19c:

   <test-case name="Serialization-html-19c" covers-30="html-output">
      <description>Test with cdata-section-elements for HTML 5.0</description>
      <created by="Henry Zongaro" on="2012-10-26"/>
      <modified by="O'Neil Delpratt" on="2013-05-30" change="added dependency inline with bug issue #21868"/>
      <modified by="Michael Kay" on="2013-06-13" change="correct expected result"/>
      <dependency type="feature" value="serialization" satisfied="true"/>
      <dependency type="spec" value="XQ30+"/>
      <test><![CDATA[
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace html = "http://www.w3.org/1999/xhtml";
declare option output:method  "html";
declare option output:indent  "no";
declare option output:version  "5.0";
declare option output:cdata-section-elements  "b html:em";
<html><body><p><b>No CDATA</b><em>No CDATA</em><html:b>No CDATA</html:b><html:em>No CDATA</html:em></p></body></html>]]></test>
      <result>
        <serialization-matches><![CDATA[<html><body><p><b>No CDATA</b><em>No CDATA</em><html:b *xmlns:html=(['"])http://www.w3.org/1999/xhtml\1>No CDATA</html:b><html:em *xmlns:html=(['"])http://www.w3.org/1999/xhtml\2>No CDATA</html:em></p></body></html>]]></serialization-matches>
      </result>
   </test-case>

Notice it expects the <html:b> and <html:em> elements to serialize with prefixes.  

In point 1. of section 7.1 it says "... if the requested HTML version is 5.0, any element node that has a prefix and is in the XHTML namespace ... MUST be serialized with an unprefixed element name. The serializer MUST serialize an attribute with the name xmlns whose value is equal to the namespace URI of the element node, unless ..."

I think that the correct result would be to match elements html:b and html:em with prefix normalization applied to them, because the html prefix is in XHTML namespace.
Like this: 

...<b *xmlns=(['"])http://www.w3.org/1999/xhtml\1>No CDATA</b><em *xmlns=(['"])http://www.w3.org/1999/xhtml\2>No CDATA</em>...
Comment 1 Josh Spiegel 2017-06-13 16:07:46 UTC
The working group agrees with you.  I will update the expected test result as you suggest.
Comment 2 Michael Kay 2017-12-19 17:28:17 UTC
Tha change has now been committed. Sorry about the delay.