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 2003/05/05 21:25:21 UTC
DO NOT REPLY [Bug 19681] New: -
updated base - extension - restriction
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19681>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19681
updated base - extension - restriction
Summary: updated base - extension - restriction
Product: Xerces2-J
Version: 2.4.0
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: Critical
Priority: Other
Component: XML Schema Structures
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: donbate@iadfw.net
I've isolated the problem I'm seeing down to a single schema. It appears that
xerces is not looking through the extension type to the base type for the name
attribute definition where the use = "required" appears. This is the error I
receive from xerces.
======================
[Error] xerces-bug.xsd:21:30: derivation-ok-restriction.2.1.1: Error for type
'RestrictionType'. An attribute use in this type has a REQUIRED setting which
is inconsistent with a matching attribute use in the base type.
[Error] xerces-bug.xsd:40:56: derivation-ok-restriction.2.1.1: Error for type
'Restriction2Type'. An attribute use in this type has a REQUIRED setting which
is inconsistent with a matching attribute use in the base type.
[Error] xerces-bug.xsd:48:57: derivation-ok-restriction.2.1.1: Error for type
'#AnonType_restrict'. An attribute use in this type has a REQUIRED setting
which is inconsistent with a matching attribute use in the base type.
[Error] xerces-bug.xml:3:112: cvc-elt.1: Cannot find the declaration of element
'restrict'.
===========================
The schema is as follows:
----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) -->
<xs:schema targetNamespace="urn:bs.bateconsulting.com"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bs="urn:bs.bateconsulting.com"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="xerces-bug">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType/>
</xs:element>
<xs:complexType name="BaseType" abstract="true">
<xs:attribute name="foo" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="ExtensionType">
<xs:complexContent>
<xs:extension base="bs:BaseType"/>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="RestrictionType">
<xs:complexContent>
<xs:restriction base="bs:ExtensionType">
<xs:attribute name="foo">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Test"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="RestrictedName">
<xs:restriction base="xs:string">
<xs:enumeration value="Test1"/>
<xs:enumeration value="Test2"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Restriction2Type">
<xs:complexContent>
<xs:restriction base="bs:ExtensionType">
<xs:attribute name="foo" type="bs:RestrictedName"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="restrict">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="bs:ExtensionType">
<xs:attribute name="foo" type="bs:RestrictedName"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:schema>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org