Subject:xpath level, storing variables & parsed trees Author:edel rooster Date:26 Jan 2005 11:33 AM
I'm a relatively new user of xslt & I'm not sure how to best convey this problem...
I am trying to transform a very large and quite complex xml document -
however I am constantly running into problems because of two elements which
are on the same level. In the middle of processing the first of these elements I want to
be able to move up an xpath level and access the other one but the xpath focus is no longer at the
correct level.
The xml structure can be simply described as
<context>
<t_list>
<t/>
<t/>
</t_list>
<s_list>
<s/>
<s/>
</s_list>
</context>
And I want to transform it into
<t>
<s_list><s/><s/></s_list>
</t>
So for each <t> the same s_list applies...
Is there any way of storing the s_list, and adding it as a nested element of <t>, when processing <t>?