|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: problem converting xml to excel
Anna,
At 01:38 PM 3/12/2004, you wrote: I was wondering if I can check if the string-length for a element is greater than 0 and then display the required results. The easiest way is simply test="$string". A string tests as true if it has content, false if it is empty (has length zero). There is also a string-length function, but test="string-length($string) > 0" is a long way of testing the same thing as test="$string". When operating on an element (or rather, on a node set containing a single node), test="string($element)" will do it. The string() function turns its operand into a string; a node set turned into a string is the string value of the first node in the set in document order. So if the element you want to test is the current node, of course this can be test="string(.)" or even "string()", since the default operand is the context node of the function. On the Mulberry web site is a Quick Reference page to XSLT/XPath 1.0 which lists all the standard functions. See http://www.mulberrytech.com/quickref/index.html Enjoy, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








