Skip to content

Commit 9450dda

Browse files
committed
fixes to hyphen handling after square brackets
(1) exception for MedCyprus Leiden-style; (2) correction to bug in diplomatic handling of hyphens
1 parent 74238ef commit 9450dda

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

htm-teilb.xsl

+3-2
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,12 @@
8585
(tested by EDF:f-wwrap in functions.xsl, which is called by teisupplied.xsl, teig.xsl and teispace.xsl) -->
8686
<xsl:when
8787
test="
88-
preceding-sibling::node()[1][local-name() = 'space' or
88+
(preceding-sibling::node()[1][local-name() = 'space' or
8989
local-name() = 'g' or (local-name() = 'supplied' and @reason = 'lost') or
9090
(normalize-space(.) = ''
9191
and preceding-sibling::node()[1][local-name() = 'space' or
92-
local-name() = 'g' or (local-name() = 'supplied' and @reason = 'lost')])]"/>
92+
local-name() = 'g' or (local-name() = 'supplied' and @reason = 'lost')])])
93+
and not($parm-leiden-style='medcyprus')"/>
9394
<!-- *or unless* this break is accompanied by a paragraphos mark -->
9495
<!-- in which case the hypen will be inserted before the paragraphos by code in htm-teimilestone.xsl -->
9596
<xsl:when

teig.xsl

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
<xsl:template name="lb-dash">
55
<!-- function EDF:f-wwrap declared in functions.xsl; tests if lb break=no immediately follows g -->
6-
<xsl:if test="EDF:f-wwrap(.) = true()">
6+
<!-- UNLESS diplomatic -->
7+
<!-- or UNLESS project MedCyprus -->
8+
<xsl:if test="EDF:f-wwrap(.) = true() and not($parm-edition-type='diplomatic') and not($parm-leiden-style='medcyprus')">
79
<xsl:text>- </xsl:text>
810
</xsl:if>
911
</xsl:template>

teispace.xsl

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
<xsl:template match="t:space">
1111
<xsl:param name="parm-edition-type" tunnel="yes" required="no"/>
1212
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"/>
13-
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"/> <!-- function EDF:f-wwrap declared in functions.xsl; tests if lb break=no immediately follows space -->
14-
<xsl:if test="EDF:f-wwrap(.) = true()">
13+
<xsl:param name="parm-edn-structure" tunnel="yes" required="no"/>
14+
<!-- function EDF:f-wwrap declared in functions.xsl; tests if lb break=no immediately follows space -->
15+
<!-- UNLESS diplomatic -->
16+
<!-- or UNLESS project MedCyprus -->
17+
<xsl:if test="EDF:f-wwrap(.) = true() and not($parm-edition-type='diplomatic') and not($parm-leiden-style='medcyprus')">
1518
<xsl:text>- </xsl:text>
1619
</xsl:if>
1720
<xsl:choose>

teisupplied.xsl

+3-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@
8484
<!-- Found in tpl-cert-low.xsl -->
8585
<xsl:call-template name="cert-low"/>
8686
<!-- function EDF:f-wwrap declared in functions.xsl; tests if lb break=no immediately follows supplied -->
87-
<xsl:if test="EDF:f-wwrap(.) = true()">
87+
<!-- UNLESS diplomatic -->
88+
<!-- or UNLESS project MedCyprus -->
89+
<xsl:if test="EDF:f-wwrap(.) = true() and not($parm-edition-type='diplomatic') and not($parm-leiden-style='medcyprus')">
8890
<!-- unless this is in the app part of a choice/subst/app in ddbdp
8991
or an EDH leiden style, which doesn't use hyphens-->
9092
<xsl:if test="(not($parm-leiden-style=('ddbdp','dclp') and (ancestor::t:*[local-name()=('reg','corr','rdg')

0 commit comments

Comments
 (0)