0
select="$BCRs/BCR[count(. | $BCRs/BCR[@bss = @bss][1]) = 1]"

I need the two @bss to refer to each $BCRs/BCR.

I'm using the Muenchian technique to get the first element with each value of the attribute. However, I can't use keys so I have to check the attributes this way. How can I make the @bss refer to different nodes?

Wolfeur
  • 142
  • 1
  • 8

1 Answers1

0

I am not sure I understand why you can't use keys, but I think you can't solve that in XSLT 1.0 then with a single expression, instead you can use an approach like

<xsl:for-each select="$BCRs/BCR">
  <xsl:variable name="group" select="$BCRs/BCR[@bbs = current()/@bbs]"/>
  ... select="$group[1]"  ...
Martin Honnen
  • 160,499
  • 6
  • 90
  • 110