Regression - Schema Error for valid Substition Group
----------------------------------------------------
Key: XERCESC-1817
URL: https://issues.apache.org/jira/browse/XERCESC-1817
Project: Xerces-C++
Issue Type: Bug
Components: Validating Parser (XML Schema)
Affects Versions: 3.0.0
Reporter: cargilld
When I run the following instance document and schema through Xerces-C 3.0.0
(did an svn udpate today) it fails with:
Error at file D:\m3_3v15.xml, line 25, char 15
Message: element 'Magazine' is not allowed for content model
'((Periodical,Magazine,Book),Newsletter)'
It used to pass with an earlier version of 3.0.0 and earlier releases of
xerces-c. It also passes with xerces-j.
Instance doc:
<?xml version="1.0"?>
<!-- =========================================================================
Test Type : Schema Valid ( <element> )
Description: A valid instance document used to test a valid schema with
example of <element>s with substitutionGroup=.
========================================================================== -->
<svi:Library xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
xmlns:svi ="http://www.schemaTest.org/m3_3v"
xsi:schemaLocation="http://www.schemaTest.org/m3_3v
m3_3v15.xsd">
<svi:Periodical>Weekly Want Ads</svi:Periodical>
<svi:Periodical>Weekly Want Ads</svi:Periodical>
<svi:Magazine>McLeans</svi:Magazine>
<svi:Newsletter>Software Developers Monthly</svi:Newsletter>
<svi:Magazine>McLeans</svi:Magazine>
<svi:Periodical>Weekly Want Ads</svi:Periodical>
<svi:Newsletter>Software Developers Monthly</svi:Newsletter>
<svi:Book>O</svi:Book>
<svi:Newsletter>Software Developers Monthly</svi:Newsletter>
</svi:Library>
Schema:
<?xml version="1.0"?>
<!-- =========================================================================
Test Type : Schema Valid ( <element> )
Description: Tests valid substitutionGroup= for <element>s with valid derived
<simpleType> definitions.
========================================================================== -->
<schema xmlns ="http://www.w3.org/2001/XMLSchema"
xmlns:sv ="http://www.schemaTest.org/m3_3v"
targetNamespace="http://www.schemaTest.org/m3_3v">
<element name="Magazine" type="sv:strMin5" substitutionGroup="sv:Book"/>
<element name="Book" type="string"/>
<element name="Periodical" type="sv:strMin10" substitutionGroup="sv:Magazine"/>
<element name="Newsletter" substitutionGroup="sv:Magazine">
<simpleType>
<restriction base="sv:strMin5">
<minLength value="15"/>
</restriction>
</simpleType>
</element>
<simpleType name="strMin5">
<restriction base="string">
<minLength value="5"/>
</restriction>
</simpleType>
<simpleType name="strMin10">
<restriction base="sv:strMin5">
<minLength value="10"/>
</restriction>
</simpleType>
<element name="Library">
<complexType>
<sequence>
<element ref="sv:Periodical"/>
<element ref="sv:Magazine" minOccurs="3" maxOccurs="3"/>
<element ref="sv:Book" minOccurs="4" maxOccurs="4"/>
<element ref="sv:Newsletter"/>
</sequence>
</complexType>
</element>
</schema>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]