Skip to content

Commit

Permalink
added xsl template for tei:quote
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Jul 16, 2014
1 parent 65329ec commit 279b8da
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion xsl/common_main.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@
</xsl:template>

<xsl:template match="tei:q" priority="0.5">
<!-- Surround with quotation marks -->
<!-- Always(!) surround with quotation marks -->
<xsl:choose>
<!-- German (double) quotation marks -->
<xsl:when test="$lang eq 'de'">
Expand All @@ -1026,6 +1026,38 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="tei:quote" priority="0.5">
<!-- Surround with quotation marks if @rend is set -->
<xsl:choose>
<!-- German double quotation marks -->
<xsl:when test="$lang eq 'de' and @rend='double-quotes'">
<xsl:text>&#x201E;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#x201C;</xsl:text>
</xsl:when>
<xsl:when test="$lang eq 'en' and @rend='double-quotes'">
<xsl:text>&#x201C;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#x201D;</xsl:text>
</xsl:when>
<!-- German single quotation marks -->
<xsl:when test="$lang eq 'de' and @rend='single-quotes'">
<xsl:text>&#x201A;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#x2018;</xsl:text>
</xsl:when>
<xsl:when test="$lang eq 'en' and @rend='single-quotes'">
<xsl:text>&#x2018;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#x2019;</xsl:text>
</xsl:when>
<!-- no quotation marks as default -->
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- Default template for TEI elements -->
<!-- will be turned into html:span with class tei_elementName_attributeRendValue -->
Expand Down

0 comments on commit 279b8da

Please sign in to comment.