Skip to content

Commit

Permalink
fixes for processing of tei:rs, closes #162
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Jan 17, 2017
1 parent d8e0046 commit 62c873e
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions xsl/common_link.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
thus exclude all elements with the following child elements
-->
<xsl:variable name="linkableElements" as="xs:string+" select="('persName', 'rs', 'workName', 'characterName', 'orgName', 'sic', 'del', 'add', 'subst', 'damage', 'choice', 'note', 'unclear', 'app')"/>

<!--
Need to distinguish between docTypes with support for single views and those with tooltips only
-->
<xsl:variable name="rs-types-with-link" as="xs:string+" select="('person', 'news', 'writing', 'letter', 'diaryDay', 'org', 'document')"/>
<!-- <xsl:variable name="rs-types-with-tooltip-only" as="xs:string+" select="('biblio', 'work')"/>-->


<!-- ********************************************* -->
Expand All @@ -23,23 +29,15 @@

<xsl:template match="tei:rs">
<xsl:choose>
<xsl:when test="$suppressLinks">
<xsl:when test="@key and not($suppressLinks) and (@type=$rs-types-with-link)">
<xsl:call-template name="createLink"/>
</xsl:when>
<xsl:when test="@key and not($suppressLinks) and not(@type=$rs-types-with-link)">
<xsl:call-template name="createSpan"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="matches(@type, '.+[yrnkg]s$|newsPl$')">
<!-- Pluralformen werden aktuell noch ausgespart-->
<xsl:call-template name="createSpan"/>
</xsl:when>
<xsl:when test="matches(@type, 'work|biblio')">
<!-- Für Werke und Bibliographische Objekte gibt es aktuell noch keine Einzelansicht, lediglich einen Tooltip -->
<xsl:call-template name="createSpan"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="createLink"/>
</xsl:otherwise>
</xsl:choose>
<!--<xsl:call-template name="createSpan"/>-->
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Expand Down Expand Up @@ -101,7 +99,8 @@
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<!--<xsl:apply-templates/>-->
<xsl:call-template name="createSpan"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Expand Down

0 comments on commit 62c873e

Please sign in to comment.