Mercurial > hg > ooxml
comparison refs.xsl @ 40:ac6d1ca099f7
simplified rect output, refs (not refs2) working again
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Tue, 02 May 2017 09:20:13 +0100 |
parents | 468a6cf8bf0b |
children | 6ed900e8cc61 |
comparison
equal
deleted
inserted
replaced
39:4c6a341e75da | 40:ac6d1ca099f7 |
---|---|
1 <?xml version='1.0'?> | 1 <?xml version='1.0'?> |
2 <!DOCTYPE xsl:stylesheet SYSTEM "../../../lib/xml/xsl.dtd" > | 2 <!DOCTYPE xsl:stylesheet SYSTEM "../../../lib/xml/xsl.dtd" > |
3 <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"> | 3 <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"> |
4 | 4 |
5 <xsl:include href="a2n.xsl"/> | 5 <xsl:include href="n2a.xsl"/> |
6 | |
7 <xsl:param name="sheet-name"/> | |
8 | 6 |
9 <xsl:template match="/"> | 7 <xsl:template match="/"> |
10 <refs sheetName="{$sheet-name}"><xsl:apply-templates select="//s:c"/></refs> | 8 <refs><xsl:apply-templates select="//e:c"/></refs> |
11 </xsl:template> | 9 </xsl:template> |
12 | 10 |
13 <xsl:template match="e:c[e:f]"> | 11 <xsl:template match="e:c[e:f/(e:s|e:r)]"> |
14 <xsl:variable name="cr" select="e:cr(@r,0,0)"/> | 12 <xsl:variable name="r" select="../@r"/> |
15 <xsl:if test="@r='xxx'"><xsl:message><xsl:value-of select="count(e:f/*)"/>|</xsl:message> | 13 <xsl:variable name="c" select="@c"/> |
14 <xsl:if test="@r='xxx' and @c='1'"><xsl:message><xsl:value-of select="count(e:f/*)"/>|</xsl:message> | |
16 </xsl:if> | 15 </xsl:if> |
16 <ref r="{e:n2a($c)}{$r}"><xsl:apply-templates select="e:f/(e:s|e:r)"/></ref> | |
17 </xsl:template> | 17 </xsl:template> |
18 | 18 |
19 <xsl:template match="s:c"/> | 19 <xsl:template match="e:c"/> |
20 | |
21 <xsl:template match="node()|@*"> | |
22 <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> | |
23 </xsl:template> | |
20 </xsl:stylesheet> | 24 </xsl:stylesheet> |