Mercurial > hg > ooxml
diff refs2.xsl @ 47:3e9a3e51627e
explicit form match working, but shared still needs work
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Tue, 09 May 2017 23:08:18 +0100 |
parents | 8dd54346bfd8 |
children | adeb9575b273 |
line wrap: on
line diff
--- a/refs2.xsl Sun May 07 22:03:31 2017 +0100 +++ b/refs2.xsl Tue May 09 23:08:18 2017 +0100 @@ -32,10 +32,11 @@ <r><xsl:value-of select="@r"/>></r> </xsl:for-each> </i> - </xsl:for-each> - <xsl:for-each select="distinct-values(e:nf/text())"> - <nf i="{position()}"><xsl:value-of select="."/></nf> </xsl:for-each> + <!-- We want to be able to sort by frequency, so just d-v isn't enough --> + <xsl:for-each-group select="e:nf" group-by="text()"> + <nf i="{position()}" n="{count(current-group())}"><xsl:value-of select="current-group()[1]/text()"/></nf> + </xsl:for-each-group> </xsl:variable> <xsl:copy> <xsl:copy-of select="$invert"/>