This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Tom, There's some pretty good discussion of the attribute-vs-element issue at http://www.oasis-open.org/cover/elementsAndAttrs.html In particular, I like the last paragraph of the "Sperberg-McQueen" comments which suggests that it really doesn't matter all that much. Basically, most seem to agree that it depends on how the designer plans to use the XML. In the case of the inventory catalog XML, sub-elements were used to hierarchically organize the datasets and attributes were used for just about everything else (except for free text). Ethan Tom Whittaker wrote: > > Sorry, I had an incompleted thought at the end of my last note: > > > Finally, I don't have much experience in XML, but a few things I've read > > suggest that using attributes instead of elements to describe data. > > should have ended: "...to describe data is a bad idea." > > > Is this > > one of those "religous wars" things? > > tom > > -- > Tom Whittaker (address@hidden) > University of Wisconsin-Madison > Space Science and Engineering Center > Phone/VoiceMail: 608/262-2759 > Fax: 608/262-5974 -- Ethan R. Davis Telephone: (303) 497-8155 Software Engineer Fax: (303) 497-8690 UCAR Unidata Program Center E-mail: address@hidden P.O. Box 3000 Boulder, CO 80307-3000 http://www.unidata.ucar.edu/