Re: [xml] Question about 'union' types in xmlSchemas
- From: Kasimier Buchcik <kbuchcik 4commerce de>
- To: GUY Fabrice <fabrice guy gmail com>
- Cc: "xml gnome org" <xml gnome org>
- Subject: Re: [xml] Question about 'union' types in xmlSchemas
- Date: Wed, 25 May 2005 19:36:08 +0200
Hi,
On Wed, 2005-05-25 at 18:16 +0200, GUY Fabrice wrote:
Hi,
I have this schema :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="ELEMENTS">
<xsd:simpleType>
<xsd:union>
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="10"/>
<xsd:maxInclusive value="20"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="30"/>
<xsd:maxInclusive value="40"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
</xsd:element>
</xsd:schema>
and this simple xml file :
<ELEMENTS>5</ELEMENTS>
This xml file validates using xmllint (with libxml 2.6.19) although 5
does not fall in the interval [10,20] neither [30,40].
But maybe the 'union' type is not yet fully implemented ?
This was a bug: in some cases, the facet-violation was not channelled
back to the main validation function.
Fixed in CVS, xmlschemas.c rev 1.133.
I added your case to the regression tests.
We have currently no informative error-messages for union types. So
you'll get only a "The character content is not valid." message.
Thanks for the report!
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]