Skip to content

Commit

Permalink
specific page numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
glorieux-f committed Mar 31, 2024
1 parent 3d87778 commit ec0cc00
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docx/tei_tmpl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ s#</(bg|color|font|mark)_[^>]+>#</hi>#g
<xsl:template match="tei:sub">
<xsl:choose>
<!-- Specific to "Classiques des Sciences Sociales", original page number -->
<xsl:when test="translate(., ' .0123456789IVXLC', '')='p'">
<xsl:variable name="n" select="normalize-space(translate(., ' .p', ''))"/>
<xsl:when test="translate(., '  .0123456789IVXLC', '')='p'">
<xsl:variable name="n" select="normalize-space(translate(., ' .p', ' '))"/>
<pb ana="src" n="{$n}">
<xsl:attribute name="xml:id">
<xsl:text>p</xsl:text>
Expand Down Expand Up @@ -292,6 +292,9 @@ s#</(bg|color|font|mark)_[^>]+>#</hi>#g
</xsl:attribute>
</pb>
</xsl:when>
<xsl:when test="contains(., '###')">
<pb n="###"/>
</xsl:when>
<xsl:otherwise>
<pb n="{normalize-space(translate(., '[]', ''))}"/>
</xsl:otherwise>
Expand Down

0 comments on commit ec0cc00

Please sign in to comment.