XSLT2: CDATA sections in XML output method

  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.

something like

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 first character
in any sequence of such characters, the characters should be output
using character or entity references, and a new CDATA section should be
opened for any further characters in the text node that are
representable in the character encoding being used.

so as to allow

<x>&#1234;&#1235;&#1236;</x>

if 1234,1235,1236 are not in the output encoding.

Actually the suggested wording would force the new behaviour, maybe some
suitably vague wording to allow either behaviour would be preferable.


David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

Received on Wednesday, 4 September 2002 10:23:56 UTC