annotate refs.xsl @ 73:4bd5de7ac247

added Range, M and RC
author Henry S. Thompson <ht@markup.co.uk>
date Mon, 03 Jul 2017 16:25:49 +0100
parents 3e9a3e51627e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17
a874f2a81ed2 default vis pipeline to raw xml, start extracting refs
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
1 <?xml version='1.0'?>
37
ac3cd8de7a10 towards big rework of tokenisation
Henry S. Thompson <ht@markup.co.uk>
parents: 36
diff changeset
2 <!DOCTYPE xsl:stylesheet SYSTEM "../../../lib/xml/xsl.dtd" >
23
bfa38afaea63 change to default ns
Henry S. Thompson <ht@markup.co.uk>
parents: 22
diff changeset
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">
38
468a6cf8bf0b big change wrt formulae compiles, crashes
Henry S. Thompson <ht@markup.co.uk>
parents: 37
diff changeset
4
40
ac6d1ca099f7 simplified rect output, refs (not refs2) working again
Henry S. Thompson <ht@markup.co.uk>
parents: 38
diff changeset
5 <xsl:include href="n2a.xsl"/>
28
c56a2e6990bd convert tokenisation to a function, so can make recursive
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
6
17
a874f2a81ed2 default vis pipeline to raw xml, start extracting refs
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
7 <xsl:template match="/">
40
ac6d1ca099f7 simplified rect output, refs (not refs2) working again
Henry S. Thompson <ht@markup.co.uk>
parents: 38
diff changeset
8 <refs><xsl:apply-templates select="//e:c"/></refs>
17
a874f2a81ed2 default vis pipeline to raw xml, start extracting refs
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
9 </xsl:template>
a874f2a81ed2 default vis pipeline to raw xml, start extracting refs
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
10
45
6ed900e8cc61 towards comparable formulae
Henry S. Thompson <ht@markup.co.uk>
parents: 40
diff changeset
11 <xsl:template match="e:c[e:f]">
40
ac6d1ca099f7 simplified rect output, refs (not refs2) working again
Henry S. Thompson <ht@markup.co.uk>
parents: 38
diff changeset
12 <xsl:variable name="r" select="../@r"/>
ac6d1ca099f7 simplified rect output, refs (not refs2) working again
Henry S. Thompson <ht@markup.co.uk>
parents: 38
diff changeset
13 <xsl:variable name="c" select="@c"/>
45
6ed900e8cc61 towards comparable formulae
Henry S. Thompson <ht@markup.co.uk>
parents: 40
diff changeset
14 <xsl:variable name="i" select="concat(e:n2a($c),$r)"/>
40
ac6d1ca099f7 simplified rect output, refs (not refs2) working again
Henry S. Thompson <ht@markup.co.uk>
parents: 38
diff changeset
15 <xsl:if test="@r='xxx' and @c='1'"><xsl:message><xsl:value-of select="count(e:f/*)"/>|</xsl:message>
21
f05f0d0ee296 fix false positives
Henry S. Thompson <ht@markup.co.uk>
parents: 18
diff changeset
16 </xsl:if>
47
3e9a3e51627e explicit form match working, but shared still needs work
Henry S. Thompson <ht@markup.co.uk>
parents: 46
diff changeset
17 <nf r="{$i}"><xsl:value-of select="e:nf/text()"/></nf>
46
8dd54346bfd8 tabulate unique normalised formulae
Henry S. Thompson <ht@markup.co.uk>
parents: 45
diff changeset
18 <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>
17
a874f2a81ed2 default vis pipeline to raw xml, start extracting refs
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
19 </xsl:template>
18
16bba7a0d0bd one form of refs output, not sure it's what is wanted...
Henry S. Thompson <ht@markup.co.uk>
parents: 17
diff changeset
20
40
ac6d1ca099f7 simplified rect output, refs (not refs2) working again
Henry S. Thompson <ht@markup.co.uk>
parents: 38
diff changeset
21 <xsl:template match="e:c"/>
ac6d1ca099f7 simplified rect output, refs (not refs2) working again
Henry S. Thompson <ht@markup.co.uk>
parents: 38
diff changeset
22
ac6d1ca099f7 simplified rect output, refs (not refs2) working again
Henry S. Thompson <ht@markup.co.uk>
parents: 38
diff changeset
23 <xsl:template match="node()|@*">
ac6d1ca099f7 simplified rect output, refs (not refs2) working again
Henry S. Thompson <ht@markup.co.uk>
parents: 38
diff changeset
24 <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
ac6d1ca099f7 simplified rect output, refs (not refs2) working again
Henry S. Thompson <ht@markup.co.uk>
parents: 38
diff changeset
25 </xsl:template>
17
a874f2a81ed2 default vis pipeline to raw xml, start extracting refs
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
26 </xsl:stylesheet>