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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Issues with Packaging Application Payloads

[ Lists Home | Date Index | Thread Index ]
  • From: Aaron Swartz <aswartz@swartzfam.com>
  • To: David Ezell <David_E3@verifone.com>
  • Date: Thu, 19 Oct 2000 12:59:47 -0500

David Ezell <David_E3@Verifone.Com> wrote:

>> Then there's #4, the *RIGHT WAY* to do this, which is: A) Before inserting
>> your arbitrary text into your XML wrapper, run it through a filter that
>> replaces & with &amp;, < with &lt;, and > with &gt;. B) Before handing
>> arbitrary text back to the user, run it through a filter that replaces &lt;
>> with <, &gt; with >, and &amp; with &.
>> 
>> Voila, the problem is solved.  You don't have the byte bloat of base64, you
>> don't have the limitation of not including ]]> in CDATA, and you don't have
>> to mess up validation.
>> 
> Not a bad idea for simple uses, but it won't nest (at least I don't think it
> will):  the export filter would convert all the PCDATA at once.  It seems to
> me a safe bet that if you need to nest one level, you'll have use cases for
> nesting to N levels.

I don't understand -- couldn't you just use &amp;?

Original: <text/>
One level: &lt;text/&gt;
Two levels: &amp;lt;text/&amp;gt;
Three levels: &amp;amp;lt;text/&amp;amp;gt;

-- 
Aaron Swartz | me@aaronsw.com | http://www.aaronsw.com





 

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

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