diff refs.xsl @ 22:ca98c74a7cb1

towards var handling, no lookup yet
author Henry S. Thompson <ht@markup.co.uk>
date Wed, 05 Apr 2017 11:57:00 +0100
parents f05f0d0ee296
children bfa38afaea63
line wrap: on
line diff
--- a/refs.xsl	Wed Apr 05 11:24:11 2017 +0100
+++ b/refs.xsl	Wed Apr 05 11:57:00 2017 +0100
@@ -9,14 +9,14 @@
  </xsl:template>
  
  <xsl:template match="s:c[s:f]">
-  <xsl:variable name="tokens" select="analyze-string(.,$pat)/xf:match/xf:group"/>
-  <xsl:if test="@r='B1'"><xsl:message><xsl:value-of select="$tokens/@nr"/></xsl:message>
+  <xsl:variable name="tokens" select="analyze-string(s:f/.,$pat)/xf:match/xf:group"/>
+  <xsl:if test="@r='B4'"><xsl:message><xsl:value-of select="$tokens/@nr"/></xsl:message>
 <xsl:message><xsl:value-of select="$tokens/."/></xsl:message>
   </xsl:if>
-  <xsl:if test="$tokens[@nr=8]">
+  <xsl:if test="$tokens[@nr=(7,8,9)]">
    <xsl:variable name="n" select="count($tokens)"/>
    <xsl:variable name="singles" select="for $i in (1 to $n)
-       return if ($tokens[$i][@nr=8] and not($tokens[$i - 1][@nr=10 and .=(':','!')]) and not($tokens[$i + 1][@nr=10 and .=':']))
+       return if ($tokens[$i][@nr=(8,9)] and not($tokens[$i - 1][@nr=10 and .=(':','!')]) and not($tokens[$i + 1][@nr=10 and .=':']))
             then translate($tokens[$i],'$','')
             else ()"/>
    <xsl:variable name="ranges" select="for $i in (1 to count($tokens))