Types aren't first-class objects in the XQuery data model. There are
therefore no expressions that return types as their result, or that
operate on types supplied dynamically at run-time.
Michael Kay
Saxonica
On 10/02/2012 15:07, David Lee wrote:
Is there a way to coerce/convert a QName into its representative type ?
Example: suppose I have
let $name := xs:QName( "xs:int" )
I can do
if( type eq xs:QName("xs:int") ) ...
But I cant do
typeswitch( $name (: how to cast to type ? :) )
case $i as xs:int ...
Any suggestions ? Is there some function or expression I'm missing
which can convert a QName into the type ?
----------------------------------------
David A. Lee
[email protected] <mailto:[email protected]>
http://www.xmlsh.org
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk