Subject: Re: [xsl] Issues with xs:error in the XPath 3.0 and XDM 3.0 Recommendations. From: Graydon <graydon@xxxxxxxxx> Date: Sat, 19 Apr 2014 19:23:02 -0400 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Issues with xs:error in t, Dimitre Novatchev | Thread | Re: [xsl] Issues with xs:error in t, Michael Kay |
Re: [xsl] Issues with xs:error in t, Dimitre Novatchev | Date | Re: [xsl] Issues with xs:error in t, Michael Kay |
Month |