xsl-list
[Top] [All Lists]

Re: [xsl] Issues with xs:error in the XPath 3.0 and XDM 3.0 Recommendations.

2014-04-19 18:23:17
On Sat, Apr 19, 2014 at 04:03:16PM -0700, Dimitre Novatchev scripsit:
I apologize, but I am still curious to see a legal (and if possible
meaningful) XPath expression that involves xs:error.

I tried this in BaseX and it works, but it seems totally wrong to me
-- returning a type! And from the explanations about xs:error, it
would be an error to use it as a constructor.

let $v := 3
    return
      if($v eq 2) then xs:error
       else $v

It doesn't seem to be intended as a type so much as a Platonic ideal; if
I'm understanding the schema guys discussion of it correctly, it's the
name for a type with no valid instances, and sort of cognate with the
empty set in terms of validation.

It's not supposed to mean anything about what kind of error, it's "this
is never ever valid anywhere", so it's not for returning "this is an
error condition" in a try/catch sort of context.  (Since the only thing
it can possibly mean is "that's never right", it's not even "something,
somewhere, went wrong somehow".)

-- Graydon

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--