metanorma-mpfa 0.6.11 → 0.6.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/mpfa/isodoc.rng +9 -0
- data/lib/asciidoctor/mpfa/section.rb +4 -6
- data/lib/isodoc/mpfa/mpfa.circular.xsl +154 -8
- data/lib/isodoc/mpfa/mpfa.compliance-standards-for-mpf-trustees.xsl +154 -8
- data/lib/isodoc/mpfa/mpfa.guidelines.xsl +154 -8
- data/lib/isodoc/mpfa/mpfa.standards.xsl +154 -8
- data/lib/isodoc/mpfa/mpfa.supervision-of-mpf-intermediaries.xsl +154 -8
- data/lib/metanorma/mpfa/version.rb +1 -1
- metadata +2 -2
@@ -1307,13 +1307,20 @@
|
|
1307
1307
|
|
1308
1308
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1309
1309
|
|
1310
|
-
</xsl:attribute-set><xsl:
|
1310
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1311
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1312
|
+
</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">
|
1311
1313
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1312
1314
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1313
1315
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1314
1316
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1315
1317
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1316
|
-
</xsl:template><xsl:template name="
|
1318
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1319
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1320
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1321
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1322
|
+
</xsl:for-each>
|
1323
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1317
1324
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1318
1325
|
|
1319
1326
|
<!-- Normative references -->
|
@@ -1326,13 +1333,33 @@
|
|
1326
1333
|
<!-- Bibliography -->
|
1327
1334
|
<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"/>
|
1328
1335
|
|
1329
|
-
</xsl:template><xsl:template name="
|
1336
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1337
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1338
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1339
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1340
|
+
</xsl:for-each>
|
1341
|
+
|
1342
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1343
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1344
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1345
|
+
</xsl:for-each>
|
1346
|
+
|
1347
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1348
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1349
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1350
|
+
</xsl:for-each>
|
1351
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1330
1352
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1331
1353
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1332
1354
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1333
1355
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1334
1356
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1335
|
-
</xsl:template><xsl:template name="
|
1357
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1358
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1359
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1360
|
+
<xsl:apply-templates select="."/>
|
1361
|
+
</xsl:for-each>
|
1362
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1336
1363
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1337
1364
|
|
1338
1365
|
<!-- Normative references -->
|
@@ -1344,6 +1371,22 @@
|
|
1344
1371
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1345
1372
|
<!-- Bibliography -->
|
1346
1373
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1374
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1375
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1376
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1377
|
+
<xsl:apply-templates select="."/>
|
1378
|
+
|
1379
|
+
</xsl:for-each>
|
1380
|
+
|
1381
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1382
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1383
|
+
<xsl:apply-templates select="."/>
|
1384
|
+
</xsl:for-each>
|
1385
|
+
|
1386
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1387
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1388
|
+
<xsl:apply-templates select="."/>
|
1389
|
+
</xsl:for-each>
|
1347
1390
|
</xsl:template><xsl:template match="text()">
|
1348
1391
|
<xsl:value-of select="."/>
|
1349
1392
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -3844,6 +3887,13 @@
|
|
3844
3887
|
</xsl:attribute>
|
3845
3888
|
<xsl:apply-templates mode="svg_update"/>
|
3846
3889
|
</xsl:copy>
|
3890
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
3891
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
3892
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
3893
|
+
<xsl:call-template name="image_svg">
|
3894
|
+
<xsl:with-param name="name" select="$name"/>
|
3895
|
+
</xsl:call-template>
|
3896
|
+
</xsl:for-each>
|
3847
3897
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
3848
3898
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3849
3899
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -3948,7 +3998,7 @@
|
|
3948
3998
|
</fo:basic-link>
|
3949
3999
|
</fo:block>
|
3950
4000
|
</fo:block-container>
|
3951
|
-
</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">
|
4001
|
+
</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">
|
3952
4002
|
<xsl:apply-templates mode="contents"/>
|
3953
4003
|
<xsl:text> </xsl:text>
|
3954
4004
|
</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">
|
@@ -4624,14 +4674,15 @@
|
|
4624
4674
|
</xsl:if>
|
4625
4675
|
</xsl:template><xsl:variable name="localized.source">
|
4626
4676
|
<xsl:call-template name="getLocalizedString">
|
4627
|
-
|
4628
|
-
|
4677
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4678
|
+
</xsl:call-template>
|
4629
4679
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4630
4680
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4631
4681
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4632
4682
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4633
4683
|
</xsl:if>
|
4634
4684
|
|
4685
|
+
|
4635
4686
|
<fo:inline>
|
4636
4687
|
|
4637
4688
|
|
@@ -4639,6 +4690,7 @@
|
|
4639
4690
|
|
4640
4691
|
|
4641
4692
|
|
4693
|
+
|
4642
4694
|
<xsl:call-template name="getTitle">
|
4643
4695
|
<xsl:with-param name="name" select="'title-source'"/>
|
4644
4696
|
</xsl:call-template>
|
@@ -4650,6 +4702,7 @@
|
|
4650
4702
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4651
4703
|
<xsl:apply-templates/>
|
4652
4704
|
</fo:inline>
|
4705
|
+
|
4653
4706
|
</fo:basic-link>
|
4654
4707
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4655
4708
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4716,6 +4769,9 @@
|
|
4716
4769
|
|
4717
4770
|
</xsl:if>
|
4718
4771
|
|
4772
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
4773
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
4774
|
+
|
4719
4775
|
|
4720
4776
|
|
4721
4777
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4731,7 +4787,9 @@
|
|
4731
4787
|
|
4732
4788
|
|
4733
4789
|
</xsl:if>
|
4734
|
-
|
4790
|
+
|
4791
|
+
|
4792
|
+
|
4735
4793
|
<xsl:apply-templates/>
|
4736
4794
|
</fo:basic-link>
|
4737
4795
|
|
@@ -5228,9 +5286,97 @@
|
|
5228
5286
|
<fo:block-container border="1pt solid black" width="50%">
|
5229
5287
|
<fo:block> </fo:block>
|
5230
5288
|
</fo:block-container>
|
5289
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5290
|
+
<xsl:param name="colwidths"/>
|
5291
|
+
<xsl:variable name="colwidths_">
|
5292
|
+
<xsl:choose>
|
5293
|
+
<xsl:when test="not($colwidths)">
|
5294
|
+
<xsl:variable name="toc_table_simple">
|
5295
|
+
<tbody>
|
5296
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5297
|
+
</tbody>
|
5298
|
+
</xsl:variable>
|
5299
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5300
|
+
<xsl:call-template name="calculate-column-widths">
|
5301
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5302
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5303
|
+
</xsl:call-template>
|
5304
|
+
</xsl:when>
|
5305
|
+
<xsl:otherwise>
|
5306
|
+
<xsl:copy-of select="$colwidths"/>
|
5307
|
+
</xsl:otherwise>
|
5308
|
+
</xsl:choose>
|
5309
|
+
</xsl:variable>
|
5310
|
+
<fo:block role="TOCI" space-after="16pt">
|
5311
|
+
<fo:table width="100%" table-layout="fixed">
|
5312
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5313
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5314
|
+
</xsl:for-each>
|
5315
|
+
<fo:table-body>
|
5316
|
+
<xsl:apply-templates/>
|
5317
|
+
</fo:table-body>
|
5318
|
+
</fo:table>
|
5319
|
+
</fo:block>
|
5320
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5321
|
+
<fo:table-row min-height="5mm">
|
5322
|
+
<xsl:apply-templates/>
|
5323
|
+
</fo:table-row>
|
5324
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5325
|
+
<xsl:apply-templates/>
|
5326
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5327
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5328
|
+
<xsl:variable name="target" select="@target"/>
|
5329
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5330
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5331
|
+
<fo:table-cell>
|
5332
|
+
<fo:block>
|
5333
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5334
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5335
|
+
<xsl:choose>
|
5336
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5337
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5338
|
+
</xsl:choose>
|
5339
|
+
</xsl:for-each>
|
5340
|
+
</fo:basic-link>
|
5341
|
+
</fo:block>
|
5342
|
+
</fo:table-cell>
|
5343
|
+
</xsl:for-each>
|
5344
|
+
<!-- last column - for page numbers -->
|
5345
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5346
|
+
<fo:block>
|
5347
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5348
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5349
|
+
</fo:basic-link>
|
5350
|
+
</fo:block>
|
5351
|
+
</fo:table-cell>
|
5352
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5353
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5354
|
+
</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">
|
5355
|
+
<tr>
|
5356
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5357
|
+
</tr>
|
5358
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5359
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5360
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5361
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5362
|
+
<td>
|
5363
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5364
|
+
<xsl:copy-of select="."/>
|
5365
|
+
</xsl:for-each>
|
5366
|
+
</td>
|
5367
|
+
</xsl:for-each>
|
5368
|
+
<td>333</td> <!-- page number, just for fill -->
|
5231
5369
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5232
5370
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5233
5371
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5372
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5373
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5374
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5375
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5376
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5377
|
+
</svg>
|
5378
|
+
</fo:instream-foreign-object>
|
5379
|
+
</fo:inline>
|
5234
5380
|
</xsl:template><xsl:template name="convertDate">
|
5235
5381
|
<xsl:param name="date"/>
|
5236
5382
|
<xsl:param name="format" select="'short'"/>
|
@@ -1307,13 +1307,20 @@
|
|
1307
1307
|
|
1308
1308
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1309
1309
|
|
1310
|
-
</xsl:attribute-set><xsl:
|
1310
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1311
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1312
|
+
</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">
|
1311
1313
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1312
1314
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1313
1315
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1314
1316
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1315
1317
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1316
|
-
</xsl:template><xsl:template name="
|
1318
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1319
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1320
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1321
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1322
|
+
</xsl:for-each>
|
1323
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1317
1324
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1318
1325
|
|
1319
1326
|
<!-- Normative references -->
|
@@ -1326,13 +1333,33 @@
|
|
1326
1333
|
<!-- Bibliography -->
|
1327
1334
|
<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"/>
|
1328
1335
|
|
1329
|
-
</xsl:template><xsl:template name="
|
1336
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1337
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1338
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1339
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1340
|
+
</xsl:for-each>
|
1341
|
+
|
1342
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1343
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1344
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1345
|
+
</xsl:for-each>
|
1346
|
+
|
1347
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1348
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1349
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1350
|
+
</xsl:for-each>
|
1351
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1330
1352
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1331
1353
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1332
1354
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1333
1355
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1334
1356
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1335
|
-
</xsl:template><xsl:template name="
|
1357
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1358
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1359
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1360
|
+
<xsl:apply-templates select="."/>
|
1361
|
+
</xsl:for-each>
|
1362
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1336
1363
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1337
1364
|
|
1338
1365
|
<!-- Normative references -->
|
@@ -1344,6 +1371,22 @@
|
|
1344
1371
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1345
1372
|
<!-- Bibliography -->
|
1346
1373
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1374
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1375
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1376
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1377
|
+
<xsl:apply-templates select="."/>
|
1378
|
+
|
1379
|
+
</xsl:for-each>
|
1380
|
+
|
1381
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1382
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1383
|
+
<xsl:apply-templates select="."/>
|
1384
|
+
</xsl:for-each>
|
1385
|
+
|
1386
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1387
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1388
|
+
<xsl:apply-templates select="."/>
|
1389
|
+
</xsl:for-each>
|
1347
1390
|
</xsl:template><xsl:template match="text()">
|
1348
1391
|
<xsl:value-of select="."/>
|
1349
1392
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -3844,6 +3887,13 @@
|
|
3844
3887
|
</xsl:attribute>
|
3845
3888
|
<xsl:apply-templates mode="svg_update"/>
|
3846
3889
|
</xsl:copy>
|
3890
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
3891
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
3892
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
3893
|
+
<xsl:call-template name="image_svg">
|
3894
|
+
<xsl:with-param name="name" select="$name"/>
|
3895
|
+
</xsl:call-template>
|
3896
|
+
</xsl:for-each>
|
3847
3897
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
3848
3898
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3849
3899
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -3948,7 +3998,7 @@
|
|
3948
3998
|
</fo:basic-link>
|
3949
3999
|
</fo:block>
|
3950
4000
|
</fo:block-container>
|
3951
|
-
</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">
|
4001
|
+
</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">
|
3952
4002
|
<xsl:apply-templates mode="contents"/>
|
3953
4003
|
<xsl:text> </xsl:text>
|
3954
4004
|
</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">
|
@@ -4624,14 +4674,15 @@
|
|
4624
4674
|
</xsl:if>
|
4625
4675
|
</xsl:template><xsl:variable name="localized.source">
|
4626
4676
|
<xsl:call-template name="getLocalizedString">
|
4627
|
-
|
4628
|
-
|
4677
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4678
|
+
</xsl:call-template>
|
4629
4679
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4630
4680
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4631
4681
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4632
4682
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4633
4683
|
</xsl:if>
|
4634
4684
|
|
4685
|
+
|
4635
4686
|
<fo:inline>
|
4636
4687
|
|
4637
4688
|
|
@@ -4639,6 +4690,7 @@
|
|
4639
4690
|
|
4640
4691
|
|
4641
4692
|
|
4693
|
+
|
4642
4694
|
<xsl:call-template name="getTitle">
|
4643
4695
|
<xsl:with-param name="name" select="'title-source'"/>
|
4644
4696
|
</xsl:call-template>
|
@@ -4650,6 +4702,7 @@
|
|
4650
4702
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4651
4703
|
<xsl:apply-templates/>
|
4652
4704
|
</fo:inline>
|
4705
|
+
|
4653
4706
|
</fo:basic-link>
|
4654
4707
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4655
4708
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4716,6 +4769,9 @@
|
|
4716
4769
|
|
4717
4770
|
</xsl:if>
|
4718
4771
|
|
4772
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
4773
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
4774
|
+
|
4719
4775
|
|
4720
4776
|
|
4721
4777
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4731,7 +4787,9 @@
|
|
4731
4787
|
|
4732
4788
|
|
4733
4789
|
</xsl:if>
|
4734
|
-
|
4790
|
+
|
4791
|
+
|
4792
|
+
|
4735
4793
|
<xsl:apply-templates/>
|
4736
4794
|
</fo:basic-link>
|
4737
4795
|
|
@@ -5228,9 +5286,97 @@
|
|
5228
5286
|
<fo:block-container border="1pt solid black" width="50%">
|
5229
5287
|
<fo:block> </fo:block>
|
5230
5288
|
</fo:block-container>
|
5289
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5290
|
+
<xsl:param name="colwidths"/>
|
5291
|
+
<xsl:variable name="colwidths_">
|
5292
|
+
<xsl:choose>
|
5293
|
+
<xsl:when test="not($colwidths)">
|
5294
|
+
<xsl:variable name="toc_table_simple">
|
5295
|
+
<tbody>
|
5296
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5297
|
+
</tbody>
|
5298
|
+
</xsl:variable>
|
5299
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5300
|
+
<xsl:call-template name="calculate-column-widths">
|
5301
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5302
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5303
|
+
</xsl:call-template>
|
5304
|
+
</xsl:when>
|
5305
|
+
<xsl:otherwise>
|
5306
|
+
<xsl:copy-of select="$colwidths"/>
|
5307
|
+
</xsl:otherwise>
|
5308
|
+
</xsl:choose>
|
5309
|
+
</xsl:variable>
|
5310
|
+
<fo:block role="TOCI" space-after="16pt">
|
5311
|
+
<fo:table width="100%" table-layout="fixed">
|
5312
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5313
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5314
|
+
</xsl:for-each>
|
5315
|
+
<fo:table-body>
|
5316
|
+
<xsl:apply-templates/>
|
5317
|
+
</fo:table-body>
|
5318
|
+
</fo:table>
|
5319
|
+
</fo:block>
|
5320
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5321
|
+
<fo:table-row min-height="5mm">
|
5322
|
+
<xsl:apply-templates/>
|
5323
|
+
</fo:table-row>
|
5324
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5325
|
+
<xsl:apply-templates/>
|
5326
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5327
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5328
|
+
<xsl:variable name="target" select="@target"/>
|
5329
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5330
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5331
|
+
<fo:table-cell>
|
5332
|
+
<fo:block>
|
5333
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5334
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5335
|
+
<xsl:choose>
|
5336
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5337
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5338
|
+
</xsl:choose>
|
5339
|
+
</xsl:for-each>
|
5340
|
+
</fo:basic-link>
|
5341
|
+
</fo:block>
|
5342
|
+
</fo:table-cell>
|
5343
|
+
</xsl:for-each>
|
5344
|
+
<!-- last column - for page numbers -->
|
5345
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5346
|
+
<fo:block>
|
5347
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5348
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5349
|
+
</fo:basic-link>
|
5350
|
+
</fo:block>
|
5351
|
+
</fo:table-cell>
|
5352
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5353
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5354
|
+
</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">
|
5355
|
+
<tr>
|
5356
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5357
|
+
</tr>
|
5358
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5359
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5360
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5361
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5362
|
+
<td>
|
5363
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5364
|
+
<xsl:copy-of select="."/>
|
5365
|
+
</xsl:for-each>
|
5366
|
+
</td>
|
5367
|
+
</xsl:for-each>
|
5368
|
+
<td>333</td> <!-- page number, just for fill -->
|
5231
5369
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5232
5370
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5233
5371
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5372
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5373
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5374
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5375
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5376
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5377
|
+
</svg>
|
5378
|
+
</fo:instream-foreign-object>
|
5379
|
+
</fo:inline>
|
5234
5380
|
</xsl:template><xsl:template name="convertDate">
|
5235
5381
|
<xsl:param name="date"/>
|
5236
5382
|
<xsl:param name="format" select="'short'"/>
|