[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: check for whitespace value between nodes
On Thu, 2010-08-19 at 12:58 -0500, 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. Whitespace is a tricky thing to get right. It's impossible to give you a good answer without knowing more about what you are trying to do and why, and the context, and without seeing your XSLT. In some contexts, . eq ' ' would work, for example, and in others you might want data(.) eq ' ' (both assuming XSLT 2) or even something like, matches(., '^\s+$') Liam Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ XML Blog: http://www.barefootliam.org/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|