Stanimir,
I just checked your schema in XMLSpy and it gave no others. This is not a
absolute proof of a bug, because XMLSPY is not always to strict.
Using the latest Xerces builds I get the same error as you. But there is
one good point: when you check documents aginst the XSD , it validates
well. A value of zero (or others that are conforming the pattern) is
accepted. It seems the "default" attribute causes the problems. Maybe a
developer can confirm this bug?
Dick Deneer
> Using Xerces 2.7.1 I get an error loading the following schema:
>
> <?xml version="1.0" ?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="sample-elem" type="MyInteger" default="0" />
> <xs:simpleType name="MyInteger">
> <xs:restriction base="xs:decimal">
> <xs:pattern value="[\-+]?[0-9]+" />
> </xs:restriction>
> </xs:simpleType>
> </xs:schema>
>
> And the error:
>
> e-props-correct.2: Invalid value constraint value '0' in element
> 'sample-elem'.
>
> I don't see anything wrong with the schema and I've tried validating
> it using the XML Schema Validator [1] on the W3C site, which gave me
> no error. Am I missing something or it appears to be a problem with
> the Xerces implementation?
>
> [1] http://www.w3.org/2001/03/webdata/xsv
>
> --
> Stanimir
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
> For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx
>
>
|