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

Re: Variable containing tree

Subject: Re: Variable containing tree
From: "Filipe Correia" <filipe.correia@xxxxxxxxxxxxxxx>
Date: Fri, 07 Jun 2002 12:49:41 +0100
filipe correia
  Hello again,

>then $var = '' would also be true because the string value of the root
>node of the result tree fragment (the concatenation of all the text
>node descendants of the RTF) is empty.
>
>If you want to test whether the result tree fragment's root node has
>any children ...

yep, thats what I want to do...


>  (If you just want to copy the
>result, then use xsl:copy-of.)
>  
    It works, using xsl:copy-of I get the result I expected. thanks!
    but using <apply-templates> should also work right?

>Note that $var/node() gives you a node set of the nodes under the
>result tree fragment's root node; it appears as if these are the nodes
>to which you wish to apply templates.

   yes, those are the nodes i wanted to apply the templates to.
   I've also tried to use $var/node() but I got the root node in the tree fragment.
   My tree fragmente was something like this:

      <node1>
         <node2>
            <node3/>
            <node4/>
         </node2>
         <node5/>
      </node1>

so the result I got when invoquing <xsl:apply-templates select="$var/node()" />
 was only  <node1/> instead of the entire tree.


      Cheers,

           Filipe




 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.