diff 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 diff
--- a/ascii.xsl	Wed Apr 12 17:43:54 2017 +0100
+++ b/ascii.xsl	Wed Apr 12 21:35:04 2017 +0100
@@ -17,11 +17,12 @@
  </xsl:template>
  
  <xsl:template match="e:c">
-  <xsl:value-of select="if (text())
-                        then 
+  <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(.,'cdens','CDENS')
-                          else .
+                          then translate($v,'cdens','CDENS')
+                          else $v
                         else ' '"/>
  </xsl:template>
 </xsl:stylesheet>