Re: Howto define Custom error messages ?

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.

Mik

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>
>
></xsd:simpleType>
>
>
>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 ?
>
>John
>
>.
>
>  
>

Received on Saturday, 6 March 2004 03:51:48 UTC