I read on a different issue, talking about choosing unique nodes in a document (using the Muenchian method), but in my case I can’t use the keys (or I don’t know how), because I'm working on node and not on the document.
And the keys cannot be set to node-set. Basically I have a variable:
<xsl:variable name="limitedSet" select="
$deviceInstanceNodeSet[position() <= $tableMaxCol]"
/>
which contains <deviceInstance>nodes that themselves contain elements <structure>
a node set can be represented as follows:
<deviceInstance name="Demux TSchannel" deviceIndex="0">
<structure name="DemuxTschannelCaps">
</structure>
</deviceInstance>
<deviceInstance name="Demux TSchannel" deviceIndex="1">
<structure name="DemuxTschannelCaps">
</structure>
</deviceInstance>
<deviceInstance name="Demux TSchannel" deviceIndex="3">
<structure name="otherCaps">
</structure>
</deviceInstance>
And I do not know to select <structure>items that have only a different name. The selection in this example returns two items <structure>:
<structure name="DemuxTschannelCaps"></structure>
<structure name="otherCaps"></structure>
I tried
select="$limitedSet//structure[not(@name=preceding::structure/@name)]"
but the previous axis goes throughout the document, not $limitedSet?
I'm stuck, can someone help me. Thanks.