Michael Glavassevich wrote:
Hi Lucian,
I've had a look at the bug report. The only problem I see here is with the
error message. The description of SecurityManager.
setMaxOccurNodeLimit(int) says: Sets the limit of the number of content
model nodes that may be created when building a grammar for a W3C XML
Schema that contains maxOccurs attributes with values other than
"unbounded". (Unfortunately you won't find that in the Javadocs for Xerces
2.6.2 but it's there in the source code.) Rather than a limit on
maxOccurs, it's a limit on the number of nodes which may be created for
representing the content model of a given type. CMNodeFactory counts the
number of nodes it has created and when it hits the limit it reports a
fatal error.
Rather than the error message saying "Current configuration of the parser
doesn't allow a maxOccurs attribute value to be set greater than the value
{0}" or
"Current configuration of the parser doesn't allow maxOccurs attribute
values in a schema to sum to greater than {0}", it should probably say
something like "Current configuration of the parser doesn't allow the
expansion of a content model for a complex type to contain more than {0}
nodes".
Michael,
Many thanks for looking at this (apologies for the multiple emails
yesterday - not sure what was happening there!). It looks to my
uneducated eye like there was previously an attempt to shield users of
the SecurityManager from having to understand CMBuilder etc. by having a
magic MULTIPLICITY constant there to try and convert sum(maxOccurs) into
sum(ExpandedNodeCount); from the comment, it looks like this value was 3
at some point. I'm assuming from the fact that this has now changed that
this was not particularly accurate and potentially misleading; if so, I
agree that the best thing would be to just change the error message to
reflect what really happens. In an ideal world it would be nice if one
could specify this in Schema terms - something like a "maximum particle
count", but I imagine that would get pretty complex for something that's
just an arbitrary security limit...
Thanks again,
Lucian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]