Thanks for the reply, George. I'm still wondering, though: isn't it valid according to the spec to have redef.xsd redefine initial.xsd? As I mentioned, other validators accept this just fine. Should I report it as a bug?
David -----Original Message----- From: George Cristian Bina [mailto:[EMAIL PROTECTED] Sent: July 29, 2004 5:45 AM To: [EMAIL PROTECTED] Subject: Re: FW: Occurrence range restriction via redefine Here it is a cut down sample to reproduce the behavior. There are three schemas, incl.xsd defines the group and is included from the initial.xsd schema. The 3rd one, redef.xsd redefines the group by specifying the initial.xsd schema in the redefine/@schemaLocation. incl.xsd -------- <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:group name="atom.extend"> <xs:sequence> <xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:element ref="ind"/> <xs:element ref="var"/> </xs:choice> </xs:sequence> </xs:group> <xs:element name="ind"/> <xs:element name="var"/> </xs:schema> initial.xsd ----------- <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:include schemaLocation="incl.xsd"/> <xs:element name="test"> <xs:complexType> <xs:group ref="atom.extend"/> </xs:complexType> </xs:element> </xs:schema> redef.xsd --------- <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'> <xs:redefine schemaLocation="initial.xsd"> <xs:group name="atom.extend"> <xs:sequence> <xs:choice minOccurs="2" maxOccurs="2"> <xs:element ref="ind"/> <xs:element ref="var"/> </xs:choice> </xs:sequence> </xs:group> </xs:redefine> </xs:schema If the redef.xsd is changed to refer to the incl.xsd as the redefined schema location then the schema is reported valid: redefValid.xsd -------------- <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'> <xs:redefine schemaLocation="incl.xsd"> <xs:group name="atom.extend"> <xs:sequence> <xs:choice minOccurs="2" maxOccurs="2"> <xs:element ref="ind"/> <xs:element ref="var"/> </xs:choice> </xs:sequence> </xs:group> </xs:redefine> </xs:schema Hope that helps, George ----------------------------------------------- George Cristian Bina <oXygen/> XML Editor & XSLT Editor/Debugger http://www.oxygenxml.com Hirtle, David wrote: > I didn't receive any feedback on the user list regarding this apparent bug > so I thought I'd forward it on. > > David > > -----Original Message----- > From: Hirtle, David [mailto:[EMAIL PROTECTED] > Sent: July 21, 2004 4:19 PM > To: '[EMAIL PROTECTED]' > Subject: Occurrence range restriction via redefine > > > Good day, > > java dom.Counter -v -s -f -n bindatalog.ruleml (or sax.Counter) produces the > following error for me: > > [Error] atom_module.xsd:62:31: An internal error occurred while formatting > the following message: > mg-props-correct.2: Circular definitions detected for group ''{0}''. > Recursively following the {term} values of the particles leads to a particle > whose {term} is the group itself. > [Error] atom_module.xsd:62:31: src-redefine.6.2.1: No group in the redefined > schema has a name matching 'atom.extend'. > bindatalog.ruleml: 1492;40;0 ms (51 elems, 8 attrs, 0 spaces, 494 chars) > > What's going on is that a content model originally defined as > > <xs:group name="atom.extend"> > <xs:sequence> > <xs:choice minOccurs="1" maxOccurs="unbounded"> > <xs:element ref="ind"/> > <xs:element ref="var"/> > </xs:choice> > </xs:sequence> > </xs:group> > > in http://www.ruleml.org/0.86/xsd/modules/atom_module.xsd is being redefined > to > > <xs:redefine schemaLocation="datalog.xsd"> > > <xs:group name="atom.extend"> > <xs:sequence> > <xs:choice minOccurs="2" maxOccurs="2"> > <xs:element ref="ind"/> > <xs:element ref="var"/> > </xs:choice> > </xs:sequence> > </xs:group> > </xs:redefine> > > in http://www.ruleml.org/0.86/xsd/bindatalog.xsd. (Note that bindatalog.xsd > actually redefines datalog.xsd which in turn includes atom_module.xsd.) As > far as I can tell, this is a valid restriction because the occurrence range > is being restricted from 1 or more to exactly 2 (i.e. binary, hence > bindatalog). The schemas validate okay with XSV 2.7-1, MSXML 4.0 and Saxon > 8.0. > > I'm using Xerces 2.6.2. Any help would be appreciated. > > David > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
