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=12430>. 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=12430 Derivation of restriction of Elements Summary: Derivation of restriction of Elements Product: Xerces2-J Version: 2.1.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: XML Schema Structures AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When an element is derived-by-restriction from a complex type, and its attributes are listed, the types of the attributes must be explicitly specified, even though they could be inferred from the base complex type. Example XSD (Schema.xsd): <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:complexType name="Base"> <xs:attribute name="anAttribute" type="xs:int" use="optional" default="123"/> </xs:complexType> <xs:element name="TheElement"> <xs:complexType> <xs:complexContent> <xs:restriction base="Base"> <!-- It seems that here type should be set to xs:int... --> <xs:attribute name="anAttribute" default="1234"/> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:element> </xs:schema> Example XML (Data.xml): <?xml version="1.0" encoding="UTF-8"?> <TheElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Schema.xsd"/> Reproduce by: java dom.Counter -v -s Data.xml --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
