annotate ascii.xsl @ 44:5b2333e59d91

updated html, ascii output to new raw doctype
author Henry S. Thompson <ht@markup.co.uk>
date Sun, 07 May 2017 11:56:02 +0100
parents 93fd0d532754
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
1 <?xml version='1.0'?>
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
2 <!DOCTYPE doc SYSTEM "../../../lib/xml/xsl.dtd" >
44
5b2333e59d91 updated html, ascii output to new raw doctype
Henry S. Thompson <ht@markup.co.uk>
parents: 34
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 xpf e" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xpf="http://www.w3.org/2005/xpath-functions">
14
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
4 <xsl:strip-space elements="e:a"/>
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
5 <xsl:output omit-xml-declaration="yes"/>
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
6
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
7 <xsl:template match="e:a">
15
e767bef35bb9 default to ascii, but accept html.xsl for pretty
Henry S. Thompson <ht@markup.co.uk>
parents: 14
diff changeset
8 <e:a>
e767bef35bb9 default to ascii, but accept html.xsl for pretty
Henry S. Thompson <ht@markup.co.uk>
parents: 14
diff changeset
9 <xsl:text>&#10;</xsl:text>
e767bef35bb9 default to ascii, but accept html.xsl for pretty
Henry S. Thompson <ht@markup.co.uk>
parents: 14
diff changeset
10 <xsl:apply-templates select="*"/>
e767bef35bb9 default to ascii, but accept html.xsl for pretty
Henry S. Thompson <ht@markup.co.uk>
parents: 14
diff changeset
11 </e:a>
14
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
12 </xsl:template>
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
13
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
14 <xsl:template match="e:r">
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
15 <xsl:apply-templates/>
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
16 <xsl:text>&#10;</xsl:text>
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
17 </xsl:template>
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
18
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
19 <xsl:template match="e:c">
44
5b2333e59d91 updated html, ascii output to new raw doctype
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
20 <xsl:value-of select="if (@t or text())
34
93fd0d532754 fix bug in refs wrt e.g. [1]!.SGX,
Henry S. Thompson <ht@markup.co.uk>
parents: 15
diff changeset
21 then
44
5b2333e59d91 updated html, ascii output to new raw doctype
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
22 let $v := if (@t) then @t else text() return
5b2333e59d91 updated html, ascii output to new raw doctype
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
23 if (e:f)
34
93fd0d532754 fix bug in refs wrt e.g. [1]!.SGX,
Henry S. Thompson <ht@markup.co.uk>
parents: 15
diff changeset
24 then translate($v,'cdens','CDENS')
93fd0d532754 fix bug in refs wrt e.g. [1]!.SGX,
Henry S. Thompson <ht@markup.co.uk>
parents: 15
diff changeset
25 else $v
14
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
26 else ' '"/>
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
27 </xsl:template>
261e439a19fb use UC for computed cells
Henry S. Thompson <ht@markup.co.uk>
parents:
diff changeset
28 </xsl:stylesheet>