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 Sam Tregar <sa...@tregar.com> on 2002/02/06 01:14:18 UTC
Schema Validation Bug
The following bad snippet in my schema:
<xs:element name="size">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="9999999999"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Generated a good error and two bad ones when trying to validate a document
against it:
Error at file /usr/local/bricolage-SOAP/doc_GdUs.xml, line 3, char 196
Message: maxInclusive value '+9999999999' must be less than or equal to
base's maxInclusive value '+2147483647'
Error at file /usr/local/bricolage-SOAP/doc_GdUs.xml, line 3, char 196
Message: Unknown simpleType: {null}
Error at file /usr/local/bricolage-SOAP/doc_GdUs.xml, line 3, char 196
Message: Untyped element: size
The first one is spot-on. The other two are bugs, I think. Also, would
it be possible to label schema errors with the line and char of the schema
file rather than the line in the document where the schema is declared?
-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: Schema Validation Bug
Posted by Sam Tregar <sa...@tregar.com>.
On Wed, 6 Feb 2002, John Utz wrote:
> hmm, i think all 3 bugs are valid, but i could be mistaken....
>
> the simple type in include the broken int, so now it's broken.
>
> the element 'size' includes the simple type so now it's broken.
Wait, you're saying that you can read:
> > Error at file /usr/local/bricolage-SOAP/doc_GdUs.xml, line 3, char 196
> > Message: Unknown simpleType: {null}
And it means "now it's broken"? My response was to search my schema for
the word "{null}" figuring that my schema generator had slipped a gear.
> > Error at file /usr/local/bricolage-SOAP/doc_GdUs.xml, line 3, char 196
> > Message: Untyped element: size
And this one is clearly wrong as well - it's not untyped, the type has
errors.
Viewing these as non-bugs takes some extremely rose-colored goggles. They
say things which have only a passing relationship to the text of the
template.
-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: Schema Validation Bug
Posted by John Utz <ut...@singingfish.com>.
hmm, i think all 3 bugs are valid, but i could be mistaken....
the simple type in include the broken int, so now it's broken.
the element 'size' includes the simple type so now it's broken.
On Tue, 5 Feb 2002, Sam Tregar wrote:
> The following bad snippet in my schema:
>
> <xs:element name="size">
> <xs:simpleType>
> <xs:restriction base="xs:integer">
> <xs:minInclusive value="0"/>
> <xs:maxInclusive value="9999999999"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:element>
>
> Generated a good error and two bad ones when trying to validate a document
> against it:
>
> Error at file /usr/local/bricolage-SOAP/doc_GdUs.xml, line 3, char 196
> Message: maxInclusive value '+9999999999' must be less than or equal to
> base's maxInclusive value '+2147483647'
>
> Error at file /usr/local/bricolage-SOAP/doc_GdUs.xml, line 3, char 196
> Message: Unknown simpleType: {null}
>
> Error at file /usr/local/bricolage-SOAP/doc_GdUs.xml, line 3, char 196
> Message: Untyped element: size
>
> The first one is spot-on. The other two are bugs, I think. Also, would
> it be possible to label schema errors with the line and char of the schema
> file rather than the line in the document where the schema is declared?
>
> -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