[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: attribute vs value
At 01:49 PM 05/21/1999 -0700, Cote, Stephane wrote:>I was wondering if any one knows when to use an attribute >versus a value in a XML document. This verges on being the highest-scoring XML FAQ. :) My rule of thumb is that true content belongs in elements (what you call "values"), and that attributes are for somehow shading the "meaning" of the content in ways that probably aren't useful to be displayed. If you know HTML, you know that attribute values are almost never displayed (except for fringe things like the <img> tag's alt attribute); they're effectively "invisible." Check Robin Cover's SGML/XML site for good coverage of the question, at: http://www.oasis-open.org/cover/elementsAndAttrs.html -- in particular, Eliot Kimber's discussion at: http://www.oasis-open.org/cover/attrKimber9711.htm ========================================================== John E. Simpson | The secret of eternal youth simpson@xxxxxxxxxxx | is arrested development. http://www.flixml.org | -- Alice Roosevelt Longworth XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
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.
|