[
https://issues.apache.org/jira/browse/XERCESJ-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13632716#comment-13632716
]
Octavian Nadolu commented on XERCESJ-1580:
------------------------------------------
I know that you can rewrite the schema to avoid the problem. But in some cases
users cannot modify the schemas, for different reasons. And they complain that
the schema is valid and they got an "Out of memory" exception when they
validate with Xerces.
As I told you, I know that this is not an usual use case. But was reported by
some oXygen XML Editor users.
Thank you.
> Out of memory while validating an XML instance with a schema that contains
> particles with a large maxOccurs
> -----------------------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1580
> URL: https://issues.apache.org/jira/browse/XERCESJ-1580
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Reporter: Octavian Nadolu
> Priority: Critical
>
> I obtain an OutOfMemory exception when i validate the XML instance "test.xml"
> with the schema "test.xsd".
> You can reproduce the issue on the xml-schema-1.1-dev branch, using the
> jaxp.SourceValidator as follows:
> jaxp.SourceValidator -xsd11 -a test.xsd -i test.xml
> Please note that this exception occurs only if the "full schema checking"
> feature is disabled.
> XML instance: test.xml
> <doc>
> <a/>
> <b/>
> </doc>
> Schema: test.xsd
> <xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema' >
> <xsd:complexType name='fooType' >
> <xsd:choice maxOccurs="100000">
> <xsd:sequence maxOccurs="100000000">
> <xsd:element name='a'
> maxOccurs="unbounded"/>
> </xsd:sequence>
> <xsd:element name="b"/>
> </xsd:choice>
> </xsd:complexType>
> <xsd:element name="doc" type="fooType"/>
> </xsd:schema>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]