p:unescape-markup - "namespace" confusion

Hi all,

I find the description of the "namespace" option of p:unescape-markup
quite confusing. In 7.1.26, the spec says the following:

"When the string value is parsed, the original document element is
preserved so that the result will be well-formed XML even if the content
consists of multiple, sibling elements.

The namespace option specifies the default namespace. If it is provided,
it will be declared as the default namespace on the document element."

So, are the two sentences talking about the same document element, or
about different document elements?

The example at the end of the section suggests that the "namespace"
option is applied to the document element (or better, top-level
elements, since there may be more of them - or even none, if the escaped
markup is just plain text, for instance) of the unescaped markup. This
is apparently the behavior the WG agreed on (according to Norm).

When I was implementing p:unescape-markup, I seem to have misinterpreted
the spec, because I am applying the "namespace" option to the wrapper
element. I have no problem with fixing that, except that maybe the spec
for p:unescape-markup could be  a bit clearer on this.

Regards,
Vojtech

Received on Monday, 8 December 2008 16:07:26 UTC