[Home] [By Thread] [By Date] [Recent Entries]
On 15/07/2016 20:20, dvint@xxxxxxxxx wrote:
So I have a large document that I need to pull a list of unique values from a given element. These are taxonomy and term tag values from a 4,000 topic collection of DITA content. Another option that you could try to see how it affects memory usage [1]: <xsl:key name="terms" match="term[empty(@keyref)]" use="true()" /> <data type="topicreport" name="WDTermList">
<xsl:value-of separator=", ">
<xsl:perform-sort select="distinct-values(key('terms', true()))">
<xsl:sort select="." />
</xsl:perform-sort>
</xsl:value-of>
</data>(borrowing the xsl:perform-sort idea from Martin Honnen, and assuming that the context node is the document element.) Regards,
[1] Unless and until Michael Kay advises that using the xsl:key instead of '//' makes no difference in Saxon.
|

Cart



