Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xml design

From: Peter Flynn <peter.nosp@-.--------.-->
To: NULL
Date: 1/3/2006 9:23:00 PM
stan wrote:

> Hi,
> 
> I'm having some trouble with designing an XML document/vocabulary.
> 
> Situation:
> 
> I have sets of numerical data, that is essentially tabular data
> captured in xml elements:
> 
> <dataset id='1'>
> <row/>
> <row/>
> <row/>
> <dataset>
> <dataset id='2'>
> ...
> ...
> </dataset>
> ...
> 
> PROBLEM:
> I need to extend this with xml that captures multiple hierarchical
> relationships between these datasets. 

Multiple *concurrent* hierarchies? I'm not sure you can do this in XML.
Even in SGML, where you had the CONCUR option, it was mind-bendingly
difficult to do this kind of thing.

> Currently I've defined a 
> <datahierarchy/> element that captures a single type of relationship
> between the datasets:
> 
> <datahierarchy>
> <tier id='1'>
> <dataset>1</dataset>
> <dataset>2</dataset>
> 
> <tier id='2'>
> <dataset>3</dataset>
> </tier>
> </tier>
> ...
> </datahierarchy>
> 
> However, the datasets have several different hierarchal relationships.
> i.e. where <dataset id='3'> may be the root rather than a child, and
> have <dataset id='2'> and <dataset id='1'> as children.
> 
> The easy solution would be to capture the different types of data
> hierarchies in multiple <datahierarchy></datahierarchy> elements. But
> I am reluctant to do this because it seems like a clumsy and
> spactially expensive solution.

If I understand you right, this may be your only practical option. 
XML was designed for the markup of text documents, not relational 
data, so its architectural features for this kind of thing are limited.

Have a look at the Guidelines of the Text Encoding Initiative on
www.tei-c.org. AFAIK they are the only people who have tried to
provide this kind of facility on a practical scale.

It only *looks* spatially expensive: XML doesn't care whereabouts
each integral <datahierarchy> is stored, provided you hook them
together right.

As an aside, try to get into the habit of keeping "id" attributes
for the ID datatype (begins with a letter) because that way you can
use the inbuilt ID/IDREF facility to perform the linking. Numeric-
only identity values are attractive but misleading to XML-heads.

///Peter
-- 
XML FAQ: http://xml.silmaril.ie/



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent