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

[ Lists Home | Date Index | Thread Index ]

How about changing your third one to "Use SAX when efficiency matters" (to
suggest that using the DOM can be the right design choice in some

I very much like the first two. I really wish RDDL was more widely adopted.
I'm also inclined to add the following (though others may disagree with the
last 2):
  - Don't use XML documents as a database
  - Stick with UTF-8 and UTF-16 encodings (and if you don't know what that
means, learn)
  - Use namespaces for modularity and extensibility
  - Be friendly to non-validating parsers -- don't rely upon PSVI constructs
(e.g. defaulted attributes, IDs) without prior knowledge of how the document
will be used 

I know the last one is probably controversial. I personally think that
parsing, validating, and transforming/filtering the infoset should be
explicitly separate processing layers, but I guess I can't change the world
on this one. At least, though, we should be able to say it is not a best
practice to bludgeon every user of your documents into relying upon DTD or
XML Schema validation to get the intended content of your document.

> -----Original Message-----
> From: Leigh Dodds [mailto:ldodds@ingenta.com]
> Sent: Wednesday, January 02, 2002 6:18 AM
> To: xml-dev
> Subject: [xml-dev] Effective XML
> During the discussion on pull-apis last month, James Clark 
> recommended the book 'Effective Java', prompting me to 
> add it to my reading list.
> On scanning the introduction, I saw that the author (Joshua 
> Bloch) explained that he'd borrowed the concept from Effective 
> C++ which also sets out 50 odd language best practices.
> It started me wondering whether there are 50 rules for 
> Effective XML?
> I suspect that there are probably a great deal more than 50, 
> simply because the domain is getting so big. But I'm sure that 
> there are some good high-level guidelines which might be 
> grouped in categories.
> A couple off the top of my head:
> - Document your Namespaces using RDDL
> - Avoid using external entities when exchanging documents
> - Use SAX for efficiency
> Anyone care to add some others?


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

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