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] 3 XML Design Principles

[ Lists Home | Date Index | Thread Index ]

Alan,

    I dont think it follows that the structure of information in the
XML representation needs to match the lexical representation. In the
loose coupling demonstrated, the information is structured
heirarchically, even though lexically it is not. To represent the same
data you show, in a loosely coupled fashion, one would go :

<organization id="org" />
<person id="john">
    <worksFor />
</person>
<person id="sue">
    <worksFor="john" />
</person>
<person id="stephan">
    <worksFor="sue" />
</person>

....etc. This is pretty much the way the XML serialization of RDF
works - the structure can
be derived by an application / parser aware of the structure rules
without depending on lexical structure.

    That being said, I would disagree with the original poster's
assertion that flat structure is the preferred design. For things like
XSL processing, a lexical structure that matches the information
structure is desirable. For things like RDF, the lexical structure is
not very important. So I think it is a matter of which technologies
are being used.

Regards,
Kenneth


On Sat, 29 Jan 2005 13:24:18 -0500, Alan Gutierrez
<alan-xml-dev@engrm.com> wrote:
> * Roger L. Costello <costello@mitre.org> [2005-01-29 12:20]:
> > Hi Folks,
> >
> > Below I propose a few XML design principles.  I am interested in hearing
> > your thoughts on them, i.e., do you agree or disagree with them?
> >
> > Which is Better Design?
> >
> > Suppose that I have data about a grape vineyard.  Below I show two lots on
> > the vineyard, and a picker on one of the lots.  I show two ways of designing
> > the data.  Which design is better?
> > 
> > XML Design Principle #3
> 
> > Minimize the amount of nesting you use.
> 
> > Nested data is tightly coupled and uses implicit relationships, both of
> > which are bad.
> 
> > Flat data is good data!
> 
> > Flat data is loosely coupled and promotes the use of explicit relationships,
> > both of which are good.
> 
>     Flat data is good data?
> 
>     How do you go about creating an org chart then? Imagine I've
>     gone an removed the person's name, address, and such...
> 
>     <organization>
>       <person id="john">
>         <person id="sue">
>           <person id="stephan"/>
>         </person>
>         <person id="shrinivas">
>           <person id="daniel"/>
>         </person>
>       </person>
>     </organization>
>




 

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

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