Skip to content

Commit

Permalink
Some improvements to transcript XSL
Browse files Browse the repository at this point in the history
  • Loading branch information
berndmoos committed Dec 16, 2024
1 parent 1b01988 commit 8ce9425
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions src/main/java/org/zumult/io/isotei2html_table.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
exclude-result-prefixes="xs"
version="2.0">

<xsl:output method="xhtml" omit-xml-declaration="yes" indent="no"/>
<xsl:output method="xml" omit-xml-declaration="yes" indent="no"/>
<xsl:strip-space elements="*"/>

<!-- whether to include a column for the dropdown menu -->
Expand Down Expand Up @@ -247,10 +247,17 @@
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<xsl:if test="not(following-sibling::*[1][self::tei:pc]) and following-sibling::*">
<xsl:text> </xsl:text>
</xsl:if>
</span>
</xsl:template>

<xsl:template match="tei:pc">
<xsl:apply-templates/>
<xsl:text> </xsl:text>
</xsl:template>

<xsl:template match="tei:w/text()">
<!-- inside overlap? -->
<xsl:choose>
Expand Down Expand Up @@ -335,19 +342,28 @@
</tr>
</xsl:template>

<xsl:template match="tei:seg[@type='utterance']">
<xsl:template match="tei:seg[parent::tei:seg and not(child::tei:seg)]">
<xsl:apply-templates/>
<xsl:choose>
<xsl:when test="@subtype='interrogative'">
<xsl:when test="@type='utterance' and @subtype='interrogative'">
<xsl:text>? </xsl:text>
</xsl:when>
<xsl:when test="@subtype='interrupted'">
<xsl:when test="@type='utterance' and @subtype='interrupted'">
<xsl:text>... </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:when test="@type='utterance' and @subtype='modeless'">
<xsl:text>&#x02d9; </xsl:text>
</xsl:when>
<xsl:when test="@type='utterance' and @subtype='declarative'">
<xsl:text>. </xsl:text>
</xsl:otherwise>
</xsl:when>
<xsl:when test="@type='utterance' and @subtype='exclamative'">
<xsl:text>! </xsl:text>
</xsl:when>
</xsl:choose>
<xsl:if test="following-sibling::tei:seg">
<br/>
</xsl:if>
</xsl:template>

<!-- to do : highlight -->
Expand Down Expand Up @@ -381,6 +397,7 @@
</xsl:template>



<xsl:template match="tei:anchor[@type]">
<xsl:choose>
<xsl:when test="@type='ol-start'"><span class="ol-marker">[</span></xsl:when>
Expand Down

0 comments on commit 8ce9425

Please sign in to comment.