[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: problem converting xml to excel

Subject: Re: problem converting xml to excel
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 12 Mar 2004 14:27:09 -0500
excel string length
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.

Is there any method like that?

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) &gt; 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


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.