OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Relax NG and Web Services (formerly Joining the church)

[ Lists Home | Date Index | Thread Index ]

James Clark said:
> Dave Pawson wrote:
>> At 13:12 10/07/2003 -0700, Tim Bray wrote:
>>> To be more precise: valid/not-valid+error messages.  Despite the nice
>>>  things I said about RelaxNG and Jing and Trang, they have typically
>>> James-Clark-esque error messages:
>> +1
>> Michael Kay really showed James up with xslt.
>> I'm scratching my head with Jing and Tim's pie schema :-)
>> Come on James, help us out a little... please.


Getting clear error messages is probably one of the trickiest issues I
have in my Relax NG implementation and I actually find that Jing is doing
a very good job.
In the specific case reported by Tim Bray, given the flexibility of Relax
NG (and the fact that ambiguity is allowed), that can be quite challenging
to say why (or how) an element is incomplete.
> One of the problems with trying to improve error messages is that
> almost  nobody ever feels it's worthwhile to report a
> confusing/unhelpful error  message as a bug.

I'd like to submit not a bug but a feature request, then.

I think that there are cases where it could help if people were able to
specify customed error messages to be raised when a pattern isn't matched,
for instance:
<element name="foo">
  <attribute name="bar">
    <data type="xsd:date">
     <er:message>The content of the "bar" attribute should have a format
     "YYYY:MM:DD"</er:message>    </data>
    <er:message>Hmmm... once again, you've forgotten the "bar"
    attribute!</er:message>  </attribute>

This would allow to add application oriented error messages more readable
to the end user than the generic error messages given by a schema
processor and give some of the expressive power of Schematron's error
messages to other schema languages.
Note that this idea does also apply to other schema languages:


Freelance consulting and training.
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS