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 bu...@apache.org on 2001/06/12 22:35:06 UTC
[Bug 2138] New: - cannot substitute element with same as head
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2138
*** shadow/2138 Tue Jun 12 13:35:06 2001
--- shadow/2138.tmp.6854 Tue Jun 12 13:35:06 2001
***************
*** 0 ****
--- 1,59 ----
+ +============================================================================+
+ | cannot substitute element with same <complexType> as head |
+ +----------------------------------------------------------------------------+
+ | Bug #: 2138 Product: Xerces-J |
+ | Status: NEW Version: 1.4 |
+ | Resolution: Platform: All |
+ | Severity: Major OS/Version: All |
+ | Priority: Other Component: Schema-Structures |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xerces-j-dev@xml.apache.org |
+ | Reported By: mhuffman@ca.ibm.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ When 2 <element>s are declared having the same global <complexType> and 1 of
+ them is in the other's substitutionGroup, an error is produced by the parser
+ when trying to do a valid substitution. Here's a valid example:
+
+ xc3_3v13.xml
+ ============
+ <?xml version="1.0"?>
+ <svi:Root xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:svi ="http://www.Test.org/3_3v"
+ xsi:schemaLocation="http://www.Test.org/3_3v
+ xc3_3v13.xsd">
+
+ <svi:Child1 Name="John"/>
+ <svi:Child2 Name="Jane"/>
+
+ </svi:Root>
+
+ xc3_3v13.xsd
+ ============
+ <?xml version="1.0"?>
+ <schema xmlns ="http://www.w3.org/2001/XMLSchema"
+ xmlns:sv ="http://www.Test.org/3_3v"
+ targetNamespace="http://www.Test.org/3_3v">
+
+ <complexType name="childType">
+ <sequence>
+ <element name="GrandChild" type="string" minOccurs="0"/>
+ </sequence>
+ <attribute name="Name" type="string"/>
+ </complexType>
+
+ <element name="Child1" type="sv:childType"/>
+ <element name="Child2" type="sv:childType" substitutionGroup="sv:Child1"/>
+
+ <element name="Root">
+ <complexType>
+ <sequence>
+ <element ref="sv:Child1" maxOccurs="2"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org