W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2004

Re: Howto define Custom error messages ?

From: Mik Lernout <mik@futurestreet.org>
Date: Sat, 06 Mar 2004 09:50:00 +0100
Message-ID: <404990B8.8000300@futurestreet.org>
Cc: xmlschema-dev@w3.org

Hey John,

The "message test" you talk about does not exist within the scope of 
XMLSchema. The "not facet valid" - type of exceptions are specific to 
your validator, Xerces, and refer to the XMLSchema spec for easy 
reference. The structure of these messages are not common across all of 
the XMLSchema validators and the one from Xerces you use does not 
include additional information like the type/element/... the validation 
failed on.

RI checks over multiple documents is not supported. XMLSchema's scope is 
very well confined to the validation of a single XML document. The only 
way it would be possible to do this would be to use XInclude to combine 
several XML documents and then to validate that, but I do not know of a 
validator-implementation that would support this kind of stuff.


John Sharp wrote:

>Is it at all possible to define some "message test" in the
>body of, say, a schemaType - such that the validatator
>would use this instead of its own.
>something along the lines of:
><xsd:simpleType name="Common.PinType">
>   <xsd:restriction base="xsd:string">
>     <xsd:enumeration value="IN"/>
>     <xsd:enumeration value="OUT"/>
>     <xsd:enumeration value="INOUT"/>
>     <xsd:enumeration value="IO"/>
>     <xsd:enumeration value="REF"/>
>     <xsd:enumeration value="INV"/>
>     <xsd:enumeration value="Supply"/> 
>     <xsd:enumeration value=""/>
>   </xsd:restriction>
>  <ERROR>Non Standard Pin Type, please correct...</ERROR>
>Where do the current error messages "not facet valid..." come from ?
>I'm using xerces & dom4j
>Also, I need to perform RI checks over multiple documents. How are
>others doing this ?
Received on Saturday, 6 March 2004 03:51:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:04 UTC