DesignLiquido / xslt-processor

A JavaScript XSLT processor without native library dependencies
GNU Lesser General Public License v3.0
94 stars 30 forks source link

Implement <xsl:key> #93

Open menelai opened 2 months ago

menelai commented 2 months ago

Should work this way:

<xsl:key name="term-key" match="mark" use="concat(@term, ../../@id)"/>
<xsl:template match="marks">
  <xsl:variable name="unique-term" select="mark[generate-id()=generate-id(key('term-key', concat(@term, ../../@id)))]/@term"/>
</xsl:template>

Thank you

tenaz3 commented 4 weeks ago

I had the same issue when I try to combine xml and stylesheet from nmap(https://svn.nmap.org/nmap/docs/nmap.xsl)