view ascii.xsl @ 34:93fd0d532754

fix bug in refs wrt e.g. [1]!.SGX, adapt html and ascii to new-format refs, move a2n and n2a into separate files for re-use
author Henry S. Thompson <ht@markup.co.uk>
date Wed, 12 Apr 2017 21:35:04 +0100
parents e767bef35bb9
children 5b2333e59d91
line wrap: on
line source

<?xml version='1.0'?>
<!DOCTYPE doc 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 xpf" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xpf="http://www.w3.org/2005/xpath-functions">
 <xsl:strip-space elements="e:a"/>
 <xsl:output omit-xml-declaration="yes"/>

 <xsl:template match="e:a">
  <e:a>
   <xsl:text>&#10;</xsl:text>
   <xsl:apply-templates select="*"/>
  </e:a>
 </xsl:template>
 
 <xsl:template match="e:r">
  <xsl:apply-templates/>
  <xsl:text>&#10;</xsl:text>
 </xsl:template>
 
 <xsl:template match="e:c">
  <xsl:value-of select="if (e:t)
                        then
                          let $v := if (e:t/@c) then e:t/@c else e:t return 
                          if (@f)
                          then translate($v,'cdens','CDENS')
                          else $v
                        else ' '"/>
 </xsl:template>
</xsl:stylesheet>