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

RE: Constrain the Number of Occurrences of Elements in your X

  • To: "Bullard, Claude L \(Len\)" <len.bullard@i...>, "XML Developers List" <xml-dev@l...>
  • Subject: RE: Constrain the Number of Occurrences of Elements in your XML Schema
  • From: "Chiusano Joseph" <chiusano_joseph@b...>
  • Date: Fri, 5 Aug 2005 14:36:22 -0400
  • Thread-index: AcWZ7EB6JOp6VsmhTP2KUGKUGDiiAAAADIRA
  • Thread-topic: Constrain the Number of Occurrences of Elements in your XML Schema

xsd number
> Keep a light hand on the tiller.
 
And the Rudder. (sorry, couldn't resist:p)
 
Kind Regards,
Joseph Chiusano
Booz Allen Hamilton
O: 703-902-6923
C: 202-251-0731
Visit us online@ http://www.boozallen.com/
 


From: Bullard, Claude L (Len) [mailto:len.bullard@i...]
Sent: Friday, August 05, 2005 2:24 PM
To: 'Doug Rudder'; 'Roger L. Costello'; 'XML Developers List'
Subject: RE: Constrain the Number of Occurrences of Elements in your XML Schema

I agree with Doug.  Unless there is clear evidence that a feature is creating a problem or
will soon, don't close an extensibility feature.   Wildcards, xsd:any, this sort of construct,
are the real heart of the 'extensibility' of XML.  Otherwise, schemas are just a means to
validate.   Even if there is overlap, it sometimes dicey to turn a validator into a filter. 
 
Sometimes one has to limit the depth of a recursion and when we had the SGML Declaration,
that could be specified (support varied but the intent was clear).   Otherwise, I don't think
I'd go so far as to say 'never use it' because it, like mixed content, proves to be an organic
property of the data.  I don't like to constrain organic properties to suit the tool.
That usually bites.   To put it another way, in a domain of attractors, you can rely on 
strict rules on the limit and fixed types, but the strange ones remain strange.
 
Keep a light hand on the tiller.
 
len
-----Original Message-----
From: Doug Rudder [mailto:drudder@d...]
Sent: Friday, August 05, 2005 1:12 PM
To: 'Roger L. Costello'; 'XML Developers List'
Subject: RE: Constrain the Number of Occurrences of Elements in your XML Schema

Personal opinion: Recursive structures can be among the most valuable structures available in XML, especially with regard to generic <section> (and similar) elements. Putting a cap on maxOccurs and adjusting as needed going forward can be a good idea.
 
Frankly, nothing in your arguments below justify the statement "don't use recursive constructions." You do make a good argument for restricting maxOccurs. An awful lot of the discussion is related to specific "possible" conditions that can lead to problems. It is very subjective. If recursion is not good for what you do, don't use it. But telling others that they shouldn't when it is an important, proven part of their processes just doesn't float. Quite a few major XML players are proponents of recursive sections, based largely on experience. Of course, quite a few are of the opposite opinion as well. :-)
 
I've written XML tips illustrating both potential strengths and potential pitfalls of recursive sections, but would need time to rewrite them here (since the online journal I wrote them for owns the copyright to the exact phrasing of the tips). The point is, the value of recursion depends largely on what you are trying to accomplish.
 

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.