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/09/01 17:11:09 UTC
DO NOT REPLY [Bug 22861] New: -
attributeGroup redefinition: incorrect circular reference
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=22861>.
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=22861
attributeGroup redefinition: incorrect circular reference
Summary: attributeGroup redefinition: incorrect circular
reference
Product: Xerces2-J
Version: 2.5.0
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: XML Schema Structures
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: sjb@ambrielconsulting.com
The attached files mirror the arrangement of a set of libraries for which
Xerces2-J gives an incorrect error message.
There are two chameleon schemas, one of types and one of structures. The
structures schema includes the types schema. The document schema
(Greeting.xsd) redefines the structures schema, changing an attribute
group originally declared in the types schema.
When Xerces2-J 2.5.0 validates Greeting.xml against Greeting.xsd, a
schema error is given for a circular definition of the attribute group
but the validation proceeds and returns the correct result.
If the content of the types schema is physically included in the
structures schema instead of using xsd:include, there is no error.
As a cross-check, XML Spy behaves as expected.
The behaviour on RedHat Linux 9.0 was as follows:
------
[sjb@jupiter Greeting]$ java -version
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
[sjb@jupiter Greeting]$ export CLASSPATH=\
/usr/local/java/xerces-2_5_0/xercesImpl.jar:\
/usr/local/java/xerces-2_5_0/xercesSamples.jar:\
/usr/local/java/xerces-2_5_0/xml-apis.jar
[sjb@jupiter Greeting]$ java -Xms64m -Xmx512m dom.ASBuilder -f \
-a Greeting.xsd GreetingStructures.xsd GreetingTypes.xsd \
-i Greeting.xml
[Error] GreetingTypes.xsd:6:44: src-attribute_group.3: Circular
definitions detected for attribute group
':langAttrGroup_fn3dktizrknc9pi'. Recursively following attribute group
references eventually leads back to itself.
[Error] GreetingTypes.xsd:6:44: src-redefine.7.2.1: No attributeGroup in
the redefined schema has a name matching 'langAttrGroup'.
[Error] Greeting.xml:4:14: cvc-complex-type.4: Attribute 'lang' must
appear on element 'Greeting'.
# And the correct behaviour with the workaround:
[sjb@jupiter Greeting]$ java -Xms64m -Xmx512m dom.ASBuilder -f \
-a Greeting.xsd GreetingStructures.xsd \
-i Greeting.xml
[Error] Greeting.xml:4:14: cvc-complex-type.4: Attribute 'lang' must
appear on element 'Greeting'.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org