[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: ]]> within a CDATA marked section ?

  • From: Jarle Stabell <jarle.stabell@d...>
  • To: "xml-dev@i..." <xml-dev@i...>
  • Date: Thu, 27 Nov 1997 13:16:13 +0100

cdata gt
Pat wrote: 
<<<< 
Is it possible to put the sequence ]]> within a CDATA marked section ?

Exemple:

<P> Here is the beginning of the CDATA marked section:
<![CDATA[<p><![CDATA[
blah blah ...
]]></p>
Here is the true end.
]]>
</P>
>>>> 

[JS]  I don't think so. A "workaround" is to close the first CDATA section, write the ]]> (or for compatibility it seems you have to use ]]&gt; and then open up a new CDATA section to continue.

Example:

<P> Here is the beginning of the CDATA marked section:
<![CDATA[<p><![CDATA[
blah blah ...
]]>
]]&gt;
<![CDATA[</p>
Here is the true end.
]]>
</P>
 
BTW: Do people think XML parsers generally will/should complain about a ]]> when it for *compatibility* should be ]]&gt; ?
(Or do I misinterpret the draft text:

'and must for compatibility, be escaped using "&gt;" or a character reference when it appears in the string "]]>", when that string is not marking the end of a CDATA section'

Does it mean that the user should better use "&gt;" to be compatible with SGML, or that the XML parser should report this as an error if not escaped using "&gt;"?)

<OffTopic>
I have some concerns related to & and < when not followed by a char which can start a name (or "<!", <?").
I assume the reasons for *not* allowing "if x<>nil then doSomething" as legal content is because it is better for users that & and < are consistently not allowed for anything than markup, but I'm not convinced about this.
(At least it seems trivial for parsers to check this situation)
</OffTopic>


Cheers,
Jarle

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.