Groups | Blog | Home
all groups > dotnet xml > january 2005 >

dotnet xml : Is it possible to generate non-technical schema validation errors?


Prodika
1/19/2005 4:41:03 PM
With the 1.0 Framework, I've worked out using the XmlValidatingReader. Since
I'm using the validation errors as feedback to the end user, I'm hoping to
get away from techy messages such as "The
'http://tempuri.org/XMLFile1.xsd:MaxDependents' element has an invalid value
according to its data type. An error occurred at
file:///c:/work/prodika/main/code/apps/schemavalidation/XMLFile1.xml(8, 25)."
and go with a user friendly message of "Max Dependents must be between 0 and
10". I've scoured the newsgroups, MSDN and docs for creating custom
validators or a way to access some of the private fields for the
XmlValidatingReader to no avail. Ideally, I'd like to pass my custom message
as an xs:annotation\documentation on an elements xs:restriction. Any
suggestions?

Thanks!
Prodika
1/21/2005 11:35:03 AM
Well, so far it appears possible options are 1) writing my own validating
reader 2) using Schematron

[quoted text, click to view]
AddThis Social Bookmark Button