metanorma-iho 0.3.11 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iho/basicdoc.rng +21 -4
- data/lib/asciidoctor/iho/iho.rng +3 -8
- data/lib/asciidoctor/iho/isodoc.rng +429 -76
- data/lib/asciidoctor/iho/reqt.rng +23 -2
- data/lib/isodoc/iho/base_convert.rb +1 -1
- data/lib/isodoc/iho/html/wordstyle.css +12 -1
- data/lib/isodoc/iho/html/wordstyle.scss +12 -1
- data/lib/isodoc/iho/iho.specification.xsl +201 -23
- data/lib/isodoc/iho/iho.standard.xsl +201 -23
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +1 -1
- metadata +5 -5
@@ -817,7 +817,7 @@
|
|
817
817
|
</xsl:variable>
|
818
818
|
<fo:block line-height="1.1" role="H{$levelTerm}">
|
819
819
|
<fo:block font-weight="bold" keep-with-next="always">
|
820
|
-
<xsl:apply-templates select="ancestor::iho:term/iho:name" mode="presentation"/>
|
820
|
+
<xsl:apply-templates select="ancestor::iho:term[1]/iho:name" mode="presentation"/>
|
821
821
|
</fo:block>
|
822
822
|
<fo:block font-weight="bold" keep-with-next="always">
|
823
823
|
<xsl:apply-templates/>
|
@@ -1062,6 +1062,8 @@
|
|
1062
1062
|
|
1063
1063
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
1064
1064
|
|
1065
|
+
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
1066
|
+
|
1065
1067
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1066
1068
|
|
1067
1069
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
@@ -1350,6 +1352,14 @@
|
|
1350
1352
|
|
1351
1353
|
|
1352
1354
|
|
1355
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
1356
|
+
|
1357
|
+
|
1358
|
+
|
1359
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1360
|
+
<xsl:attribute name="padding-right">3mm</xsl:attribute>
|
1361
|
+
|
1362
|
+
|
1353
1363
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1354
1364
|
|
1355
1365
|
|
@@ -1524,13 +1534,20 @@
|
|
1524
1534
|
|
1525
1535
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1526
1536
|
|
1527
|
-
</xsl:attribute-set><xsl:
|
1537
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1538
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1539
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
1528
1540
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1529
1541
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1530
1542
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1531
1543
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1532
1544
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1533
|
-
</xsl:template><xsl:template name="
|
1545
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1546
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1547
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1548
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1549
|
+
</xsl:for-each>
|
1550
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1534
1551
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1535
1552
|
|
1536
1553
|
<!-- Normative references -->
|
@@ -1543,13 +1560,33 @@
|
|
1543
1560
|
<!-- Bibliography -->
|
1544
1561
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
1545
1562
|
|
1546
|
-
</xsl:template><xsl:template name="
|
1563
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1564
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1565
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1566
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1567
|
+
</xsl:for-each>
|
1568
|
+
|
1569
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1570
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1571
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1572
|
+
</xsl:for-each>
|
1573
|
+
|
1574
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1575
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1576
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1577
|
+
</xsl:for-each>
|
1578
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1547
1579
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1548
1580
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1549
1581
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1550
1582
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1551
1583
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1552
|
-
</xsl:template><xsl:template name="
|
1584
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1585
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1586
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1587
|
+
<xsl:apply-templates select="."/>
|
1588
|
+
</xsl:for-each>
|
1589
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1553
1590
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1554
1591
|
|
1555
1592
|
<!-- Normative references -->
|
@@ -1561,6 +1598,22 @@
|
|
1561
1598
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1562
1599
|
<!-- Bibliography -->
|
1563
1600
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1601
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1602
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1603
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1604
|
+
<xsl:apply-templates select="."/>
|
1605
|
+
|
1606
|
+
</xsl:for-each>
|
1607
|
+
|
1608
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1609
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1610
|
+
<xsl:apply-templates select="."/>
|
1611
|
+
</xsl:for-each>
|
1612
|
+
|
1613
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1614
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1615
|
+
<xsl:apply-templates select="."/>
|
1616
|
+
</xsl:for-each>
|
1564
1617
|
</xsl:template><xsl:template match="text()">
|
1565
1618
|
<xsl:value-of select="."/>
|
1566
1619
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -2406,14 +2459,10 @@
|
|
2406
2459
|
|
2407
2460
|
<!-- Table's note name (NOTE, for example) -->
|
2408
2461
|
|
2409
|
-
<fo:inline padding-right="2mm">
|
2462
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
2410
2463
|
|
2411
|
-
|
2412
2464
|
|
2413
2465
|
|
2414
|
-
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2415
|
-
<xsl:attribute name="padding-right">3mm</xsl:attribute>
|
2416
|
-
|
2417
2466
|
|
2418
2467
|
|
2419
2468
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
@@ -2922,6 +2971,7 @@
|
|
2922
2971
|
<fo:table-cell>
|
2923
2972
|
|
2924
2973
|
<fo:block margin-top="6pt">
|
2974
|
+
<xsl:copy-of select="@id"/>
|
2925
2975
|
|
2926
2976
|
|
2927
2977
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -3028,6 +3078,8 @@
|
|
3028
3078
|
<xsl:if test="$font-size != ''">
|
3029
3079
|
<xsl:attribute name="font-size">
|
3030
3080
|
<xsl:choose>
|
3081
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
3082
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
3031
3083
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3032
3084
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3033
3085
|
</xsl:choose>
|
@@ -3762,14 +3814,18 @@
|
|
3762
3814
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
3763
3815
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
3764
3816
|
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
3817
|
+
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
3765
3818
|
<fo:block id="{@id}">
|
3766
3819
|
<xsl:apply-templates/>
|
3767
3820
|
</fo:block>
|
3768
3821
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
3822
|
+
<!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
|
3769
3823
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
3770
3824
|
|
3771
3825
|
|
3772
|
-
|
3826
|
+
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
3827
|
+
|
3828
|
+
</xsl:if>
|
3773
3829
|
<xsl:apply-templates/>
|
3774
3830
|
</fo:block>
|
3775
3831
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
@@ -3831,6 +3887,7 @@
|
|
3831
3887
|
<xsl:otherwise>
|
3832
3888
|
<fo:block xsl:use-attribute-sets="image-style">
|
3833
3889
|
|
3890
|
+
|
3834
3891
|
<xsl:variable name="src">
|
3835
3892
|
<xsl:call-template name="image_src"/>
|
3836
3893
|
</xsl:variable>
|
@@ -4078,6 +4135,13 @@
|
|
4078
4135
|
</xsl:attribute>
|
4079
4136
|
<xsl:apply-templates mode="svg_update"/>
|
4080
4137
|
</xsl:copy>
|
4138
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4139
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4140
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4141
|
+
<xsl:call-template name="image_svg">
|
4142
|
+
<xsl:with-param name="name" select="$name"/>
|
4143
|
+
</xsl:call-template>
|
4144
|
+
</xsl:for-each>
|
4081
4145
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4082
4146
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4083
4147
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4182,7 +4246,7 @@
|
|
4182
4246
|
</fo:basic-link>
|
4183
4247
|
</fo:block>
|
4184
4248
|
</fo:block-container>
|
4185
|
-
</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">
|
4249
|
+
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
|
4186
4250
|
<xsl:apply-templates mode="contents"/>
|
4187
4251
|
<xsl:text> </xsl:text>
|
4188
4252
|
</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">
|
@@ -4190,7 +4254,7 @@
|
|
4190
4254
|
<xsl:text> </xsl:text>
|
4191
4255
|
</xsl:template><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">
|
4192
4256
|
<xsl:value-of select="."/>
|
4193
|
-
</xsl:template><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']
|
4257
|
+
</xsl:template><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="bookmarks" priority="2">
|
4194
4258
|
<xsl:value-of select="."/>
|
4195
4259
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4196
4260
|
<xsl:apply-templates mode="contents"/>
|
@@ -4288,6 +4352,8 @@
|
|
4288
4352
|
|
4289
4353
|
|
4290
4354
|
|
4355
|
+
|
4356
|
+
|
4291
4357
|
</fo:bookmark-tree>
|
4292
4358
|
</xsl:if>
|
4293
4359
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
@@ -4481,12 +4547,16 @@
|
|
4481
4547
|
<xsl:if test="$font-size != ''">
|
4482
4548
|
<xsl:attribute name="font-size">
|
4483
4549
|
<xsl:choose>
|
4550
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4551
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4484
4552
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4485
4553
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4486
4554
|
</xsl:choose>
|
4487
4555
|
</xsl:attribute>
|
4488
4556
|
</xsl:if>
|
4489
4557
|
|
4558
|
+
|
4559
|
+
|
4490
4560
|
<xsl:apply-templates/>
|
4491
4561
|
</fo:block>
|
4492
4562
|
|
@@ -4729,7 +4799,8 @@
|
|
4729
4799
|
</fo:block>
|
4730
4800
|
</fo:table-cell>
|
4731
4801
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
4732
|
-
<fo:block font-size="11pt"
|
4802
|
+
<fo:block font-size="11pt">
|
4803
|
+
|
4733
4804
|
<xsl:apply-templates/>
|
4734
4805
|
</fo:block>
|
4735
4806
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -4834,6 +4905,7 @@
|
|
4834
4905
|
</xsl:choose>
|
4835
4906
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4836
4907
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4908
|
+
|
4837
4909
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4838
4910
|
<xsl:variable name="termsource_text">
|
4839
4911
|
<xsl:apply-templates/>
|
@@ -4844,13 +4916,15 @@
|
|
4844
4916
|
<!-- <xsl:apply-templates /> -->
|
4845
4917
|
<xsl:copy-of select="$termsource_text"/>
|
4846
4918
|
</xsl:when>
|
4847
|
-
<xsl:otherwise>
|
4919
|
+
<xsl:otherwise>
|
4920
|
+
|
4848
4921
|
|
4849
4922
|
<xsl:text>[</xsl:text>
|
4850
4923
|
|
4851
4924
|
<!-- <xsl:apply-templates /> -->
|
4852
4925
|
<xsl:copy-of select="$termsource_text"/>
|
4853
4926
|
|
4927
|
+
|
4854
4928
|
<xsl:text>]</xsl:text>
|
4855
4929
|
|
4856
4930
|
</xsl:otherwise>
|
@@ -4862,14 +4936,15 @@
|
|
4862
4936
|
</xsl:if>
|
4863
4937
|
</xsl:template><xsl:variable name="localized.source">
|
4864
4938
|
<xsl:call-template name="getLocalizedString">
|
4865
|
-
|
4866
|
-
|
4939
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4940
|
+
</xsl:call-template>
|
4867
4941
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4868
4942
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4869
4943
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4870
4944
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4871
4945
|
</xsl:if>
|
4872
4946
|
|
4947
|
+
|
4873
4948
|
<fo:inline>
|
4874
4949
|
|
4875
4950
|
|
@@ -4877,6 +4952,7 @@
|
|
4877
4952
|
|
4878
4953
|
|
4879
4954
|
|
4955
|
+
|
4880
4956
|
<xsl:call-template name="getTitle">
|
4881
4957
|
<xsl:with-param name="name" select="'title-source'"/>
|
4882
4958
|
</xsl:call-template>
|
@@ -4888,6 +4964,7 @@
|
|
4888
4964
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4889
4965
|
<xsl:apply-templates/>
|
4890
4966
|
</fo:inline>
|
4967
|
+
|
4891
4968
|
</fo:basic-link>
|
4892
4969
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4893
4970
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4931,12 +5008,20 @@
|
|
4931
5008
|
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
4932
5009
|
<xsl:text>— </xsl:text>
|
4933
5010
|
<xsl:apply-templates/>
|
4934
|
-
</xsl:template><xsl:
|
5011
|
+
</xsl:template><xsl:variable name="bibitem_hidden_">
|
5012
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
|
5013
|
+
<xsl:copy-of select="."/>
|
5014
|
+
</xsl:for-each>
|
5015
|
+
<xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
|
5016
|
+
<xsl:copy-of select="."/>
|
5017
|
+
</xsl:for-each>
|
5018
|
+
</xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
|
4935
5019
|
|
4936
5020
|
<xsl:variable name="bibitemid">
|
4937
5021
|
<xsl:choose>
|
4938
|
-
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"
|
4939
|
-
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"
|
5022
|
+
<!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
|
5023
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
|
5024
|
+
<xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
4940
5025
|
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
4941
5026
|
</xsl:choose>
|
4942
5027
|
</xsl:variable>
|
@@ -4954,6 +5039,9 @@
|
|
4954
5039
|
|
4955
5040
|
</xsl:if>
|
4956
5041
|
|
5042
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
5043
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
5044
|
+
|
4957
5045
|
|
4958
5046
|
|
4959
5047
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4969,7 +5057,9 @@
|
|
4969
5057
|
|
4970
5058
|
|
4971
5059
|
</xsl:if>
|
4972
|
-
|
5060
|
+
|
5061
|
+
|
5062
|
+
|
4973
5063
|
<xsl:apply-templates/>
|
4974
5064
|
</fo:basic-link>
|
4975
5065
|
|
@@ -5024,10 +5114,10 @@
|
|
5024
5114
|
</xsl:choose>
|
5025
5115
|
</xsl:variable>
|
5026
5116
|
|
5027
|
-
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
5117
|
+
<!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
|
5028
5118
|
|
5029
5119
|
<xsl:choose>
|
5030
|
-
<xsl:when test="$
|
5120
|
+
<xsl:when test="$lang = 'zh'">
|
5031
5121
|
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
5032
5122
|
</xsl:when>
|
5033
5123
|
<xsl:when test="../../@inline-header = 'true'">
|
@@ -5571,9 +5661,97 @@
|
|
5571
5661
|
<fo:block-container border="1pt solid black" width="50%">
|
5572
5662
|
<fo:block> </fo:block>
|
5573
5663
|
</fo:block-container>
|
5664
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5665
|
+
<xsl:param name="colwidths"/>
|
5666
|
+
<xsl:variable name="colwidths_">
|
5667
|
+
<xsl:choose>
|
5668
|
+
<xsl:when test="not($colwidths)">
|
5669
|
+
<xsl:variable name="toc_table_simple">
|
5670
|
+
<tbody>
|
5671
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5672
|
+
</tbody>
|
5673
|
+
</xsl:variable>
|
5674
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5675
|
+
<xsl:call-template name="calculate-column-widths">
|
5676
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5677
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5678
|
+
</xsl:call-template>
|
5679
|
+
</xsl:when>
|
5680
|
+
<xsl:otherwise>
|
5681
|
+
<xsl:copy-of select="$colwidths"/>
|
5682
|
+
</xsl:otherwise>
|
5683
|
+
</xsl:choose>
|
5684
|
+
</xsl:variable>
|
5685
|
+
<fo:block role="TOCI" space-after="16pt">
|
5686
|
+
<fo:table width="100%" table-layout="fixed">
|
5687
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5688
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5689
|
+
</xsl:for-each>
|
5690
|
+
<fo:table-body>
|
5691
|
+
<xsl:apply-templates/>
|
5692
|
+
</fo:table-body>
|
5693
|
+
</fo:table>
|
5694
|
+
</fo:block>
|
5695
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5696
|
+
<fo:table-row min-height="5mm">
|
5697
|
+
<xsl:apply-templates/>
|
5698
|
+
</fo:table-row>
|
5699
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5700
|
+
<xsl:apply-templates/>
|
5701
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5702
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5703
|
+
<xsl:variable name="target" select="@target"/>
|
5704
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5705
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5706
|
+
<fo:table-cell>
|
5707
|
+
<fo:block>
|
5708
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5709
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5710
|
+
<xsl:choose>
|
5711
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5712
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5713
|
+
</xsl:choose>
|
5714
|
+
</xsl:for-each>
|
5715
|
+
</fo:basic-link>
|
5716
|
+
</fo:block>
|
5717
|
+
</fo:table-cell>
|
5718
|
+
</xsl:for-each>
|
5719
|
+
<!-- last column - for page numbers -->
|
5720
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5721
|
+
<fo:block>
|
5722
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5723
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5724
|
+
</fo:basic-link>
|
5725
|
+
</fo:block>
|
5726
|
+
</fo:table-cell>
|
5727
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5728
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5729
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
|
5730
|
+
<tr>
|
5731
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5732
|
+
</tr>
|
5733
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5734
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5735
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5736
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5737
|
+
<td>
|
5738
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5739
|
+
<xsl:copy-of select="."/>
|
5740
|
+
</xsl:for-each>
|
5741
|
+
</td>
|
5742
|
+
</xsl:for-each>
|
5743
|
+
<td>333</td> <!-- page number, just for fill -->
|
5574
5744
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5575
5745
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5576
5746
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5747
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5748
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5749
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5750
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5751
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5752
|
+
</svg>
|
5753
|
+
</fo:instream-foreign-object>
|
5754
|
+
</fo:inline>
|
5577
5755
|
</xsl:template><xsl:template name="convertDate">
|
5578
5756
|
<xsl:param name="date"/>
|
5579
5757
|
<xsl:param name="format" select="'short'"/>
|