[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Relax NG and Web Services (formerly Joining the church)


syntax error found expecting
From: "James Clark" <jjc@j...>
> Unfortunately, your scratching your head is not an effective way to
> communicate to me that you would like me to change an error message.

Jing's error messages seem much better than they used to be! Thanks for
continuing to work on them.

> The way to get me to change something is to send me a bug report
> including as many as possible as:
>
> - the error message you got

In the compact syntax, "Syntax error."
In the XML syntax, "Element incomplete." (From memory; the actual message is
very close to that.)

> - a brief explanation of why the error message made you scratch your head

The messages don't pinpoint the problem or suggest how to fix it.

> - an alternative error message that would not have made you scratch your
> head

A good template to fall back on is to say what prompted the error message
and what was expected, instead. E.g., "Syntax error: found '|' expecting
'=', '|=' or '&='." Or, "Element incomplete: found '</foo>' expecting one of
elements 'bar', 'baz', etc."

This type of message becomes unhelpful if the list of expected items is very
large, but it is ok to truncate the list, as shown above. Of course, the
expected symbols come from the First set or equivalent of the grammar just
before the error was detected.

> - the schema
> - the instance
> - the version of Jing you're using

20030619

> At the very least, I need the first two. If I tried to guess what you
> found confusing, I would probably get it wrong.

As a rule, messages that do not already contain a quoted symbol might be
improved by following the template above.

> If the problem is just the wording, then you can change it yourself.
> Extract com/thaiopensource/relaxng/impl/resources/Messages.properties
> from jing.jar (e.g. with unzip), edit to taste (and send me the diffs),
> and add back to jing.jar.  If it's the formatting you don't like, you
> can change com/thaiopensource/xml/sax/resources/Messages.properties.

The problem is lack of information, which can't be added by translation or
reformatting.

> 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.

Mea culpa.

Bob

> James



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.