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/22 12:04:37 UTC

[jira] [Updated] (XERCESJ-1579) Possible infinite loop while validating a schema that contains complex type restrictions

     [ https://issues.apache.org/jira/browse/XERCESJ-1579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Octavian Nadolu updated XERCESJ-1579:
-------------------------------------

    Description: 
There seems to be an infinite loop while validating the schema with "full schema checking" and XML Schema 1.1 features, on the xml-schema-1.1-dev branch.

You can reproduce the issue on the xml-schema-1.1-dev branch, using the jaxp.SourceValidator as follows:
jaxp.SourceValidator -xsd11 -f -a particlesIe003.xsd

Schema: particlesIe003.xsd
{code}
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xsdtesting" xmlns:x="http://xsdtesting" elementFormDefault="qualified">
	<xsd:complexType name="base">
		<xsd:choice>
			<xsd:element name="e1" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="e2" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:choice>
	</xsd:complexType>
	<xsd:complexType name="testing">
		<xsd:complexContent>
			<xsd:restriction base="x:base">
				<xsd:choice>
					<xsd:element name="e1" minOccurs="1" maxOccurs="9999999"/>
					<xsd:element name="e2" minOccurs="1" maxOccurs="9999999"/>
				</xsd:choice>
			</xsd:restriction>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:element name="doc" type="x:testing"/>
</xsd:schema>
{code}

  was:
There seems to be an infinite loop while validating the schema with "full schema checking" and XML Schema 1.1 features, on the xml-schema-1.1-dev branch.

You can reproduce the issue on the xml-schema-1.1-dev branch, using the jaxp.SourceValidator as follows:
jaxp.SourceValidator -xsd11 -f -a particlesIe003.xsd

Schema: particlesIe003.xsd

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xsdtesting" xmlns:x="http://xsdtesting" elementFormDefault="qualified">
	<xsd:complexType name="base">
		<xsd:choice>
			<xsd:element name="e1" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="e2" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:choice>
	</xsd:complexType>
	<xsd:complexType name="testing">
		<xsd:complexContent>
			<xsd:restriction base="x:base">
				<xsd:choice>
					<xsd:element name="e1" minOccurs="1" maxOccurs="9999999"/>
					<xsd:element name="e2" minOccurs="1" maxOccurs="9999999"/>
				</xsd:choice>
			</xsd:restriction>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:element name="doc" type="x:testing"/>
</xsd:schema>

    
> Possible infinite loop while validating a schema that contains complex type restrictions
> ----------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1579
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1579
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Structures
>            Reporter: Octavian Nadolu
>            Priority: Critical
>
> There seems to be an infinite loop while validating the schema with "full schema checking" and XML Schema 1.1 features, on the xml-schema-1.1-dev branch.
> You can reproduce the issue on the xml-schema-1.1-dev branch, using the jaxp.SourceValidator as follows:
> jaxp.SourceValidator -xsd11 -f -a particlesIe003.xsd
> Schema: particlesIe003.xsd
> {code}
> <?xml version="1.0"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xsdtesting" xmlns:x="http://xsdtesting" elementFormDefault="qualified">
> 	<xsd:complexType name="base">
> 		<xsd:choice>
> 			<xsd:element name="e1" minOccurs="0" maxOccurs="unbounded"/>
> 			<xsd:element name="e2" minOccurs="0" maxOccurs="unbounded"/>
> 		</xsd:choice>
> 	</xsd:complexType>
> 	<xsd:complexType name="testing">
> 		<xsd:complexContent>
> 			<xsd:restriction base="x:base">
> 				<xsd:choice>
> 					<xsd:element name="e1" minOccurs="1" maxOccurs="9999999"/>
> 					<xsd:element name="e2" minOccurs="1" maxOccurs="9999999"/>
> 				</xsd:choice>
> 			</xsd:restriction>
> 		</xsd:complexContent>
> 	</xsd:complexType>
> 	<xsd:element name="doc" type="x:testing"/>
> </xsd:schema>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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