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

Re: A bug or incorrect logic?

From: Arshad Noor <arshad.noor@strongauth.com>
Date: Fri, 31 Oct 2008 11:10:35 -0700
Message-ID: <490B4A1B.7020003@strongauth.com>
To: Michael Kay <mike@saxonica.com>
CC: xmlschema-dev@w3.org
Re: A bug or incorrect logic?

Point taken, Michael.  Its a reasonable assumption to make
when there are many choices available to a developer of a
finite state machine.

Thank you (and Michael Glavassevich) for the answers.

Arshad Noor
StrongAuth, Inc.

Michael Kay wrote:
>> Given that A is optional, shouldn't the error message 
>> indicate that (at a minimum) "B or C" is expected?
>>
> 
> Designing good error messages tends to involve guessing what the user's
> intention was. The message that this particular processor has given you is
> what comes out easily from the usual strategy of compiling the grammar into
> a finite state machine, where in any given state you know what symbols are
> allowed to appear to move you to the next state. 
> 
> There are strategies that do better (spelling checkers use them, essentially
> by trying to work out what valid construct your invalid construct is closest
> to) but they tend to involve look-ahead, which means they don't scale well
> when the content is very long. And as we know from spelling checkers, they
> can sometimes produce hilarious results.
> 
> Michael Kay
> http://www.saxonica.com/
> 
Received on Friday, 31 October 2008 18:11:11 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.