Permalink
Browse files

Making ref matches more exact

  • Loading branch information...
kthoden committed Nov 20, 2018
1 parent fc60b8a commit a03eaa56a6881ef1bfa5dd8a0f53e0d532088374
Showing with 7 additions and 1 deletion.
  1. +7 −1 tei2eoatex.xsl
@@ -258,7 +258,13 @@ contexts, a double replacement is performed.
<xsl:text>}</xsl:text>
</xsl:template>

<xsl:template match="//tei:body//tei:ref[starts-with(@type, 'number')]">
<xsl:template match="//tei:body//tei:ref[@type='number-hi']">
<!-- target="#chap02_fig13-hi -->
<xsl:value-of select="replace(@target, '#chap[0-9]{1,2}_fig([0-9]{1,2})(-hi)?', '$1')"/>
<!-- <xsl:value-of select="substring-after(@target, '#')"/> -->
</xsl:template>

<xsl:template match="//tei:body//tei:ref[@type='number']">
<xsl:text>\EOAref{</xsl:text>
<xsl:value-of select="substring-after(@target, '#')"/>
<xsl:text>}</xsl:text>

0 comments on commit a03eaa5

Please sign in to comment.