Skip to content

Commit

Permalink
more verbose output for page and column breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Jan 24, 2017
1 parent a4c8398 commit 3cbbb21
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions catalogues/dictionary_de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
<entry xml:id="diary">Tagebuch</entry>
<entry xml:id="diaries">Tagebücher</entry>
<entry xml:id="pageBreak">Seitenumbruch</entry>
<entry xml:id="columnBreak">Spaltenumbruch</entry>
<entry xml:id="prevDiaryDay">Vorausgehender Eintrag</entry>
<entry xml:id="nextDiaryDay">Folgender Eintrag</entry>
<entry xml:id="context">Kontext</entry>
Expand Down
1 change: 1 addition & 0 deletions catalogues/dictionary_en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
<entry xml:id="diary">Diary</entry>
<entry xml:id="diaries">Diaries</entry>
<entry xml:id="pageBreak">Pagebreak</entry>
<entry xml:id="columnBreak">Columnbreak</entry>
<entry xml:id="prevDiaryDay">Preceding entry</entry>
<entry xml:id="nextDiaryDay">Following entry</entry>
<entry xml:id="context">Context</entry>
Expand Down
24 changes: 20 additions & 4 deletions xsl/common_main.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,26 @@
</xsl:variable>
<!-- breaks are not allowed within lists as they are in TEI. We need to workaround this … -->
<xsl:element name="{if(parent::tei:list) then 'li' else 'span'}">
<xsl:attribute name="class" select="concat('tei_', local-name())"/>
<!-- breaks between block level elements -->
<xsl:if test="parent::tei:div or parent::tei:body">
<xsl:attribute name="class" select="concat('tei_', local-name(), '_block')"/>
<xsl:attribute name="class">
<xsl:text>tei_</xsl:text>
<xsl:value-of select="local-name()"/>
<!-- breaks between block level elements -->
<xsl:if test="parent::tei:div or parent::tei:body">
<xsl:text>_block</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:choose>
<xsl:when test="self::tei:pb">
<xsl:value-of select="wega:getLanguageString('pageBreak', $lang)"/>
</xsl:when>
<xsl:when test="self::tei:cb">
<xsl:value-of select="wega:getLanguageString('columnBreak', $lang)"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:if test="@facs">
<xsl:attribute name="data-facs" select="substring(@facs, 2)"/>
</xsl:if>
<xsl:choose>
<xsl:when test="@type='inWord'">
Expand Down

0 comments on commit 3cbbb21

Please sign in to comment.