Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Making ref matches more exact
  • Loading branch information
Klaus Thoden committed Nov 20, 2018
1 parent fc60b8a commit a03eaa5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tei2eoatex.xsl
Expand Up @@ -258,7 +258,13 @@ contexts, a double replacement is performed.
<xsl:text>}</xsl:text> <xsl:text>}</xsl:text>
</xsl:template> </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:text>\EOAref{</xsl:text>
<xsl:value-of select="substring-after(@target, '#')"/> <xsl:value-of select="substring-after(@target, '#')"/>
<xsl:text>}</xsl:text> <xsl:text>}</xsl:text>
Expand Down

0 comments on commit a03eaa5

Please sign in to comment.