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

Re: Handling of "error value" in XPATH 2.0


Re:  Handling of "error value" in XPATH 2.0
[Joe English]

>
> Thomas B. Passin wrote:
> >
> > I also noticed something else [in XPATH 2.0]
> > and I'd like some assurance that it isn't a problem, or else that it
> > will be handled.
> >
> > I'm referring to "error value", which will sometimes be returned by
XPATH
> > 2.0 expressions.  I haven't found any place in the draft that says
anything
> > about how the "error value" is to be handled.
>
> The use of a distinguished "error value" is a fairly common
> technique in formal semantics; it's used to simplify the definitions.
>
> In the XPATH 2.0 rec, it says:
>
> | _Error_ is a special value indicating that an error has been
> | encountered during the evaluation of an expression. Except
> | as noted in this document, if any operand of an expression
> | is the error value, the value of the expression is also the
> | error value. [2.1 "Basics"]
>

Aha!  I thought I had found every occurrence of "error value", but I must
have had the 1000-yard stare when I got to that one.

> The "Except as noted in this document" clause is the important
> part.  The rest of the spec lists several places where the error
> value may be introduced, but it rarely needs to specify how it's
> handled, because that's covered by this one paragraph.  This
> shortens the spec considerably.
>
> Consider for example 2.5 "Arithmetic Expressions", where there are
> four clauses specfying how an arithmetic expression is evaluated.
> This would easily be twice as long if it explicitly accounted for
> errors at each step.  (By way of contrast, check out the ECMAScript
> standard; nearly every clause in that spec is mostly boilerplate text
> which redescribes how errors are handled.)
>
>
I'm very comfortable with referring to a clause rather than repeating the
boilerplate.
I just want to make sure that it's easy to test for, and that how we test
for error_value won't vary  between implementations (like getting the string
"NaN" - you know what to look for).

Cheers,

Tom P


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.