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 16:13:24 UTC
[Bug 2131] New: - a by "restriction" reporting errors
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2131
*** shadow/2131 Tue Jun 12 07:13:24 2001
--- shadow/2131.tmp.4856 Tue Jun 12 07:13:24 2001
***************
*** 0 ****
--- 1,111 ----
+ +============================================================================+
+ | <redefine> a <group> by "restriction" reporting errors |
+ +----------------------------------------------------------------------------+
+ | Bug #: 2131 Product: Xerces-J |
+ | Status: NEW Version: 1.4 |
+ | Resolution: Platform: All |
+ | Severity: Normal 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 |
+ Here is an example of <redefine>ing a <group> by "restriction" (ie. the
+ redefined <group> definition does NOT have a <group ref="..."/> back to itself
+ in the redefinition). The parser produces errors for this case.
+
+ 4_2_2v19.xml
+ ============
+ <?xml version="1.0"?>
+ <svi:Father xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:svi ="http://www.Test.org/4_2_2v"
+ xsi:schemaLocation="http://www.Test.org/4_2_2v
+ 4_2_2v19.xsd">
+ <svi:Son>
+ <Age>15</Age>
+ <svi:GivenName>John</svi:GivenName>
+ <svi:GivenName>J</svi:GivenName>
+ <LastName>Doe</LastName>
+ </svi:Son>
+
+ <Daughter>
+ <Age>10</Age>
+ <svi:GivenName>Jane</svi:GivenName>
+ <LastName>Doe</LastName>
+ </Daughter>
+
+ </svi:Father>
+
+ 4_2_2v19.xsd
+ ============
+ <?xml version="1.0"?>
+ <schema xmlns ="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.Test.org/4_2_2v"
+ xmlns:sv ="http://www.Test.org/4_2_2v">
+
+ <redefine schemaLocation="4_2_2v19_inc.xsd">
+ <group name="childinfo">
+ <sequence>
+ <element name="Age" type="positiveInteger"/>
+ <element ref="sv:GivenName" minOccurs="1" maxOccurs="3"/>
+ <element name="LastName">
+ <simpleType>
+ <restriction base="sv:lastNameType">
+ <minLength value="1"/>
+ </restriction>
+ </simpleType>
+ </element>
+ </sequence>
+ </group>
+ </redefine>
+
+ <element name="Father">
+ <complexType>
+ <sequence>
+ <element ref="sv:Son" minOccurs="0" maxOccurs="10"/>
+ <element name="Daughter" minOccurs="0" maxOccurs="10">
+ <complexType>
+ <group ref="sv:childinfo"/>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+
+ 4_2_2v19_inc.xsd
+ ================
+ <?xml version="1.0"?>
+ <schema xmlns ="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.Test.org/4_2_2v"
+ xmlns:sv ="http://www.Test.org/4_2_2v">
+
+ <group name="childinfo">
+ <sequence>
+ <element name="Age" type="integer"/>
+ <element ref="sv:GivenName" minOccurs="0" maxOccurs="3"/>
+ <element name="LastName" type="sv:lastNameType"/>
+ <element name="NickName" type="string" minOccurs="0"/>
+ </sequence>
+ </group>
+
+ <element name="Son">
+ <complexType>
+ <group ref="sv:childinfo"/>
+ </complexType>
+ </element>
+
+ <element name="GivenName" type="string"/>
+
+ <simpleType name="lastNameType">
+ <restriction base="string">
+ <maxLength value="40"/>
+ </restriction>
+ </simpleType>
+
+ </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