Skip to content

Commit 6a36831

Browse files
committed
Fixed bracketing problem.
1 parent 765a3fc commit 6a36831

6 files changed

+53
-32
lines changed

htm-teigap.xsl

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@
1313
<!-- adds a newline character before gap-extent-line in DDbDP unless <lb/> present -->
1414
<br/>
1515
</xsl:if>
16-
<span dir="ltr" class="gap"><xsl:apply-imports/></span>
16+
<xsl:apply-imports/>
1717
</xsl:template>
1818

1919
<xsl:template match="t:gap">
20-
<span dir="ltr" class="gap"><xsl:apply-imports/></span>
20+
<xsl:apply-imports/>
21+
</xsl:template>
22+
23+
<xsl:template name="extent-string-wrapper">
24+
<span dir="ltr" class="gap"><xsl:call-template name="extent-string-content"/></span>
2125
</xsl:template>
2226

2327
</xsl:stylesheet>

htm-teispace.xsl

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
99
<xsl:param name="vacat"/>
1010
<xsl:param name="extent"/>
11-
1211
<xsl:choose>
1312
<xsl:when test="$parm-leiden-style = 'london'">
1413
<i dir="ltr">

htm-tpl-sqbrackets.xsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<bracket>⟦</bracket>
5959
</closingbrackets>
6060
</xsl:variable>
61-
<xsl:variable name="regex" select="concat('([^\]])[',string-join($closingadjacentbrackettypes//text(),''),']([',string-join($ignorableThingsBetweenAdjacentBrackets//text(),''),']*)[',string-join($openingadjacentbrackettypes//text(),''),']([^\[])')"/>
61+
<xsl:variable name="regex" select="concat('([^\]])[',string-join($closingadjacentbrackettypes//text(),''),']([',string-join($ignorableThingsBetweenAdjacentBrackets//text(),''),']*)[',string-join($openingadjacentbrackettypes//text(),''),']([^\[])?')"/>
6262

6363
<xsl:variable name="current" select="replace(normalize-space(.), $regex, '$1$2$3')" />
6464
<xsl:variable name="strlength" select="string-length($current)"/>

teigap.xsl

+13-4
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,21 @@
212212
</xsl:template>
213213

214214

215-
<xsl:template name="extent-string">
215+
<xsl:template name="extent-string">
216+
<xsl:param name="parm-edition-type" tunnel="yes" required="no"/>
217+
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"/>
218+
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"/>
219+
<!-- Found in htm|txt-teigap.xsl This allows, e.g. setting a text direction on the content. -->
220+
<xsl:call-template name="extent-string-wrapper"/>
221+
</xsl:template>
222+
223+
<xsl:template name="extent-string-content">
216224
<xsl:param name="parm-edition-type" tunnel="yes" required="no"/>
217225
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"/>
218226
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"/> <!-- added for creta -->
219227
<xsl:variable name="cur-dot" select="EDF:dotchar($parm-leiden-style,@reason)"/>
220228
<xsl:variable name="cur-max" select="EDF:dotmax($parm-leiden-style)"/>
229+
221230
<!-- Precision of <gap> defined -->
222231
<xsl:variable name="circa">
223232
<xsl:choose>
@@ -250,7 +259,7 @@
250259
</xsl:when>
251260
<!-- other reason illegible and lost/chars caught in the otherwise -->
252261
<xsl:otherwise>
253-
<xsl:text> -ca.?- </xsl:text>
262+
<xsl:text>&#x2066; -ca.?- &#x2069;</xsl:text>
254263
</xsl:otherwise>
255264
</xsl:choose>
256265
</xsl:when>
@@ -379,7 +388,7 @@
379388
</xsl:call-template>
380389
</xsl:when>
381390
<xsl:otherwise>
382-
<xsl:text> - - - </xsl:text>
391+
<xsl:text>&#x2066; - - - &#x2069;</xsl:text>
383392
</xsl:otherwise>
384393
</xsl:choose>
385394
</xsl:otherwise>
@@ -518,7 +527,7 @@
518527
</xsl:choose>
519528
</xsl:when>
520529
<xsl:otherwise>
521-
<xsl:text> - - - - - - - - - - </xsl:text>
530+
<xsl:text>&#x2066; - - - - - - - - - - &#x2069;</xsl:text>
522531
</xsl:otherwise>
523532
</xsl:choose>
524533
</xsl:when>

teispace.xsl

+29-24
Original file line numberDiff line numberDiff line change
@@ -47,41 +47,46 @@
4747
<xsl:otherwise>
4848
<xsl:choose>
4949
<xsl:when test="($parm-leiden-style = ('ddbdp','dclp','sammelbuch'))">
50-
<xsl:text> vac. </xsl:text>
51-
<xsl:choose>
50+
<xsl:variable name="content">
51+
<xsl:text>&#x2066; vac. </xsl:text>
52+
<xsl:choose>
5253
<xsl:when test="@quantity">
53-
<xsl:if test="@precision='low'">
54-
<xsl:text>ca. </xsl:text>
55-
</xsl:if>
56-
<xsl:value-of select="@quantity"/>
54+
<xsl:if test="@precision='low'">
55+
<xsl:text>ca. </xsl:text>
56+
</xsl:if>
57+
<xsl:value-of select="@quantity"/>
5758
</xsl:when>
5859
<xsl:when test="@atLeast and @atMost">
59-
<xsl:value-of select="@atLeast"/>
60-
<xsl:text>-</xsl:text>
61-
<xsl:value-of select="@atMost"/>
60+
<xsl:value-of select="@atLeast"/>
61+
<xsl:text>-</xsl:text>
62+
<xsl:value-of select="@atMost"/>
6263
</xsl:when>
6364
<xsl:when test="@atLeast ">
64-
<xsl:text>&#x2265;</xsl:text>
65-
<xsl:value-of select="@atLeast"/>
65+
<xsl:text>&#x2265;</xsl:text>
66+
<xsl:value-of select="@atLeast"/>
6667
</xsl:when>
6768
<xsl:when test="@atMost ">
68-
<xsl:text>&#x2264;</xsl:text>
69-
<xsl:value-of select="@atMost"/>
69+
<xsl:text>&#x2264;</xsl:text>
70+
<xsl:value-of select="@atMost"/>
7071
</xsl:when>
7172
<xsl:otherwise>
72-
<xsl:text>?</xsl:text>
73+
<xsl:text>? </xsl:text>
7374
</xsl:otherwise>
74-
</xsl:choose>
75-
<xsl:if test="@unit='line'">
76-
<xsl:text> line</xsl:text>
77-
<xsl:if test="@quantity > 1 or @extent='unknown' or @atLeast or @atMost">
78-
<xsl:text>s</xsl:text>
79-
</xsl:if>
75+
</xsl:choose>
76+
<xsl:if test="@unit='line'">
77+
<xsl:text> line</xsl:text>
78+
<xsl:if test="@quantity > 1 or @extent='unknown' or @atLeast or @atMost">
79+
<xsl:text>s</xsl:text>
8080
</xsl:if>
81-
82-
<xsl:if test="child::t:certainty[@match='..']">
83-
<xsl:text>(?)</xsl:text>
84-
</xsl:if>
81+
</xsl:if>
82+
<xsl:if test="child::t:certainty[@match='..']">
83+
<xsl:text>(?) </xsl:text>
84+
</xsl:if>
85+
<xsl:text>&#x2069;</xsl:text>
86+
</xsl:variable>
87+
<xsl:call-template name="space-content">
88+
<xsl:with-param name="vacat" select="$content"/>
89+
</xsl:call-template>
8590
</xsl:when>
8691

8792
<xsl:when test="$parm-leiden-style='london'">

txt-teigap.xsl

+4
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@
1515
<xsl:apply-imports/>
1616
</xsl:template>
1717

18+
<xsl:template name="extent-string-wrapper">
19+
<xsl:text>&#2066;</xsl:text><xsl:apply-imports/><xsl:text>&#2069;</xsl:text>
20+
</xsl:template>
21+
1822
</xsl:stylesheet>

0 commit comments

Comments
 (0)