OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Create XML

[ Lists Home | Date Index | Thread Index ]

James Clark wrote:

> If you still think it's easy, try serializing the infoset you get from 
> this:
> 
> <!DOCTYPE doc [
> <!ENTITY e "<?x y&#13;?>">
> ]>
> <doc>&e;</doc>

Which proves that *re*-serializing data sourced from XML is 
substantially harder than generating XML from scratch.  Obvious when you 
think about it.

I think I still claim that in the normal case of generating XML output 
from your internal program data, all you really need are print 
statements and an escape() function.  And yes, you might as well escape 
*all* instances of <, &, ', ", and >, since this costs nothing and 
avoids potential risks.

James is right, we screwed up in letting attribute normalization into 
XML.  It still boggles my mind in retrospect that during the discussions 
back in 96-97,  nobody piped up to say "why are you morons doing this?" 
  Because we probably would have said "D'oh, right, lose it."  Sigh.

-- 
Cheers, Tim Bray
         (ongoing fragmented essay: http://www.tbray.org/ongoing/)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS