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

XSD Question: what is the current recommendation regarding largevalues f

  • From: "Costello, Roger L." <costello@mitre.org>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Tue, 9 Aug 2011 08:17:49 -0400

XSD Question: what is the current recommendation regarding largevalues f
Hi Folks,

This is a question about XML Schema. Specifically, about the maxOccurs attribute. 

Recall that the maxOccurs attribute is used to specify the maximum number of occurrences of an element. For example, the following says that there may be up to 10 Authors:

<element name="Author" type="..." maxOccurs="10" />

Suppose that my business requirements are that there must not be more than 500 Foo elements. I could declare Foo as such:

<element name="Foo" type="..." maxOccurs="500" />

I recall years ago the recommendation was to avoid setting maxOccurs to a large number because at that time XML Schema validators would allocate memory for all the potential occurrences. For example, a validator would allocate 500 units of memory for the Foo element. 

The recommendation at that time was this: if you need a large number of occurrences, set maxOccurs to unbounded.

Is that still the recommendation? Or, are validators more sophisticated now and can handle large values for maxOccurs?

/Roger


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.