Mercurial > hg > ooxml
view refs.xsl @ 46:8dd54346bfd8
tabulate unique normalised formulae
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Sun, 07 May 2017 22:03:31 +0100 |
parents | 6ed900e8cc61 |
children | 3e9a3e51627e |
line wrap: on
line source
<?xml version='1.0'?> <!DOCTYPE xsl:stylesheet SYSTEM "../../../lib/xml/xsl.dtd" > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0" xmlns:s="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:e="http://markup.co.uk/excel" exclude-result-prefixes="xs s e xf" xmlns="http://markup.co.uk/excel" xmlns:xf="http://www.w3.org/2005/xpath-functions"> <xsl:include href="n2a.xsl"/> <xsl:template match="/"> <refs><xsl:apply-templates select="//e:c"/></refs> </xsl:template> <xsl:template match="e:c[e:f]"> <xsl:variable name="r" select="../@r"/> <xsl:variable name="c" select="@c"/> <xsl:variable name="i" select="concat(e:n2a($c),$r)"/> <xsl:if test="@r='xxx' and @c='1'"><xsl:message><xsl:value-of select="count(e:f/*)"/>|</xsl:message> </xsl:if> <nf r="{$i}"><xsl:value-of select="e:fnf(e:f/*)"/></nf> <xsl:if test="e:f[e:s|e:r]"><ref r="{$i}"><xsl:apply-templates select="e:f/(e:s|e:r)"/></ref></xsl:if> </xsl:template> <xsl:template match="e:c"/> <xsl:template match="node()|@*"> <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> </xsl:template> </xsl:stylesheet>