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

RE: Array content model

  • From: Kevin Williams <Kevin.Williams@u...>
  • To: xml-dev@l...
  • Date: Wed, 5 Apr 2000 13:50:43 -0400

RE: Array content model
> -----Original Message-----
> From: John.OSullivan@c... [mailto:John.OSullivan@c...]
> Sent: Wednesday, April 05, 2000 5:06 AM
> To: xml-dev@l...
> Subject: Array content model
> 
> 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.
> 

John,

IMO, either implementation is fine. When working with XML, there are myriad
ways of representing the same information, all of which are equally valid;
which one you use then becomes a matter of taste. Certainly, the <items>
element doesn't impart any additional meaning to the <item> elements
embedded in it; however, you give a compelling reason to use such an element
(the start and end events in SAX being used as signals to begin and end
construction of your item array). In the implementations I have designed,
for example, I have tended to use attributes for virtually all data points,
since my implementations often have to interface with RDBs - and the code to
handle RDB to XML translation (whether using DOM or SAX) seems more natural
when using attributes. As always, your mileage may vary. 

- Kevin

Kevin Williams
XML Data Architect
Ultraprise Corporation
kwilliams@u...

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

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.