It is very difficult for me to express it in English, so an example can help. Say I have several elements called a multi-member proposal. In another part of XML there is a set of elements with language codes. I would like to apply a template for each sentence as many times as the number of languages and call this template with the corresponding language code. From this:
<description>
<sentences>
<sentence>
<term type="adjective">nice</term>
<term type="tripType">cycling</term>
</sentence>
<sentence>
<term type="adjective">boring</term>
<term type="tripType">hike</term>
</sentence>
</sentences>
<languages>
<l>cs</l>
<l>en</l>
</languages>
</description>
I want to create something like this:
<div>
<p><span>cs</span> nice cycling</p>
<p><span>en</span> nice cycling</p>
</div>
<div>
<p><span>cs</span> boring hike</p>
<p><span>en</span> boring hike</p>
</div>
I tried to use <xsl:for-each select="/description/languages/l">, but this sets the content las the current item, and I can no longer use this term.
Any idea would be greatly appreciated. Thanks
source
share