You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Lenny Hoffman <le...@earthlink.net> on 2002/01/31 17:58:10 UTC
Circular Definitions
Hi All,
I get the following message when parsing an input file with schema checking
on:
Message: No circular definitions are allowed: 'ValueGroup'
A portion of my schema is defined as follows:
<xs:complexType name="ObjectType">
<xs:sequence>
<xs:group ref="ValueGroup" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:group name="ValueGroup">
<xs:choice>
<xs:element name="Inherited" type="InheritedType"/>
<xs:element name="Basic" type="BasicType"/>
<xs:element name="String" type="StringType"/>
</xs:choice>
</xs:group>
<xs:complexType name="InheritedType">
<xs:complexContent>
<xs:extension base="ValueType">
<xs:group ref="ValueGroup" minOccurs="0" maxOccurs="unbounded"/>
</xs:extension>
</xs:complexType>
Some sample XML would be:
<Object>
<Inherited name="ooObjectPlacementStrategy" position="0">
<Inherited name="ooPdStrategy" position="0">
<String name="mName" position="1">EvolveTest</String>
<String name="mComment" position="2"/>
</Inherited>
<Basic name="mSeparateByOwner" position="4" type="uint8" value="1"/>
</Inherited>
<Basic name="mPagePlacement" position="2" type="uint8" value="7"/>
</Object>
The complaint is that InheritedType is included in ValueGroup, and includes
ValueGroup. This is certainly circular from the schema's point of view, but
is a natural outcome of generically modeling an object's data, which is what
I am doing. Is such an arrangement really illegal? Or is it a constraint
specific to Xerces' implementation? I was not able to locate any such
constraint in the XML Schema specification (I may have missed it though).
Also, when processing the same input with XML Spy, I do not get this error
(I believe it uses MSXML).
Thanks,
Lenny
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Circular Definitions
Posted by Khaled Noaman <kn...@ca.ibm.com>.
Hi Lenny,
The schema spec has the following constraint on model groups:
" Schema Component Constraint: Model Group Correct
2 Circular groups are disallowed. That is, within the {particles} of a group there must not be
at any depth a particle whose {term} is the group itself."
However, that constraint does not apply to your example. Would you please open a bugzilla bug for
that problem?
Thanks,
Khaled
Lenny Hoffman wrote:
> Hi All,
>
> I get the following message when parsing an input file with schema checking
> on:
>
> Message: No circular definitions are allowed: 'ValueGroup'
>
> A portion of my schema is defined as follows:
>
> <xs:complexType name="ObjectType">
> <xs:sequence>
> <xs:group ref="ValueGroup" minOccurs="0" maxOccurs="unbounded"/>
> </xs:sequence>
> </xs:complexType>
> <xs:group name="ValueGroup">
> <xs:choice>
> <xs:element name="Inherited" type="InheritedType"/>
> <xs:element name="Basic" type="BasicType"/>
> <xs:element name="String" type="StringType"/>
> </xs:choice>
> </xs:group>
> <xs:complexType name="InheritedType">
> <xs:complexContent>
> <xs:extension base="ValueType">
> <xs:group ref="ValueGroup" minOccurs="0" maxOccurs="unbounded"/>
> </xs:extension>
> </xs:complexType>
>
> Some sample XML would be:
>
> <Object>
> <Inherited name="ooObjectPlacementStrategy" position="0">
> <Inherited name="ooPdStrategy" position="0">
> <String name="mName" position="1">EvolveTest</String>
> <String name="mComment" position="2"/>
> </Inherited>
> <Basic name="mSeparateByOwner" position="4" type="uint8" value="1"/>
> </Inherited>
> <Basic name="mPagePlacement" position="2" type="uint8" value="7"/>
> </Object>
>
> The complaint is that InheritedType is included in ValueGroup, and includes
> ValueGroup. This is certainly circular from the schema's point of view, but
> is a natural outcome of generically modeling an object's data, which is what
> I am doing. Is such an arrangement really illegal? Or is it a constraint
> specific to Xerces' implementation? I was not able to locate any such
> constraint in the XML Schema specification (I may have missed it though).
> Also, when processing the same input with XML Spy, I do not get this error
> (I believe it uses MSXML).
>
> Thanks,
>
> Lenny
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Circular Definitions
Posted by Khaled Noaman <kn...@ca.ibm.com>.
Hi Lenny,
You can forgo submitting the bug report.
Khaled
Lenny Hoffman wrote:
> Hi Khaled,
>
> Your fix worked. Thank you very much!!
>
> BTW, I tried to submit a bug report in Bugzilla for this one as you
> suggested, but for some reason it would always time out saying it could not
> find the server after I hit commit. Strange, because I successfully
> submitted another bug in-between tries. The only difference I could see was
> that the one that failed had a longer comment, so I was getting ready to
> send it with a short comment and attach the description afterwards. But now
> that you have fixed it, I suppose I will forgo that, unless you would like
> to have the bug submitted anyway for tracking purposes -- just let me know.
>
> Lenny
>
> -----Original Message-----
> From: Khaled Noaman [mailto:knoaman@ca.ibm.com]
> Sent: Thursday, February 07, 2002 11:55 AM
> To: xerces-c-dev@xml.apache.org
> Subject: Re: Circular Definitions
>
> Hi Lenny,
>
> I have put a fix in CVS. Would you please download the latest code from CVS
> and
> try again?
>
> Thanks,
> Khaled
>
> Lenny Hoffman wrote:
>
> > Hi Sam,
> >
> > I was using the released version (1.6), so I took your advise and tried it
> > on the CVS version, but with no affect. The problem persists, and
> examining
> > code differences between 1.6 and the latest I could not see anything that
> > would suggest a fix.
> >
> > Thanks,
> >
> > Lenny
> >
> > -----Original Message-----
> > From: Sam Tregar [mailto:sam@tregar.com]
> > Sent: Saturday, February 02, 2002 10:34 PM
> > To: xerces-c-dev@xml.apache.org; lenny.hoffman@objectivity.com
> > Subject: Re: Circular Definitions
> >
> > On Thu, 31 Jan 2002, Lenny Hoffman wrote:
> >
> > > I get the following message when parsing an input file with schema
> > > checking on:
> > >
> > > Message: No circular definitions are allowed: 'ValueGroup'
> >
> > Are you using the released version or CVS? I encountered a similar
> > problem and solved it by switching to the CVS version.
> >
> > -sam
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
RE: Circular Definitions
Posted by Lenny Hoffman <le...@earthlink.net>.
Hi Khaled,
Your fix worked. Thank you very much!!
BTW, I tried to submit a bug report in Bugzilla for this one as you
suggested, but for some reason it would always time out saying it could not
find the server after I hit commit. Strange, because I successfully
submitted another bug in-between tries. The only difference I could see was
that the one that failed had a longer comment, so I was getting ready to
send it with a short comment and attach the description afterwards. But now
that you have fixed it, I suppose I will forgo that, unless you would like
to have the bug submitted anyway for tracking purposes -- just let me know.
Lenny
-----Original Message-----
From: Khaled Noaman [mailto:knoaman@ca.ibm.com]
Sent: Thursday, February 07, 2002 11:55 AM
To: xerces-c-dev@xml.apache.org
Subject: Re: Circular Definitions
Hi Lenny,
I have put a fix in CVS. Would you please download the latest code from CVS
and
try again?
Thanks,
Khaled
Lenny Hoffman wrote:
> Hi Sam,
>
> I was using the released version (1.6), so I took your advise and tried it
> on the CVS version, but with no affect. The problem persists, and
examining
> code differences between 1.6 and the latest I could not see anything that
> would suggest a fix.
>
> Thanks,
>
> Lenny
>
> -----Original Message-----
> From: Sam Tregar [mailto:sam@tregar.com]
> Sent: Saturday, February 02, 2002 10:34 PM
> To: xerces-c-dev@xml.apache.org; lenny.hoffman@objectivity.com
> Subject: Re: Circular Definitions
>
> On Thu, 31 Jan 2002, Lenny Hoffman wrote:
>
> > I get the following message when parsing an input file with schema
> > checking on:
> >
> > Message: No circular definitions are allowed: 'ValueGroup'
>
> Are you using the released version or CVS? I encountered a similar
> problem and solved it by switching to the CVS version.
>
> -sam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Circular Definitions
Posted by Khaled Noaman <kn...@ca.ibm.com>.
Hi Lenny,
I have put a fix in CVS. Would you please download the latest code from CVS and
try again?
Thanks,
Khaled
Lenny Hoffman wrote:
> Hi Sam,
>
> I was using the released version (1.6), so I took your advise and tried it
> on the CVS version, but with no affect. The problem persists, and examining
> code differences between 1.6 and the latest I could not see anything that
> would suggest a fix.
>
> Thanks,
>
> Lenny
>
> -----Original Message-----
> From: Sam Tregar [mailto:sam@tregar.com]
> Sent: Saturday, February 02, 2002 10:34 PM
> To: xerces-c-dev@xml.apache.org; lenny.hoffman@objectivity.com
> Subject: Re: Circular Definitions
>
> On Thu, 31 Jan 2002, Lenny Hoffman wrote:
>
> > I get the following message when parsing an input file with schema
> > checking on:
> >
> > Message: No circular definitions are allowed: 'ValueGroup'
>
> Are you using the released version or CVS? I encountered a similar
> problem and solved it by switching to the CVS version.
>
> -sam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
RE: Circular Definitions
Posted by Lenny Hoffman <le...@earthlink.net>.
Hi Sam,
I was using the released version (1.6), so I took your advise and tried it
on the CVS version, but with no affect. The problem persists, and examining
code differences between 1.6 and the latest I could not see anything that
would suggest a fix.
Thanks,
Lenny
-----Original Message-----
From: Sam Tregar [mailto:sam@tregar.com]
Sent: Saturday, February 02, 2002 10:34 PM
To: xerces-c-dev@xml.apache.org; lenny.hoffman@objectivity.com
Subject: Re: Circular Definitions
On Thu, 31 Jan 2002, Lenny Hoffman wrote:
> I get the following message when parsing an input file with schema
> checking on:
>
> Message: No circular definitions are allowed: 'ValueGroup'
Are you using the released version or CVS? I encountered a similar
problem and solved it by switching to the CVS version.
-sam
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Circular Definitions
Posted by Sam Tregar <sa...@tregar.com>.
On Thu, 31 Jan 2002, Lenny Hoffman wrote:
> I get the following message when parsing an input file with schema
> checking on:
>
> Message: No circular definitions are allowed: 'ValueGroup'
Are you using the released version or CVS? I encountered a similar
problem and solved it by switching to the CVS version.
-sam
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org