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

Howto define Custom error messages ?

From: John Sharp <jsharp@ti.com>
Date: Fri, 05 Mar 2004 17:43:43 -0600
Message-ID: <404910AF.817712C9@ti.com>
To: xmlschema-dev@w3.org

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 Friday, 5 March 2004 18:43:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:40:23 UTC