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

RE: RELAX NG Marketing (was RE: Do Names Matt er?)

relax ng attribute default value
> From: Matthew Gertner [mailto:matthew.gertner@s...]


> 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).


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.
First Name
Last Name
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.