metanorma-nist 1.2.5 → 1.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +62 -0
- data/.github/workflows/release.yml +36 -0
- data/README.adoc +23 -7
- data/lib/asciidoctor/nist/basicdoc.rng +50 -3
- data/lib/asciidoctor/nist/boilerplate.rb +3 -1
- data/lib/asciidoctor/nist/cleanup.rb +2 -1
- data/lib/asciidoctor/nist/converter.rb +3 -0
- data/lib/asciidoctor/nist/front.rb +36 -45
- data/lib/asciidoctor/nist/front_id.rb +18 -7
- data/lib/asciidoctor/nist/isodoc.rng +36 -43
- data/lib/asciidoctor/nist/nist.rng +1 -0
- data/lib/asciidoctor/nist/validate.rb +17 -6
- data/lib/isodoc/nist/base_convert.rb +2 -3
- data/lib/isodoc/nist/fonts_manifest.yaml +4 -0
- data/lib/isodoc/nist/html/header_cswp.html +2 -3
- data/lib/isodoc/nist/html/htmlstyle.css +225 -221
- data/lib/isodoc/nist/html/htmlstyle.scss +5 -6
- data/lib/isodoc/nist/html/nist.css +49 -50
- data/lib/isodoc/nist/html/nist.scss +49 -50
- data/lib/isodoc/nist/html/nist_cswp.css +48 -49
- data/lib/isodoc/nist/html/nist_cswp.scss +48 -49
- data/lib/isodoc/nist/html/wordstyle.css +42 -42
- data/lib/isodoc/nist/html/wordstyle.scss +42 -42
- data/lib/isodoc/nist/html/wordstyle_cswp.css +52 -52
- data/lib/isodoc/nist/html/wordstyle_cswp.scss +52 -52
- data/lib/isodoc/nist/html_convert.rb +12 -1
- data/lib/isodoc/nist/metadata.rb +28 -40
- data/lib/isodoc/nist/metadata_id.rb +3 -7
- data/lib/isodoc/nist/nist.cswp.xsl +329 -156
- data/lib/isodoc/nist/nist.sp.xsl +326 -192
- data/lib/isodoc/nist/presentation_xml_convert.rb +30 -10
- data/lib/isodoc/nist/refs.rb +6 -20
- data/lib/isodoc/nist/render.rb +42 -40
- data/lib/isodoc/nist/render_dates.rb +8 -9
- data/lib/isodoc/nist/word_convert.rb +9 -3
- data/lib/metanorma/nist/processor.rb +14 -8
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +2 -2
- metadata +9 -9
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
data/lib/isodoc/nist/nist.sp.xsl
CHANGED
@@ -808,10 +808,25 @@
|
|
808
808
|
<fo:block>
|
809
809
|
<fo:block><xsl:value-of select="nist:person/nist:name/nist:completename"/></fo:block>
|
810
810
|
<xsl:variable name="org-name" select="nist:person/nist:affiliation/nist:organization/nist:name"/>
|
811
|
+
<xsl:variable name="subdivision">
|
812
|
+
<xsl:for-each select="nist:person/nist:affiliation/nist:organization/nist:subdivision">
|
813
|
+
<xsl:value-of select="."/>
|
814
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
815
|
+
</xsl:for-each>
|
816
|
+
</xsl:variable>
|
817
|
+
<xsl:variable name="following_subdivision">
|
818
|
+
<xsl:for-each select="following-sibling::nist:contributor[nist:role/@type = 'author'][1]/nist:person/nist:affiliation/nist:organization/nist:subdivision">
|
819
|
+
<xsl:value-of select="."/>
|
820
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
821
|
+
</xsl:for-each>
|
822
|
+
</xsl:variable>
|
811
823
|
<xsl:variable name="org-address" select="nist:person/nist:affiliation/nist:organization/nist:address/nist:formattedAddress"/>
|
812
|
-
<xsl:if test="concat(following-sibling::nist:contributor[nist:role/@type = 'author'][1]/nist:person/nist:affiliation/nist:organization/nist:name, following-sibling::nist:contributor[nist:role/@type = 'author'][1]/nist:person/nist:affiliation/nist:organization/nist:address/nist:formattedAddress) != concat($org-name, $org-address)">
|
824
|
+
<xsl:if test="concat(following-sibling::nist:contributor[nist:role/@type = 'author'][1]/nist:person/nist:affiliation/nist:organization/nist:name, $following_subdivision, following-sibling::nist:contributor[nist:role/@type = 'author'][1]/nist:person/nist:affiliation/nist:organization/nist:address/nist:formattedAddress) != concat($org-name, $subdivision, $org-address)">
|
813
825
|
<fo:block font-style="italic" margin-bottom="12pt">
|
814
826
|
<xsl:value-of select="$org-name"/>
|
827
|
+
<xsl:if test="normalize-space($subdivision) != ''">
|
828
|
+
<fo:inline>, <xsl:value-of select="$subdivision"/></fo:inline>
|
829
|
+
</xsl:if>
|
815
830
|
<xsl:if test="normalize-space($org-address) != ''">
|
816
831
|
<fo:inline>, <xsl:value-of select="$org-address"/></fo:inline>
|
817
832
|
</xsl:if>
|
@@ -915,7 +930,7 @@
|
|
915
930
|
<fo:block font-size="12pt" font-weight="bold" text-align="center" margin-bottom="12pt"><xsl:value-of select="$title-list-figures"/></fo:block>
|
916
931
|
<xsl:for-each select="//nist:figure[@id and nist:name]">
|
917
932
|
<fo:block text-align-last="justify" margin-top="6pt" margin-bottom="6pt">
|
918
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
933
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{nist:name}">
|
919
934
|
<xsl:apply-templates select="nist:name" mode="contents"/>
|
920
935
|
<fo:inline keep-together.within-line="always">
|
921
936
|
<fo:leader leader-pattern="dots"/>
|
@@ -941,7 +956,7 @@
|
|
941
956
|
<fo:block font-size="12pt" font-weight="bold" text-align="center" margin-bottom="12pt"><xsl:value-of select="$title-list-tables"/></fo:block>
|
942
957
|
<xsl:for-each select="//nist:table[@id and nist:name]">
|
943
958
|
<fo:block text-align-last="justify" margin-top="6pt" margin-bottom="6pt">
|
944
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
959
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{nist:name}">
|
945
960
|
<xsl:apply-templates select="nist:name" mode="contents"/>
|
946
961
|
<fo:inline keep-together.within-line="always">
|
947
962
|
<fo:leader leader-pattern="dots"/>
|
@@ -1340,35 +1355,24 @@
|
|
1340
1355
|
<!-- Bibliography -->
|
1341
1356
|
<!-- ============================= -->
|
1342
1357
|
|
1343
|
-
<!--
|
1358
|
+
<!-- Examples:
|
1359
|
+
[b-ASM] b-ASM, http://www.eecs.umich.edu/gasm/ (accessed 20 March 2018).
|
1360
|
+
[b-Börger & Stärk] b-Börger & Stärk, Börger, E., and Stärk, R. S. (2003), Abstract State Machines: A Method for High-Level System Design and Analysis, Springer-Verlag.
|
1361
|
+
-->
|
1344
1362
|
<xsl:template match="nist:bibitem">
|
1345
|
-
<fo:block id="{@id}" margin-top="6pt" margin-left="
|
1346
|
-
<
|
1347
|
-
|
1348
|
-
<fo:inline
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
<xsl:value-of select="nist:title[@type = 'main' and @language = 'en']"/>
|
1353
|
-
</xsl:when>
|
1354
|
-
<xsl:otherwise>
|
1355
|
-
<xsl:value-of select="nist:title"/>
|
1356
|
-
</xsl:otherwise>
|
1357
|
-
</xsl:choose>
|
1358
|
-
</fo:inline>
|
1359
|
-
</xsl:if>
|
1360
|
-
<xsl:apply-templates select="nist:formattedref"/>
|
1361
|
-
</fo:block>
|
1363
|
+
<fo:block id="{@id}" margin-top="6pt" margin-left="12mm" text-indent="-12mm">
|
1364
|
+
<xsl:variable name="docidentifier" select="normalize-space(nist:docidentifier[@display = 'true'])"/>
|
1365
|
+
<xsl:if test="$docidentifier != ''">
|
1366
|
+
<fo:inline padding-right="5mm"><xsl:value-of select="$docidentifier"/></fo:inline>
|
1367
|
+
</xsl:if>
|
1368
|
+
<xsl:apply-templates select="nist:formattedref"/>
|
1369
|
+
</fo:block>
|
1362
1370
|
</xsl:template>
|
1363
|
-
<xsl:template match="nist:bibitem/nist:docidentifier"/>
|
1364
|
-
|
1365
|
-
<xsl:template match="nist:bibitem/nist:title"/>
|
1366
1371
|
|
1367
1372
|
<xsl:template match="nist:formattedref">
|
1368
|
-
<xsl:
|
1373
|
+
<xsl:apply-templates/>
|
1369
1374
|
</xsl:template>
|
1370
1375
|
|
1371
|
-
|
1372
1376
|
<!-- ============================= -->
|
1373
1377
|
<!-- ============================= -->
|
1374
1378
|
|
@@ -1488,21 +1492,21 @@
|
|
1488
1492
|
<!-- ====== -->
|
1489
1493
|
|
1490
1494
|
|
1491
|
-
<xsl:template match="nist:p
|
1495
|
+
<xsl:template match="nist:p//nist:fn[not(ancestor::nist:table)] | nist:title/nist:fn | nist:table/nist:name/nist:fn" priority="2">
|
1492
1496
|
<fo:footnote>
|
1493
1497
|
<xsl:variable name="number">
|
1494
|
-
<xsl:number level="any" count="nist:p
|
1498
|
+
<xsl:number level="any" count="nist:p//nist:fn[not(ancestor::nist:table)] | nist:title/nist:fn | nist:table/nist:name/nist:fn"/>
|
1495
1499
|
</xsl:variable>
|
1496
1500
|
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
1497
1501
|
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
1498
1502
|
<!-- <xsl:value-of select="@reference"/> -->
|
1499
|
-
<xsl:value-of select="$number + count(//nist:bibitem
|
1503
|
+
<xsl:value-of select="$number + count(//nist:bibitem//nist:note)"/>
|
1500
1504
|
</fo:basic-link>
|
1501
1505
|
</fo:inline>
|
1502
1506
|
<fo:footnote-body>
|
1503
1507
|
<fo:block font-size="10pt" font-family="Times New Roman" font-style="normal" font-weight="normal" text-align="justify" margin-bottom="12pt" start-indent="0">
|
1504
1508
|
<fo:inline id="footnote_{@reference}_{$number}" font-size="75%" keep-with-next.within-line="always" vertical-align="super"> <!-- alignment-baseline="hanging" -->
|
1505
|
-
<xsl:value-of select="$number + count(//nist:bibitem
|
1509
|
+
<xsl:value-of select="$number + count(//nist:bibitem//nist:note)"/>
|
1506
1510
|
</fo:inline>
|
1507
1511
|
<xsl:for-each select="nist:p">
|
1508
1512
|
<xsl:apply-templates/>
|
@@ -1536,104 +1540,6 @@
|
|
1536
1540
|
</xsl:element>
|
1537
1541
|
</xsl:template>
|
1538
1542
|
|
1539
|
-
|
1540
|
-
|
1541
|
-
<!-- Examples:
|
1542
|
-
[b-ASM] b-ASM, http://www.eecs.umich.edu/gasm/ (accessed 20 March 2018).
|
1543
|
-
[b-Börger & Stärk] b-Börger & Stärk, Börger, E., and Stärk, R. S. (2003), Abstract State Machines: A Method for High-Level System Design and Analysis, Springer-Verlag.
|
1544
|
-
-->
|
1545
|
-
<xsl:template match="nist:annex//nist:bibitem">
|
1546
|
-
<fo:block id="{@id}" margin-top="6pt" margin-left="12mm" text-indent="-12mm">
|
1547
|
-
<xsl:if test="nist:formattedref">
|
1548
|
-
<xsl:choose>
|
1549
|
-
<xsl:when test="nist:docidentifier[@type = 'metanorma']">
|
1550
|
-
<xsl:attribute name="margin-left">0</xsl:attribute>
|
1551
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1552
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1553
|
-
<!-- create list -->
|
1554
|
-
<fo:list-block>
|
1555
|
-
<fo:list-item>
|
1556
|
-
<fo:list-item-label end-indent="label-end()">
|
1557
|
-
<fo:block>
|
1558
|
-
<xsl:apply-templates select="nist:docidentifier[@type = 'metanorma']" mode="process"/>
|
1559
|
-
</fo:block>
|
1560
|
-
</fo:list-item-label>
|
1561
|
-
<fo:list-item-body start-indent="body-start()">
|
1562
|
-
<fo:block margin-left="3mm">
|
1563
|
-
<xsl:apply-templates select="nist:formattedref"/>
|
1564
|
-
</fo:block>
|
1565
|
-
</fo:list-item-body>
|
1566
|
-
</fo:list-item>
|
1567
|
-
</fo:list-block>
|
1568
|
-
</xsl:when>
|
1569
|
-
<xsl:otherwise>
|
1570
|
-
<xsl:apply-templates select="nist:formattedref"/>
|
1571
|
-
<xsl:apply-templates select="nist:docidentifier[@type != 'metanorma' or not(@type)]" mode="process"/>
|
1572
|
-
</xsl:otherwise>
|
1573
|
-
</xsl:choose>
|
1574
|
-
|
1575
|
-
|
1576
|
-
</xsl:if>
|
1577
|
-
<xsl:if test="nist:title">
|
1578
|
-
<xsl:for-each select="nist:contributor">
|
1579
|
-
<xsl:choose>
|
1580
|
-
<xsl:when test="nist:person/nist:name/nist:completename">
|
1581
|
-
<xsl:apply-templates select="nist:person/nist:name/nist:completename"/>
|
1582
|
-
</xsl:when>
|
1583
|
-
<xsl:otherwise>
|
1584
|
-
<xsl:apply-templates select="nist:organization/nist:name"/>
|
1585
|
-
</xsl:otherwise>
|
1586
|
-
</xsl:choose>
|
1587
|
-
<xsl:if test="position() != last()">, </xsl:if>
|
1588
|
-
</xsl:for-each>
|
1589
|
-
<xsl:text> (</xsl:text>
|
1590
|
-
<xsl:variable name="date">
|
1591
|
-
<xsl:choose>
|
1592
|
-
<xsl:when test="nist:date[@type='issued']">
|
1593
|
-
<xsl:call-template name="formatDate">
|
1594
|
-
<xsl:with-param name="date" select="nist:date[@type='issued']/nist:on"/>
|
1595
|
-
</xsl:call-template>
|
1596
|
-
</xsl:when>
|
1597
|
-
<xsl:otherwise>
|
1598
|
-
<xsl:call-template name="formatDate">
|
1599
|
-
<xsl:with-param name="date" select="nist:date/nist:on"/>
|
1600
|
-
</xsl:call-template>
|
1601
|
-
</xsl:otherwise>
|
1602
|
-
</xsl:choose>
|
1603
|
-
</xsl:variable>
|
1604
|
-
<xsl:value-of select="$date"/>
|
1605
|
-
<xsl:text>) </xsl:text>
|
1606
|
-
<fo:inline font-style="italic"><xsl:value-of select="nist:title"/></fo:inline>
|
1607
|
-
<xsl:if test="nist:contributor[nist:role/@type='publisher']/nist:organization/nist:name">
|
1608
|
-
<xsl:text> (</xsl:text><xsl:value-of select="nist:contributor[nist:role/@type='publisher']/nist:organization/nist:name"/><xsl:text>)</xsl:text>
|
1609
|
-
</xsl:if>
|
1610
|
-
<xsl:if test="nist:place">
|
1611
|
-
<xsl:text> (</xsl:text><xsl:value-of select="nist:place"/><xsl:text>)</xsl:text>
|
1612
|
-
</xsl:if>
|
1613
|
-
<xsl:text>, </xsl:text>
|
1614
|
-
<xsl:value-of select="$date"/>
|
1615
|
-
<xsl:text>. </xsl:text>
|
1616
|
-
<xsl:value-of select="nist:docidentifier"/>
|
1617
|
-
<xsl:value-of select="$linebreak"/>
|
1618
|
-
<xsl:value-of select="nist:uri"/>
|
1619
|
-
</xsl:if>
|
1620
|
-
</fo:block>
|
1621
|
-
</xsl:template>
|
1622
|
-
|
1623
|
-
<xsl:template match="nist:annex//nist:bibitem//nist:formattedref">
|
1624
|
-
<xsl:apply-templates/>
|
1625
|
-
</xsl:template>
|
1626
|
-
|
1627
|
-
<xsl:template match="nist:docidentifier[@type = 'metanorma']" mode="process">
|
1628
|
-
<xsl:apply-templates/>
|
1629
|
-
</xsl:template>
|
1630
|
-
<xsl:template match="nist:docidentifier[@type != 'metanorma' or not(@type)]" mode="process">
|
1631
|
-
<xsl:text> [</xsl:text><xsl:apply-templates/><xsl:text>]</xsl:text>
|
1632
|
-
</xsl:template>
|
1633
|
-
<xsl:template match="nist:docidentifier"/>
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
1543
|
<xsl:template match="nist:ul | nist:ol" mode="ul_ol">
|
1638
1544
|
<xsl:param name="margin"/>
|
1639
1545
|
<fo:list-block>
|
@@ -1693,7 +1599,7 @@
|
|
1693
1599
|
<xsl:number format="1."/>
|
1694
1600
|
</xsl:when>
|
1695
1601
|
<xsl:when test="../@type = 'arabic'">
|
1696
|
-
<xsl:number format="a)"/>
|
1602
|
+
<xsl:number format="a)" lang="en"/>
|
1697
1603
|
</xsl:when>
|
1698
1604
|
<xsl:when test="../@type = 'alphabet'">
|
1699
1605
|
<xsl:number format="1)"/>
|
@@ -1702,7 +1608,7 @@
|
|
1702
1608
|
<xsl:number format="i)"/>
|
1703
1609
|
</xsl:when>
|
1704
1610
|
<xsl:when test="../@type = 'alphabet_upper'">
|
1705
|
-
<xsl:number format="A)"/>
|
1611
|
+
<xsl:number format="A)" lang="en"/>
|
1706
1612
|
</xsl:when>
|
1707
1613
|
<xsl:when test="ancestor::*[nist:annex]">
|
1708
1614
|
<!-- <xsl:variable name="level">
|
@@ -1710,7 +1616,7 @@
|
|
1710
1616
|
</xsl:variable> -->
|
1711
1617
|
<xsl:choose>
|
1712
1618
|
<xsl:when test="$level = 1">
|
1713
|
-
<xsl:number format="a)"/>
|
1619
|
+
<xsl:number format="a)" lang="en"/>
|
1714
1620
|
</xsl:when>
|
1715
1621
|
<xsl:when test="$level = 2">
|
1716
1622
|
<xsl:number format="i)"/>
|
@@ -2225,13 +2131,22 @@
|
|
2225
2131
|
<title-part lang="en">
|
2226
2132
|
|
2227
2133
|
|
2134
|
+
|
2228
2135
|
</title-part>
|
2229
2136
|
<title-part lang="fr">
|
2230
2137
|
|
2231
2138
|
|
2139
|
+
|
2232
2140
|
</title-part>
|
2233
2141
|
<title-part lang="zh">第 # 部分:</title-part>
|
2234
2142
|
|
2143
|
+
<title-subpart lang="en">
|
2144
|
+
|
2145
|
+
</title-subpart>
|
2146
|
+
<title-subpart lang="fr">
|
2147
|
+
|
2148
|
+
</title-subpart>
|
2149
|
+
|
2235
2150
|
<title-modified lang="en">modified</title-modified>
|
2236
2151
|
<title-modified lang="fr">modifiée</title-modified>
|
2237
2152
|
|
@@ -2496,6 +2411,7 @@
|
|
2496
2411
|
|
2497
2412
|
|
2498
2413
|
|
2414
|
+
|
2499
2415
|
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
2500
2416
|
|
2501
2417
|
|
@@ -2533,6 +2449,7 @@
|
|
2533
2449
|
|
2534
2450
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2535
2451
|
|
2452
|
+
|
2536
2453
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2537
2454
|
|
2538
2455
|
|
@@ -2557,6 +2474,7 @@
|
|
2557
2474
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2558
2475
|
|
2559
2476
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2477
|
+
|
2560
2478
|
|
2561
2479
|
|
2562
2480
|
|
@@ -2676,7 +2594,9 @@
|
|
2676
2594
|
|
2677
2595
|
|
2678
2596
|
|
2679
|
-
|
2597
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2598
|
+
<fo:block> </fo:block>
|
2599
|
+
</xsl:if> -->
|
2680
2600
|
|
2681
2601
|
<!-- $namespace = 'iso' or -->
|
2682
2602
|
|
@@ -2708,10 +2628,12 @@
|
|
2708
2628
|
|
2709
2629
|
|
2710
2630
|
<xsl:variable name="colwidths">
|
2711
|
-
<xsl:
|
2712
|
-
<xsl:
|
2713
|
-
|
2714
|
-
|
2631
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2632
|
+
<xsl:call-template name="calculate-column-widths">
|
2633
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2634
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
2635
|
+
</xsl:call-template>
|
2636
|
+
</xsl:if>
|
2715
2637
|
</xsl:variable>
|
2716
2638
|
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2717
2639
|
|
@@ -2791,16 +2713,25 @@
|
|
2791
2713
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2792
2714
|
</xsl:if>
|
2793
2715
|
|
2794
|
-
<xsl:
|
2795
|
-
<xsl:
|
2796
|
-
<xsl:
|
2797
|
-
<fo:table-column column-width="
|
2798
|
-
</xsl:
|
2799
|
-
|
2800
|
-
|
2801
|
-
|
2802
|
-
|
2803
|
-
|
2716
|
+
<xsl:choose>
|
2717
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2718
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2719
|
+
<fo:table-column column-width="{@width}"/>
|
2720
|
+
</xsl:for-each>
|
2721
|
+
</xsl:when>
|
2722
|
+
<xsl:otherwise>
|
2723
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2724
|
+
<xsl:choose>
|
2725
|
+
<xsl:when test=". = 1 or . = 0">
|
2726
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2727
|
+
</xsl:when>
|
2728
|
+
<xsl:otherwise>
|
2729
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2730
|
+
</xsl:otherwise>
|
2731
|
+
</xsl:choose>
|
2732
|
+
</xsl:for-each>
|
2733
|
+
</xsl:otherwise>
|
2734
|
+
</xsl:choose>
|
2804
2735
|
|
2805
2736
|
<xsl:choose>
|
2806
2737
|
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
@@ -2813,10 +2744,12 @@
|
|
2813
2744
|
|
2814
2745
|
</fo:table>
|
2815
2746
|
|
2747
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2816
2748
|
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2817
2749
|
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2818
2750
|
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2819
2751
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2752
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2820
2753
|
</xsl:call-template>
|
2821
2754
|
</xsl:for-each>
|
2822
2755
|
|
@@ -2849,6 +2782,7 @@
|
|
2849
2782
|
<xsl:if test="normalize-space() != ''">
|
2850
2783
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2851
2784
|
|
2785
|
+
|
2852
2786
|
<xsl:apply-templates/>
|
2853
2787
|
</fo:block>
|
2854
2788
|
</xsl:if>
|
@@ -3031,12 +2965,26 @@
|
|
3031
2965
|
|
3032
2966
|
|
3033
2967
|
|
3034
|
-
<!-- except gb and bipm -->
|
3035
2968
|
|
3036
|
-
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3037
2969
|
|
3038
2970
|
|
2971
|
+
<!-- except gb -->
|
2972
|
+
|
2973
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2974
|
+
|
3039
2975
|
|
2976
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
2977
|
+
<!-- empty, because notes show at page side in main sections -->
|
2978
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2979
|
+
<xsl:choose>
|
2980
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2981
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2982
|
+
</xsl:when>
|
2983
|
+
<xsl:otherwise>
|
2984
|
+
<fo:block/>
|
2985
|
+
</xsl:otherwise>
|
2986
|
+
</xsl:choose>
|
2987
|
+
</xsl:if> -->
|
3040
2988
|
|
3041
2989
|
|
3042
2990
|
<!-- horizontal row separator -->
|
@@ -3055,12 +3003,22 @@
|
|
3055
3003
|
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
3056
3004
|
<xsl:param name="table_attributes"/>
|
3057
3005
|
<xsl:param name="colwidths"/>
|
3006
|
+
<xsl:param name="colgroup"/>
|
3058
3007
|
|
3059
3008
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3060
3009
|
|
3061
3010
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3062
3011
|
|
3063
|
-
<xsl:variable name="cols-count"
|
3012
|
+
<xsl:variable name="cols-count">
|
3013
|
+
<xsl:choose>
|
3014
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
3015
|
+
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
|
3016
|
+
</xsl:when>
|
3017
|
+
<xsl:otherwise>
|
3018
|
+
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
|
3019
|
+
</xsl:otherwise>
|
3020
|
+
</xsl:choose>
|
3021
|
+
</xsl:variable>
|
3064
3022
|
|
3065
3023
|
<fo:table keep-with-previous="always">
|
3066
3024
|
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
@@ -3078,16 +3036,25 @@
|
|
3078
3036
|
</xsl:choose>
|
3079
3037
|
</xsl:for-each>
|
3080
3038
|
|
3081
|
-
<xsl:
|
3082
|
-
<xsl:
|
3083
|
-
<xsl:
|
3084
|
-
<fo:table-column column-width="
|
3085
|
-
</xsl:
|
3086
|
-
|
3087
|
-
|
3088
|
-
|
3089
|
-
|
3090
|
-
|
3039
|
+
<xsl:choose>
|
3040
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
3041
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
3042
|
+
<fo:table-column column-width="{@width}"/>
|
3043
|
+
</xsl:for-each>
|
3044
|
+
</xsl:when>
|
3045
|
+
<xsl:otherwise>
|
3046
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3047
|
+
<xsl:choose>
|
3048
|
+
<xsl:when test=". = 1 or . = 0">
|
3049
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
3050
|
+
</xsl:when>
|
3051
|
+
<xsl:otherwise>
|
3052
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
3053
|
+
</xsl:otherwise>
|
3054
|
+
</xsl:choose>
|
3055
|
+
</xsl:for-each>
|
3056
|
+
</xsl:otherwise>
|
3057
|
+
</xsl:choose>
|
3091
3058
|
|
3092
3059
|
<fo:table-body>
|
3093
3060
|
<fo:table-row>
|
@@ -3099,7 +3066,11 @@
|
|
3099
3066
|
|
3100
3067
|
|
3101
3068
|
|
3102
|
-
|
3069
|
+
|
3070
|
+
|
3071
|
+
|
3072
|
+
|
3073
|
+
<!-- except gb -->
|
3103
3074
|
|
3104
3075
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3105
3076
|
|
@@ -3188,6 +3159,10 @@
|
|
3188
3159
|
|
3189
3160
|
|
3190
3161
|
|
3162
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3163
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
3164
|
+
</xsl:if> -->
|
3165
|
+
|
3191
3166
|
<xsl:apply-templates/>
|
3192
3167
|
</fo:table-row>
|
3193
3168
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -3277,7 +3252,8 @@
|
|
3277
3252
|
</xsl:attribute>
|
3278
3253
|
</xsl:if>
|
3279
3254
|
<xsl:call-template name="display-align"/>
|
3280
|
-
<fo:block>
|
3255
|
+
<fo:block>
|
3256
|
+
|
3281
3257
|
<xsl:apply-templates/>
|
3282
3258
|
</fo:block>
|
3283
3259
|
</fo:table-cell>
|
@@ -3498,7 +3474,13 @@
|
|
3498
3474
|
<xsl:apply-templates/>
|
3499
3475
|
</fo:inline>
|
3500
3476
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3501
|
-
<fo:block-container
|
3477
|
+
<fo:block-container>
|
3478
|
+
|
3479
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
3480
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3481
|
+
</xsl:if>
|
3482
|
+
|
3483
|
+
|
3502
3484
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3503
3485
|
<xsl:attribute name="margin-left">
|
3504
3486
|
<xsl:choose>
|
@@ -3508,8 +3490,12 @@
|
|
3508
3490
|
</xsl:attribute>
|
3509
3491
|
|
3510
3492
|
</xsl:if>
|
3511
|
-
<fo:block-container
|
3512
|
-
|
3493
|
+
<fo:block-container>
|
3494
|
+
|
3495
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3496
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
3497
|
+
|
3498
|
+
|
3513
3499
|
<xsl:variable name="parent" select="local-name(..)"/>
|
3514
3500
|
|
3515
3501
|
<xsl:variable name="key_iso">
|
@@ -3523,9 +3509,12 @@
|
|
3523
3509
|
<fo:block margin-bottom="12pt" text-align="left">
|
3524
3510
|
|
3525
3511
|
<xsl:variable name="title-where">
|
3526
|
-
|
3527
|
-
|
3528
|
-
|
3512
|
+
|
3513
|
+
|
3514
|
+
<xsl:call-template name="getTitle">
|
3515
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3516
|
+
</xsl:call-template>
|
3517
|
+
|
3529
3518
|
</xsl:variable>
|
3530
3519
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3531
3520
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -3541,9 +3530,12 @@
|
|
3541
3530
|
|
3542
3531
|
|
3543
3532
|
<xsl:variable name="title-where">
|
3544
|
-
|
3545
|
-
|
3546
|
-
|
3533
|
+
|
3534
|
+
|
3535
|
+
<xsl:call-template name="getTitle">
|
3536
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3537
|
+
</xsl:call-template>
|
3538
|
+
|
3547
3539
|
</xsl:variable>
|
3548
3540
|
<xsl:value-of select="$title-where"/>
|
3549
3541
|
</fo:block>
|
@@ -3554,9 +3546,12 @@
|
|
3554
3546
|
|
3555
3547
|
|
3556
3548
|
<xsl:variable name="title-key">
|
3557
|
-
|
3558
|
-
|
3559
|
-
|
3549
|
+
|
3550
|
+
|
3551
|
+
<xsl:call-template name="getTitle">
|
3552
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3553
|
+
</xsl:call-template>
|
3554
|
+
|
3560
3555
|
</xsl:variable>
|
3561
3556
|
<xsl:value-of select="$title-key"/>
|
3562
3557
|
</fo:block>
|
@@ -3690,12 +3685,32 @@
|
|
3690
3685
|
</xsl:otherwise>
|
3691
3686
|
</xsl:choose>
|
3692
3687
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
3693
|
-
<xsl:
|
3694
|
-
<xsl:
|
3695
|
-
|
3696
|
-
<xsl:
|
3697
|
-
|
3698
|
-
|
3688
|
+
<xsl:variable name="lengths">
|
3689
|
+
<xsl:for-each select="*[local-name()='dt']">
|
3690
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
3691
|
+
<xsl:variable name="attributes">
|
3692
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
3693
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
3694
|
+
</xsl:variable>
|
3695
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
3696
|
+
</xsl:for-each>
|
3697
|
+
</xsl:variable>
|
3698
|
+
<xsl:variable name="maxLength">
|
3699
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
3700
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
3701
|
+
<xsl:if test="position() = 1">
|
3702
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
3703
|
+
</xsl:if>
|
3704
|
+
</xsl:for-each> -->
|
3705
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
3706
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
3707
|
+
<xsl:if test="position() = 1">
|
3708
|
+
<xsl:value-of select="."/>
|
3709
|
+
</xsl:if>
|
3710
|
+
</xsl:for-each>
|
3711
|
+
</xsl:variable>
|
3712
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
3713
|
+
<xsl:value-of select="$maxLength"/>
|
3699
3714
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
3700
3715
|
<xsl:param name="key_iso"/>
|
3701
3716
|
|
@@ -3823,6 +3838,7 @@
|
|
3823
3838
|
</fo:inline>
|
3824
3839
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
3825
3840
|
<fo:inline font-weight="bold">
|
3841
|
+
|
3826
3842
|
<xsl:apply-templates/>
|
3827
3843
|
</fo:inline>
|
3828
3844
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -4151,7 +4167,18 @@
|
|
4151
4167
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
4152
4168
|
</xsl:apply-templates>
|
4153
4169
|
</xsl:template><xsl:template name="getLang">
|
4154
|
-
<xsl:variable name="
|
4170
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4171
|
+
<xsl:variable name="language">
|
4172
|
+
<xsl:choose>
|
4173
|
+
<xsl:when test="$language_current != ''">
|
4174
|
+
<xsl:value-of select="$language_current"/>
|
4175
|
+
</xsl:when>
|
4176
|
+
<xsl:otherwise>
|
4177
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
4178
|
+
</xsl:otherwise>
|
4179
|
+
</xsl:choose>
|
4180
|
+
</xsl:variable>
|
4181
|
+
|
4155
4182
|
<xsl:choose>
|
4156
4183
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
4157
4184
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -4186,6 +4213,7 @@
|
|
4186
4213
|
<xsl:value-of select="substring($str, 2)"/>
|
4187
4214
|
</xsl:template><xsl:template match="mathml:math">
|
4188
4215
|
<fo:inline font-family="STIX Two Math"> <!-- -->
|
4216
|
+
|
4189
4217
|
<xsl:variable name="mathml">
|
4190
4218
|
<xsl:apply-templates select="." mode="mathml"/>
|
4191
4219
|
</xsl:variable>
|
@@ -4215,6 +4243,7 @@
|
|
4215
4243
|
</xsl:choose>
|
4216
4244
|
</xsl:variable>
|
4217
4245
|
<fo:inline xsl:use-attribute-sets="link-style">
|
4246
|
+
|
4218
4247
|
<xsl:choose>
|
4219
4248
|
<xsl:when test="$target = ''">
|
4220
4249
|
<xsl:apply-templates/>
|
@@ -4268,10 +4297,14 @@
|
|
4268
4297
|
</fo:inline>
|
4269
4298
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
4270
4299
|
<xsl:variable name="title-modified">
|
4271
|
-
|
4272
|
-
|
4273
|
-
|
4300
|
+
|
4301
|
+
|
4302
|
+
<xsl:call-template name="getTitle">
|
4303
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
4304
|
+
</xsl:call-template>
|
4305
|
+
|
4274
4306
|
</xsl:variable>
|
4307
|
+
|
4275
4308
|
<xsl:choose>
|
4276
4309
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
4277
4310
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -4332,6 +4365,8 @@
|
|
4332
4365
|
|
4333
4366
|
|
4334
4367
|
|
4368
|
+
|
4369
|
+
|
4335
4370
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
4336
4371
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4337
4372
|
</fo:inline>
|
@@ -4424,7 +4459,8 @@
|
|
4424
4459
|
</fo:inline>
|
4425
4460
|
</xsl:if>
|
4426
4461
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
4427
|
-
<fo:block-container id="{@id}">
|
4462
|
+
<fo:block-container id="{@id}">
|
4463
|
+
|
4428
4464
|
<fo:block>
|
4429
4465
|
<xsl:apply-templates/>
|
4430
4466
|
</fo:block>
|
@@ -4475,7 +4511,7 @@
|
|
4475
4511
|
<xsl:apply-templates mode="bookmarks"/>
|
4476
4512
|
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4477
4513
|
<xsl:apply-templates select="."/>
|
4478
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4514
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4479
4515
|
<xsl:apply-templates mode="bookmarks"/>
|
4480
4516
|
</xsl:template><xsl:template name="addBookmarks">
|
4481
4517
|
<xsl:param name="contents"/>
|
@@ -4491,6 +4527,8 @@
|
|
4491
4527
|
<xsl:variable name="bookmark-title_">
|
4492
4528
|
<xsl:call-template name="getLangVersion">
|
4493
4529
|
<xsl:with-param name="lang" select="@lang"/>
|
4530
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
4531
|
+
<xsl:with-param name="title" select="@title-part"/>
|
4494
4532
|
</xsl:call-template>
|
4495
4533
|
</xsl:variable>
|
4496
4534
|
<xsl:choose>
|
@@ -4508,13 +4546,34 @@
|
|
4508
4546
|
</xsl:choose>
|
4509
4547
|
</fo:bookmark-title>
|
4510
4548
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4549
|
+
|
4550
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4551
|
+
<xsl:with-param name="contents" select="contents"/>
|
4552
|
+
</xsl:call-template>
|
4553
|
+
|
4554
|
+
<xsl:call-template name="insertTableBookmarks">
|
4555
|
+
<xsl:with-param name="contents" select="contents"/>
|
4556
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4557
|
+
</xsl:call-template>
|
4558
|
+
|
4511
4559
|
</fo:bookmark>
|
4512
4560
|
|
4513
4561
|
</xsl:for-each>
|
4514
4562
|
</xsl:when>
|
4515
4563
|
<xsl:otherwise>
|
4516
4564
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4565
|
+
|
4517
4566
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4567
|
+
|
4568
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4569
|
+
<xsl:with-param name="contents" select="contents"/>
|
4570
|
+
</xsl:call-template>
|
4571
|
+
|
4572
|
+
<xsl:call-template name="insertTableBookmarks">
|
4573
|
+
<xsl:with-param name="contents" select="contents"/>
|
4574
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4575
|
+
</xsl:call-template>
|
4576
|
+
|
4518
4577
|
</xsl:for-each>
|
4519
4578
|
</xsl:otherwise>
|
4520
4579
|
</xsl:choose>
|
@@ -4560,8 +4619,44 @@
|
|
4560
4619
|
|
4561
4620
|
</fo:bookmark-tree>
|
4562
4621
|
</xsl:if>
|
4622
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
4623
|
+
<xsl:param name="contents"/>
|
4624
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
4625
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
4626
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
4627
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
4628
|
+
<fo:bookmark internal-destination="{@id}">
|
4629
|
+
<fo:bookmark-title>
|
4630
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4631
|
+
</fo:bookmark-title>
|
4632
|
+
</fo:bookmark>
|
4633
|
+
</xsl:for-each>
|
4634
|
+
</fo:bookmark>
|
4635
|
+
</xsl:if>
|
4636
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
4637
|
+
<xsl:param name="contents"/>
|
4638
|
+
<xsl:param name="lang"/>
|
4639
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
4640
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
4641
|
+
<fo:bookmark-title>
|
4642
|
+
<xsl:choose>
|
4643
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
4644
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
4645
|
+
</xsl:choose>
|
4646
|
+
</fo:bookmark-title>
|
4647
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
4648
|
+
<fo:bookmark internal-destination="{@id}">
|
4649
|
+
<fo:bookmark-title>
|
4650
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4651
|
+
</fo:bookmark-title>
|
4652
|
+
</fo:bookmark>
|
4653
|
+
</xsl:for-each>
|
4654
|
+
</fo:bookmark>
|
4655
|
+
</xsl:if>
|
4563
4656
|
</xsl:template><xsl:template name="getLangVersion">
|
4564
4657
|
<xsl:param name="lang"/>
|
4658
|
+
<xsl:param name="doctype" select="''"/>
|
4659
|
+
<xsl:param name="title" select="''"/>
|
4565
4660
|
<xsl:choose>
|
4566
4661
|
<xsl:when test="$lang = 'en'">
|
4567
4662
|
|
@@ -5050,7 +5145,8 @@
|
|
5050
5145
|
<fo:block-container margin-left="0mm">
|
5051
5146
|
|
5052
5147
|
<fo:block xsl:use-attribute-sets="quote-style">
|
5053
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
5148
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
5149
|
+
<xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
5054
5150
|
</fo:block>
|
5055
5151
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
5056
5152
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -5177,9 +5273,12 @@
|
|
5177
5273
|
</fo:block>
|
5178
5274
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
5179
5275
|
<xsl:variable name="title-deprecated">
|
5180
|
-
|
5181
|
-
|
5182
|
-
|
5276
|
+
|
5277
|
+
|
5278
|
+
<xsl:call-template name="getTitle">
|
5279
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
5280
|
+
</xsl:call-template>
|
5281
|
+
|
5183
5282
|
</xsl:variable>
|
5184
5283
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
5185
5284
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -5232,7 +5331,7 @@
|
|
5232
5331
|
<fo:block id="{@id}">
|
5233
5332
|
<xsl:apply-templates/>
|
5234
5333
|
</fo:block>
|
5235
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
5334
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
5236
5335
|
|
5237
5336
|
<fo:block break-after="page"/>
|
5238
5337
|
|
@@ -5291,7 +5390,10 @@
|
|
5291
5390
|
<fo:table-column column-width="107mm"/>
|
5292
5391
|
<fo:table-column column-width="15mm"/>
|
5293
5392
|
<fo:table-body>
|
5294
|
-
<fo:table-row
|
5393
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
5394
|
+
|
5395
|
+
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
5396
|
+
|
5295
5397
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
5296
5398
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
5297
5399
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -5309,6 +5411,10 @@
|
|
5309
5411
|
<fo:block><xsl:apply-templates/></fo:block>
|
5310
5412
|
</fo:table-cell>
|
5311
5413
|
</xsl:template><xsl:template name="processBibitem">
|
5414
|
+
|
5415
|
+
|
5416
|
+
<!-- end BIPM bibitem processing-->
|
5417
|
+
|
5312
5418
|
|
5313
5419
|
|
5314
5420
|
|
@@ -5551,13 +5657,22 @@
|
|
5551
5657
|
</xsl:template><xsl:template name="split">
|
5552
5658
|
<xsl:param name="pText" select="."/>
|
5553
5659
|
<xsl:param name="sep" select="','"/>
|
5660
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
5554
5661
|
<xsl:if test="string-length($pText) >0">
|
5555
5662
|
<item>
|
5556
|
-
<xsl:
|
5663
|
+
<xsl:choose>
|
5664
|
+
<xsl:when test="$normalize-space = 'true'">
|
5665
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
5666
|
+
</xsl:when>
|
5667
|
+
<xsl:otherwise>
|
5668
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
5669
|
+
</xsl:otherwise>
|
5670
|
+
</xsl:choose>
|
5557
5671
|
</item>
|
5558
5672
|
<xsl:call-template name="split">
|
5559
5673
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
5560
5674
|
<xsl:with-param name="sep" select="$sep"/>
|
5675
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
5561
5676
|
</xsl:call-template>
|
5562
5677
|
</xsl:if>
|
5563
5678
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -5623,4 +5738,23 @@
|
|
5623
5738
|
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5624
5739
|
</xsl:call-template>
|
5625
5740
|
</xsl:if>
|
5741
|
+
</xsl:template><xsl:template name="repeat">
|
5742
|
+
<xsl:param name="char" select="'*'"/>
|
5743
|
+
<xsl:param name="count"/>
|
5744
|
+
<xsl:if test="$count > 0">
|
5745
|
+
<xsl:value-of select="$char"/>
|
5746
|
+
<xsl:call-template name="repeat">
|
5747
|
+
<xsl:with-param name="char" select="$char"/>
|
5748
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
5749
|
+
</xsl:call-template>
|
5750
|
+
</xsl:if>
|
5751
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
5752
|
+
<xsl:param name="key"/>
|
5753
|
+
|
5754
|
+
<xsl:variable name="curr_lang">
|
5755
|
+
<xsl:call-template name="getLang"/>
|
5756
|
+
</xsl:variable>
|
5757
|
+
|
5758
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5759
|
+
|
5626
5760
|
</xsl:template></xsl:stylesheet>
|