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] XML into SQL and out again

[ Lists Home | Date Index | Thread Index ]

Basically, I concur with Joseph.  One can use attributes 
for fields, certainly, and that will produce a compact 
instance.  It will also result in a much simpler schema 
should one have to write one, but the restrictions on 
what one can express in attributes viz a vis types and 
structure also means the schema is not doing very much 
useful work.  It can also limit the use of the instance 
particulary with regards to extensibility.

One can consider the instance also in terms of broader 
contexts.  What I find more and more is that if an XML 
instance is dumped at all from a relational system, the 
odds are good that it isn't being roundtripped back to 
the same system; it is going elsewhere, perhaps to another 
relational system, or even to the browser.  This can mean 
that one has to provide more than the original table did, 
for example, alternative representations of say timestamps, 
personnel numbers, and so on.  In this case, one begins 
to need the structural powers of elements.  I seldom see 
the relational data dumped precisely as it was used in 
the relational table (and one has to account for nulls).

So best practice, meaning, this is not a one off, 
tends to be as Joseph describes it.  Elements are 
generally better.


-----Original Message-----
From: Chiusano Joseph [mailto:chiusano_joseph@bah.com]

whether to use attribute or element based tagging here..

IMHO, this should not be an "or" type of choice - elements should be
used to represent data, attributes to qualify (modify) metadata. In
terms of english, one may think (in a very basic sense) of attributes as
adjectives, and elements as nouns.

Kind Regards,
Joe Chiusano
Booz | Allen | Hamilton


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

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