[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: What characters can go into a CDATA section and acomment?
On 24/03/2022 05:06, Mukul Gandhi wrote: Hi all,THE most important use case IMNSHO is for documenting markup. I like to be able to write: <programlisting language="XML"><![CDATA[ <?xml version="1.0"> <!DOCTYPE foo SYSTEM "bar.dtd"> <foo> <title>Some <title></title> </foo> ]]></programlisting> and NOT <programlisting language="XML"> <?xml version="1.0"> <!DOCTYPE foo SYSTEM "bar.dtd"> <foo> <title>Some &lt;title></title> </foo> </programlisting> SGML had other types of Marked Section, but they did not make it into XML because the stricter syntax made them unnecessary, and TBH they didn't really get a lot of use, whereas CDATA sections are a mainstay. CDATA sections are also used by many web developers unsure of exactly /what/ a user is going to input, and exactly /when/ in subsequent non-XML processes the markup is going to be stripped, so they use it as a safety-net of last resort, which often goes wrong; but that seems to be an acceptable price for them for passing the buck to someone else's code. Peter
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|