Mercurial > hg > ooxml
comparison merge.xsl @ 48:5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Wed, 10 May 2017 16:52:04 +0100 |
parents | 3e9a3e51627e |
children | f90bbd38b8f6 |
comparison
equal
deleted
inserted
replaced
47:3e9a3e51627e | 48:5d9806f90896 |
---|---|
16 </xsl:variable> | 16 </xsl:variable> |
17 | 17 |
18 <xsl:key name="ref" match="e:i" use="@r"/> | 18 <xsl:key name="ref" match="e:i" use="@r"/> |
19 <xsl:key name="nf" match="e:nf" use="text()"/> | 19 <xsl:key name="nf" match="e:nf" use="text()"/> |
20 | 20 |
21 <xsl:template match="/"><a><xsl:copy-of select="$nfs"/>|<xsl:value-of select="count($refs/e:i)"/>|<xsl:value-of select="count($nfs/e:nf)"/>|<xsl:value-of select="count(key('nf','SUM(ª2ª7:ª3ª7)',$nfs))"/>|<xsl:value-of select="count($nfs/e:nf[.='SUM(ª2ª7:ª3ª7)'])"/> | 21 <xsl:template match="/xxx"><a><xsl:copy-of select="$nfs"/>|<xsl:value-of select="count($refs/e:i)"/>|<xsl:value-of select="count($nfs/e:nf)"/>|<xsl:value-of select="count(key('nf','SUM(ª2ª7:ª3ª7)',$nfs))"/>|<xsl:value-of select="count($nfs/e:nf[.='SUM(ª2ª7:ª3ª7)'])"/> |
22 <xsl:apply-templates/></a> | 22 <xsl:apply-templates/></a> |
23 </xsl:template> | 23 </xsl:template> |
24 | 24 |
25 <xsl:template match="e:r/e:c"> | 25 <xsl:template match="e:r/e:c"> |
26 <xsl:variable name="row" select="../@r"/> | 26 <xsl:variable name="row" select="../@r"/> |
27 <xsl:variable name="col" select="@c"/> | 27 <xsl:variable name="col" select="@c"/> |
28 <xsl:variable name="reffed" select="key('ref',concat(e:n2a($col),$row),$refs)"/> | 28 <xsl:variable name="reffed" select="key('ref',concat(e:n2a($col),$row),$refs)"/> |
29 <c> | 29 <c> |
30 <xsl:apply-templates select="@*"/> | 30 <xsl:apply-templates select="@*"/> |
31 <xsl:if test="e:f"> | 31 <xsl:if test="e:f"> |
32 <xsl:message><xsl:value-of select="e:f"/></xsl:message> | |
33 <xsl:attribute name="fi"><xsl:value-of select="key('nf',e:nf/text(),$nfs)/@i"/></xsl:attribute> | 32 <xsl:attribute name="fi"><xsl:value-of select="key('nf',e:nf/text(),$nfs)/@i"/></xsl:attribute> |
34 </xsl:if> | 33 </xsl:if> |
35 <xsl:if test="$reffed"><xsl:copy-of select="$reffed"/></xsl:if> | 34 <xsl:if test="$reffed"><xsl:copy-of select="$reffed"/></xsl:if> |
36 <xsl:apply-templates select="node()"/> | 35 <xsl:apply-templates select="node()"/> |
37 </c> | 36 </c> |