You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Octavian Nadolu (JIRA)" <xe...@xml.apache.org> on 2012/08/27 08:13:07 UTC

[jira] [Commented] (XERCESJ-1580) Out of memory while validating an XML instance with a schema that contains particles with a large maxOccurs

    [ https://issues.apache.org/jira/browse/XERCESJ-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13442294#comment-13442294 ] 

Octavian Nadolu commented on XERCESJ-1580:
------------------------------------------

You are right this is not an usual use case, but this is one of the test cases from the W3C [http://www.w3.org/XML/2004/xml-schema-test-suite/]
The test case name is "particlesZ036_b1" and the files are:
/msData/particles/particlesZ036_b.xsd
/msData/particles/particlesZ036_b1.xml

                
> 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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org