Skip to content

Commit

Permalink
folia2html: handle t-ref #32
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Apr 8, 2021
1 parent d815b74 commit 45cdfb0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion foliatools/folia2html.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,10 @@
font-weight: bold;
background: #ddd;
}

span.ref {
text-decoration: underline;
color: blue;
}
div.note {
font-size: 80%;
border-bottom: 1px #ddd dotted;
Expand Down Expand Up @@ -622,6 +625,16 @@
<span class="gap"><xsl:apply-templates /></span>
</xsl:template>

<xsl:template match="folia:t-ref">
<xsl:choose>
<xsl:when test="@xlink:href">
<a href="{@xlink:href}"><span class="ref"><xsl:attribute name="title"><xsl:value-of select="@xlink:href"/></xsl:attribute><xsl:choose><xsl:when test="*"> <xsl:apply-templates /> </xsl:when> <xsl:otherwise><a href="#ref.{@id}">*</a></xsl:otherwise></xsl:choose></span></a>
</xsl:when>
<xsl:otherwise>
<span class="ref"><xsl:attribute name="title"><xsl:value-of select="./@id"/></xsl:attribute><xsl:choose><xsl:when test="*"> <xsl:apply-templates /> </xsl:when> <xsl:otherwise><a href="#ref.{@id}">*</a></xsl:otherwise></xsl:choose></span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template name="contentannotation_text">
<xsl:if test="folia:t">
Expand Down

0 comments on commit 45cdfb0

Please sign in to comment.