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

RE: Tradeoffs of XML encoding by enclosing all content in CDAT

  • From: "Michael Kay" <mike@s...>
  • To: "'Fraser Goffin'" <goffinf@g...>,"'xml-dev'" <xml-dev@l...>
  • Date: Tue, 30 Sep 2008 12:50:19 +0100

RE:  Tradeoffs of XML encoding by enclosing all content in CDAT
> No I (like Rick) am talking about pragmatism. Sometimes it is 
> possible to reason about the likely occurence of edge cases 
> such as ]]> 

I'm sometimes prepared to be pragmatic, for example I don't worry too much
what happens if an input document contains a text node longer than 2G
characters. But writing code that breaks if a particular 3-character
sequence is present in the input? Sorry, but you won't find me doing that,
or willingly using code written by someone else who does that.

It's not as if it's a rare character sequence. It's been present in
half-a-dozen mail messages that I've received over the last couple of days.

Thanks, Richard, for the reminder that "]]>" is illegal even outside CDATA.
I knew that of course, but it's the kind of rule you can easily forget
because it is so totally irrational.

You can survive a long time with a pragmatic approach to coding. I came
across one schema processor that didn't bother to "undeclare" namespace
prefixes when they went out of scope, and I bet very few users have ever
noticed, and those that have are unlikely to suffer seriously as a result.
But I wouldn't do that either. Call it puritanism if you like. I program for
pleasure, and shipping code with that sort of deficiency just leaves a bad
taste. If you go down that road, you don't know when to stop, and you end up
shipping garbage. You'll never find me asking users to vote on which bugs
should be fixed either.

Michael Kay
http://www.saxonica.com/



[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!

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.