Mercurial > hg > ooxml
comparison backref.xsl @ 59:f90bbd38b8f6
towards display of reffed info via colour
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Fri, 02 Jun 2017 12:54:54 +0100 |
parents | |
children | 588cb9ba7c9c |
comparison
equal
deleted
inserted
replaced
58:adeb9575b273 | 59:f90bbd38b8f6 |
---|---|
1 <?xml version='1.0'?> | |
2 <!DOCTYPE doc 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 xpf e" xmlns="http://www.w3.org/1999/xhtml" xmlns:xpf="http://www.w3.org/2005/xpath-functions"> | |
4 | |
5 <xsl:import href="n2a.xsl"/> | |
6 | |
7 <xsl:key name="fcell" match="e:c[@fi]" use="@r"/> | |
8 | |
9 <xsl:template match="e:i"> | |
10 <xsl:variable name="row" select="../../@r"/> | |
11 <xsl:variable name="col" select="../@c"/> | |
12 <xsl:variable name="r" select="concat(e:n2a($col),$row)"/> | |
13 <xsl:variable name="ris" select="for $r in e:r/text() | |
14 return key('fcell',$r)/@fi"/> | |
15 <xsl:copy> | |
16 <xsl:attribute name="ri"><xsl:value-of select="string-join($ris,',')"/></xsl:attribute> | |
17 <xsl:apply-templates select="node()|@*"/> | |
18 </xsl:copy> | |
19 </xsl:template> | |
20 | |
21 <xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> | |
22 </xsl:template> | |
23 | |
24 </xsl:stylesheet> |