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

Re: Variable : string or temporary tree

Subject: Re: Variable : string or temporary tree
From: "Siarhei Biarozkin" <sberyozkin@xxxxxxxxxx>
Date: Mon, 13 May 2002 10:08:02 +0100
xsl variable string
Hi,
When testing whether the variable was a tree or not, I meant to say
$treeTest/node/*, that is I'd like to test whether a variable contains
element children, not any childtren, like text.
Thanks, S.Biarozkin
----- Original Message -----
From: "Siarhei Biarozkin" <sberyozkin@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, May 13, 2002 9:41 AM
Subject:  Variable : string or temporary tree


> Hello,
> What is the best way to find out whether a variable is a string or a tree
?
> For example,
>
> <xsl:variable name="cmdRequest" select='Z_ShowFile'>
> or
> <xsl:variable name="cmdRequest">
>   <request>Z_ShowFile</request>
>   <request>Z_GetPips</request>
> </xsl:variable>
> As I'm new to XSLT, the only way I can think of is  :
>
> <xsl:variable name="treeTest">
>  <node>
>     <xsl:copy-of select="$cmdRequest"/>
>  </node>
> </xsl:variable>
> <xsl:choose>
>   <xsl:when test="$treeTest/node/node()">
>     <!-- $cmdRequest is a tree -->
>   </xsl:when>
>   <xsl:otherwise>
>     <!-- $cmdRequest is a string -->
>   </xsl:otherwise>
> </xsl:choose>
>
> Is there a shorter way to test it ?
> Thank you
> Siarhei Biarozkin
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
>


 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.