RE: unescape-markup - support for text/xml

> > > Section 7.1.25 (p:unescape markup) says:
> > > 
> > > "All implementations must support the content type 
> > > application/xml, and
> > > must use a standard XML parser for it. It is a dynamic error
> > > (err:XC0051) if the content-type specified is not supported by the
> > > implementation."
> > > 
> > > Shouldn't the implementations be required to support also 
> > text/xml and
> > > not only application/xml?
> > > 
> > 
> > Three more questions:
> > 
> > 1. Shouldn't it be an error if the document element 
> contains anything
> > else than text content?
> > 2. What error should be reported if the unescaped content does not
> > represent well-formed XML or cannot be parsed?
> > 3. What should happen if the document element already specifies a
> > default namespace and the 'namespace' option is provided on
> > p:unescape-markup?
> > 
> 
> One more remark:
> 
> I think that the sentence: 
> 
> "The octet-stream that results from decoding the text must be
> interpreted using the specified encoding to produce a sequence of
> Unicode characters to parse."
> 
> Should read:
> 
> "The octet-stream that results from decoding the text must be
> interpreted using the specified CHARSET to produce a sequence 
> of Unicode
> characters to parse."
> 

Sorry for making this thread longer and longer, but I just noticed that
the example in section 7.1.8 (p:escape-markup) is probably not entirely
correct. It says that the result of the step is:

<description>
&lt;div xmlns="http://www.w3.org/1999/xhtml">
&lt;p>This is a chunk of XHTML.&lt;/p>
&lt;/div>
</description>

but I think it should look like this:

<description>
&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;div xmlns="http://www.w3.org/1999/xhtml">
&lt;p>This is a chunk of XHTML.&lt;/p>
&lt;/div>
</description>

unless we state that 'omit-xml-declaration' is set to false in the
example.

Regards
Vojtech

Received on Monday, 28 April 2008 09:11:56 UTC