[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: 3 XML Design Principles


org chart xml
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@e...> wrote:
> * Roger L. Costello <costello@m...> [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>
>

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.