[Bug 5433] [SER] descendants of an XML island

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5433





------- Comment #1 from zongaro@ca.ibm.com  2008-02-04 16:50 -------
This is a personal response, not the official response of the XSL and XQuery
working groups.

The fifth item in the list in section 7.1 of the serialization specification
[1] has this to say, "When serializing an element whose name is in a non-null
namespace, the HTML output method MUST apply the same rules (for example,
indentation rules) as when serializing a div element. The descendants of such
an element MUST be serialized as if they were descendants of a div element."  I
take this to mean that all the normal rules of the html output method apply to
the span element in the example of comment #0, and hence that the answers to
your questions (1) and (2) are false and false, as you suggested.

The boundary between what is part of an XML island and what is excluded is a
bit fuzzy.  Taking sections 7.1 and 7.4.4 together, I infer that the start and
end tag (or empty element tag) are considered to be part of the serialized
island.  Any processing instruction, comment or element node child that is in
no namespace should be treated as an HTML "pond" on the XML island.

As for text node children, they are clearly descendants, so according to the
text of 7.1 I've quoted above, they should be serialized as if they were
children of a div element - so for instance, a serializer may use the HTML
character entity reference Β to represent U+03B2 (GREEK SMALL LETTER
BETA), if that character cannot be represented in the output encoding. 
However, the cdata-section-elements parameter clearly applies to such a text
node, but does not apply to a text node child of a div element, so the text
from 7.1 I've quoted clearly needs amending.

I propose the following change:  In the fifth item in the list in section 7.1,
after "as if they were descendants of a div element," add the text ", except
for the influence of the cdata-section-elements serialization parameter on any
text node children of the element."

[1] http://www.w3.org/TR/xslt-xquery-serialization/#HTML_MARKUP

Received on Monday, 4 February 2008 16:50:46 UTC