I need to group Itemno for different Level
Example:
Level1:8000000377 - 1
8000000376 - 1
8000000378 - 2
8000000373 - 1
8000000371 - 1
Level2:8000000373 - 2
<Root>
<Label>
<Dept>
<Line>
<Material>
<Level>1</Level>
<Type>abc</Type>
<Itemno>8000000377</Itemno>
</Material>
<Material>
<Level>1</Level>
<Type>abc</Type>
<Itemno>8000000376</Itemno>
</Material>
<Material>
<Level>1</Level>
<Type>123</Type>
<Itemno>8000000378</Itemno>
</Material>
<Material>
<Level>2</Level>
<Type>rth</Type>
<Itemno>8000000373</Itemno>
</Material>
</Line>
</Dept>
<Dept>
<Line>
<Material>
<Level>1</Level>
<Type>34r</Type>
<Itemno>8000000372</Itemno>
</Material>
<Material>
<Level>1</Level>
<Type>4th</Type>
<Itemno>8000000371</Itemno>
</Material>
<Material>
<Level>1</Level>
<Type>123</Type>
<Itemno>8000000378</Itemno>
</Material>
<Material>
<Level>2</Level>
<Type>dvg</Type>
<Itemno>8000000373</Itemno>
</Material>
</Line>
</Dept>
</Label>
</Root>
I tried key as:
<xsl:key name="s1" match="Material[Level='1']" use="concat(Label ,'|', Itemno)" />
<xsl:key name="s1" match="Material[Level='2']" use="concat(Label ,'|', Itemno)" />
but I am getting key not bound.
Can anyone help me where I am going wrong?