W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2002

XSLT2: CDATA sections in XML output method

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 4 Sep 2002 15:23:21 +0100
Message-Id: <200209041423.PAA30616@penguin.nag.co.uk>
To: public-qt-comments@w3.org



  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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:23 GMT