Re: [xml] Question about 'union' types in xmlSchemas


On Wed, 2005-05-25 at 18:16 +0200, GUY Fabrice wrote:

I have this schema :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="";>
  <xsd:element name="ELEMENTS">
          <xsd:restriction base="xsd:int">
            <xsd:minInclusive value="10"/>
            <xsd:maxInclusive value="20"/>
          <xsd:restriction base="xsd:int">
            <xsd:minInclusive value="30"/>
            <xsd:maxInclusive value="40"/>

and this simple xml file :

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!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]