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] Best practices for default values for attributes?

[ Lists Home | Date Index | Thread Index ]

Michael Good wrote:


> We have had feedback from some users - not a lot, though - that they would like
> to see MusicXML make more use of default values for attributes. If you are
> using a validating parser, this should make some code easier to write, but I am
> not sure it is worth the tradeoffs. I was wondering what people think current
> "best practices" are in this area. I don't see it covered in Effective XML or
> in other online writings on XML style.

You aren't looking in the right chapter. :-) Item 18, "Include all 
information in instance documents" strongly recommends against using 
default attribute values. The problem arises when processing documents 
with tools like browsers that don't read the DTD.

I wasn't aware of the problem with editors cluttering the display with 
default attribute values (I mostly use plain text editors myself) but 
that sounds like another good reason to avoid default attribute values.

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




 

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

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