Casting

if ($x castable as xs:gYear)
then $x cast as xs:gYear
else if ($x castable as xs:integer)
then $x cast as xs:integer
else if ($x castable as xs:decimal)
then $x cast as xs:decimal
else $x cast as string

Previous | Next | Top | Cafe con Leche

Copyright 2002, 2003 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified November 15, 2003