On 19/08/2010 18:58, a kusa wrote:
Hi
Is there any way in XSLT to check if the value between two nodes is a
whitespace?
I tried normalize-space(product/text()) !=' ' but that is not working.
I want tocheck if the actual value between<product> </product> is a
white space.
That space isn't between two nodes - it's between a begin tag and its
corresponding end tag, and it is the child text node of the element
represented by those tags.
If you want to test for a single space character, the test is
product = ' '
(where there's a single space between those apostrophes)
If you want to test for one or more whitespace characters, where
whitespace characters include tab, CR, and NL, you could use
matches(product, '\s+').
Michael Kay
Saxonica
--~------------------------------------------------------------------
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>
--~--