Re: assertion failures - providing feedback

An xs:assert does seem to allow an xs:annotation.  Does that help?  I guess 
it might help the developer, but you'd have to make assumptions about the 
contents of the text before you displayed it to a regular user.

And if you're going to display messages embedded in the XML schema to a 
user, what's the effect of internationalisation / localisation of such error 
messages?  Would the messages need to be parameterized in the general case?

Regards,

Pete Cordell
Codalogic
Visit http://www.codalogic.com/lmx/ for XML C++ data binding

----- Original Message ----- 
From: "Andrew Welch" <andrew.j.welch@gmail.com>
To: <xmlschema-dev@w3.org>
Sent: Thursday, February 14, 2008 4:46 PM
Subject: assertion failures - providing feedback


>
> What is the intended way to provide feedback when an assertion fails?
>
> Given:
>
> <xs:assert test="@min le @max"/>
>
> How would you say "The min attribute must be less than or equal to the
> max attribute" when the test fails?
>
> I hope it's not:
>
> <xs:assert test="if (@min le @max) then true() else
> error('http://mycomp.com', 'myerr:minlessthanmax', 'The min attribute
> must be less than or equal to the max attribute')"/>
>
>
>
> thanks
> -- 
> Andrew Welch
> http://andrewjwelch.com
> Kernow: http://kernowforsaxon.sf.net/
>
> 

Received on Thursday, 14 February 2008 18:22:15 UTC