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

Re: Issues with Packaging Application Payloads

  • From: Aaron Swartz <aswartz@s...>
  • To: David Ezell <David_E3@v...>
  • Date: Thu, 19 Oct 2000 12:59:47 -0500

issues with packaging
David Ezell <David_E3@V...> 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@a... | http://www.aaronsw.com


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.