Hi. Here's peace of my xml:
Code:
<GetUserMenu>
<MenuList>
<row MenuID="1" MenuTitle="Duomenų pateikimas"/>
</MenuList>
<FunctionList>
<row FunctionID="1" FunctionTitle="Duomenų importavimas iš failo" MenuID="1" WorkflowName="ImportDataWithoutFile" Order="1"/>
<row FunctionID="2" FunctionTitle="Duomenų įvedimas" MenuID="1" WorkflowName="ImportDataFromFile" Order="2"/>
</FunctionList>
</GetUserMenu>
and peace of xsl:
Code:
<xsl:template match="//Authentication/GetUserMenu">
<div>
<xsl:for-each select="//MenuList/row">
<div><xsl:value-of select="@MenuID"/></div>
tu
<xsl:for-each select="//FunctionList/row[">
<div><xsl:value-of select="@MenuID"/></div>
</xsl:for-each>
tu
</xsl:for-each>
</div>
</xsl:template>
I would like to make my xsl do this:
1)In outer for-each cycle xsl reads value of MenuId attribute of <row> of <MenuList>.
2) then in inner cycle my xsl compares that value to every value of MenuAttribute of <row>'s of <FunctionList>
3) then my xsl reads the value of MenuId attribute of following <row> of <MenuList? and repeats second step
In normal programming language what i am trying to do would look like this:
foreach (xitems as xitem)
foreach (yitems as yitem)
if xitem == yitem do smth
Could anyone give any advice or post few lines of code that would solve my issue? I would be grateful