RE: XSLT2: CDATA sections in XML output method

David Carlisle:
> 
>   If the text node contains a character that is not 
> representable in the
>   character encoding being used to output the result tree, then the
>   currently open CDATA section should be closed before the 
> character, the
>   character should be output using a character reference or entity
>   reference, and a new CDATA section should be opened for any further
>   characters in the text node.
> 
> 
> This would seem to imply that a run of characters not in the 
> output encoding would cause CDATA to be opened and closed for 
> each character. as in 
> <x><![CDATA[]]>&#1234;<![CDATA[]]>&#1235;<![CDATA[]]>&#1236;</x>
> 
> Would it be possible to allow a run of such characters to be 
> encoded as references and then just restart the CDATA section 
> (if) there are further characters in the output encoding.
> 

This text is carried over unchanged from the 1.0 spec. I'm sure it was never
intended to mean that processors should output empty CDATA sections, and
I'll use editorial licence to remove this implication from the way it's
worded.

Michael Kay

Received on Wednesday, 4 September 2002 15:45:54 UTC