|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: When is an attribute an attribute?
There is no real "right" way to encode something like your example. Any of the examples that you have offered is just as likely as the other, and an application that works with any of them is just as likely to succeed in meeting its objectives. However, if you wanted to distinguish between a family and given name, and maybe add an honorific or an accreditation, you might want to use an element with subelements for the author. Using a comma in the name requires a second-level parse. An advantage of using nested subelements is that you can avoid a second level parse. Otherwise, as I said, there is no "right" answer. At 06:51 PM 4/6/98 -0400, Roy Tennant wrote: >I've been trying to figure this out for a while with no success. It seems >to me that there are several quite different ways one can encode >information in XML. Are all of the following correct? When and why would >you choose one over another? Does it matter? Thank you for your indulgence >as I puzzle out what must surely be readily apparent to most of you. > >Example 1: >--------- > ><BOOK TITLE="The Call of the Wild" AUTHOR="London, Jack"\> > >Example 2: >--------- > ><BOOK AUTHOR="London, Jack">The Call of the Wild</BOOK> > >Example 3: >--------- > ><BOOK> > <TITLE>The Call of the Wild</TITLE> > <AUTHOR>London, Jack</AUTHOR> ></BOOK> > >Thanks, >Roy Tennant > > >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...) > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Murray Maloney Email: murray@m... Technical Director Phone: (905) 509-9120 Veo Systems Fax: (905) 509-8637 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Make a Tax-Deductible Donation Yuri Rubinsky Insight Foundation http://www.yuri.org/donate.html 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
|
|||||||||

Cart








