xsl-list
[Top] [All Lists]

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

2014-04-19 20:42:36
On Sat, Apr 19, 2014 at 4:42 PM, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:
One way one might construct a scenario where xs:error is possibly useful is 
via function-lookup(). Suppose I am passed a type local name (e.g. "int" or 
"string") as a parameter, then I can cast to that type by doing

function-lookup(QName(XSD_NAMESPACE, $type), 1)($input)

and if I want the cast to always fail, then I can supply $type := "error".

Thanks for this example.

To put it in other words:  Why was the xs:error type introduced (in
XML Schema)? What purpose does it serve? What problems does it solve?


Cheers,
Dimitre Novatchev

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