Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - xml design [Thread Next] Re: xml designTo: 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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
