metanorma-itu 2.8.4 → 2.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63567364155d68f66099200d1d3568d0c1bfd0a17b74a72c0c7b64342798f1f4
4
- data.tar.gz: 562a0859cd6616cc92fa6fde1d078cd421ba625d34519ccac73fcedcc3559c87
3
+ metadata.gz: 6c90902604bc7595629aab447f819c8aa365b2d88bcfdd916c75f249f29b0a8c
4
+ data.tar.gz: b0c8ce84b486a5edb5a3ffff29b9289c25caebaf49cd258faeef98a42ca8f689
5
5
  SHA512:
6
- metadata.gz: 67da2c8835fc974209329ae279bb78db56404d2667f96ddad682a63d7889b94e418f470a34912ae85a0634b478d3fbc64940a5e8057ef19686f727927439b8ed
7
- data.tar.gz: 2ed17169f6e2402d2a76b1d9572883c9b113160ac1a9f86e9be1744cfb289ad4c0c4ae79108bffb9a219a6ba72f0c93ddce85247d4098e5afa3d65241a8c0c37
6
+ metadata.gz: ebed4f7693b075eb8121005178f2be913bbda87ac321b6d7d1f78cb3611fd017e21c137e7e3d9e718afdde5f4144b34bd8bb3f4a049be4c127c01ab7dc893886
7
+ data.tar.gz: b19909608492c4ec559bbfe5a9cb8933f954110455a22a885bf0b4dbdfdc0718e64f3a7e1e75e98b7e35e5982edcae7609878795a09807f3c82d3a4c6281b84a
@@ -312,6 +312,11 @@ svg {
312
312
  display: block; /* ← removes unwanted inline spacing */
313
313
  }
314
314
 
315
+ /* style dfn by override in flavor */
316
+ dfn {
317
+ font-style: inherit;
318
+ }
319
+
315
320
  #standard-band {
316
321
  background-color: #0AC442;
317
322
  }
@@ -312,6 +312,11 @@ svg {
312
312
  display: block; /* ← removes unwanted inline spacing */
313
313
  }
314
314
 
315
+ /* style dfn by override in flavor */
316
+ dfn {
317
+ font-style: inherit;
318
+ }
319
+
315
320
  #standard-band {
316
321
  background-color: #0AC442;
317
322
  }
@@ -371,32 +371,12 @@
371
371
 
372
372
  <xsl:for-each select=".//mn:page_sequence[parent::mn:preface][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
373
373
 
374
- <fo:page-sequence master-reference="preface" format="i" force-page-count="no-force">
374
+ <!-- <debug><xsl:copy-of select="."/></debug> -->
375
375
 
376
- <xsl:if test="$doctype = 'resolution'">
377
- <xsl:attribute name="font-size">11pt</xsl:attribute>
378
- </xsl:if>
379
- <xsl:if test="$doctype = 'service-publication'">
380
- <xsl:attribute name="font-size">11pt</xsl:attribute>
381
- <xsl:attribute name="font-family">Arial, STIX Two Math</xsl:attribute>
382
- </xsl:if>
383
-
384
- <xsl:attribute name="master-reference">
385
- <xsl:text>preface</xsl:text>
386
- <xsl:call-template name="getPageSequenceOrientation"/>
387
- </xsl:attribute>
388
-
389
- <xsl:if test="$doctype = 'service-publication'">
390
- <xsl:attribute name="master-reference">
391
- <xsl:text>document</xsl:text>
392
- <xsl:call-template name="getPageSequenceOrientation"/>
393
- </xsl:attribute>
394
- <xsl:attribute name="format">1</xsl:attribute>
395
- </xsl:if>
396
-
397
- <xsl:if test="position() = 1">
398
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
399
- </xsl:if>
376
+ <fo:page-sequence xsl:use-attribute-sets="page-sequence-preface">
377
+ <xsl:call-template name="refine_page-sequence-preface">
378
+ <xsl:with-param name="doctype" select="$doctype"/>
379
+ </xsl:call-template>
400
380
 
401
381
  <xsl:call-template name="insertHeaderFooter">
402
382
  <xsl:with-param name="doctype" select="$doctype"/>
@@ -506,28 +486,10 @@
506
486
  <xsl:for-each select=".//mn:page_sequence[not(parent::mn:preface)][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
507
487
 
508
488
  <!-- BODY -->
509
- <fo:page-sequence master-reference="document" force-page-count="no-force">
510
-
511
- <xsl:if test="$doctype = 'resolution'">
512
- <xsl:attribute name="font-size">11pt</xsl:attribute>
513
- </xsl:if>
514
- <xsl:if test="$doctype = 'service-publication'">
515
- <xsl:attribute name="font-size">11pt</xsl:attribute>
516
- <xsl:attribute name="font-family">Arial, STIX Two Math</xsl:attribute>
517
- </xsl:if>
518
-
519
- <xsl:attribute name="master-reference">
520
- <xsl:text>document</xsl:text>
521
- <xsl:call-template name="getPageSequenceOrientation"/>
522
- </xsl:attribute>
523
-
524
- <xsl:if test="position() = 1">
525
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
526
- </xsl:if>
527
-
528
- <xsl:if test="$doctype = 'service-publication'">
529
- <xsl:attribute name="initial-page-number">auto</xsl:attribute>
530
- </xsl:if>
489
+ <fo:page-sequence xsl:use-attribute-sets="page-sequence-main">
490
+ <xsl:call-template name="refine_page-sequence-main">
491
+ <xsl:with-param name="doctype" select="$doctype"/>
492
+ </xsl:call-template>
531
493
 
532
494
  <xsl:call-template name="insertFootnoteSeparatorCommon"/>
533
495
 
@@ -1881,7 +1843,7 @@
1881
1843
  </xsl:call-template>
1882
1844
  <xsl:apply-templates select="." mode="contents"/>
1883
1845
  <fo:inline keep-together.within-line="always">
1884
- <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
1846
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
1885
1847
  <fo:page-number-citation ref-id="{@id}"/>
1886
1848
  </fo:inline>
1887
1849
  </fo:basic-link>
@@ -1943,7 +1905,7 @@
1943
1905
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
1944
1906
  <xsl:apply-templates select="mnx:title"/>
1945
1907
  <fo:inline keep-together.within-line="always">
1946
- <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
1908
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
1947
1909
  <fo:page-number-citation ref-id="{@id}"/>
1948
1910
  </fo:inline>
1949
1911
  </fo:basic-link>
@@ -2080,6 +2042,9 @@
2080
2042
  <xsl:variable name="title">
2081
2043
  <xsl:call-template name="getName"/>
2082
2044
  </xsl:variable>
2045
+ <xsl:variable name="variant_title">
2046
+ <xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
2047
+ </xsl:variable>
2083
2048
 
2084
2049
  <mnx:item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
2085
2050
  <xsl:call-template name="setId"/>
@@ -2087,7 +2052,14 @@
2087
2052
  <xsl:attribute name="level">1</xsl:attribute>
2088
2053
  </xsl:if>
2089
2054
  <mnx:title>
2090
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
2055
+ <xsl:choose>
2056
+ <xsl:when test="normalize-space($variant_title) != ''">
2057
+ <xsl:apply-templates select="xalan:nodeset($variant_title)" mode="contents_item"/>
2058
+ </xsl:when>
2059
+ <xsl:otherwise>
2060
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
2061
+ </xsl:otherwise>
2062
+ </xsl:choose>
2091
2063
  </mnx:title>
2092
2064
  <xsl:if test="$type != 'indexsect'">
2093
2065
  <xsl:apply-templates mode="contents"/>
@@ -3257,20 +3229,71 @@
3257
3229
  </xsl:variable>
3258
3230
 
3259
3231
  <xsl:attribute-set name="page-sequence-preface">
3232
+ <xsl:attribute name="master-reference">preface</xsl:attribute>
3260
3233
  <xsl:attribute name="format">i</xsl:attribute>
3261
- </xsl:attribute-set>
3234
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
3235
+ </xsl:attribute-set> <!-- page-sequence-preface -->
3262
3236
 
3263
3237
  <xsl:template name="refine_page-sequence-preface">
3264
3238
  <xsl:param name="layoutVersion"/>
3265
- </xsl:template>
3239
+ <xsl:param name="doctype"/>
3240
+ <xsl:param name="num"/>
3241
+ <xsl:param name="skip_force_page_count">false</xsl:param>
3242
+ <xsl:if test="$doctype = 'resolution'">
3243
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
3244
+ </xsl:if>
3245
+ <xsl:if test="$doctype = 'service-publication'">
3246
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
3247
+ <xsl:attribute name="font-family">Arial, STIX Two Math</xsl:attribute>
3248
+ </xsl:if>
3266
3249
 
3267
- <xsl:attribute-set name="page-sequence-main">
3250
+ <xsl:attribute name="master-reference">
3251
+ <xsl:text>preface</xsl:text>
3252
+ <xsl:call-template name="getPageSequenceOrientation"/>
3253
+ </xsl:attribute>
3268
3254
 
3269
- </xsl:attribute-set>
3255
+ <xsl:if test="$doctype = 'service-publication'">
3256
+ <xsl:attribute name="master-reference">
3257
+ <xsl:text>document</xsl:text>
3258
+ <xsl:call-template name="getPageSequenceOrientation"/>
3259
+ </xsl:attribute>
3260
+ <xsl:attribute name="format">1</xsl:attribute>
3261
+ </xsl:if>
3262
+
3263
+ <xsl:if test="position() = 1">
3264
+ <xsl:attribute name="initial-page-number">1</xsl:attribute>
3265
+ </xsl:if>
3266
+ </xsl:template> <!-- refine_page-sequence-preface -->
3267
+
3268
+ <xsl:attribute-set name="page-sequence-main">
3269
+ <xsl:attribute name="master-reference">document</xsl:attribute>
3270
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
3271
+ </xsl:attribute-set> <!-- page-sequence-main -->
3270
3272
 
3271
3273
  <xsl:template name="refine_page-sequence-main">
3272
3274
  <xsl:param name="layoutVersion"/>
3273
- </xsl:template>
3275
+ <xsl:param name="doctype"/>
3276
+ <xsl:if test="$doctype = 'resolution'">
3277
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
3278
+ </xsl:if>
3279
+ <xsl:if test="$doctype = 'service-publication'">
3280
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
3281
+ <xsl:attribute name="font-family">Arial, STIX Two Math</xsl:attribute>
3282
+ </xsl:if>
3283
+
3284
+ <xsl:attribute name="master-reference">
3285
+ <xsl:text>document</xsl:text>
3286
+ <xsl:call-template name="getPageSequenceOrientation"/>
3287
+ </xsl:attribute>
3288
+
3289
+ <xsl:if test="position() = 1">
3290
+ <xsl:attribute name="initial-page-number">1</xsl:attribute>
3291
+ </xsl:if>
3292
+
3293
+ <xsl:if test="$doctype = 'service-publication'">
3294
+ <xsl:attribute name="initial-page-number">auto</xsl:attribute>
3295
+ </xsl:if>
3296
+ </xsl:template> <!-- refine_page-sequence-main -->
3274
3297
 
3275
3298
  <xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable>
3276
3299
  <xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
@@ -3574,7 +3597,24 @@
3574
3597
  <xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
3575
3598
 
3576
3599
  <!-- remove image/emf -->
3577
- <xsl:template match="mn:image/mn:emf" mode="update_xml_step1"/>
3600
+ <xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
3601
+
3602
+ <!-- https://github.com/metanorma/metanorma/issues/540 -->
3603
+ <xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
3604
+ <xsl:copy>
3605
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
3606
+ <xsl:choose>
3607
+ <xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
3608
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
3609
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
3610
+ </xsl:when>
3611
+ <xsl:otherwise>
3612
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
3613
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
3614
+ </xsl:otherwise>
3615
+ </xsl:choose>
3616
+ </xsl:copy>
3617
+ </xsl:template>
3578
3618
 
3579
3619
  <!-- remove preprocess-xslt -->
3580
3620
  <xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
@@ -3802,6 +3842,15 @@
3802
3842
  </xsl:choose>
3803
3843
  </xsl:template>
3804
3844
 
3845
+ <!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
3846
+ <xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
3847
+ <xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
3848
+ </xsl:template>
3849
+
3850
+ <xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
3851
+ <xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
3852
+ </xsl:template>
3853
+
3805
3854
  <!-- li/fmt-name -->
3806
3855
  <xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
3807
3856
  <xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
@@ -7101,6 +7150,8 @@
7101
7150
  <xsl:if test="$doctype = 'service-publication'">
7102
7151
  <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
7103
7152
  </xsl:if>
7153
+
7154
+ <xsl:call-template name="setNoBordersForTableList"/>
7104
7155
  </xsl:template> <!-- refine_table-style -->
7105
7156
 
7106
7157
  <xsl:attribute-set name="table-number-style">
@@ -7139,12 +7190,16 @@
7139
7190
  <xsl:if test="$doctype = 'service-publication'">
7140
7191
  <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
7141
7192
  </xsl:if>
7193
+
7194
+ <xsl:call-template name="setNoBordersForTableList"/>
7142
7195
  </xsl:template> <!-- refine_table-header-row-style -->
7143
7196
 
7144
7197
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
7145
7198
  </xsl:attribute-set>
7146
7199
 
7147
7200
  <xsl:template name="refine_table-footer-row-style">
7201
+
7202
+ <xsl:call-template name="setNoBordersForTableList"/>
7148
7203
  </xsl:template> <!-- refine_table-footer-row-style -->
7149
7204
 
7150
7205
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -7154,6 +7209,8 @@
7154
7209
  <xsl:template name="refine_table-body-row-style">
7155
7210
 
7156
7211
  <xsl:call-template name="setBordersTableArray"/>
7212
+
7213
+ <xsl:call-template name="setNoBordersForTableList"/>
7157
7214
  </xsl:template> <!-- refine_table-body-row-style -->
7158
7215
 
7159
7216
  <xsl:attribute-set name="table-header-cell-style">
@@ -7183,6 +7240,16 @@
7183
7240
  </xsl:if>
7184
7241
 
7185
7242
  <xsl:call-template name="setTableCellAttributes"/>
7243
+
7244
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
7245
+ <xsl:attribute name="display-align">before</xsl:attribute>
7246
+ <xsl:attribute name="text-align">left</xsl:attribute>
7247
+ <xsl:if test="following-sibling::*">
7248
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
7249
+ </xsl:if>
7250
+ <xsl:call-template name="setNoBordersForTableList"/>
7251
+ </xsl:if>
7252
+
7186
7253
  </xsl:template> <!-- refine_table-header-cell-style -->
7187
7254
 
7188
7255
  <xsl:attribute-set name="table-cell-style">
@@ -7209,6 +7276,15 @@
7209
7276
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
7210
7277
  </xsl:if>
7211
7278
 
7279
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
7280
+ <xsl:attribute name="display-align">before</xsl:attribute>
7281
+ <xsl:attribute name="text-align">left</xsl:attribute>
7282
+ <xsl:if test="following-sibling::*">
7283
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
7284
+ </xsl:if>
7285
+ <xsl:call-template name="setNoBordersForTableList"/>
7286
+ </xsl:if>
7287
+
7212
7288
  </xsl:template> <!-- refine_table-cell-style -->
7213
7289
 
7214
7290
  <xsl:attribute-set name="table-footer-cell-style">
@@ -7228,6 +7304,8 @@
7228
7304
  <xsl:if test="$doctype = 'service-publication'">
7229
7305
  <xsl:attribute name="border">none</xsl:attribute>
7230
7306
  </xsl:if>
7307
+
7308
+ <xsl:call-template name="setNoBordersForTableList"/>
7231
7309
  </xsl:template> <!-- refine_table-footer-cell-style -->
7232
7310
 
7233
7311
  <xsl:attribute-set name="table-note-style">
@@ -7272,6 +7350,16 @@
7272
7350
  <xsl:template name="refine_table-fn-body-style">
7273
7351
  </xsl:template>
7274
7352
 
7353
+ <xsl:template name="setNoBordersForTableList">
7354
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
7355
+ <xsl:attribute name="border">none</xsl:attribute>
7356
+ <xsl:attribute name="border-top">none</xsl:attribute>
7357
+ <xsl:attribute name="border-bottom">none</xsl:attribute>
7358
+ <xsl:attribute name="border-left">none</xsl:attribute>
7359
+ <xsl:attribute name="border-right">none</xsl:attribute>
7360
+ </xsl:if>
7361
+ </xsl:template>
7362
+
7275
7363
  <!-- ========================== -->
7276
7364
  <!-- END Table styles -->
7277
7365
  <!-- ========================== -->
@@ -12886,6 +12974,10 @@
12886
12974
  </fo:list-item>
12887
12975
  </xsl:template>
12888
12976
 
12977
+ <xsl:template match="mn:fmt-ol | mn:fmt-ul">
12978
+ <xsl:apply-templates/>
12979
+ </xsl:template>
12980
+
12889
12981
  <!-- ===================================== -->
12890
12982
  <!-- END Lists processing -->
12891
12983
  <!-- ===================================== -->
@@ -14250,6 +14342,7 @@
14250
14342
  </xsl:attribute-set>
14251
14343
 
14252
14344
  <xsl:template name="refine_toc-style">
14345
+ <xsl:copy-of select="@id"/>
14253
14346
  </xsl:template>
14254
14347
 
14255
14348
  <xsl:attribute-set name="toc-title-style">
@@ -14334,13 +14427,13 @@
14334
14427
 
14335
14428
  <xsl:template name="processPrefaceSectionsDefault_Contents">
14336
14429
  <xsl:variable name="nodes_preface_">
14337
- <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
14430
+ <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
14338
14431
  <node id="{@id}"/>
14339
14432
  </xsl:for-each>
14340
14433
  </xsl:variable>
14341
14434
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
14342
14435
 
14343
- <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
14436
+ <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
14344
14437
  <xsl:sort select="@displayorder" data-type="number"/>
14345
14438
 
14346
14439
  <!-- process Section's title -->
@@ -14353,6 +14446,23 @@
14353
14446
  </xsl:for-each>
14354
14447
  </xsl:template>
14355
14448
 
14449
+ <xsl:template match="*[@type = 'toc'][mn:title or mn:fmt-title]" mode="contents" priority="2">
14450
+ <xsl:variable name="title">
14451
+ <xsl:call-template name="getName"/>
14452
+ </xsl:variable>
14453
+ <xsl:variable name="root">
14454
+ <xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
14455
+ <xsl:if test="ancestor-or-self::mn:annex">annex</xsl:if>
14456
+ </xsl:variable>
14457
+ <mnx:item id="{@id}" level="1" section="" type="toc" root="{$root}" display="false">
14458
+ <mnx:title>
14459
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
14460
+ <xsl:with-param name="element" select="$root"/>
14461
+ </xsl:apply-templates>
14462
+ </mnx:title>
14463
+ </mnx:item>
14464
+ </xsl:template>
14465
+
14356
14466
  <xsl:template name="processMainSectionsDefault_Contents">
14357
14467
 
14358
14468
  <xsl:variable name="nodes_sections_">
@@ -16213,16 +16323,17 @@
16213
16323
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
16214
16324
  <xsl:template name="insert_basic_link">
16215
16325
  <xsl:param name="element"/>
16326
+ <xsl:param name="wrapper">true</xsl:param>
16216
16327
  <xsl:variable name="element_node" select="xalan:nodeset($element)"/>
16217
16328
  <xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
16218
16329
  <xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
16219
16330
  <xsl:choose>
16220
- <xsl:when test="$internal-destination = 'true'">
16331
+ <xsl:when test="$internal-destination = 'true' and $wrapper = 'true'">
16221
16332
  <fo:wrapper role="Reference">
16222
16333
  <xsl:copy-of select="$element_node"/>
16223
16334
  </fo:wrapper>
16224
16335
  </xsl:when>
16225
- <xsl:when test="$external-destination = 'true'">
16336
+ <xsl:when test="$internal-destination = 'true' or $external-destination = 'true'">
16226
16337
  <xsl:copy-of select="$element_node"/>
16227
16338
  </xsl:when>
16228
16339
  <xsl:otherwise>