I have been reading on the different question talking about selecting unique nodes in a document (using the Muenchian method) but in my case I cannot use keys (or I do not know how) because I am working on a node set and not on the document.
And keys cannot be set on a node-set. Basically I have a variable:
<xsl:variable name="limitedSet" select="
$deviceInstanceNodeSet[position() <= $tableMaxCol]"
/>
which contains <deviceInstance>
nodes which themselves containing <structure>
elements
the node set may be represented this way:
<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 a to select <structure>
elements that only have different name. The select would in this example return two <structure>
elements, being:
<structure name="DemuxTschannelCaps"></structure>
<structure name="otherCaps"></structure>
I have tried
select="$limitedSet//structure[not(@name=preceding::structure/@name)]"
but the preceding axis goes all along the document and not the $limitedSet
?
I am stuck, can someone help me. Thank you.