A
Artie
Hi,
Is there any way to tell an XSD Schema that you want custom error
codes for particular validation failures in an XML document?
To show what I mean, here's an example:
XSD excerpt
<xs:element name = "EmployeeID">
<xs:simpleType>
<xs:restriction base = "xs:string" >
<xs:length value = "3"/>
<xsattern value = "[0-9]{3}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
XML excerpt
<EmployeeID>1234</EmployeeID>
When the XML fails to validate against its XSD element, I want, say,
error code 1000 to be returned from the validator - can this be done
easily?
(I'm thinking along the lines of having an element like
<xs:customErrorCode = 1000> along side each restriction.)
Any help very much appreciated
Artie
Is there any way to tell an XSD Schema that you want custom error
codes for particular validation failures in an XML document?
To show what I mean, here's an example:
XSD excerpt
<xs:element name = "EmployeeID">
<xs:simpleType>
<xs:restriction base = "xs:string" >
<xs:length value = "3"/>
<xsattern value = "[0-9]{3}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
XML excerpt
<EmployeeID>1234</EmployeeID>
When the XML fails to validate against its XSD element, I want, say,
error code 1000 to be returned from the validator - can this be done
easily?
(I'm thinking along the lines of having an element like
<xs:customErrorCode = 1000> along side each restriction.)
Any help very much appreciated
Artie