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] RELAX NG Marketing (was RE: [xml-dev] Do Names Matt er?)

[ Lists Home | Date Index | Thread Index ]

> From: Matthew Gertner [mailto:matthew.gertner@schemantix.com]


> I'm not entirely sure what the objection to this is. Wouldn't 
> it make more
> sense to default an empty element than to insert the element 
> automatically
> (which could be taken care of by setting the minimum 
> occurrence to one)? Or
> do you think that the whole idea of element defaulting is misguided?

Personally, I'd say the latter is definitely the case. Honestly, what is the
use case for software (or a user) to be able to put an empty tag in the
document and have the value defaulted rather than just explicitly put the
intended value into the document? This simply shifts a burden from the
producer of a document to the consumer of the document; a producer can
*force* a consumer to have to construct a PSVI (or have a hard-coded
equivalent in application code) in order to reliably interpret the infoset
of a document. If the default value is intended, why is it an unacceptable
burden for the producer to just put the intended value in the document?

By conflating the tasks of validation and lightweight transformations (such
as attribute and element defaulting), DTDs and XML Schema force a coupling
between processing models in endpoints of a document exchange. Both must
perform validation in a functionally equivalent manner to correctly
interpret document content rather than simply relying upon the explicit
infoset in the document. So what is this coupling really buying us in terms
of functionality?

Rather than asking what the objections to this are, I'd like to hear someone
make the case for why this is needed. Maybe there are legitimate use cases
for this, but in all the instances I've seen where this controversy has been
raised on this list or in other forums I follow, I have never seen anyone
step forward with real use cases to defend attribute or element defaulting.
I'd really like someone to explain why this is important (other than for
historical legacy).


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

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