metanorma-iho 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -137,89 +137,89 @@
137
137
  <xsl:with-param name="contents" select="$contents"/>
138
138
  </xsl:call-template>
139
139
 
140
- <!-- =========================== -->
141
- <!-- Cover Page -->
142
- <fo:page-sequence master-reference="cover">
143
- <fo:flow flow-name="xsl-region-body">
144
- <fo:block-container position="absolute" left="14.25mm" top="12mm" id="__internal_layout__coverpage_{generate-id()}">
145
- <fo:table table-layout="fixed" width="181.1mm">
146
- <fo:table-column column-width="26mm"/>
147
- <fo:table-column column-width="19.4mm"/>
148
- <fo:table-column column-width="135.7mm"/>
149
- <fo:table-body>
150
- <fo:table-row>
151
- <fo:table-cell><fo:block> </fo:block></fo:table-cell>
152
- <fo:table-cell>
153
- <fo:block-container width="19.4mm" height="21mm" background-color="rgb(241, 234, 202)" border-bottom="0.05pt solid rgb(0, 21, 50)" text-align="center" display-align="center" font-size="10pt" font-weight="bold">
154
- <fo:block>
155
- <xsl:value-of select="$docidentifier"/>
140
+ <xsl:variable name="updated_xml">
141
+ <xsl:call-template name="updateXML"/>
142
+ </xsl:variable>
143
+
144
+ <xsl:for-each select="xalan:nodeset($updated_xml)/*">
145
+
146
+ <!-- =========================== -->
147
+ <!-- Cover Page -->
148
+ <fo:page-sequence master-reference="cover">
149
+ <fo:flow flow-name="xsl-region-body">
150
+ <fo:block-container position="absolute" left="14.25mm" top="12mm" id="__internal_layout__coverpage_{generate-id()}">
151
+ <fo:table table-layout="fixed" width="181.1mm">
152
+ <fo:table-column column-width="26mm"/>
153
+ <fo:table-column column-width="19.4mm"/>
154
+ <fo:table-column column-width="135.7mm"/>
155
+ <fo:table-body>
156
+ <fo:table-row>
157
+ <fo:table-cell><fo:block> </fo:block></fo:table-cell>
158
+ <fo:table-cell>
159
+ <fo:block-container width="19.4mm" height="21mm" background-color="rgb(241, 234, 202)" border-bottom="0.05pt solid rgb(0, 21, 50)" text-align="center" display-align="center" font-size="10pt" font-weight="bold">
160
+ <fo:block>
161
+ <xsl:value-of select="$docidentifier"/>
162
+ </fo:block>
163
+ </fo:block-container>
164
+ </fo:table-cell>
165
+ <fo:table-cell><fo:block> </fo:block></fo:table-cell>
166
+ </fo:table-row>
167
+ <fo:table-row>
168
+ <fo:table-cell display-align="after" text-align="right">
169
+ <fo:block font-size="1">
170
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-IHO))}" width="25.9mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image IHO"/>
156
171
  </fo:block>
157
- </fo:block-container>
158
- </fo:table-cell>
159
- <fo:table-cell><fo:block> </fo:block></fo:table-cell>
160
- </fo:table-row>
161
- <fo:table-row>
162
- <fo:table-cell display-align="after" text-align="right">
163
- <fo:block font-size="1">
164
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-IHO))}" width="25.9mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image IHO"/>
165
- </fo:block>
166
- </fo:table-cell>
167
- <fo:table-cell number-columns-spanned="2" border="0.5pt solid rgb(0, 21, 50)" font-weight="bold" color="rgb(0, 0, 76)" padding-top="3mm">
168
- <fo:block-container height="165mm" width="115mm">
169
- <fo:block-container margin-left="10mm">
170
- <fo:block-container margin-left="0mm">
171
- <fo:block-container display-align="center" height="90mm">
172
- <fo:block font-size="28pt" role="H1" line-height="115%">
173
- <xsl:copy-of select="$title-en"/>
172
+ </fo:table-cell>
173
+ <fo:table-cell number-columns-spanned="2" border="0.5pt solid rgb(0, 21, 50)" font-weight="bold" color="rgb(0, 0, 76)" padding-top="3mm">
174
+ <fo:block-container height="165mm" width="115mm">
175
+ <fo:block-container margin-left="10mm">
176
+ <fo:block-container margin-left="0mm">
177
+ <fo:block-container display-align="center" height="90mm">
178
+ <fo:block font-size="28pt" role="H1" line-height="115%">
179
+ <xsl:copy-of select="$title-en"/>
180
+ </fo:block>
181
+ </fo:block-container>
182
+ <fo:block font-size="14pt">
183
+ <xsl:value-of select="$edition"/>
184
+ <xsl:if test="normalize-space($month_year) != ''">
185
+ <xsl:text> – </xsl:text>
186
+ <xsl:value-of select="$month_year"/>
187
+ </xsl:if>
174
188
  </fo:block>
175
189
  </fo:block-container>
176
- <fo:block font-size="14pt">
177
- <xsl:value-of select="$edition"/>
178
- <xsl:if test="normalize-space($month_year) != ''">
179
- <xsl:text> – </xsl:text>
180
- <xsl:value-of select="$month_year"/>
181
- </xsl:if>
182
- </fo:block>
183
190
  </fo:block-container>
184
191
  </fo:block-container>
185
- </fo:block-container>
186
- </fo:table-cell>
187
- </fo:table-row>
188
- <fo:table-row>
189
- <fo:table-cell>
190
- <fo:block font-size="1">
191
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo-IHO))}" width="25.9mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IHO"/>
192
- </fo:block>
193
- </fo:table-cell>
194
- <fo:table-cell>
195
- <fo:block font-size="1">
196
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Text-IHO))}" width="25.8mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Text IHO"/>
197
- </fo:block>
198
- </fo:table-cell>
199
- <fo:table-cell>
200
- <fo:block-container width="79mm" height="72mm" margin-left="56.8mm" background-color="rgb(0, 172, 158)" text-align="right" display-align="after">
201
- <fo:block-container margin-left="0mm">
202
- <fo:block font-size="8pt" color="white" margin-right="5mm" margin-bottom="5mm" line-height-shift-adjustment="disregard-shifts">
203
- <xsl:apply-templates select="/iho:iho-standard/iho:boilerplate/iho:feedback-statement"/>
204
- </fo:block>
192
+ </fo:table-cell>
193
+ </fo:table-row>
194
+ <fo:table-row>
195
+ <fo:table-cell>
196
+ <fo:block font-size="1">
197
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo-IHO))}" width="25.9mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IHO"/>
198
+ </fo:block>
199
+ </fo:table-cell>
200
+ <fo:table-cell>
201
+ <fo:block font-size="1">
202
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Text-IHO))}" width="25.8mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Text IHO"/>
203
+ </fo:block>
204
+ </fo:table-cell>
205
+ <fo:table-cell>
206
+ <fo:block-container width="79mm" height="72mm" margin-left="56.8mm" background-color="rgb(0, 172, 158)" text-align="right" display-align="after">
207
+ <fo:block-container margin-left="0mm">
208
+ <fo:block font-size="8pt" color="white" margin-right="5mm" margin-bottom="5mm" line-height-shift-adjustment="disregard-shifts">
209
+ <xsl:apply-templates select="/iho:iho-standard/iho:boilerplate/iho:feedback-statement"/>
210
+ </fo:block>
211
+ </fo:block-container>
205
212
  </fo:block-container>
206
- </fo:block-container>
207
- </fo:table-cell>
208
- </fo:table-row>
209
- </fo:table-body>
210
- </fo:table>
211
- </fo:block-container>
212
- </fo:flow>
213
- </fo:page-sequence>
214
- <!-- End Cover Page -->
215
- <!-- =========================== -->
216
- <!-- =========================== -->
217
-
218
- <xsl:variable name="updated_xml">
219
- <xsl:call-template name="updateXML"/>
220
- </xsl:variable>
221
-
222
- <xsl:for-each select="xalan:nodeset($updated_xml)/*">
213
+ </fo:table-cell>
214
+ </fo:table-row>
215
+ </fo:table-body>
216
+ </fo:table>
217
+ </fo:block-container>
218
+ </fo:flow>
219
+ </fo:page-sequence>
220
+ <!-- End Cover Page -->
221
+ <!-- =========================== -->
222
+ <!-- =========================== -->
223
223
 
224
224
  <xsl:variable name="updated_xml_with_pages">
225
225
  <xsl:call-template name="processPrefaceAndMainSectionsDefault_items"/>
@@ -386,19 +386,19 @@
386
386
 
387
387
  <xsl:template match="iho:preface//iho:clause[@type = 'toc']" priority="4">
388
388
  <!-- Table of Contents -->
389
- <fo:block role="TOC">
389
+ <fo:block>
390
390
 
391
391
  <xsl:apply-templates/>
392
392
 
393
- <!-- <xsl:if test="$debug = 'true'">
394
- <redirect:write file="contents_{java:getTime(java:java.util.Date.new())}.xml">
393
+ <xsl:if test="$debug = 'true'">
394
+ <redirect:write file="contents_.xml"> <!-- {java:getTime(java:java.util.Date.new())} -->
395
395
  <xsl:copy-of select="$contents"/>
396
396
  </redirect:write>
397
- </xsl:if> -->
397
+ </xsl:if>
398
398
 
399
399
  <xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
400
400
 
401
- <fo:block line-height="115%">
401
+ <fo:block line-height="115%" role="TOC">
402
402
 
403
403
  <xsl:for-each select="$contents//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
404
404
  <fo:block role="TOCI">
@@ -466,8 +466,8 @@
466
466
  </xsl:template>
467
467
 
468
468
  <xsl:template match="iho:preface//iho:clause[@type = 'toc']/iho:title" priority="3">
469
- <fo:block font-weight="bold" margin-bottom="7.5pt" role="H1" font-size="12pt" margin-top="4pt">
470
- <fo:block-container width="18.3mm" border-bottom="1.25pt solid black">
469
+ <fo:block font-weight="bold" margin-bottom="7.5pt" font-size="12pt" margin-top="4pt" role="SKIP">
470
+ <fo:block-container width="18.3mm" border-bottom="1.25pt solid black" role="SKIP">
471
471
  <fo:block line-height="75%">
472
472
  <!-- <xsl:call-template name="getLocalizedString">
473
473
  <xsl:with-param name="key">table_of_contents</xsl:with-param>
@@ -483,10 +483,10 @@
483
483
  <!-- ============================= -->
484
484
 
485
485
  <!-- element with title -->
486
- <xsl:template match="*[iho:title]" mode="contents">
486
+ <xsl:template match="*[iho:title or iho:fmt-title]" mode="contents">
487
487
  <xsl:variable name="level">
488
488
  <xsl:call-template name="getLevel">
489
- <xsl:with-param name="depth" select="iho:title/@depth"/>
489
+ <xsl:with-param name="depth" select="iho:fmt-title/@depth | iho:title/@depth"/>
490
490
  </xsl:call-template>
491
491
  </xsl:variable>
492
492
 
@@ -881,7 +881,7 @@
881
881
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAN8AAADfCAIAAAD5m5F7AAAAAXNSR0IArs4c6QAAAAlwSFlzAAAh1QAAIdUBBJy0nQAAPjlJ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RlR7jxGJdIYB1BbeQkumxo6QqDfbKOiz143yp3HULz2/PdnL4UQFKYERGLSVZgVJmWJkQQIOsVIWRLHKkGnxKlcjCpM0ClGypI4Vgk6JU7lYlRhgk4xUpbEsUrQKXEqF6MKE3SKkbIkjlWCTolTuRhVmKBTjJQlcawSdEqcysWowgSdYqQsiWOVoFPiVC5GFSboFCNlSRyrBJ0Sp3IxqjBBpxgpS+JYJeiUOJWLUYUJOsVIWRLHKkGnxKlcjCpM0ClGypI4Vgk6JU7lYlRhgk4xUpbEsUrQKXEqF6MKE3SKkbIkjlWCTolTuRhVmKBTjJQlcawSdEqcysWowgSdYqQsiWOVoFPiVC5GFSboFCNlSRyrBJ0Sp3IxqjBBpxgpS+JYJeiUOJWLUYUJOsVIWRLHKkGnxKlcjCpM0ClGypI4Vgk6JU7lYlRhgk4xUpbEsUrQKXEqF6MKE3SKkbIkjlWCTolTuRhVmKBTjJQlcawSdEqcysWowgSdYqQsiWOVoFPiVC5GFSboFCNlSRyrBJ0Sp3IxqjBBpxgpS+JYJeiUOJWLUYUJOsVIWRLHKkGnxKlcjCpM0ClGypI4Vgk6JU7lYlRhgk4xUpbEsUrQKXEqF6MKE3SKkbIkjlWCTolTuRhVmKBTjJQlcawSdEqcysWowgSdYqQsiWP1f5V8zYCHJlYcAAAAAElFTkSuQmCC</xsl:text>
882
882
  </xsl:variable>
883
883
 
884
- <xsl:strip-space elements="iho:xref"/>
884
+ <!-- <xsl:strip-space elements="iho:xref"/> -->
885
885
 
886
886
  <xsl:variable name="namespace_full" select="namespace-uri(/*)"/> <!-- example: https://www.metanorma.org/ns/iso -->
887
887
  <xsl:variable name="root_element" select="local-name(/*)"/> <!-- example: iso-standard -->
@@ -1868,6 +1868,10 @@
1868
1868
 
1869
1869
  <xsl:template name="refine_termnote-name-style">
1870
1870
 
1871
+ <!-- <xsl:if test="$namespace = 'ieee'">
1872
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
1873
+ </xsl:if> -->
1874
+
1871
1875
  </xsl:template>
1872
1876
 
1873
1877
  <xsl:attribute-set name="termnote-p-style">
@@ -2551,9 +2555,21 @@
2551
2555
  <xsl:template name="processTables_Contents">
2552
2556
  <tables>
2553
2557
  <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
2554
- <table id="{@id}" alt-text="{*[local-name() = 'name']}">
2555
- <xsl:copy-of select="*[local-name() = 'name']"/>
2556
- </table>
2558
+ <xsl:choose>
2559
+ <xsl:when test="*[local-name() = 'fmt-name']">
2560
+ <xsl:variable name="fmt_name">
2561
+ <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
2562
+ </xsl:variable>
2563
+ <table id="{@id}" alt-text="{normalize-space($fmt_name)}">
2564
+ <xsl:copy-of select="$fmt_name"/>
2565
+ </table>
2566
+ </xsl:when>
2567
+ <xsl:otherwise>
2568
+ <table id="{@id}" alt-text="{*[local-name() = 'name']}">
2569
+ <xsl:copy-of select="*[local-name() = 'name']"/>
2570
+ </table>
2571
+ </xsl:otherwise>
2572
+ </xsl:choose>
2557
2573
  </xsl:for-each>
2558
2574
  </tables>
2559
2575
  </xsl:template>
@@ -2561,9 +2577,21 @@
2561
2577
  <xsl:template name="processFigures_Contents">
2562
2578
  <figures>
2563
2579
  <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
2564
- <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
2565
- <xsl:copy-of select="*[local-name() = 'name']"/>
2566
- </figure>
2580
+ <xsl:choose>
2581
+ <xsl:when test="*[local-name() = 'fmt-name']">
2582
+ <xsl:variable name="fmt_name">
2583
+ <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
2584
+ </xsl:variable>
2585
+ <figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
2586
+ <xsl:copy-of select="$fmt_name"/>
2587
+ </figure>
2588
+ </xsl:when>
2589
+ <xsl:otherwise>
2590
+ <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
2591
+ <xsl:copy-of select="*[local-name() = 'name']"/>
2592
+ </figure>
2593
+ </xsl:otherwise>
2594
+ </xsl:choose>
2567
2595
  </xsl:for-each>
2568
2596
  </figures>
2569
2597
  </xsl:template>
@@ -7385,6 +7413,8 @@
7385
7413
 
7386
7414
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7387
7415
 
7416
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
7417
+
7388
7418
  <xsl:call-template name="refine_note-name-style"/>
7389
7419
 
7390
7420
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
@@ -7441,10 +7471,6 @@
7441
7471
 
7442
7472
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
7443
7473
 
7444
- <xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
7445
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
7446
- </xsl:if>
7447
-
7448
7474
  <xsl:call-template name="refine_termnote-name-style"/>
7449
7475
 
7450
7476
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
@@ -7591,17 +7617,29 @@
7591
7617
  <!-- Example: Dimensions in millimeters -->
7592
7618
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
7593
7619
 
7620
+ <xsl:variable name="show_figure_key_in_block_container">
7621
+ true
7622
+ </xsl:variable>
7623
+
7594
7624
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
7595
7625
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
7596
7626
  </fo:block>
7597
- <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
7598
- <xsl:call-template name="note"/>
7599
- </xsl:for-each>
7600
- <xsl:call-template name="fn_display_figure"/>
7627
+
7628
+ <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
7629
+ <xsl:call-template name="showFigureKey"/>
7630
+ </xsl:if>
7601
7631
 
7602
7632
  <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
7603
7633
 
7604
7634
  </fo:block-container>
7635
+
7636
+ </xsl:template>
7637
+
7638
+ <xsl:template name="showFigureKey">
7639
+ <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
7640
+ <xsl:call-template name="note"/>
7641
+ </xsl:for-each>
7642
+ <xsl:call-template name="fn_display_figure"/>
7605
7643
  </xsl:template>
7606
7644
 
7607
7645
  <xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
@@ -7797,6 +7835,22 @@
7797
7835
  </xsl:if>
7798
7836
  </xsl:template>
7799
7837
 
7838
+ <xsl:template name="getImageSrc">
7839
+ <xsl:choose>
7840
+ <xsl:when test="not(starts-with(@src, 'data:'))">
7841
+ <xsl:choose>
7842
+ <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
7843
+ <xsl:value-of select="@src"/>
7844
+ </xsl:when>
7845
+ <xsl:otherwise>
7846
+ <xsl:value-of select="concat($basepath, @src)"/>
7847
+ </xsl:otherwise>
7848
+ </xsl:choose>
7849
+ </xsl:when>
7850
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
7851
+ </xsl:choose>
7852
+ </xsl:template>
7853
+
7800
7854
  <xsl:template name="getImageScale">
7801
7855
  <xsl:param name="indent"/>
7802
7856
  <xsl:variable name="indent_left">
@@ -7806,19 +7860,7 @@
7806
7860
  </xsl:choose>
7807
7861
  </xsl:variable>
7808
7862
  <xsl:variable name="img_src">
7809
- <xsl:choose>
7810
- <xsl:when test="not(starts-with(@src, 'data:'))">
7811
- <xsl:choose>
7812
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
7813
- <xsl:value-of select="@src"/>
7814
- </xsl:when>
7815
- <xsl:otherwise>
7816
- <xsl:value-of select="concat($basepath, @src)"/>
7817
- </xsl:otherwise>
7818
- </xsl:choose>
7819
- </xsl:when>
7820
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
7821
- </xsl:choose>
7863
+ <xsl:call-template name="getImageSrc"/>
7822
7864
  </xsl:variable>
7823
7865
 
7824
7866
  <xsl:variable name="image_width_effective">
@@ -7826,10 +7868,15 @@
7826
7868
  <xsl:value-of select="$width_effective - number($indent_left)"/>
7827
7869
 
7828
7870
  </xsl:variable>
7871
+ <xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
7829
7872
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
7830
7873
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
7831
7874
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
7832
- <xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
7875
+ <xsl:variable name="scale">
7876
+
7877
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
7878
+
7879
+ </xsl:variable>
7833
7880
  <xsl:value-of select="$scale"/>
7834
7881
  </xsl:template>
7835
7882
 
@@ -8382,20 +8429,48 @@
8382
8429
  <xsl:template match="*[local-name() = 'emf']"/>
8383
8430
 
8384
8431
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
8432
+ <xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-name'])">
8433
+ <xsl:apply-templates mode="contents"/>
8434
+ <xsl:text> </xsl:text>
8435
+ </xsl:if>
8436
+ </xsl:template>
8437
+
8438
+ <xsl:template match="*[local-name() = 'title'][following-sibling::*[1][local-name() = 'fmt-title']]" mode="contents"/>
8439
+
8440
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fmt-name'] | *[local-name() = 'table']/*[local-name() = 'fmt-name'] | *[local-name() = 'permission']/*[local-name() = 'fmt-name'] | *[local-name() = 'recommendation']/*[local-name() = 'fmt-name'] | *[local-name() = 'requirement']/*[local-name() = 'fmt-name']" mode="contents">
8385
8441
  <xsl:apply-templates mode="contents"/>
8386
8442
  <xsl:text> </xsl:text>
8387
8443
  </xsl:template>
8388
8444
 
8389
8445
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
8446
+ <xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-name'])">
8447
+ <xsl:apply-templates mode="bookmarks"/>
8448
+ <xsl:text> </xsl:text>
8449
+ </xsl:if>
8450
+ </xsl:template>
8451
+
8452
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fmt-name'] | *[local-name() = 'table']/*[local-name() = 'fmt-name'] | *[local-name() = 'permission']/*[local-name() = 'fmt-name'] | *[local-name() = 'recommendation']/*[local-name() = 'fmt-name'] | *[local-name() = 'requirement']/*[local-name() = 'fmt-name'] | *[local-name() = 'sourcecode']/*[local-name() = 'fmt-name']" mode="bookmarks">
8390
8453
  <xsl:apply-templates mode="bookmarks"/>
8391
8454
  <xsl:text> </xsl:text>
8392
8455
  </xsl:template>
8393
8456
 
8394
8457
  <xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
8458
+ <xsl:if test="not(../following-sibling::*[1][local-name() = 'fmt-name'])">
8459
+ <xsl:value-of select="."/>
8460
+ </xsl:if>
8461
+ </xsl:template>
8462
+
8463
+ <xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'fmt-name']/text()" mode="contents" priority="2">
8395
8464
  <xsl:value-of select="."/>
8396
8465
  </xsl:template>
8397
8466
 
8398
8467
  <xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
8468
+ <xsl:if test="not(../following-sibling::*[1][local-name() = 'fmt-name'])">
8469
+ <xsl:value-of select="."/>
8470
+ </xsl:if>
8471
+ </xsl:template>
8472
+
8473
+ <xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'fmt-name']//text()" mode="bookmarks" priority="2">
8399
8474
  <xsl:value-of select="."/>
8400
8475
  </xsl:template>
8401
8476
 
@@ -8416,7 +8491,7 @@
8416
8491
  </xsl:template>
8417
8492
 
8418
8493
  <!-- special case: ignore section-title if @depth different than @depth of parent clause, or @depth of parent clause = 1 -->
8419
- <xsl:template match="*[local-name() = 'clause']/*[local-name() = 'p'][@type = 'section-title' and (@depth != ../*[local-name() = 'title']/@depth or ../*[local-name() = 'title']/@depth = 1)]" priority="3" mode="contents"/>
8494
+ <xsl:template match="*[local-name() = 'clause']/*[local-name() = 'p'][@type = 'section-title' and (@depth != ../*[local-name() = 'title' or local-name() = 'fmt-title']/@depth or ../*[local-name() = 'title' or local-name() = 'fmt-title']/@depth = 1)]" priority="3" mode="contents"/>
8420
8495
 
8421
8496
  <xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" name="contents_section-title" mode="contents">
8422
8497
  <xsl:variable name="level">
@@ -8428,6 +8503,9 @@
8428
8503
  <xsl:variable name="section">
8429
8504
  <xsl:choose>
8430
8505
  <xsl:when test="@type = 'section-title'"/>
8506
+ <xsl:when test="*[local-name() = 'span'][@class = 'fmt-caption-delim']">
8507
+ <xsl:value-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/preceding-sibling::node()"/>
8508
+ </xsl:when>
8431
8509
  <xsl:otherwise>
8432
8510
  <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
8433
8511
  </xsl:otherwise>
@@ -8450,6 +8528,19 @@
8450
8528
 
8451
8529
  <xsl:variable name="title">
8452
8530
  <xsl:choose>
8531
+ <!-- https://github.com/metanorma/mn-native-pdf/issues/770 -->
8532
+ <xsl:when test="*[local-name() = 'span'][@class = 'fmt-caption-delim']">
8533
+ <xsl:choose>
8534
+ <xsl:when test="@type = 'section-title'">
8535
+ <xsl:value-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/preceding-sibling::node()"/>
8536
+ <xsl:text>: </xsl:text>
8537
+ <xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
8538
+ </xsl:when>
8539
+ <xsl:otherwise>
8540
+ <xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
8541
+ </xsl:otherwise>
8542
+ </xsl:choose>
8543
+ </xsl:when>
8453
8544
  <xsl:when test="*[local-name() = 'tab']">
8454
8545
  <xsl:choose>
8455
8546
  <xsl:when test="@type = 'section-title'">
@@ -8485,7 +8576,7 @@
8485
8576
  <xsl:apply-templates mode="bookmarks"/>
8486
8577
  </xsl:template>
8487
8578
 
8488
- <xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
8579
+ <xsl:template match="*[local-name() = 'title' or local-name() = 'name' or local-name() = 'fmt-title' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
8489
8580
  <xsl:apply-templates select="."/>
8490
8581
  </xsl:template>
8491
8582
 
@@ -8498,6 +8589,10 @@
8498
8589
  <xsl:apply-templates mode="contents"/>
8499
8590
  </xsl:template>
8500
8591
 
8592
+ <xsl:template match="*[local-name() = 'semx']" mode="contents">
8593
+ <xsl:apply-templates mode="contents"/>
8594
+ </xsl:template>
8595
+
8501
8596
  <xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
8502
8597
  <xsl:apply-templates mode="bookmarks"/>
8503
8598
  </xsl:template>
@@ -8507,9 +8602,14 @@
8507
8602
  <xsl:apply-templates mode="bookmarks"/>
8508
8603
  </xsl:template>
8509
8604
 
8605
+ <xsl:template match="*[local-name() = 'semx']" mode="bookmarks">
8606
+ <xsl:apply-templates mode="bookmarks"/>
8607
+ </xsl:template>
8608
+
8510
8609
  <!-- Bookmarks -->
8511
8610
  <xsl:template name="addBookmarks">
8512
8611
  <xsl:param name="contents"/>
8612
+ <xsl:param name="contents_addon"/>
8513
8613
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
8514
8614
  <xsl:if test="$contents_nodes//item">
8515
8615
  <fo:bookmark-tree>
@@ -8607,6 +8707,9 @@
8607
8707
  </xsl:otherwise>
8608
8708
  </xsl:choose>
8609
8709
 
8710
+ <!-- for $namespace = 'nist-sp' $namespace = 'ogc' $namespace = 'ogc-white-paper' -->
8711
+ <xsl:copy-of select="$contents_addon"/>
8712
+
8610
8713
  </fo:bookmark-tree>
8611
8714
  </xsl:if>
8612
8715
  </xsl:template>
@@ -8760,6 +8863,16 @@
8760
8863
  <!-- ====== -->
8761
8864
  <!-- ====== -->
8762
8865
  <xsl:template match="*[local-name() = 'title']" mode="contents_item">
8866
+ <xsl:param name="mode">bookmarks</xsl:param>
8867
+ <xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-title'])">
8868
+ <xsl:apply-templates mode="contents_item">
8869
+ <xsl:with-param name="mode" select="$mode"/>
8870
+ </xsl:apply-templates>
8871
+ <!-- <xsl:text> </xsl:text> -->
8872
+ </xsl:if>
8873
+ </xsl:template>
8874
+
8875
+ <xsl:template match="*[local-name() = 'fmt-title']" mode="contents_item">
8763
8876
  <xsl:param name="mode">bookmarks</xsl:param>
8764
8877
  <xsl:apply-templates mode="contents_item">
8765
8878
  <xsl:with-param name="mode" select="$mode"/>
@@ -8767,12 +8880,38 @@
8767
8880
  <!-- <xsl:text> </xsl:text> -->
8768
8881
  </xsl:template>
8769
8882
 
8883
+ <xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim']" mode="contents_item" priority="3">
8884
+ <xsl:apply-templates mode="contents_item"/>
8885
+ </xsl:template>
8886
+
8887
+ <xsl:template match="*[local-name() = 'semx']" mode="contents_item">
8888
+ <xsl:apply-templates mode="contents_item"/>
8889
+ </xsl:template>
8890
+
8891
+ <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
8892
+
8770
8893
  <xsl:template name="getSection">
8771
- <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
8894
+ <xsl:choose>
8895
+ <xsl:when test="*[local-name() = 'fmt-title']">
8896
+ <xsl:variable name="fmt_title_section">
8897
+ <xsl:copy-of select="*[local-name() = 'fmt-title']//*[local-name() = 'span'][@class = 'fmt-caption-delim'][*[local-name() = 'tab']][1]/preceding-sibling::node()[not(local-name() = 'review')]"/>
8898
+ </xsl:variable>
8899
+ <xsl:value-of select="normalize-space($fmt_title_section)"/>
8900
+ </xsl:when>
8901
+ <xsl:otherwise>
8902
+ <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
8903
+ </xsl:otherwise>
8904
+ </xsl:choose>
8772
8905
  </xsl:template>
8773
8906
 
8774
8907
  <xsl:template name="getName">
8775
8908
  <xsl:choose>
8909
+ <xsl:when test="*[local-name() = 'fmt-title']//*[local-name() = 'span'][@class = 'fmt-caption-delim'][*[local-name() = 'tab']]">
8910
+ <xsl:copy-of select="*[local-name() = 'fmt-title']//*[local-name() = 'span'][@class = 'fmt-caption-delim'][*[local-name() = 'tab']][1]/following-sibling::node()"/>
8911
+ </xsl:when>
8912
+ <xsl:when test="*[local-name() = 'fmt-title']">
8913
+ <xsl:copy-of select="*[local-name() = 'fmt-title']/node()"/>
8914
+ </xsl:when>
8776
8915
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
8777
8916
  <xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
8778
8917
  </xsl:when>
@@ -8879,6 +9018,15 @@
8879
9018
  </xsl:template>
8880
9019
 
8881
9020
  <xsl:template match="*[local-name() = 'name']" mode="contents_item">
9021
+ <xsl:param name="mode">bookmarks</xsl:param>
9022
+ <xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-name'])">
9023
+ <xsl:apply-templates mode="contents_item">
9024
+ <xsl:with-param name="mode" select="$mode"/>
9025
+ </xsl:apply-templates>
9026
+ </xsl:if>
9027
+ </xsl:template>
9028
+
9029
+ <xsl:template match="*[local-name() = 'fmt-name']" mode="contents_item">
8882
9030
  <xsl:param name="mode">bookmarks</xsl:param>
8883
9031
  <xsl:apply-templates mode="contents_item">
8884
9032
  <xsl:with-param name="mode" select="$mode"/>
@@ -9716,107 +9864,108 @@
9716
9864
  -->
9717
9865
  <xsl:template match="*[local-name() = 'example']">
9718
9866
 
9719
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9720
-
9721
- <xsl:call-template name="setBlockSpanAll"/>
9867
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9722
9868
 
9723
- <xsl:call-template name="refine_example-style"/>
9869
+ <xsl:call-template name="setBlockSpanAll"/>
9724
9870
 
9725
- <xsl:variable name="fo_element">
9726
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
9727
- inline
9728
- </xsl:variable>
9871
+ <xsl:call-template name="refine_example-style"/>
9729
9872
 
9730
- <fo:block-container margin-left="0mm" role="SKIP">
9873
+ <xsl:variable name="fo_element">
9874
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
9875
+ inline
9876
+ </xsl:variable>
9731
9877
 
9732
- <xsl:choose>
9878
+ <fo:block-container margin-left="0mm" role="SKIP">
9733
9879
 
9734
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
9880
+ <xsl:choose>
9735
9881
 
9736
- <!-- display name 'EXAMPLE' in a separate block -->
9737
- <fo:block>
9738
- <xsl:apply-templates select="*[local-name()='name']">
9739
- <xsl:with-param name="fo_element" select="$fo_element"/>
9740
- </xsl:apply-templates>
9741
- </fo:block>
9882
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
9742
9883
 
9743
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9744
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9745
- <xsl:variable name="example_body">
9746
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9884
+ <!-- display name 'EXAMPLE' in a separate block -->
9885
+ <fo:block>
9886
+ <xsl:apply-templates select="*[local-name()='name']">
9747
9887
  <xsl:with-param name="fo_element" select="$fo_element"/>
9748
9888
  </xsl:apply-templates>
9749
- </xsl:variable>
9750
- <xsl:choose>
9751
- <xsl:when test="xalan:nodeset($example_body)/*">
9752
- <xsl:copy-of select="$example_body"/>
9753
- </xsl:when>
9754
- <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
9755
- </xsl:choose>
9756
- </fo:block-container>
9757
- </fo:block-container>
9758
- </xsl:when> <!-- end block -->
9889
+ </fo:block>
9759
9890
 
9760
- <xsl:when test="contains(normalize-space($fo_element), 'list')">
9891
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9892
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9893
+ <xsl:variable name="example_body">
9894
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9895
+ <xsl:with-param name="fo_element" select="$fo_element"/>
9896
+ </xsl:apply-templates>
9897
+ </xsl:variable>
9898
+ <xsl:choose>
9899
+ <xsl:when test="xalan:nodeset($example_body)/*">
9900
+ <xsl:copy-of select="$example_body"/>
9901
+ </xsl:when>
9902
+ <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
9903
+ </xsl:choose>
9904
+ </fo:block-container>
9905
+ </fo:block-container>
9906
+ </xsl:when> <!-- end block -->
9761
9907
 
9762
- <xsl:variable name="provisional_distance_between_starts_">
9763
- 7
9764
- </xsl:variable>
9765
- <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
9766
- <xsl:variable name="indent_">
9767
- 0
9768
- </xsl:variable>
9769
- <xsl:variable name="indent" select="normalize-space($indent_)"/>
9908
+ <xsl:when test="contains(normalize-space($fo_element), 'list')">
9770
9909
 
9771
- <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
9772
- <fo:list-item>
9773
- <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
9774
- <fo:block>
9775
- <xsl:apply-templates select="*[local-name()='name']">
9776
- <xsl:with-param name="fo_element">block</xsl:with-param>
9777
- </xsl:apply-templates>
9778
- </fo:block>
9779
- </fo:list-item-label>
9780
- <fo:list-item-body start-indent="body-start()">
9781
- <fo:block>
9782
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9910
+ <xsl:variable name="provisional_distance_between_starts_">
9911
+ 7
9912
+ </xsl:variable>
9913
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
9914
+ <xsl:variable name="indent_">
9915
+ 0
9916
+ </xsl:variable>
9917
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
9918
+
9919
+ <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
9920
+ <fo:list-item>
9921
+ <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
9922
+ <fo:block>
9923
+ <xsl:apply-templates select="*[local-name()='name']">
9924
+ <xsl:with-param name="fo_element">block</xsl:with-param>
9925
+ </xsl:apply-templates>
9926
+ </fo:block>
9927
+ </fo:list-item-label>
9928
+ <fo:list-item-body start-indent="body-start()">
9929
+ <fo:block>
9930
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9931
+ <xsl:with-param name="fo_element" select="$fo_element"/>
9932
+ </xsl:apply-templates>
9933
+ </fo:block>
9934
+ </fo:list-item-body>
9935
+ </fo:list-item>
9936
+ </fo:list-block>
9937
+ </xsl:when> <!-- end list -->
9938
+
9939
+ <xsl:otherwise> <!-- inline -->
9940
+
9941
+ <!-- display 'EXAMPLE' and first element in the same line -->
9942
+ <fo:block>
9943
+ <xsl:apply-templates select="*[local-name()='name']">
9944
+ <xsl:with-param name="fo_element" select="$fo_element"/>
9945
+ </xsl:apply-templates>
9946
+ <fo:inline>
9947
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
9783
9948
  <xsl:with-param name="fo_element" select="$fo_element"/>
9784
9949
  </xsl:apply-templates>
9785
- </fo:block>
9786
- </fo:list-item-body>
9787
- </fo:list-item>
9788
- </fo:list-block>
9789
- </xsl:when> <!-- end list -->
9790
-
9791
- <xsl:otherwise> <!-- inline -->
9950
+ </fo:inline>
9951
+ </fo:block>
9792
9952
 
9793
- <!-- display 'EXAMPLE' and first element in the same line -->
9794
- <fo:block>
9795
- <xsl:apply-templates select="*[local-name()='name']">
9796
- <xsl:with-param name="fo_element" select="$fo_element"/>
9797
- </xsl:apply-templates>
9798
- <fo:inline>
9799
- <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
9800
- <xsl:with-param name="fo_element" select="$fo_element"/>
9801
- </xsl:apply-templates>
9802
- </fo:inline>
9803
- </fo:block>
9953
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
9954
+ <!-- display further elements in blocks -->
9955
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9956
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9957
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
9958
+ <xsl:with-param name="fo_element" select="'block'"/>
9959
+ </xsl:apply-templates>
9960
+ </fo:block-container>
9961
+ </fo:block-container>
9962
+ </xsl:if>
9963
+ </xsl:otherwise> <!-- end inline -->
9804
9964
 
9805
- <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
9806
- <!-- display further elements in blocks -->
9807
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9808
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9809
- <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
9810
- <xsl:with-param name="fo_element" select="'block'"/>
9811
- </xsl:apply-templates>
9812
- </fo:block-container>
9813
- </fo:block-container>
9814
- </xsl:if>
9815
- </xsl:otherwise> <!-- end inline -->
9965
+ </xsl:choose>
9966
+ </fo:block-container>
9967
+ </fo:block-container>
9816
9968
 
9817
- </xsl:choose>
9818
- </fo:block-container>
9819
- </fo:block-container>
9820
9969
  </xsl:template>
9821
9970
 
9822
9971
  <xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
@@ -10200,6 +10349,15 @@
10200
10349
 
10201
10350
  </xsl:template> <!-- tab -->
10202
10351
 
10352
+ <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
10353
+ <xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
10354
+
10355
+ <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
10356
+
10357
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
10358
+
10359
+ </xsl:template>
10360
+
10203
10361
  <xsl:template name="insertNonBreakSpaces">
10204
10362
  <xsl:param name="count"/>
10205
10363
  <xsl:if test="$count &gt; 0">
@@ -11737,6 +11895,10 @@
11737
11895
  <!-- - Remove semantic xml part -->
11738
11896
  <!-- - Remove image/emf (EMF vector image for Word) -->
11739
11897
  <!-- - add @id, redundant for table auto-layout algorithm -->
11898
+ <!-- - process 'passthrough' element -->
11899
+ <!-- - split math by element with @linebreak into maths -->
11900
+ <!-- - rename fmt-title to title, fmt-name to name and another changes to convert new presentation XML to -->
11901
+ <!-- - old XML without significant changes in XSLT -->
11740
11902
  <!-- =========================================================================== -->
11741
11903
  <xsl:template match="@*|node()" mode="update_xml_step1">
11742
11904
  <xsl:copy>
@@ -11744,6 +11906,12 @@
11744
11906
  </xsl:copy>
11745
11907
  </xsl:template>
11746
11908
 
11909
+ <xsl:template match="@*|node()" mode="update_xml_pres">
11910
+ <xsl:copy>
11911
+ <xsl:apply-templates select="@*|node()" mode="update_xml_pres"/>
11912
+ </xsl:copy>
11913
+ </xsl:template>
11914
+
11747
11915
  <!-- change section's order based on @displayorder value -->
11748
11916
  <xsl:template match="*[local-name() = 'preface']" mode="update_xml_step1">
11749
11917
  <xsl:copy>
@@ -11820,7 +11988,7 @@
11820
11988
  </xsl:template>
11821
11989
 
11822
11990
  <!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
11823
- <xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" mode="update_xml_step1" priority="2">
11991
+ <xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear' or @class = 'horizontal' or @class = 'norotate' or @class = 'halffontsize']" mode="update_xml_step1" priority="2">
11824
11992
  <xsl:copy>
11825
11993
  <xsl:copy-of select="@*"/>
11826
11994
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -11839,14 +12007,17 @@
11839
12007
 
11840
12008
  <!-- remove semantic xml -->
11841
12009
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'metanorma']/*[local-name() = 'source']" mode="update_xml_step1"/>
12010
+ <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'metanorma']/*[local-name() = 'source']" mode="update_xml_pres"/>
11842
12011
 
11843
12012
  <!-- remove image/emf -->
11844
12013
  <xsl:template match="*[local-name() = 'image']/*[local-name() = 'emf']" mode="update_xml_step1"/>
12014
+ <xsl:template match="*[local-name() = 'image']/*[local-name() = 'emf']" mode="update_xml_pres"/>
11845
12015
 
11846
12016
  <!-- remove preprocess-xslt -->
11847
12017
  <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
12018
+ <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
11848
12019
 
11849
- <xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
12020
+ <xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
11850
12021
  <xsl:copy-of select="."/>
11851
12022
  </xsl:template>
11852
12023
 
@@ -11928,6 +12099,77 @@
11928
12099
  <xsl:copy-of select="$maths"/>
11929
12100
  </xsl:template>
11930
12101
 
12102
+ <!-- update new Presentation XML -->
12103
+ <xsl:template match="*[local-name() = 'title'][following-sibling::*[1][local-name() = 'fmt-title']]" mode="update_xml_step1"/>
12104
+ <xsl:template match="*[local-name() = 'title'][following-sibling::*[1][local-name() = 'fmt-title']]" mode="update_xml_pres"/>
12105
+ <xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_step1"/>
12106
+ <xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
12107
+ <xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
12108
+ <xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
12109
+
12110
+ <xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
12111
+ <xsl:copy>
12112
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
12113
+ <xsl:copy-of select="preceding-sibling::*[1][local-name() = 'section-title']/@depth"/>
12114
+ <xsl:apply-templates select="node()" mode="update_xml_step1"/>
12115
+ </xsl:copy>
12116
+ </xsl:template>
12117
+ <xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_pres">
12118
+ <xsl:copy>
12119
+ <xsl:apply-templates select="@*" mode="update_xml_pres"/>
12120
+ <xsl:copy-of select="preceding-sibling::*[1][local-name() = 'section-title']/@depth"/>
12121
+ <xsl:apply-templates select="node()" mode="update_xml_pres"/>
12122
+ </xsl:copy>
12123
+ </xsl:template>
12124
+
12125
+ <xsl:template match="*[local-name() = 'fmt-title']"/>
12126
+ <xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
12127
+ <xsl:element name="title" namespace="{$namespace_full}">
12128
+ <xsl:copy-of select="@*"/>
12129
+ <xsl:apply-templates mode="update_xml_step1"/>
12130
+ </xsl:element>
12131
+ </xsl:template>
12132
+ <xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
12133
+ <xsl:element name="title" namespace="{$namespace_full}">
12134
+ <xsl:copy-of select="@*"/>
12135
+ <xsl:apply-templates mode="update_xml_pres"/>
12136
+ </xsl:element>
12137
+ </xsl:template>
12138
+
12139
+ <xsl:template match="*[local-name() = 'fmt-name']"/>
12140
+ <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
12141
+ <xsl:element name="name" namespace="{$namespace_full}">
12142
+ <xsl:copy-of select="@*"/>
12143
+ <xsl:apply-templates mode="update_xml_step1"/>
12144
+ </xsl:element>
12145
+ </xsl:template>
12146
+ <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
12147
+ <xsl:element name="name" namespace="{$namespace_full}">
12148
+ <xsl:copy-of select="@*"/>
12149
+ <xsl:apply-templates mode="update_xml_pres"/>
12150
+ </xsl:element>
12151
+ </xsl:template>
12152
+
12153
+ <xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
12154
+ <xsl:apply-templates mode="update_xml_step1"/>
12155
+ </xsl:template>
12156
+ <xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_pres" priority="3">
12157
+ <xsl:apply-templates mode="update_xml_pres"/>
12158
+ </xsl:template>
12159
+
12160
+ <xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
12161
+ <xsl:apply-templates mode="update_xml_step1"/>
12162
+ </xsl:template>
12163
+ <xsl:template match="*[local-name() = 'semx']" mode="update_xml_pres">
12164
+ <xsl:apply-templates mode="update_xml_pres"/>
12165
+ </xsl:template>
12166
+
12167
+ <xsl:template match="*[local-name() = 'fmt-xref-label']"/>
12168
+ <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
12169
+ <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
12170
+
12171
+ <!-- END: update new Presentation XML -->
12172
+
11931
12173
  <!-- =========================================================================== -->
11932
12174
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
11933
12175
  <!-- =========================================================================== -->
@@ -12120,7 +12362,7 @@
12120
12362
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
12121
12363
  <xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
12122
12364
 
12123
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
12365
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::*[local-name() = 'name'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
12124
12366
 
12125
12367
  <xsl:variable name="parent" select="local-name(..)"/>
12126
12368
 
@@ -12699,6 +12941,7 @@
12699
12941
  </pdf:catalog>
12700
12942
  <x:xmpmeta xmlns:x="adobe:ns:meta/">
12701
12943
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
12944
+ <!-- Commented after upgrade to Apache FOP 2.10
12702
12945
  <rdf:Description xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" rdf:about="">
12703
12946
  <pdfaExtension:schemas>
12704
12947
  <rdf:Bag>
@@ -12731,7 +12974,7 @@
12731
12974
  </rdf:li>
12732
12975
  </rdf:Bag>
12733
12976
  </pdfaExtension:schemas>
12734
- </rdf:Description>
12977
+ </rdf:Description> -->
12735
12978
  <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
12736
12979
  <!-- Dublin Core properties go here -->
12737
12980
  <dc:title>
@@ -12778,7 +13021,7 @@
12778
13021
  <xsl:variable name="dc_description">
12779
13022
  <xsl:variable name="abstract">
12780
13023
 
12781
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
13024
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
12782
13025
 
12783
13026
  </xsl:variable>
12784
13027
  <rdf:Alt>
@@ -13323,31 +13566,123 @@
13323
13566
 
13324
13567
  <!-- END: insert cover page image -->
13325
13568
 
13326
- <xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
13569
+ <!-- https://github.com/metanorma/docs/blob/main/109.adoc -->
13570
+ <xsl:variable name="regex_ja_spec_">[
13571
+ <!-- Rotate 90° clockwise -->
13572
+ \u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
13573
+ \uFF08 <!-- U+FF08 FULLWIDTH LEFT PARENTHESIS (() -->
13574
+ \u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
13575
+ \uFF09 <!-- U+FF09 FULLWIDTH RIGHT PARENTHESIS ()) -->
13576
+ \u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
13577
+ \uFF5B <!-- U+FF5B FULLWIDTH LEFT CURLY BRACKET ({) -->
13578
+ \u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
13579
+ \uFF5D <!-- U+FF5D FULLWIDTH RIGHT CURLY BRACKET (}) -->
13580
+ \u3014 <!-- U+3014 LEFT TORTOISE SHELL BRACKET (〔) -->
13581
+ \u3015 <!-- U+3015 RIGHT TORTOISE SHELL BRACKET (〕) -->
13582
+ \u3010 <!-- U+3010 LEFT BLACK LENTICULAR BRACKET (【) -->
13583
+ \u3011 <!-- U+3011 RIGHT BLACK LENTICULAR BRACKET (】) -->
13584
+ \u300A <!-- U+300A LEFT DOUBLE ANGLE BRACKET (《) -->
13585
+ \u300B <!-- U+300B RIGHT DOUBLE ANGLE BRACKET (》) -->
13586
+ \uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
13587
+ \u300C <!-- U+300C LEFT CORNER BRACKET (「) -->
13588
+ \uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
13589
+ \u300D <!-- U+300D RIGHT CORNER BRACKET (」) -->
13590
+ \u300E <!-- U+300E LEFT WHITE CORNER BRACKET (『) -->
13591
+ \u300F <!-- U+300F RIGHT WHITE CORNER BRACKET (』) -->
13592
+ \u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
13593
+ \uFF3B <!-- U+FF3B FULLWIDTH LEFT SQUARE BRACKET ([) -->
13594
+ \u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
13595
+ \uFF3D <!-- U+FF3D FULLWIDTH RIGHT SQUARE BRACKET (]) -->
13596
+ \u3008 <!-- U+3008 LEFT ANGLE BRACKET (〈) -->
13597
+ \u3009 <!-- U+3009 RIGHT ANGLE BRACKET (〉) -->
13598
+ \u3016 <!-- U+3016 LEFT WHITE LENTICULAR BRACKET (〖) -->
13599
+ \u3017 <!-- U+3017 RIGHT WHITE LENTICULAR BRACKET (〗) -->
13600
+
13601
+ \u301A <!-- U+301A LEFT WHITE SQUARE BRACKET (〚) -->
13602
+ \u301B <!-- U+301B RIGHT WHITE SQUARE BRACKET (〛) -->
13603
+ \u301C <!-- U+301C WAVE DASH (〜) -->
13604
+ \u3030 <!-- U+3030 WAVY DASH (〰 )-->
13605
+ \u30FC <!-- U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK (ー) -->
13606
+ \u2329 <!-- U+2329 LEFT-POINTING ANGLE BRACKET (〈) -->
13607
+ \u232A <!-- U+232A RIGHT-POINTING ANGLE BRACKET (〉) -->
13608
+ \u3018 <!-- U+3018 LEFT WHITE TORTOISE SHELL BRACKET (〘) -->
13609
+ \u3019 <!-- U+3019 RIGHT WHITE TORTOISE SHELL BRACKET (〙) -->
13610
+ \u30A0 <!-- U+30A0 KATAKANA-HIRAGANA DOUBLE HYPHEN (゠) -->
13611
+ \uFE59 <!-- U+FE59 SMALL LEFT PARENTHESIS (﹙) -->
13612
+ \uFE5A <!-- U+FE5A SMALL RIGHT PARENTHESIS (﹚) -->
13613
+ \uFE5B <!-- U+FE5B SMALL LEFT CURLY BRACKET (﹛) -->
13614
+ \uFE5C <!-- U+FE5C SMALL RIGHT CURLY BRACKET (﹜) -->
13615
+ \uFE5D <!-- U+FE5D SMALL LEFT TORTOISE SHELL BRACKET (﹝) -->
13616
+ \uFE5E <!-- U+FE5E SMALL RIGHT TORTOISE SHELL BRACKET (﹞) -->
13617
+ \uFF5C <!-- U+FF5C FULLWIDTH VERTICAL LINE (|) -->
13618
+ \uFF5F <!-- U+FF5F FULLWIDTH LEFT WHITE PARENTHESIS (⦅) -->
13619
+ \uFF60 <!-- U+FF60 FULLWIDTH RIGHT WHITE PARENTHESIS (⦆) -->
13620
+ \uFFE3 <!-- U+FFE3 FULLWIDTH MACRON ( ̄) -->
13621
+ \uFF3F <!-- U+FF3F FULLWIDTH LOW LINE (_) -->
13622
+ \uFF5E <!-- U+FF5E FULLWIDTH TILDE (~) -->
13623
+ <!-- Rotate 180° -->
13624
+ \u309C <!-- U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜) -->
13625
+ \u3002 <!-- U+3002 IDEOGRAPHIC FULL STOP (。) -->
13626
+ \uFE52 <!-- U+FE52 SMALL FULL STOP (﹒) -->
13627
+ \uFF0E <!-- U+FF0E FULLWIDTH FULL STOP (.) -->
13628
+ ]</xsl:variable>
13629
+ <xsl:variable name="regex_ja_spec"><xsl:value-of select="translate(normalize-space($regex_ja_spec_), ' ', '')"/></xsl:variable>
13327
13630
  <xsl:template name="insertVerticalChar">
13328
13631
  <xsl:param name="str"/>
13329
13632
  <xsl:param name="writing-mode">lr-tb</xsl:param>
13330
13633
  <xsl:param name="reference-orientation">90</xsl:param>
13331
- <xsl:if test="string-length($str) &gt; 0">
13332
- <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
13333
- <xsl:if test="normalize-space($writing-mode) != ''">
13334
- <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
13335
- <xsl:attribute name="reference-orientation">90</xsl:attribute>
13336
- </xsl:if>
13337
- <xsl:variable name="char" select="substring($str,1,1)"/>
13338
- <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
13339
- <xsl:attribute name="reference-orientation">0</xsl:attribute>
13634
+ <xsl:param name="add_zero_width_space">false</xsl:param>
13635
+ <xsl:choose>
13636
+ <xsl:when test="ancestor::*[local-name() = 'span'][@class = 'norotate']">
13637
+ <xsl:value-of select="$str"/>
13638
+ </xsl:when>
13639
+ <xsl:otherwise>
13640
+ <xsl:if test="string-length($str) &gt; 0">
13641
+ <xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/>
13642
+ <xsl:variable name="char" select="substring($str,1,1)"/>
13643
+ <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
13644
+ <xsl:if test="normalize-space($writing-mode) != ''">
13645
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
13646
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
13647
+ </xsl:if>
13648
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
13649
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
13650
+ </xsl:if>
13651
+ <xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
13652
+ <!-- Rotate 180°:
13653
+ U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
13654
+ U+3002 IDEOGRAPHIC FULL STOP (。)
13655
+ U+FE52 SMALL FULL STOP (﹒)
13656
+ U+FF0E FULLWIDTH FULL STOP (.)
13657
+ -->
13658
+ <xsl:attribute name="reference-orientation">-90</xsl:attribute>
13659
+ </xsl:if>
13660
+ <fo:block-container width="1em">
13661
+ <fo:block line-height="1em">
13662
+ <xsl:choose>
13663
+ <xsl:when test="$horizontal_mode = 'true'">
13664
+ <xsl:value-of select="$str"/>
13665
+ </xsl:when>
13666
+ <xsl:otherwise>
13667
+ <xsl:value-of select="$char"/>
13668
+ </xsl:otherwise>
13669
+ </xsl:choose>
13670
+ </fo:block>
13671
+ </fo:block-container>
13672
+ </fo:inline-container>
13673
+ <xsl:if test="$add_zero_width_space = 'true' and ($char = ',' or $char = '.' or $char = ' ' or $char = '·' or $char = ')' or $char = ']' or $char = '}')"><xsl:value-of select="$zero_width_space"/></xsl:if>
13674
+
13675
+ <xsl:if test="$horizontal_mode = 'false'">
13676
+ <xsl:call-template name="insertVerticalChar">
13677
+ <xsl:with-param name="str" select="substring($str, 2)"/>
13678
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
13679
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
13680
+ <xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
13681
+ </xsl:call-template>
13682
+ </xsl:if>
13340
13683
  </xsl:if>
13341
- <fo:block-container width="1em">
13342
- <fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
13343
- </fo:block-container>
13344
- </fo:inline-container>
13345
- <xsl:call-template name="insertVerticalChar">
13346
- <xsl:with-param name="str" select="substring($str, 2)"/>
13347
- <xsl:with-param name="writing-mode" select="$writing-mode"/>
13348
- <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
13349
- </xsl:call-template>
13350
- </xsl:if>
13684
+ </xsl:otherwise>
13685
+ </xsl:choose>
13351
13686
  </xsl:template>
13352
13687
 
13353
13688
  <xsl:template name="number-to-words">