Mercurial > hg > ooxml
comparison 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 |
comparison
equal
deleted
inserted
replaced
46:8dd54346bfd8 | 47:3e9a3e51627e |
---|---|
30 </xsl:for-each> | 30 </xsl:for-each> |
31 <xsl:for-each select="key('rrefBR',$r,$refs)"> | 31 <xsl:for-each select="key('rrefBR',$r,$refs)"> |
32 <r><xsl:value-of select="@r"/>></r> | 32 <r><xsl:value-of select="@r"/>></r> |
33 </xsl:for-each> | 33 </xsl:for-each> |
34 </i> | 34 </i> |
35 </xsl:for-each> | |
36 <xsl:for-each select="distinct-values(e:nf/text())"> | |
37 <nf i="{position()}"><xsl:value-of select="."/></nf> | |
38 </xsl:for-each> | 35 </xsl:for-each> |
36 <!-- We want to be able to sort by frequency, so just d-v isn't enough --> | |
37 <xsl:for-each-group select="e:nf" group-by="text()"> | |
38 <nf i="{position()}" n="{count(current-group())}"><xsl:value-of select="current-group()[1]/text()"/></nf> | |
39 </xsl:for-each-group> | |
39 </xsl:variable> | 40 </xsl:variable> |
40 <xsl:copy> | 41 <xsl:copy> |
41 <xsl:copy-of select="$invert"/> | 42 <xsl:copy-of select="$invert"/> |
42 </xsl:copy> | 43 </xsl:copy> |
43 </xsl:template> | 44 </xsl:template> |