Skip to content

Commit 4b85f83

Browse files
authored
Merge pull request #763 from metanorma/update_pres_xml_part2
Update Presentation XML (part2)
2 parents 044f226 + 1cf5622 commit 4b85f83

File tree

2 files changed

+66
-35
lines changed

2 files changed

+66
-35
lines changed

xslt_src/common.xsl

+14-12
Original file line numberDiff line numberDiff line change
@@ -9356,7 +9356,7 @@
93569356
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
93579357
</xsl:if>
93589358
<xsl:value-of select="@reference"/>
9359-
<fo:inline font-weight="normal">)</fo:inline>
9359+
<!-- <fo:inline font-weight="normal">)</fo:inline> --> <!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
93609360
</fo:inline>
93619361
</fo:block>
93629362
</fo:list-item-label>
@@ -9395,9 +9395,10 @@
93959395
<fo:inline font-style="normal">)</fo:inline>
93969396
</xsl:if>
93979397

9398-
<xsl:if test="$namespace = 'itu'">
9398+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
9399+
<!-- <xsl:if test="$namespace = 'itu'">
93999400
<xsl:text>)</xsl:text>
9400-
</xsl:if>
9401+
</xsl:if> -->
94019402

94029403
<xsl:if test="$namespace = 'plateau'">
94039404
<xsl:text>:</xsl:text>
@@ -9415,7 +9416,7 @@
94159416

94169417
</xsl:if>
94179418
</xsl:for-each>
9418-
</xsl:template>
9419+
</xsl:template> <!-- table_fn_display -->
94199420

94209421
<xsl:template name="create_fn">
94219422
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -9457,7 +9458,7 @@
94579458
<!-- ============================ -->
94589459
<!-- figure's footnotes rendering -->
94599460
<!-- ============================ -->
9460-
<xsl:template name="fn_display_figure">
9461+
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
94619462

94629463
<!-- current figure id -->
94639464
<xsl:variable name="figure_id_">
@@ -9661,9 +9662,10 @@
96619662
<xsl:if test="$namespace = 'bsi'">
96629663
<xsl:text>)</xsl:text>
96639664
</xsl:if>
9664-
<xsl:if test="$namespace = 'jis'">
9665+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
9666+
<!-- <xsl:if test="$namespace = 'jis'">
96659667
<fo:inline font-weight="normal">)</fo:inline>
9666-
</xsl:if>
9668+
</xsl:if> -->
96679669
</fo:basic-link>
96689670
</fo:inline>
96699671
</xsl:template>
@@ -15638,7 +15640,7 @@
1563815640
<xsl:if test="normalize-space() != ''">
1563915641
<fo:inline xsl:use-attribute-sets="termexample-name-style">
1564015642
<xsl:call-template name="refine_termexample-name-style"/>
15641-
<xsl:apply-templates /><xsl:if test="$namespace = 'ieee' or $namespace = 'rsd'">: </xsl:if>
15643+
<xsl:apply-templates /><xsl:if test="$namespace = 'rsd'">: </xsl:if> <!-- commented $namespace = 'ieee', https://github.com/metanorma/isodoc/issues/614-->
1564215644
</fo:inline>
1564315645
</xsl:if>
1564415646
</xsl:template>
@@ -15841,7 +15843,7 @@
1584115843
<xsl:otherwise>
1584215844
<fo:inline xsl:use-attribute-sets="example-name-style">
1584315845
<xsl:call-template name="refine_example-name-style"/>
15844-
<xsl:apply-templates/><xsl:if test="$namespace = 'ieee' or $namespace = 'iho' or $namespace = 'ogc' or $namespace = 'rsd'">: </xsl:if>
15846+
<xsl:apply-templates/><xsl:if test="$namespace = 'iho' or $namespace = 'ogc' or $namespace = 'rsd'">: </xsl:if> <!-- $namespace = 'ieee', see https://github.com/metanorma/isodoc/issues/614 -->
1584515847
</fo:inline>
1584615848
</xsl:otherwise>
1584715849
</xsl:choose>
@@ -18654,9 +18656,9 @@
1865418656

1865518657
<xsl:if test="$namespace = 'iso'">
1865618658
<xsl:if test="@type != 'editorial'">
18657-
<xsl:call-template name="displayAdmonitionName">
18658-
<xsl:with-param name="sep"> — </xsl:with-param>
18659-
</xsl:call-template>
18659+
<xsl:call-template name="displayAdmonitionName"/>
18660+
<!-- https://github.com/metanorma/isodoc/issues/614 -->
18661+
<!-- <xsl:with-param name="sep"> — </xsl:with-param> -->
1866018662
</xsl:if>
1866118663
</xsl:if>
1866218664

xslt_src/itu.recommendation.core.xsl

+52-23
Original file line numberDiff line numberDiff line change
@@ -2107,19 +2107,25 @@
21072107
</fo:block>
21082108
<xsl:if test="$doctype != 'resolution'">
21092109
<fo:block font-size="12pt" font-weight="normal" margin-top="6pt">
2110-
<xsl:choose>
2110+
<!-- <xsl:choose>
21112111
<xsl:when test="parent::*[@obligation = 'informative']">
21122112
<xsl:text>(This appendix does not form an integral part of this Recommendation.)</xsl:text>
21132113
</xsl:when>
21142114
<xsl:otherwise>
21152115
<xsl:text>(This annex forms an integral part of this Recommendation.)</xsl:text>
21162116
</xsl:otherwise>
2117-
</xsl:choose>
2117+
</xsl:choose> -->
2118+
<!-- Added for https://github.com/metanorma/isodoc/issues/614 -->
2119+
<xsl:apply-templates select="following-sibling::itu:p[not(preceding-sibling::itu:clause)][starts-with(normalize-space(), '(')]/node()"/>
21182120
</fo:block>
21192121
</xsl:if>
21202122
</fo:block>
21212123
</xsl:template>
21222124

2125+
<!-- Added for https://github.com/metanorma/isodoc/issues/614 -->
2126+
<!-- renders in the annex/title template -->
2127+
<xsl:template match="itu:annex/itu:p[preceding-sibling::*[1][self::itu:title or self::itu:variant-title]][starts-with(normalize-space(), '(')]" priority="3"/>
2128+
21232129
<!-- Bibliography -->
21242130
<xsl:template match="itu:references[not(@normative='true')]/itu:title">
21252131
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
@@ -2261,32 +2267,50 @@
22612267
<xsl:call-template name="setStyle_preferred"/>
22622268
<xsl:apply-templates />
22632269
</fo:inline>
2264-
<xsl:if test="../itu:termsource/itu:origin">
2265-
<xsl:text>: </xsl:text>
2270+
<xsl:if test="../itu:termsource">
2271+
<!-- https://github.com/metanorma/isodoc/issues/614 -->
2272+
<!-- <xsl:text>: </xsl:text> -->
2273+
<xsl:text> </xsl:text>
22662274
<xsl:variable name="citeas" select="../itu:termsource/itu:origin/@citeas"/>
22672275
<xsl:variable name="bibitemid" select="../itu:termsource/itu:origin/@bibitemid"/>
22682276
<xsl:variable name="origin_text" select="normalize-space(../itu:termsource/itu:origin/text())"/>
22692277

2270-
<xsl:call-template name="insert_basic_link">
2271-
<xsl:with-param name="element">
2272-
<fo:basic-link internal-destination="{$bibitemid}" fox:alt-text="{$citeas}">
2273-
<xsl:choose>
2274-
<xsl:when test="$origin_text != ''">
2275-
<xsl:text> </xsl:text><xsl:apply-templates select="../itu:termsource/itu:origin/node()"/>
2276-
</xsl:when>
2277-
<xsl:when test="contains($citeas, '[')">
2278-
<xsl:text> </xsl:text><xsl:value-of select="$citeas"/> <!-- disable-output-escaping="yes" -->
2279-
</xsl:when>
2280-
<xsl:otherwise>
2281-
<xsl:text> [</xsl:text><xsl:value-of select="$citeas"/><xsl:text>]</xsl:text>
2282-
</xsl:otherwise>
2283-
</xsl:choose>
2284-
</fo:basic-link>
2285-
</xsl:with-param>
2286-
</xsl:call-template>
2278+
<xsl:choose>
2279+
<xsl:when test="$origin_text != '' or $citeas != ''">
2280+
<xsl:call-template name="insert_basic_link">
2281+
<xsl:with-param name="element">
2282+
<fo:basic-link internal-destination="{$bibitemid}" fox:alt-text="{$citeas}">
2283+
<xsl:choose>
2284+
<xsl:when test="$origin_text != ''">
2285+
<xsl:text> </xsl:text><xsl:apply-templates select="../itu:termsource/itu:origin/node()"/>
2286+
</xsl:when>
2287+
<!-- https://github.com/metanorma/isodoc/issues/614 -->
2288+
<!-- <xsl:when test="contains($citeas, '[')">
2289+
<xsl:text> </xsl:text><xsl:value-of select="$citeas"/>disable-output-escaping="yes"
2290+
</xsl:when>
2291+
<xsl:otherwise>
2292+
<xsl:text> [</xsl:text><xsl:value-of select="$citeas"/><xsl:text>]</xsl:text>
2293+
</xsl:otherwise> -->
2294+
<xsl:otherwise>
2295+
<xsl:text> </xsl:text><xsl:value-of select="$citeas"/>
2296+
</xsl:otherwise>
2297+
</xsl:choose>
2298+
</fo:basic-link>
2299+
</xsl:with-param>
2300+
</xsl:call-template>
2301+
</xsl:when>
2302+
<xsl:otherwise>
2303+
<xsl:apply-templates select="../itu:termsource">
2304+
<xsl:with-param name="process">true</xsl:with-param>
2305+
</xsl:apply-templates>
2306+
</xsl:otherwise>
2307+
</xsl:choose>
22872308
</xsl:if>
22882309
<xsl:if test="following-sibling::itu:definition/node()">
2289-
<xsl:text>: </xsl:text>
2310+
<xsl:if test="../itu:termsource">
2311+
<xsl:text>:</xsl:text>
2312+
</xsl:if>
2313+
<xsl:text> </xsl:text>
22902314
<!-- <xsl:apply-templates select="following-sibling::itu:definition/node()" mode="process"/> -->
22912315
<xsl:apply-templates select="following-sibling::itu:definition">
22922316
<xsl:with-param name="process">true</xsl:with-param>
@@ -2298,7 +2322,12 @@
22982322
</xsl:if> -->
22992323
</xsl:template> <!-- preferred -->
23002324

2301-
<xsl:template match="itu:term[itu:preferred]/itu:termsource" priority="2"/>
2325+
<xsl:template match="itu:term[itu:preferred]/itu:termsource" priority="2">
2326+
<xsl:param name="process">false</xsl:param>
2327+
<xsl:if test="$process = 'true'">
2328+
<xsl:apply-templates />
2329+
</xsl:if>
2330+
</xsl:template>
23022331

23032332
<xsl:template match="itu:term[itu:preferred]/itu:definition" priority="2">
23042333
<xsl:param name="process">false</xsl:param>

0 commit comments

Comments
 (0)