Skip to content

Commit

Permalink
Merge pull request #735 from rvdb/jTEI_OpenEditionSkipElements
Browse files Browse the repository at this point in the history
skip more unsupported OpenEdition elements
  • Loading branch information
HelenaSabel authored Feb 26, 2025
2 parents 38dc6f3 + d45ac42 commit f42a7cd
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions profiles/jtei/openedition/to.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
" use="local:map.styles(.)"/>

<!-- an index of <rendition> definitions that are in use in the input document -->
<xsl:key name="renditionsInUse" match="@rendition" use="substring-after(., '#')"/>
<xsl:key name="renditionsInUse" match="@rendition" use="tokenize(., '\s*#')"/>

<!-- a conversion table with <rendition> definitions for input elements that should be converted to <hi> -->
<xsl:variable name="hiConversion">
Expand Down Expand Up @@ -812,7 +812,7 @@

<xsl:template match="*[@rendition]" priority="-.5">
<hi>
<xsl:apply-templates select="@*"/>
<xsl:copy-of select="@rendition"/>
<xsl:call-template name="get.rendition"/>
<xsl:apply-templates/>
</hi>
Expand Down Expand Up @@ -994,8 +994,14 @@
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="tei:name[not(@rendition)]" priority="0">
<xsl:apply-templates/>
<xsl:template match="tei:name|tei:abbr|tei:placeName|tei:surname|tei:forename" priority="0">
<xsl:choose>
<xsl:when test="@rendition">
<xsl:next-match/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/></xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- ==== -->
Expand Down Expand Up @@ -1122,8 +1128,8 @@
<!-- for paragraph indentation
<xsl:when test="$node/self::tei:p[parent::tei:div]">p.indent</xsl:when>
-->

<xsl:otherwise><xsl:value-of select="$node/local-name()"/></xsl:otherwise>
<!-- <xsl:when test="$node/@rendition"><xsl:value-of select="replace($node/@rendition, '#', '')"/></xsl:when>
--> <xsl:otherwise><xsl:value-of select="$node/local-name()"/></xsl:otherwise>
</xsl:choose>
</xsl:function>

Expand Down

0 comments on commit f42a7cd

Please sign in to comment.