You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Stanimir Stamenkov <st...@myrealbox.com> on 2004/12/28 09:40:10 UTC
[XML Schema] Identically named elements of different type
I've started such thread [1] in the comp.text.xml group where I've
mentioned my experience with Xerces2. Basically, seems like Xerces
permits the following:
<!-- top-level declaration -->
<xs:element name="csv">
<xs:complexType>
<xs:sequence>
<xs:element name="row" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="col" type="xs:token" />
<xs:element name="col" type="xs:date" />
<xs:element name="col" type="xs:integer" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
where the current spec doesn't. Is it intentional or incidental
behavior?
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: [XML Schema] Identically named elements of different type
Posted by Stanimir Stamenkov <st...@myrealbox.com>.
/Stanimir Stamenkov/:
> I've started such thread [1] in the comp.text.xml group ...
Forgot to include a link:
[1] http://groups.google.com/groups?th=58f501f675c7d9b1
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: [XML Schema] Identically named elements of different type
Posted by Stanimir Stamenkov <st...@myrealbox.com>.
/Stanimir Stamenkov/:
> Confusing indeed - I'm using version 2.6.2 and it did't happen at my
> side, until I've set the
> "http://apache.org/xml/features/validation/schema-full-checking" feature
> to 'true' (which is 'false' by default).
But it doesn't seem to affect loading just the 'XSModel', as in:
String src = "...";
XMLInputSource input = new XMLInputSource(null, src, null);
XMLSchemaLoader loader = new XMLSchemaLoader();
loader.setErrorHandler(...); // log all error events
loader.setFeature(
"http://apache.org/xml/features/validation/schema-full-checking",
true);
loader.loadGrammar(input);
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: [XML Schema] Identically named elements of different type
Posted by Stanimir Stamenkov <st...@myrealbox.com>.
Hi George,
/George Cristian Bina/:
> Check your Xerces version, 2.6.2 reports the following error:
>
> Error: cos-element-consistent: Error for type '#AnonType_rowcsv'.
> Multiple elements with name 'col', with different types, appear in the
> model group.
Confusing indeed - I'm using version 2.6.2 and it did't happen at my
side, until I've set the
"http://apache.org/xml/features/validation/schema-full-checking"
feature to 'true' (which is 'false' by default). Strangely enough,
without enabling the "schema-full-checking" feature it works as I
would want it to - (in the example I've given) it correctly checks
if the first "col" element has content type of 'token', the second
"col" element - content type of 'date' and the third - 'integer'.
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: [XML Schema] Identically named elements of different type
Posted by George Cristian Bina <ge...@sync.ro>.
Hi Stanimir,
Check your Xerces version, 2.6.2 reports the following error:
Error: cos-element-consistent: Error for type '#AnonType_rowcsv'.
Multiple elements with name 'col', with different types, appear in the
model group.
Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Stanimir Stamenkov wrote:
> I've started such thread [1] in the comp.text.xml group where I've
> mentioned my experience with Xerces2. Basically, seems like Xerces
> permits the following:
>
> <!-- top-level declaration -->
> <xs:element name="csv">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="row" maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="col" type="xs:token" />
> <xs:element name="col" type="xs:date" />
> <xs:element name="col" type="xs:integer" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> where the current spec doesn't. Is it intentional or incidental behavior?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org