Test the value against NaN:
<xsl:if test="string(number(myNode)) != 'NaN'">
<!-- myNode is a number -->
</xsl:if>
This is a shorter version (thanks @Alejandro):
<xsl:if test="number(myNode) = myNode">
<!-- myNode is a number -->
</xsl:if>
More Related Contents:
- How can I match on an attribute that contains a certain string?
- Find position of a node using XPath
- How to select specified node within Xpath node sets by index with Selenium?
- How to select the first element with a specific attribute using XPath
- Is there an “if -then – else ” statement in XPath?
- XPath OR operator for different nodes
- Xpath “ends-with” does not work
- XPath : select all following siblings until another sibling
- How do I retrieve element text inside CDATA markup via XPath?
- Accessing Comments in XML using XPath
- What is the difference between absolute and relative xpaths? Which is preferred in Selenium automation testing?
- Getting element’s name in XPATH
- How would you find all nodes between two H3’s using XPATH?
- XPath to return string concatenation of qualifying child node values
- Locating the node by value containing whitespaces using XPath
- XPath – Get node with no child of specific type
- Using upper-case and lower-case xpath functions in selenium IDE
- Difference between text() and string()
- XPath find text in any text node
- XPath: How to select node with some attribute by index?
- XPath: How to select nodes which have no attributes?
- How to use not contains() in XPath?
- How do I return ” for an empty node’s text() in XPath?
- Is string matches() supported in Selenium Webdriver 2?
- Getting attribute using XPath
- XPath to select multiple tags
- XPath with namespace in Java
- XSLT: How to convert XML Node to String
- XSLT Replace function not found
- How do you identify duplicate values in a numerical sequence using XPath 2.0?