Thanks for the reply.
I guess I am still confused. Is it that - the number given in maxOccurNodeLimit call is actually used to limit the depth (as I understand with the reference to content model nodes)? In that case, it has no relation to maxOccurs attribute.
Or probably I do not understand the true meaning of 'content model nodes'. Would appreciate much if you could elaborate a little bit more.
thanks,
Samrat
On 4/6/06,
Michael Glavassevich <[EMAIL PROTECTED]> wrote:
Setting maxOccurNodeLimit doesn't override maxOccurs values in the schema.
maxOccurNodeLimit is actually a limit [1] on the number of nodes which may
be created in the internal representation of the content model of a
complex type. Large values of maxOccurs generate more nodes in the
internal representation. A fatal error is emitted if the limit is
exceeded. The limit is checked when the content model is constructed which
may be as early as during schema parsing or as late as the first time it
is needed for validation.
[1]
http://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/xerces/util/SecurityManager.html#setMaxOccurNodeLimit(int)
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]
"Samrat Ketu" <[EMAIL PROTECTED]> wrote on 04/05/2006 02:38:31 PM:
> Hi
> I was trying to use SecurityManager's setMaxOccurNodeLimit to
> limit the occurrences of any node in an XML doc. However, I am not
> clear when and how to use this.
> Is this limit checked when actually parsing the schema (thus
> overriding the number in the schema if greater), or when parsing the
> instance doc? If earlier, then on which class should I set this
> property (I am using XMLGrammarCachingConfiguration with
> XMLGrammarPoolImpl)? I guess that for the later, it is set with
> SAXParser.setProperty.
>
> Please let me know if you need more info.
>
> thanks,
> Samrak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
