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

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: PSVI



Tim Bray writes:

 > Of course the great risk in this kind of thinking is that you
 > start to believe that in general you have to apply a schema 
 > before you can start to do useful work with a chunk of XML.  

If the schema (DTD, XML Schema, or what-have-you) contains default
information of any sort, such as attribute values or even character
data, and the document instance relies on those defaults, then either

(a) you have to hand-code the defaults in your own processing code, or

(b) you have to require all receivers to read the schema.

(a) is the more practical approach, though you run the risk of letting
your code fall out of sync with the schema; (b) is full of security
and performance holes.

My preference is to include all defaulted information in production
instances and not to include a DOCTYPE declaration or schema link at
all -- that's the only way to ensure that all clients see the same
document, and that no one does anything stupid.


All the best,


David

-- 
David Megginson                 david@megginson.com
           http://www.megginson.com/