- From: <bugzilla@jessica.w3.org>
- Date: Thu, 15 Jul 2010 16:06:23 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10176
Summary: [SER] What does it mean to output an XML island as
XML?
Product: XPath / XQuery / XSLT
Version: Recommendation
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Serialization
AssignedTo: zongaro@ca.ibm.com
ReportedBy: zongaro@ca.ibm.com
QAContact: public-qt-comments@w3.org
Consider the following stylesheet.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="html" />
<xsl:template match="/">
<html>
<body>
<my:p title="<" xmlns:my="http://example.org">xml island</my:p>
<p title="<">not an xml island</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
The first paragraph of section 7.1 of Serialization says, "An element whose
expanded QName has a non-null namespace URI MUST be output as XML. This is
known as an XML Island."[1] The third item in the numbered list then says,
"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."
Then section 7.2 says, "The HTML output method MUST NOT escape "<" characters
occurring in attribute values."
So, should the serialized result be
<html>
<body>
<my:p title="<" xmlns:my="http://example.org">xml island</my:p>
<p title="<">not an xml island</p>
</body>
</html>
or
<html>
<body>
<my:p title="<" xmlns:my="http://example.org">xml island</my:p>
<p title="<">not an xml island</p>
</body>
</html>
The first requirement (that my:p be serialized "as XML") leads me to expect
that < will be escaped, yielding the first result; the second and third
requirements lead me to expect that < 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
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 15 July 2010 16:06:25 UTC