XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Tradeoffs of XML encoding by enclosing all content in CDATA blocks

> 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]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS