OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Array content model

[ Lists Home | Date Index | Thread Index ]
  • From: "Mark Volkmann" <volkmann@inlink.com>
  • To: <John.OSullivan@chase.com>, <xml-dev@lists.oasis-open.org>
  • Date: Wed, 5 Apr 2000 21:13:27 -0500

I think elements that strictly group elements are a bad idea. They slow down
the processing, make DOM trees bigger, and complicate XSL style sheets. I
don't think their impact in any of these areas is extreme though.

-----Original Message-----
From: John.OSullivan@chase.com <John.OSullivan@chase.com>
To: xml-dev@lists.oasis-open.org <xml-dev@lists.oasis-open.org>
Date: Wednesday, April 05, 2000 1:01 PM
Subject: Array content model

>I am part of the FpML (www.fpml.org) Architecture Working Group
>tasked with developing a new basic content model for FpML. My
>group has been debating how to express arrays or lists in FpML.
>In the first example of a list or array in the Schema primer
>(http://www.w3.org/TR/xmlschema-0/) we have a list of two
>instances of item, bracketed by in items tags...
>
><?xml version="1.0"?>
><purchaseOrder orderDate="1999-10-20">
>    <shipTo country="US">
>        <!-- detail elided -->
>    </shipTo>
>    <billTo country="US">
>        <!-- detail elided -->
>    </billTo>
>    <comment>Hurry, my lawn is going wild!</comment>
>    <items>
>        <item partNum="872-AA">
>            <!-- detail elided -->
>        </item>
>        <item partNum="926-AA">
>            <!-- detail elided -->
>        </item>
>    </items>
></purchaseOrder>
>
>Opinion in our working group is in favour of dropping the items tags
>in our content model, and embedding the instances of item directly
>in the parent element, purchaseOrder, yielding...
>
><?xml version="1.0"?>
><purchaseOrder orderDate="1999-10-20">
>    <shipTo country="US">
>        <!-- detail elided -->
>    </shipTo>
>    <billTo country="US">
>        <!-- detail elided -->
>    </billTo>
>    <comment>Hurry, my lawn is going wild!</comment>
>    <item partNum="872-AA">
>        <!-- detail elided -->
>    </item>
>    <item partNum="926-AA">
>        <!-- detail elided -->
>    </item>
></purchaseOrder>
>
>I favour the former arrangement, with the instances of item contained
>within an items element. I prefer it since it is easier to implement
>generic marshalling code on top of a DOM or SAX parser when
>the SAX parser will effectively give "start array" and "end array"
callbacks
>for the items open and close tags. And a DOM parser will yield an items
>node that is a parent for the array elements, partitioning them from
>the other children of purchaseOrder.
>
>However, my colleagues are unmoved by the ease of implementation
>argument, and prefer the gain in brevity from omiting the items tags.
>
>I'd be very grateful for any comment and argument for or against
>either of these positions from xml-devers. Especially with regard
>to the implications of schemas.



***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

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

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