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/11/09 15:48:56 UTC
DO NOT REPLY [Bug 4768] New: -
attributeGroup with "ref" present MAY containt annotation
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=4768>.
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=4768
attributeGroup with "ref" present MAY containt annotation
Summary: attributeGroup with "ref" present MAY containt
annotation
Product: Xerces-J
Version: 1.4.3
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Schema-Structures
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: bsmirnov@yahoo.com
When validating xml document:
---
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="test.xsd" attrFromGroup="group"
globalAttr="global"/>
---
against schema:
---
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:attributeGroup name="testAttrGroup">
<xs:attribute name="attrFromGroup" type="xs:string" use="required"/>
</xs:attributeGroup>
<xs:attribute name="globalAttr" type="xs:string"/>
<xs:element name="root">
<xs:complexType>
<xs:attributeGroup ref="testAttrGroup">
<xs:annotation>
<xs:documentation>Annotation on usage of the attribute
group in this particular element type</xs:documentation>
</xs:annotation>
</xs:attributeGroup>
<xs:attribute ref="globalAttr" use="required">
<xs:annotation>
<xs:documentation>Annotation on usage of the attribute in
this particular element type</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
---
using sample program:
java -cp %CLASSPATH% sax.SAXWriter -n -v -s test.xml
it reports:
---
test.xml:
[Error] test.xml:2:170: Schema error: An attributeGroup with "ref" present must
be empty.
---
But according to "XML Schema Part 1: Structures", part 3.2.3, statement 3.2 "If
ref is present, then all of <simpleType>, form and type must be absent.".
Annotation is allowed.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org