xsl-list
[Top] [All Lists]

RE: [xsl] Is there a way to tell if a node is an integer?

2006-04-22 01:17:29
Is there a way to tell if a node is an integer? I found this message:
http://www.xslt.com/html/xsl-list/2004-10/msg00364.html where 
it appears to say you can use a statement like this:

<xsl:if test="data($a) instance of xs:integer">

But this looks kind of strange, and maybe it is pseudo-code 
because it breaks my transform. 

This code should work provided that:

(a) you are running an XSLT 2.0 schema-aware processor

(b) your source document has been validated against a schema that declares
the type of the element to be an integer.

(c) you have bound "xs" to the XML Schema namespace.

To know which of those conditions you haven't met, I would want to see the
error message...

Michael Kay
http://www.saxonica.com/


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