I got the same problem. I finished off with "maxOccurs = unbounded", with
the
application being in charge of checking number of occurrences (I am using
SAX parser, so it was pretty easy to do )


alfredo
EverSystems Informatica de Venezuela.
Proyect Manager



-----Original Message-----
From: Gordon, M Scott [mailto:m.gordon@;baesystems.com]
Sent: Martes, 29 de Octubre de 2002 02:40 p.m.
To: '[EMAIL PROTECTED]'
Cc: Gordon, M Scott
Subject: Schema validation with large maxOccurs values



One of the limitations stated in the schema programming page for Xerces C++
states ...
http://xml.apache.org/xerces-c/schema.html
*       Due to the way in which the parser constructs content models for
elements with complex content, specifying large values for the minOccurs or
maxOccurs attributes may cause a stack overflow or very poor performance in
the parser. Large values for minOccurs should be avoided, and unbounded
should be used instead of a large value for maxOccurs.
Is there an attempt to rectify this limitation other than use of
maxOccurs="unbounded"?

When validating an XML file with a schema file that contains four instances
of complex content items where maxOccurs="999", the validation completes in
32875 milliseconds.  If I change the maxOccurs="999" instances to
maxOccurs="unbounded", the validation completes in 543 milliseconds.
Unfortunately, my application requires the upper bound check of "999".

Thanks,

M. Scott Gordon
ADSS Software Engineer
BAE Systems Mission Solutions Inc.
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to