Re: [xsl] Variable containing tree

Subject: Re: [xsl] Variable containing tree
From: "Filipe Correia" <filipe.correia@xxxxxxxxxxxxxxx>
Date: Fri, 07 Jun 2002 15:03:00 +0100
>>>  (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?

I've just realised something...  what I really want is xsl:copy-of and not xsl:apply-templates (I guess).
When I create the variable I already am applying the templates and I don't want to apply them to the
 resulting tree a second time; I just want to output the resulting tree.

>>    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.

This was happening because I had a template processing nodes with the same name has <node1>
Now I understand what i was doing wrong.


   Thanks for your help

          Filipe


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


Current Thread