[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] element content vs. element attribute
Ray Waldin writes: > In other words, when should data be contained by elements? Or > conversely, when should data be an attribute of an element instead > of contained by that element? Here's a good, general distinction: * use elements for structurally-significant information; and * use attributes for meta-data. One problem, that will become more obvious when more XML tools are available, is that most WYSIWYMG (M="might" or "may") XML editing software will like show character data (element content) on the screen by default, but will show attributes only on request, possible in a pop-up dialog. It makes sense to have the most important information (the real content) inside elements, then, and to have the meta-data out of the way in attributes. (Peter: how do you display attributes in Jumbo?) Of course, what is and isn't meta-data will vary depending on the document type, but here are some common examples: * a unique identifier * a security level * a revision or release level * rendition information (yech) * configuration information * the preferred unit of measurement All the best, David -- David Megginson ak117@f... Microstar Software Ltd. dmeggins@m... http://home.sprynet.com/sprynet/dmeggins/ xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|