metanorma-itu 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2928c54fd6da163508649bdf9367bdf62f8e65ec3c2f598f4ab7d66911da6429
4
- data.tar.gz: 21886b70fdec2eb308d94580d685bd78a6c7aa0faf5ced0556bd4a3ab59d245e
3
+ metadata.gz: 5ba47f749671a89645723abe98c885b11763bc82af7f2ae51dd61bf258c6c020
4
+ data.tar.gz: d7d9ca77cb3378430bb1c9d93c3027609c2f4154e4387178f394536f505742f0
5
5
  SHA512:
6
- metadata.gz: 782bc386c1bf33a61b33c953e427b9a695ae802e23489734e471a51c6ceca75a63e11111fd0d757864e899f0d2f8af190cf77862146622c29d9eb6f3c9da1804
7
- data.tar.gz: ac2dbe62d0dd1eb5f9c9c498c8b3708d29762d4f0865e102476a0848479d51357adbda59b92670ffa787e8386a5d902396a6465da757885f5385283643e30f0d
6
+ metadata.gz: 1587f02fd05eade3ee88febabfb053f0a295e982bf1285b067d99d81eba1a34c593ee4971ad6e3c909424193a8852ba0f4061ecf4c5c5622416289006f7d1a53
7
+ data.tar.gz: 85573c130621858588e1f0910a10d99ff874c930acf191b793abaea98c63d17492de7ab95bc402f2dab2ff22844e0763d7d3f69f568e19d173109fde53a71ae2
@@ -158,17 +158,7 @@
158
158
  <data type="ID"/>
159
159
  </attribute>
160
160
  <oneOrMore>
161
- <choice>
162
- <ref name="formula"/>
163
- <ref name="ul"/>
164
- <ref name="ol"/>
165
- <ref name="dl"/>
166
- <ref name="quote"/>
167
- <ref name="sourcecode"/>
168
- <ref name="paragraph"/>
169
- <ref name="table"/>
170
- <ref name="figure"/>
171
- </choice>
161
+ <ref name="paragraph"/>
172
162
  </oneOrMore>
173
163
  </element>
174
164
  </define>
@@ -1028,6 +1018,9 @@
1028
1018
  <value>alphabet_upper</value>
1029
1019
  </choice>
1030
1020
  </attribute>
1021
+ <optional>
1022
+ <attribute name="start"/>
1023
+ </optional>
1031
1024
  <oneOrMore>
1032
1025
  <ref name="li"/>
1033
1026
  </oneOrMore>
@@ -64,6 +64,11 @@
64
64
  </choice>
65
65
  </attribute>
66
66
  </optional>
67
+ <optional>
68
+ <attribute name="droploc">
69
+ <data type="boolean"/>
70
+ </attribute>
71
+ </optional>
67
72
  <text/>
68
73
  </element>
69
74
  </define>
@@ -859,6 +864,13 @@
859
864
  </define>
860
865
  <define name="standard-document">
861
866
  <element name="standard-document">
867
+ <attribute name="version"/>
868
+ <attribute name="type">
869
+ <choice>
870
+ <value>semantic</value>
871
+ <value>presentation</value>
872
+ </choice>
873
+ </attribute>
862
874
  <ref name="bibdata"/>
863
875
  <optional>
864
876
  <ref name="boilerplate"/>
@@ -880,7 +892,7 @@
880
892
  <oneOrMore>
881
893
  <choice>
882
894
  <ref name="content"/>
883
- <ref name="preface_abstract"/>
895
+ <ref name="abstract"/>
884
896
  <ref name="foreword"/>
885
897
  <ref name="introduction"/>
886
898
  <ref name="acknowledgements"/>
@@ -1481,11 +1493,6 @@
1481
1493
  </optional>
1482
1494
  </element>
1483
1495
  </define>
1484
- <define name="preface_abstract">
1485
- <element name="abstract">
1486
- <ref name="Basic-Section"/>
1487
- </element>
1488
- </define>
1489
1496
  <define name="term-clause">
1490
1497
  <element name="clause">
1491
1498
  <optional>
@@ -244,6 +244,13 @@
244
244
  </define>
245
245
  <define name="itu">
246
246
  <element name="itu-standard">
247
+ <attribute name="version"/>
248
+ <attribute name="type">
249
+ <choice>
250
+ <value>semantic</value>
251
+ <value>presentation</value>
252
+ </choice>
253
+ </attribute>
247
254
  <ref name="bibdata"/>
248
255
  <zeroOrMore>
249
256
  <ref name="termdocsource"/>
@@ -124,6 +124,10 @@
124
124
 
125
125
  <xsl:call-template name="addPDFUAmeta"/>
126
126
 
127
+ <xsl:call-template name="addBookmarks">
128
+ <xsl:with-param name="contents" select="$contents"/>
129
+ </xsl:call-template>
130
+
127
131
  <!-- cover page -->
128
132
  <fo:page-sequence master-reference="cover-page">
129
133
  <fo:flow flow-name="xsl-region-body">
@@ -352,7 +356,7 @@
352
356
  <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
353
357
  </xsl:if>
354
358
 
355
- <xsl:if test="xalan:nodeset($contents)//item">
359
+ <xsl:if test="xalan:nodeset($contents)//item[@display = 'true']">
356
360
  <fo:block break-after="page"/>
357
361
  <fo:block-container>
358
362
  <xsl:variable name="title-toc">
@@ -368,7 +372,7 @@
368
372
  <fo:block margin-top="6pt" text-align="center" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:block>
369
373
  <fo:block margin-top="6pt" text-align="right" font-weight="bold"><xsl:value-of select="$title-page"/></fo:block>
370
374
 
371
- <xsl:for-each select="xalan:nodeset($contents)//item">
375
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
372
376
  <fo:block>
373
377
  <xsl:if test="@level = 1">
374
378
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -407,8 +411,8 @@
407
411
  </fo:list-item-label>
408
412
  <fo:list-item-body start-indent="body-start()">
409
413
  <fo:block text-align-last="justify">
410
- <fo:basic-link internal-destination="{@id}" fox:alt-text="text()">
411
- <xsl:apply-templates/>
414
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
415
+ <xsl:apply-templates select="title"/>
412
416
  <fo:inline keep-together.within-line="always">
413
417
  <fo:leader leader-pattern="dots"/>
414
418
  <fo:page-number-citation ref-id="{@id}"/>
@@ -501,26 +505,35 @@
501
505
  </xsl:variable>
502
506
 
503
507
  <xsl:variable name="display">
504
- <xsl:choose>
505
- <xsl:when test="ancestor-or-self::itu:bibitem">false</xsl:when>
506
- <xsl:when test="ancestor-or-self::itu:term">false</xsl:when>
508
+ <xsl:choose>
507
509
  <xsl:when test="$level &gt;= 3">false</xsl:when>
508
510
  <xsl:when test="$section = '' and $type = 'clause' and $level &gt;= 2">false</xsl:when>
509
511
  <xsl:otherwise>true</xsl:otherwise>
510
512
  </xsl:choose>
511
513
  </xsl:variable>
512
514
 
513
- <xsl:if test="$display = 'true'">
515
+ <xsl:variable name="skip">
516
+ <xsl:choose>
517
+ <xsl:when test="ancestor-or-self::itu:bibitem">true</xsl:when>
518
+ <xsl:when test="ancestor-or-self::itu:term">true</xsl:when>
519
+ <xsl:otherwise>false</xsl:otherwise>
520
+ </xsl:choose>
521
+ </xsl:variable>
522
+
523
+ <xsl:if test="$skip = 'false'">
514
524
 
515
525
  <xsl:variable name="title">
516
526
  <xsl:call-template name="getName"/>
517
527
  </xsl:variable>
518
528
 
519
- <item level="{$level}" section="{$section}" type="{$type}">
529
+ <item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
520
530
  <xsl:call-template name="setId"/>
521
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
531
+ <title>
532
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
533
+ </title>
534
+ <xsl:apply-templates mode="contents"/>
522
535
  </item>
523
- <xsl:apply-templates mode="contents"/>
536
+
524
537
  </xsl:if>
525
538
 
526
539
  </xsl:template>
@@ -1226,6 +1239,12 @@
1226
1239
 
1227
1240
  </title-edition>
1228
1241
 
1242
+ <title-edition lang="fr">
1243
+
1244
+ <xsl:text>Édition </xsl:text>
1245
+
1246
+ </title-edition>
1247
+
1229
1248
 
1230
1249
  <title-toc lang="en">
1231
1250
 
@@ -1334,7 +1353,9 @@
1334
1353
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
1335
1354
  </xsl:otherwise>
1336
1355
  </xsl:choose>
1337
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="link-style">
1356
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
1357
+
1358
+ </xsl:attribute-set><xsl:attribute-set name="link-style">
1338
1359
 
1339
1360
 
1340
1361
 
@@ -3307,12 +3328,101 @@
3307
3328
 
3308
3329
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3309
3330
  </fo:block>
3310
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><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">
3331
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><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">
3311
3332
  <xsl:apply-templates mode="contents"/>
3312
3333
  <xsl:text> </xsl:text>
3313
- </xsl:template><xsl:template match="text()" mode="contents">
3334
+ </xsl:template><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="bookmarks">
3335
+ <xsl:apply-templates mode="bookmarks"/>
3336
+ <xsl:text> </xsl:text>
3337
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
3338
+ <xsl:value-of select="."/>
3339
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3314
3340
  <xsl:value-of select="."/>
3315
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3341
+ </xsl:template><xsl:template match="node()" mode="contents">
3342
+ <xsl:apply-templates mode="contents"/>
3343
+ </xsl:template><xsl:template match="node()" mode="bookmarks">
3344
+ <xsl:apply-templates mode="bookmarks"/>
3345
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3346
+ <xsl:apply-templates select="."/>
3347
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3348
+ <xsl:apply-templates mode="bookmarks"/>
3349
+ </xsl:template><xsl:template name="addBookmarks">
3350
+ <xsl:param name="contents"/>
3351
+ <xsl:if test="xalan:nodeset($contents)//item">
3352
+ <fo:bookmark-tree>
3353
+ <xsl:choose>
3354
+ <xsl:when test="xalan:nodeset($contents)/doc">
3355
+ <xsl:choose>
3356
+ <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
3357
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3358
+ <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3359
+ <fo:bookmark-title>
3360
+ <xsl:variable name="bookmark-title_">
3361
+ <xsl:choose>
3362
+ <xsl:when test="@lang = 'en'">
3363
+
3364
+
3365
+ </xsl:when>
3366
+ <xsl:when test="@lang = 'fr'">
3367
+
3368
+
3369
+ </xsl:when>
3370
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3371
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3372
+ </xsl:choose>
3373
+ </xsl:variable>
3374
+ <xsl:choose>
3375
+ <xsl:when test="normalize-space($bookmark-title_) != ''">
3376
+ <xsl:value-of select="normalize-space($bookmark-title_)"/>
3377
+ </xsl:when>
3378
+ <xsl:otherwise>
3379
+ <xsl:choose>
3380
+ <xsl:when test="@lang = 'en'">English</xsl:when>
3381
+ <xsl:when test="@lang = 'fr'">Français</xsl:when>
3382
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3383
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3384
+ </xsl:choose>
3385
+ </xsl:otherwise>
3386
+ </xsl:choose>
3387
+ </fo:bookmark-title>
3388
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3389
+ </fo:bookmark>
3390
+
3391
+ </xsl:for-each>
3392
+ </xsl:when>
3393
+ <xsl:otherwise>
3394
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3395
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3396
+ </xsl:for-each>
3397
+ </xsl:otherwise>
3398
+ </xsl:choose>
3399
+ </xsl:when>
3400
+ <xsl:otherwise>
3401
+ <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
3402
+ </xsl:otherwise>
3403
+ </xsl:choose>
3404
+
3405
+
3406
+
3407
+
3408
+
3409
+
3410
+
3411
+
3412
+ </fo:bookmark-tree>
3413
+ </xsl:if>
3414
+ </xsl:template><xsl:template match="item" mode="bookmark">
3415
+ <fo:bookmark internal-destination="{@id}" starting-state="hide">
3416
+ <fo:bookmark-title>
3417
+ <xsl:if test="@section != ''">
3418
+ <xsl:value-of select="@section"/>
3419
+ <xsl:text> </xsl:text>
3420
+ </xsl:if>
3421
+ <xsl:value-of select="normalize-space(title)"/>
3422
+ </fo:bookmark-title>
3423
+ <xsl:apply-templates mode="bookmark"/>
3424
+ </fo:bookmark>
3425
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3316
3426
  <xsl:if test="normalize-space() != ''">
3317
3427
  <fo:block xsl:use-attribute-sets="figure-name-style">
3318
3428
 
@@ -3370,7 +3480,7 @@
3370
3480
  <xsl:apply-templates/>
3371
3481
  </xsl:otherwise>
3372
3482
  </xsl:choose>
3373
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3483
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3374
3484
  <xsl:text> </xsl:text>
3375
3485
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
3376
3486
  <xsl:copy>
@@ -3967,20 +4077,29 @@
3967
4077
  <!-- 0xA0 to space replacement -->
3968
4078
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3969
4079
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
3970
- <fo:block-container margin-left="0mm">
3971
- <xsl:if test="parent::*[local-name() = 'note']">
3972
- <xsl:attribute name="margin-left">
3973
- <xsl:choose>
3974
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3975
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3976
- </xsl:choose>
3977
- </xsl:attribute>
3978
-
3979
- </xsl:if>
3980
- <fo:block-container margin-left="0mm">
3981
- <xsl:apply-templates select="." mode="ul_ol"/>
3982
- </fo:block-container>
3983
- </fo:block-container>
4080
+ <xsl:choose>
4081
+ <xsl:when test="parent::*[local-name() = 'note']">
4082
+ <fo:block-container>
4083
+ <xsl:attribute name="margin-left">
4084
+ <xsl:choose>
4085
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
4086
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4087
+ </xsl:choose>
4088
+ </xsl:attribute>
4089
+
4090
+ <fo:block-container margin-left="0mm">
4091
+ <fo:block>
4092
+ <xsl:apply-templates select="." mode="ul_ol"/>
4093
+ </fo:block>
4094
+ </fo:block-container>
4095
+ </fo:block-container>
4096
+ </xsl:when>
4097
+ <xsl:otherwise>
4098
+ <fo:block>
4099
+ <xsl:apply-templates select="." mode="ul_ol"/>
4100
+ </fo:block>
4101
+ </xsl:otherwise>
4102
+ </xsl:choose>
3984
4103
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
3985
4104
  <!-- <row>
3986
4105
  <date>05-07-2013</date>
@@ -4278,6 +4397,7 @@
4278
4397
 
4279
4398
 
4280
4399
 
4400
+
4281
4401
  </xsl:variable>
4282
4402
  <xsl:if test="$documentNS != $XSLNS">
4283
4403
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -4303,4 +4423,21 @@
4303
4423
  </xsl:otherwise>
4304
4424
  </xsl:choose>
4305
4425
  </xsl:attribute>
4426
+ </xsl:template><xsl:template name="add-letter-spacing">
4427
+ <xsl:param name="text"/>
4428
+ <xsl:param name="letter-spacing" select="'0.15'"/>
4429
+ <xsl:if test="string-length($text) &gt; 0">
4430
+ <xsl:variable name="char" select="substring($text, 1, 1)"/>
4431
+ <fo:inline padding-right="{$letter-spacing}mm">
4432
+ <xsl:if test="$char = '®'">
4433
+ <xsl:attribute name="font-size">58%</xsl:attribute>
4434
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4435
+ </xsl:if>
4436
+ <xsl:value-of select="$char"/>
4437
+ </fo:inline>
4438
+ <xsl:call-template name="add-letter-spacing">
4439
+ <xsl:with-param name="text" select="substring($text, 2)"/>
4440
+ <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4441
+ </xsl:call-template>
4442
+ </xsl:if>
4306
4443
  </xsl:template></xsl:stylesheet>
@@ -124,6 +124,10 @@
124
124
 
125
125
  <xsl:call-template name="addPDFUAmeta"/>
126
126
 
127
+ <xsl:call-template name="addBookmarks">
128
+ <xsl:with-param name="contents" select="$contents"/>
129
+ </xsl:call-template>
130
+
127
131
  <!-- cover page -->
128
132
  <fo:page-sequence master-reference="cover-page">
129
133
  <fo:flow flow-name="xsl-region-body">
@@ -352,7 +356,7 @@
352
356
  <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
353
357
  </xsl:if>
354
358
 
355
- <xsl:if test="xalan:nodeset($contents)//item">
359
+ <xsl:if test="xalan:nodeset($contents)//item[@display = 'true']">
356
360
  <fo:block break-after="page"/>
357
361
  <fo:block-container>
358
362
  <xsl:variable name="title-toc">
@@ -368,7 +372,7 @@
368
372
  <fo:block margin-top="6pt" text-align="center" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:block>
369
373
  <fo:block margin-top="6pt" text-align="right" font-weight="bold"><xsl:value-of select="$title-page"/></fo:block>
370
374
 
371
- <xsl:for-each select="xalan:nodeset($contents)//item">
375
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
372
376
  <fo:block>
373
377
  <xsl:if test="@level = 1">
374
378
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -407,8 +411,8 @@
407
411
  </fo:list-item-label>
408
412
  <fo:list-item-body start-indent="body-start()">
409
413
  <fo:block text-align-last="justify">
410
- <fo:basic-link internal-destination="{@id}" fox:alt-text="text()">
411
- <xsl:apply-templates/>
414
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
415
+ <xsl:apply-templates select="title"/>
412
416
  <fo:inline keep-together.within-line="always">
413
417
  <fo:leader leader-pattern="dots"/>
414
418
  <fo:page-number-citation ref-id="{@id}"/>
@@ -501,26 +505,35 @@
501
505
  </xsl:variable>
502
506
 
503
507
  <xsl:variable name="display">
504
- <xsl:choose>
505
- <xsl:when test="ancestor-or-self::itu:bibitem">false</xsl:when>
506
- <xsl:when test="ancestor-or-self::itu:term">false</xsl:when>
508
+ <xsl:choose>
507
509
  <xsl:when test="$level &gt;= 3">false</xsl:when>
508
510
  <xsl:when test="$section = '' and $type = 'clause' and $level &gt;= 2">false</xsl:when>
509
511
  <xsl:otherwise>true</xsl:otherwise>
510
512
  </xsl:choose>
511
513
  </xsl:variable>
512
514
 
513
- <xsl:if test="$display = 'true'">
515
+ <xsl:variable name="skip">
516
+ <xsl:choose>
517
+ <xsl:when test="ancestor-or-self::itu:bibitem">true</xsl:when>
518
+ <xsl:when test="ancestor-or-self::itu:term">true</xsl:when>
519
+ <xsl:otherwise>false</xsl:otherwise>
520
+ </xsl:choose>
521
+ </xsl:variable>
522
+
523
+ <xsl:if test="$skip = 'false'">
514
524
 
515
525
  <xsl:variable name="title">
516
526
  <xsl:call-template name="getName"/>
517
527
  </xsl:variable>
518
528
 
519
- <item level="{$level}" section="{$section}" type="{$type}">
529
+ <item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
520
530
  <xsl:call-template name="setId"/>
521
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
531
+ <title>
532
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
533
+ </title>
534
+ <xsl:apply-templates mode="contents"/>
522
535
  </item>
523
- <xsl:apply-templates mode="contents"/>
536
+
524
537
  </xsl:if>
525
538
 
526
539
  </xsl:template>
@@ -1226,6 +1239,12 @@
1226
1239
 
1227
1240
  </title-edition>
1228
1241
 
1242
+ <title-edition lang="fr">
1243
+
1244
+ <xsl:text>Édition </xsl:text>
1245
+
1246
+ </title-edition>
1247
+
1229
1248
 
1230
1249
  <title-toc lang="en">
1231
1250
 
@@ -1334,7 +1353,9 @@
1334
1353
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
1335
1354
  </xsl:otherwise>
1336
1355
  </xsl:choose>
1337
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="link-style">
1356
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
1357
+
1358
+ </xsl:attribute-set><xsl:attribute-set name="link-style">
1338
1359
 
1339
1360
 
1340
1361
 
@@ -3307,12 +3328,101 @@
3307
3328
 
3308
3329
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3309
3330
  </fo:block>
3310
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><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">
3331
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><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">
3311
3332
  <xsl:apply-templates mode="contents"/>
3312
3333
  <xsl:text> </xsl:text>
3313
- </xsl:template><xsl:template match="text()" mode="contents">
3334
+ </xsl:template><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="bookmarks">
3335
+ <xsl:apply-templates mode="bookmarks"/>
3336
+ <xsl:text> </xsl:text>
3337
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
3338
+ <xsl:value-of select="."/>
3339
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3314
3340
  <xsl:value-of select="."/>
3315
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3341
+ </xsl:template><xsl:template match="node()" mode="contents">
3342
+ <xsl:apply-templates mode="contents"/>
3343
+ </xsl:template><xsl:template match="node()" mode="bookmarks">
3344
+ <xsl:apply-templates mode="bookmarks"/>
3345
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3346
+ <xsl:apply-templates select="."/>
3347
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3348
+ <xsl:apply-templates mode="bookmarks"/>
3349
+ </xsl:template><xsl:template name="addBookmarks">
3350
+ <xsl:param name="contents"/>
3351
+ <xsl:if test="xalan:nodeset($contents)//item">
3352
+ <fo:bookmark-tree>
3353
+ <xsl:choose>
3354
+ <xsl:when test="xalan:nodeset($contents)/doc">
3355
+ <xsl:choose>
3356
+ <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
3357
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3358
+ <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3359
+ <fo:bookmark-title>
3360
+ <xsl:variable name="bookmark-title_">
3361
+ <xsl:choose>
3362
+ <xsl:when test="@lang = 'en'">
3363
+
3364
+
3365
+ </xsl:when>
3366
+ <xsl:when test="@lang = 'fr'">
3367
+
3368
+
3369
+ </xsl:when>
3370
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3371
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3372
+ </xsl:choose>
3373
+ </xsl:variable>
3374
+ <xsl:choose>
3375
+ <xsl:when test="normalize-space($bookmark-title_) != ''">
3376
+ <xsl:value-of select="normalize-space($bookmark-title_)"/>
3377
+ </xsl:when>
3378
+ <xsl:otherwise>
3379
+ <xsl:choose>
3380
+ <xsl:when test="@lang = 'en'">English</xsl:when>
3381
+ <xsl:when test="@lang = 'fr'">Français</xsl:when>
3382
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3383
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3384
+ </xsl:choose>
3385
+ </xsl:otherwise>
3386
+ </xsl:choose>
3387
+ </fo:bookmark-title>
3388
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3389
+ </fo:bookmark>
3390
+
3391
+ </xsl:for-each>
3392
+ </xsl:when>
3393
+ <xsl:otherwise>
3394
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3395
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3396
+ </xsl:for-each>
3397
+ </xsl:otherwise>
3398
+ </xsl:choose>
3399
+ </xsl:when>
3400
+ <xsl:otherwise>
3401
+ <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
3402
+ </xsl:otherwise>
3403
+ </xsl:choose>
3404
+
3405
+
3406
+
3407
+
3408
+
3409
+
3410
+
3411
+
3412
+ </fo:bookmark-tree>
3413
+ </xsl:if>
3414
+ </xsl:template><xsl:template match="item" mode="bookmark">
3415
+ <fo:bookmark internal-destination="{@id}" starting-state="hide">
3416
+ <fo:bookmark-title>
3417
+ <xsl:if test="@section != ''">
3418
+ <xsl:value-of select="@section"/>
3419
+ <xsl:text> </xsl:text>
3420
+ </xsl:if>
3421
+ <xsl:value-of select="normalize-space(title)"/>
3422
+ </fo:bookmark-title>
3423
+ <xsl:apply-templates mode="bookmark"/>
3424
+ </fo:bookmark>
3425
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3316
3426
  <xsl:if test="normalize-space() != ''">
3317
3427
  <fo:block xsl:use-attribute-sets="figure-name-style">
3318
3428
 
@@ -3370,7 +3480,7 @@
3370
3480
  <xsl:apply-templates/>
3371
3481
  </xsl:otherwise>
3372
3482
  </xsl:choose>
3373
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3483
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3374
3484
  <xsl:text> </xsl:text>
3375
3485
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
3376
3486
  <xsl:copy>
@@ -3967,20 +4077,29 @@
3967
4077
  <!-- 0xA0 to space replacement -->
3968
4078
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3969
4079
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
3970
- <fo:block-container margin-left="0mm">
3971
- <xsl:if test="parent::*[local-name() = 'note']">
3972
- <xsl:attribute name="margin-left">
3973
- <xsl:choose>
3974
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3975
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3976
- </xsl:choose>
3977
- </xsl:attribute>
3978
-
3979
- </xsl:if>
3980
- <fo:block-container margin-left="0mm">
3981
- <xsl:apply-templates select="." mode="ul_ol"/>
3982
- </fo:block-container>
3983
- </fo:block-container>
4080
+ <xsl:choose>
4081
+ <xsl:when test="parent::*[local-name() = 'note']">
4082
+ <fo:block-container>
4083
+ <xsl:attribute name="margin-left">
4084
+ <xsl:choose>
4085
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
4086
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4087
+ </xsl:choose>
4088
+ </xsl:attribute>
4089
+
4090
+ <fo:block-container margin-left="0mm">
4091
+ <fo:block>
4092
+ <xsl:apply-templates select="." mode="ul_ol"/>
4093
+ </fo:block>
4094
+ </fo:block-container>
4095
+ </fo:block-container>
4096
+ </xsl:when>
4097
+ <xsl:otherwise>
4098
+ <fo:block>
4099
+ <xsl:apply-templates select="." mode="ul_ol"/>
4100
+ </fo:block>
4101
+ </xsl:otherwise>
4102
+ </xsl:choose>
3984
4103
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
3985
4104
  <!-- <row>
3986
4105
  <date>05-07-2013</date>
@@ -4278,6 +4397,7 @@
4278
4397
 
4279
4398
 
4280
4399
 
4400
+
4281
4401
  </xsl:variable>
4282
4402
  <xsl:if test="$documentNS != $XSLNS">
4283
4403
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -4303,4 +4423,21 @@
4303
4423
  </xsl:otherwise>
4304
4424
  </xsl:choose>
4305
4425
  </xsl:attribute>
4426
+ </xsl:template><xsl:template name="add-letter-spacing">
4427
+ <xsl:param name="text"/>
4428
+ <xsl:param name="letter-spacing" select="'0.15'"/>
4429
+ <xsl:if test="string-length($text) &gt; 0">
4430
+ <xsl:variable name="char" select="substring($text, 1, 1)"/>
4431
+ <fo:inline padding-right="{$letter-spacing}mm">
4432
+ <xsl:if test="$char = '®'">
4433
+ <xsl:attribute name="font-size">58%</xsl:attribute>
4434
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4435
+ </xsl:if>
4436
+ <xsl:value-of select="$char"/>
4437
+ </fo:inline>
4438
+ <xsl:call-template name="add-letter-spacing">
4439
+ <xsl:with-param name="text" select="substring($text, 2)"/>
4440
+ <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4441
+ </xsl:call-template>
4442
+ </xsl:if>
4306
4443
  </xsl:template></xsl:stylesheet>
@@ -124,6 +124,10 @@
124
124
 
125
125
  <xsl:call-template name="addPDFUAmeta"/>
126
126
 
127
+ <xsl:call-template name="addBookmarks">
128
+ <xsl:with-param name="contents" select="$contents"/>
129
+ </xsl:call-template>
130
+
127
131
  <!-- cover page -->
128
132
  <fo:page-sequence master-reference="cover-page">
129
133
  <fo:flow flow-name="xsl-region-body">
@@ -352,7 +356,7 @@
352
356
  <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
353
357
  </xsl:if>
354
358
 
355
- <xsl:if test="xalan:nodeset($contents)//item">
359
+ <xsl:if test="xalan:nodeset($contents)//item[@display = 'true']">
356
360
  <fo:block break-after="page"/>
357
361
  <fo:block-container>
358
362
  <xsl:variable name="title-toc">
@@ -368,7 +372,7 @@
368
372
  <fo:block margin-top="6pt" text-align="center" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:block>
369
373
  <fo:block margin-top="6pt" text-align="right" font-weight="bold"><xsl:value-of select="$title-page"/></fo:block>
370
374
 
371
- <xsl:for-each select="xalan:nodeset($contents)//item">
375
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
372
376
  <fo:block>
373
377
  <xsl:if test="@level = 1">
374
378
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -407,8 +411,8 @@
407
411
  </fo:list-item-label>
408
412
  <fo:list-item-body start-indent="body-start()">
409
413
  <fo:block text-align-last="justify">
410
- <fo:basic-link internal-destination="{@id}" fox:alt-text="text()">
411
- <xsl:apply-templates/>
414
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
415
+ <xsl:apply-templates select="title"/>
412
416
  <fo:inline keep-together.within-line="always">
413
417
  <fo:leader leader-pattern="dots"/>
414
418
  <fo:page-number-citation ref-id="{@id}"/>
@@ -501,26 +505,35 @@
501
505
  </xsl:variable>
502
506
 
503
507
  <xsl:variable name="display">
504
- <xsl:choose>
505
- <xsl:when test="ancestor-or-self::itu:bibitem">false</xsl:when>
506
- <xsl:when test="ancestor-or-self::itu:term">false</xsl:when>
508
+ <xsl:choose>
507
509
  <xsl:when test="$level &gt;= 3">false</xsl:when>
508
510
  <xsl:when test="$section = '' and $type = 'clause' and $level &gt;= 2">false</xsl:when>
509
511
  <xsl:otherwise>true</xsl:otherwise>
510
512
  </xsl:choose>
511
513
  </xsl:variable>
512
514
 
513
- <xsl:if test="$display = 'true'">
515
+ <xsl:variable name="skip">
516
+ <xsl:choose>
517
+ <xsl:when test="ancestor-or-self::itu:bibitem">true</xsl:when>
518
+ <xsl:when test="ancestor-or-self::itu:term">true</xsl:when>
519
+ <xsl:otherwise>false</xsl:otherwise>
520
+ </xsl:choose>
521
+ </xsl:variable>
522
+
523
+ <xsl:if test="$skip = 'false'">
514
524
 
515
525
  <xsl:variable name="title">
516
526
  <xsl:call-template name="getName"/>
517
527
  </xsl:variable>
518
528
 
519
- <item level="{$level}" section="{$section}" type="{$type}">
529
+ <item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
520
530
  <xsl:call-template name="setId"/>
521
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
531
+ <title>
532
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
533
+ </title>
534
+ <xsl:apply-templates mode="contents"/>
522
535
  </item>
523
- <xsl:apply-templates mode="contents"/>
536
+
524
537
  </xsl:if>
525
538
 
526
539
  </xsl:template>
@@ -1226,6 +1239,12 @@
1226
1239
 
1227
1240
  </title-edition>
1228
1241
 
1242
+ <title-edition lang="fr">
1243
+
1244
+ <xsl:text>Édition </xsl:text>
1245
+
1246
+ </title-edition>
1247
+
1229
1248
 
1230
1249
  <title-toc lang="en">
1231
1250
 
@@ -1334,7 +1353,9 @@
1334
1353
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
1335
1354
  </xsl:otherwise>
1336
1355
  </xsl:choose>
1337
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="link-style">
1356
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
1357
+
1358
+ </xsl:attribute-set><xsl:attribute-set name="link-style">
1338
1359
 
1339
1360
 
1340
1361
 
@@ -3307,12 +3328,101 @@
3307
3328
 
3308
3329
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3309
3330
  </fo:block>
3310
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><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">
3331
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><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">
3311
3332
  <xsl:apply-templates mode="contents"/>
3312
3333
  <xsl:text> </xsl:text>
3313
- </xsl:template><xsl:template match="text()" mode="contents">
3334
+ </xsl:template><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="bookmarks">
3335
+ <xsl:apply-templates mode="bookmarks"/>
3336
+ <xsl:text> </xsl:text>
3337
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
3338
+ <xsl:value-of select="."/>
3339
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3314
3340
  <xsl:value-of select="."/>
3315
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3341
+ </xsl:template><xsl:template match="node()" mode="contents">
3342
+ <xsl:apply-templates mode="contents"/>
3343
+ </xsl:template><xsl:template match="node()" mode="bookmarks">
3344
+ <xsl:apply-templates mode="bookmarks"/>
3345
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3346
+ <xsl:apply-templates select="."/>
3347
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3348
+ <xsl:apply-templates mode="bookmarks"/>
3349
+ </xsl:template><xsl:template name="addBookmarks">
3350
+ <xsl:param name="contents"/>
3351
+ <xsl:if test="xalan:nodeset($contents)//item">
3352
+ <fo:bookmark-tree>
3353
+ <xsl:choose>
3354
+ <xsl:when test="xalan:nodeset($contents)/doc">
3355
+ <xsl:choose>
3356
+ <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
3357
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3358
+ <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3359
+ <fo:bookmark-title>
3360
+ <xsl:variable name="bookmark-title_">
3361
+ <xsl:choose>
3362
+ <xsl:when test="@lang = 'en'">
3363
+
3364
+
3365
+ </xsl:when>
3366
+ <xsl:when test="@lang = 'fr'">
3367
+
3368
+
3369
+ </xsl:when>
3370
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3371
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3372
+ </xsl:choose>
3373
+ </xsl:variable>
3374
+ <xsl:choose>
3375
+ <xsl:when test="normalize-space($bookmark-title_) != ''">
3376
+ <xsl:value-of select="normalize-space($bookmark-title_)"/>
3377
+ </xsl:when>
3378
+ <xsl:otherwise>
3379
+ <xsl:choose>
3380
+ <xsl:when test="@lang = 'en'">English</xsl:when>
3381
+ <xsl:when test="@lang = 'fr'">Français</xsl:when>
3382
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3383
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3384
+ </xsl:choose>
3385
+ </xsl:otherwise>
3386
+ </xsl:choose>
3387
+ </fo:bookmark-title>
3388
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3389
+ </fo:bookmark>
3390
+
3391
+ </xsl:for-each>
3392
+ </xsl:when>
3393
+ <xsl:otherwise>
3394
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3395
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3396
+ </xsl:for-each>
3397
+ </xsl:otherwise>
3398
+ </xsl:choose>
3399
+ </xsl:when>
3400
+ <xsl:otherwise>
3401
+ <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
3402
+ </xsl:otherwise>
3403
+ </xsl:choose>
3404
+
3405
+
3406
+
3407
+
3408
+
3409
+
3410
+
3411
+
3412
+ </fo:bookmark-tree>
3413
+ </xsl:if>
3414
+ </xsl:template><xsl:template match="item" mode="bookmark">
3415
+ <fo:bookmark internal-destination="{@id}" starting-state="hide">
3416
+ <fo:bookmark-title>
3417
+ <xsl:if test="@section != ''">
3418
+ <xsl:value-of select="@section"/>
3419
+ <xsl:text> </xsl:text>
3420
+ </xsl:if>
3421
+ <xsl:value-of select="normalize-space(title)"/>
3422
+ </fo:bookmark-title>
3423
+ <xsl:apply-templates mode="bookmark"/>
3424
+ </fo:bookmark>
3425
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3316
3426
  <xsl:if test="normalize-space() != ''">
3317
3427
  <fo:block xsl:use-attribute-sets="figure-name-style">
3318
3428
 
@@ -3370,7 +3480,7 @@
3370
3480
  <xsl:apply-templates/>
3371
3481
  </xsl:otherwise>
3372
3482
  </xsl:choose>
3373
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3483
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3374
3484
  <xsl:text> </xsl:text>
3375
3485
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
3376
3486
  <xsl:copy>
@@ -3967,20 +4077,29 @@
3967
4077
  <!-- 0xA0 to space replacement -->
3968
4078
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3969
4079
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
3970
- <fo:block-container margin-left="0mm">
3971
- <xsl:if test="parent::*[local-name() = 'note']">
3972
- <xsl:attribute name="margin-left">
3973
- <xsl:choose>
3974
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3975
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3976
- </xsl:choose>
3977
- </xsl:attribute>
3978
-
3979
- </xsl:if>
3980
- <fo:block-container margin-left="0mm">
3981
- <xsl:apply-templates select="." mode="ul_ol"/>
3982
- </fo:block-container>
3983
- </fo:block-container>
4080
+ <xsl:choose>
4081
+ <xsl:when test="parent::*[local-name() = 'note']">
4082
+ <fo:block-container>
4083
+ <xsl:attribute name="margin-left">
4084
+ <xsl:choose>
4085
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
4086
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4087
+ </xsl:choose>
4088
+ </xsl:attribute>
4089
+
4090
+ <fo:block-container margin-left="0mm">
4091
+ <fo:block>
4092
+ <xsl:apply-templates select="." mode="ul_ol"/>
4093
+ </fo:block>
4094
+ </fo:block-container>
4095
+ </fo:block-container>
4096
+ </xsl:when>
4097
+ <xsl:otherwise>
4098
+ <fo:block>
4099
+ <xsl:apply-templates select="." mode="ul_ol"/>
4100
+ </fo:block>
4101
+ </xsl:otherwise>
4102
+ </xsl:choose>
3984
4103
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
3985
4104
  <!-- <row>
3986
4105
  <date>05-07-2013</date>
@@ -4278,6 +4397,7 @@
4278
4397
 
4279
4398
 
4280
4399
 
4400
+
4281
4401
  </xsl:variable>
4282
4402
  <xsl:if test="$documentNS != $XSLNS">
4283
4403
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -4303,4 +4423,21 @@
4303
4423
  </xsl:otherwise>
4304
4424
  </xsl:choose>
4305
4425
  </xsl:attribute>
4426
+ </xsl:template><xsl:template name="add-letter-spacing">
4427
+ <xsl:param name="text"/>
4428
+ <xsl:param name="letter-spacing" select="'0.15'"/>
4429
+ <xsl:if test="string-length($text) &gt; 0">
4430
+ <xsl:variable name="char" select="substring($text, 1, 1)"/>
4431
+ <fo:inline padding-right="{$letter-spacing}mm">
4432
+ <xsl:if test="$char = '®'">
4433
+ <xsl:attribute name="font-size">58%</xsl:attribute>
4434
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4435
+ </xsl:if>
4436
+ <xsl:value-of select="$char"/>
4437
+ </fo:inline>
4438
+ <xsl:call-template name="add-letter-spacing">
4439
+ <xsl:with-param name="text" select="substring($text, 2)"/>
4440
+ <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4441
+ </xsl:call-template>
4442
+ </xsl:if>
4306
4443
  </xsl:template></xsl:stylesheet>
@@ -20,7 +20,7 @@ module IsoDoc
20
20
  @labels["appendix"] : @labels["annex"]
21
21
  @anchors[clause["id"]] =
22
22
  { label: annex_name_lbl(clause, num), type: "clause",
23
- xref: "#{lbl} #{num}", level: 1 }
23
+ xref: "#{lbl} #{num}", level: 1, value: num }
24
24
  if a = single_annex_special_section(clause)
25
25
  annex_names1(a, "#{num}", 1)
26
26
  else
@@ -164,6 +164,7 @@ module IsoDoc
164
164
  idx = notes.size == 1 ? "" : " #{c.increment(n).print}"
165
165
  @anchors[n["id"]] =
166
166
  { label: termnote_label(idx).strip, type: "termnote",
167
+ value: idx,
167
168
  xref: l10n("#{anchor(t['id'], :xref)}, "\
168
169
  "#{@labels["note_xref"]} #{c.print}") }
169
170
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "1.2.3"
3
+ VERSION = "1.2.4"
4
4
  end
5
5
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_dependency "htmlentities", "~> 4.3.4"
28
28
  spec.add_dependency "ruby-jing"
29
- spec.add_dependency "metanorma-standoc", "~> 1.5.0"
29
+ spec.add_dependency "metanorma-standoc", "~> 1.6.0"
30
30
  spec.add_dependency "isodoc", "~> 1.2.0"
31
31
 
32
32
  spec.add_development_dependency "byebug", "~> 9.1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-11 00:00:00.000000000 Z
11
+ date: 2020-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.5.0
47
+ version: 1.6.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.5.0
54
+ version: 1.6.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: isodoc
57
57
  requirement: !ruby/object:Gem::Requirement