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

Variable containing tree

Subject: Variable containing tree
From: "Filipe Correia" <filipe.correia@xxxxxxxxxxxxxxx>
Date: Fri, 07 Jun 2002 09:49:17 +0100
containing tree roots
  Hi,

I'm assigning a set of nodes to a variable like this:

      <xsl:variable name="var">
         <xsl:apply-templates/>
      </xsl:variable>

wich I would like to output later on only if the variable is not empty.
I've tried outputing it like this:

   <xsl:if test="$restFormElements != '' ">
      <result>
         <xsl:apply-templates select="$restFormElements"/>
      </result>
   </xsl:if>

but the test is never true. I'm not sure how to test this...
But beyond the test part... If I just try to output my variable:

         <xsl:apply-templates select="$restFormElements"/>

xalan exits with an exception: "Can not convert #RTREEFRAG to a NodeList!"
so I tried to convert the tree fragmente to a node list using xalan's built in "nodeset()"
function. like this:

         <xsl:apply-templates select="xalan:nodeset($restFormElements)"/>

but I only get the the resulting tree's root node...  and not the entire tree as I was expecting.

How is this behavior explained?


   thks in advance!

        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.