metanorma-ogc 1.4.1 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/ogc/basicdoc.rng +21 -4
- data/lib/asciidoctor/ogc/cleanup.rb +173 -0
- data/lib/asciidoctor/ogc/converter.rb +19 -76
- data/lib/asciidoctor/ogc/isodoc.rng +218 -52
- data/lib/asciidoctor/ogc/reqt.rng +23 -2
- data/lib/asciidoctor/ogc/validate.rb +35 -20
- data/lib/isodoc/ogc/base_convert.rb +47 -10
- data/lib/isodoc/ogc/html/htmlstyle.css +10 -0
- data/lib/isodoc/ogc/html/htmlstyle.scss +12 -0
- data/lib/isodoc/ogc/html/ogc.css +4 -0
- data/lib/isodoc/ogc/html/ogc.scss +4 -0
- data/lib/isodoc/ogc/html/wordstyle.css +12 -1
- data/lib/isodoc/ogc/html/wordstyle.scss +12 -1
- data/lib/isodoc/ogc/html/wordstyle_wp.css +12 -1
- data/lib/isodoc/ogc/html/wordstyle_wp.scss +12 -1
- data/lib/isodoc/ogc/i18n-en.yaml +10 -8
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +268 -33
- data/lib/isodoc/ogc/ogc.best-practice.xsl +268 -33
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +268 -33
- data/lib/isodoc/ogc/ogc.community-practice.xsl +268 -33
- data/lib/isodoc/ogc/ogc.community-standard.xsl +268 -33
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +268 -33
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +268 -33
- data/lib/isodoc/ogc/ogc.other.xsl +268 -33
- data/lib/isodoc/ogc/ogc.policy.xsl +268 -33
- data/lib/isodoc/ogc/ogc.reference-model.xsl +268 -33
- data/lib/isodoc/ogc/ogc.release-notes.xsl +268 -33
- data/lib/isodoc/ogc/ogc.standard.xsl +268 -33
- data/lib/isodoc/ogc/ogc.test-suite.xsl +268 -33
- data/lib/isodoc/ogc/ogc.user-guide.xsl +268 -33
- data/lib/isodoc/ogc/ogc.white-paper.xsl +167 -10
- data/lib/isodoc/ogc/presentation_xml_convert.rb +6 -3
- data/lib/isodoc/ogc/reqt.rb +49 -36
- data/lib/isodoc/ogc/xref.rb +1 -2
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +3 -2
@@ -364,7 +364,7 @@
|
|
364
364
|
|
365
365
|
<xsl:choose>
|
366
366
|
<xsl:when test="@level = 1">
|
367
|
-
<fo:list-block provisional-distance-between-starts="
|
367
|
+
<fo:list-block provisional-distance-between-starts="8mm">
|
368
368
|
<xsl:if test="@type = 'annex'">
|
369
369
|
<xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute>
|
370
370
|
</xsl:if>
|
@@ -393,7 +393,7 @@
|
|
393
393
|
</fo:list-block>
|
394
394
|
</xsl:when>
|
395
395
|
<xsl:otherwise>
|
396
|
-
<fo:block text-align-last="justify" margin-left="
|
396
|
+
<fo:block text-align-last="justify" margin-left="8mm">
|
397
397
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
398
398
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/>
|
399
399
|
<xsl:text> </xsl:text>
|
@@ -414,7 +414,7 @@
|
|
414
414
|
</fo:block>
|
415
415
|
</fo:block-container>
|
416
416
|
|
417
|
-
<xsl:if test="//ogc:table[@id and ogc:name]">
|
417
|
+
<xsl:if test="//ogc:table[@id and ogc:name and contains(ogc:name, '—')]">
|
418
418
|
<xsl:variable name="title-list-tables">
|
419
419
|
<xsl:call-template name="getTitle">
|
420
420
|
<xsl:with-param name="name" select="'title-list-tables'"/>
|
@@ -429,7 +429,7 @@
|
|
429
429
|
</fo:block-container>
|
430
430
|
</fo:block-container>
|
431
431
|
<fo:block-container line-height="130%">
|
432
|
-
<xsl:for-each select="//ogc:table[@id and ogc:name]">
|
432
|
+
<xsl:for-each select="//ogc:table[@id and ogc:name and contains(ogc:name, '—')]">
|
433
433
|
<fo:block text-align-last="justify" margin-top="2pt" role="TOCI">
|
434
434
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{ogc:name}">
|
435
435
|
<xsl:apply-templates select="ogc:name" mode="contents"/>
|
@@ -443,7 +443,7 @@
|
|
443
443
|
</fo:block-container>
|
444
444
|
</xsl:if>
|
445
445
|
|
446
|
-
<xsl:if test="//ogc:figure[@id and ogc:name]">
|
446
|
+
<xsl:if test="//ogc:figure[@id and ogc:name and contains(ogc:name, '—')]">
|
447
447
|
<xsl:variable name="title-list-figures">
|
448
448
|
<xsl:call-template name="getTitle">
|
449
449
|
<xsl:with-param name="name" select="'title-list-figures'"/>
|
@@ -458,7 +458,7 @@
|
|
458
458
|
</fo:block-container>
|
459
459
|
|
460
460
|
<fo:block-container line-height="130%">
|
461
|
-
<xsl:for-each select="//ogc:figure[@id and ogc:name]">
|
461
|
+
<xsl:for-each select="//ogc:figure[@id and ogc:name and contains(ogc:name, '—')]">
|
462
462
|
<fo:block text-align-last="justify" margin-top="2pt" role="TOCI">
|
463
463
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{ogc:name}">
|
464
464
|
<xsl:apply-templates select="ogc:name" mode="contents"/>
|
@@ -579,7 +579,7 @@
|
|
579
579
|
<xsl:value-of select="translate(., $thinspace, ' ')"/>
|
580
580
|
</xsl:template>
|
581
581
|
|
582
|
-
<xsl:template match="text()" priority="3" mode="contents">
|
582
|
+
<xsl:template match="ogc:title//text() | ogc:name//text()" priority="3" mode="contents">
|
583
583
|
<xsl:value-of select="translate(., $thinspace, ' ')"/>
|
584
584
|
</xsl:template>
|
585
585
|
|
@@ -587,7 +587,9 @@
|
|
587
587
|
<xsl:variable name="content">
|
588
588
|
<xsl:call-template name="add-zero-spaces"/>
|
589
589
|
</xsl:variable>
|
590
|
-
|
590
|
+
<!-- add zero-width space in the words like 'adeOfAbstractTransportaonSpace' to split it in the table's cell -->
|
591
|
+
<xsl:variable name="content2" select="java:replaceAll(java:java.lang.String.new($content),'([a-z]{2,})([A-Z])(.?)','$1$2$3')"/>
|
592
|
+
<xsl:value-of select="translate($content2, $thinspace, ' ')"/>
|
591
593
|
</xsl:template>
|
592
594
|
|
593
595
|
|
@@ -908,6 +910,7 @@
|
|
908
910
|
<xsl:call-template name="insertSectionTitle">
|
909
911
|
<xsl:with-param name="section" select="$section"/>
|
910
912
|
<xsl:with-param name="title" select="$title"/>
|
913
|
+
<xsl:with-param name="level" select="$level"/>
|
911
914
|
</xsl:call-template>
|
912
915
|
</fo:block>
|
913
916
|
</xsl:when>
|
@@ -1055,7 +1058,13 @@
|
|
1055
1058
|
<xsl:template match="ogc:ul | ogc:ol" mode="ul_ol">
|
1056
1059
|
<fo:block-container margin-left="13mm">
|
1057
1060
|
<xsl:if test="ancestor::ogc:table">
|
1058
|
-
<xsl:attribute name="margin-left">
|
1061
|
+
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
1062
|
+
</xsl:if>
|
1063
|
+
<xsl:if test="ancestor::ogc:ul or ancestor::ogc:ol">
|
1064
|
+
<xsl:attribute name="margin-top">10pt</xsl:attribute>
|
1065
|
+
<xsl:if test="ancestor::ogc:table">
|
1066
|
+
<xsl:attribute name="margin-top">1mm</xsl:attribute>
|
1067
|
+
</xsl:if>
|
1059
1068
|
</xsl:if>
|
1060
1069
|
<fo:block-container margin-left="0mm">
|
1061
1070
|
<fo:list-block provisional-distance-between-starts="12mm" space-after="12pt" line-height="115%">
|
@@ -1064,6 +1073,9 @@
|
|
1064
1073
|
</xsl:if>
|
1065
1074
|
<xsl:if test="ancestor::ogc:ul | ancestor::ogc:ol">
|
1066
1075
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
1076
|
+
<xsl:if test="ancestor::ogc:table[not(@class)]">
|
1077
|
+
<xsl:attribute name="space-after">1mm</xsl:attribute>
|
1078
|
+
</xsl:if>
|
1067
1079
|
</xsl:if>
|
1068
1080
|
<xsl:if test="following-sibling::*[1][local-name() = 'ul' or local-name() = 'ol']">
|
1069
1081
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
@@ -1091,17 +1103,22 @@
|
|
1091
1103
|
<xsl:number format="a)" lang="en"/>
|
1092
1104
|
</xsl:when>
|
1093
1105
|
<xsl:when test="../@type = 'alphabet'">
|
1094
|
-
<xsl:number format="1
|
1106
|
+
<xsl:number format="1."/>
|
1095
1107
|
</xsl:when>
|
1096
1108
|
<xsl:when test="../@type = 'alphabet_upper'">
|
1097
1109
|
<xsl:number format="A)" lang="en"/>
|
1098
1110
|
</xsl:when>
|
1099
|
-
|
1100
1111
|
<xsl:when test="../@type = 'roman'">
|
1101
1112
|
<xsl:number format="i)"/>
|
1102
1113
|
</xsl:when>
|
1103
1114
|
<xsl:otherwise>
|
1104
|
-
<xsl:
|
1115
|
+
<xsl:variable name="level" select="count(ancestor-or-self::ogc:li)"/>
|
1116
|
+
<xsl:choose>
|
1117
|
+
<xsl:when test="$level = 1"><xsl:number format="a)" lang="en"/></xsl:when>
|
1118
|
+
<xsl:when test="$level = 2"><xsl:number format="1."/></xsl:when>
|
1119
|
+
<xsl:when test="$level = 3"><xsl:number format="i)"/></xsl:when>
|
1120
|
+
<xsl:otherwise><xsl:number format="a)" lang="en"/></xsl:otherwise>
|
1121
|
+
</xsl:choose>
|
1105
1122
|
</xsl:otherwise>
|
1106
1123
|
</xsl:choose>
|
1107
1124
|
</xsl:otherwise>
|
@@ -1110,6 +1127,12 @@
|
|
1110
1127
|
</fo:list-item-label>
|
1111
1128
|
<fo:list-item-body start-indent="body-start()" line-height-shift-adjustment="disregard-shifts">
|
1112
1129
|
<fo:block margin-bottom="10pt">
|
1130
|
+
<xsl:if test="ancestor::ogc:table[not(@class)]">
|
1131
|
+
<xsl:attribute name="margin-bottom">1mm</xsl:attribute>
|
1132
|
+
</xsl:if>
|
1133
|
+
<xsl:if test="not(following-sibling::*) and not(../following-sibling::*)">
|
1134
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
1135
|
+
</xsl:if>
|
1113
1136
|
<xsl:apply-templates/>
|
1114
1137
|
</fo:block>
|
1115
1138
|
</fo:list-item-body>
|
@@ -1258,7 +1281,6 @@
|
|
1258
1281
|
|
1259
1282
|
<xsl:template match="ogc:figure" priority="2">
|
1260
1283
|
<fo:block-container id="{@id}" margin-top="12pt" margin-bottom="12pt">
|
1261
|
-
<xsl:apply-templates select="ogc:name" mode="presentation"/>
|
1262
1284
|
<fo:block>
|
1263
1285
|
<xsl:apply-templates/>
|
1264
1286
|
</fo:block>
|
@@ -1266,6 +1288,7 @@
|
|
1266
1288
|
<xsl:for-each select="ogc:note">
|
1267
1289
|
<xsl:call-template name="note"/>
|
1268
1290
|
</xsl:for-each>
|
1291
|
+
<xsl:apply-templates select="ogc:name" mode="presentation"/>
|
1269
1292
|
</fo:block-container>
|
1270
1293
|
</xsl:template>
|
1271
1294
|
|
@@ -1426,6 +1449,7 @@
|
|
1426
1449
|
<xsl:template name="insertSectionTitle">
|
1427
1450
|
<xsl:param name="section"/>
|
1428
1451
|
<xsl:param name="title"/>
|
1452
|
+
<xsl:param name="level">1</xsl:param>
|
1429
1453
|
<fo:block>
|
1430
1454
|
<fo:block font-size="18pt" color="{$color_blue}" keep-with-next="always" line-height="150%">
|
1431
1455
|
<xsl:if test="$section != ''">
|
@@ -1436,10 +1460,24 @@
|
|
1436
1460
|
</xsl:call-template>
|
1437
1461
|
</fo:inline>
|
1438
1462
|
</xsl:if>
|
1439
|
-
<xsl:
|
1463
|
+
<xsl:choose>
|
1464
|
+
<xsl:when test="$level = 1">
|
1465
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="titlesmall"/>
|
1466
|
+
</xsl:when>
|
1467
|
+
<xsl:otherwise>
|
1468
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="titlesimple"/>
|
1469
|
+
</xsl:otherwise>
|
1470
|
+
</xsl:choose>
|
1440
1471
|
|
1441
1472
|
<xsl:variable name="variant-title">
|
1442
|
-
<xsl:
|
1473
|
+
<xsl:choose>
|
1474
|
+
<xsl:when test="$level = 1">
|
1475
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="titlesmall"/>
|
1476
|
+
</xsl:when>
|
1477
|
+
<xsl:otherwise>
|
1478
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="titlesimple"/>
|
1479
|
+
</xsl:otherwise>
|
1480
|
+
</xsl:choose>
|
1443
1481
|
</xsl:variable>
|
1444
1482
|
<xsl:if test="normalize-space($variant-title) != ''">
|
1445
1483
|
<fo:inline padding-right="5mm"> </fo:inline>
|
@@ -1458,25 +1496,59 @@
|
|
1458
1496
|
</xsl:call-template>
|
1459
1497
|
</xsl:template>
|
1460
1498
|
|
1499
|
+
<xsl:template match="text()" mode="titlesimple">
|
1500
|
+
<xsl:value-of select="."/>
|
1501
|
+
</xsl:template>
|
1502
|
+
|
1461
1503
|
<xsl:template match="ogc:strong" mode="titlesmall">
|
1462
1504
|
<xsl:apply-templates mode="titlesmall"/>
|
1463
1505
|
</xsl:template>
|
1506
|
+
<xsl:template match="ogc:strong" mode="titlesimple">
|
1507
|
+
<xsl:apply-templates mode="titlesimple"/>
|
1508
|
+
</xsl:template>
|
1464
1509
|
|
1465
1510
|
<xsl:template match="ogc:em" mode="titlesmall">
|
1466
1511
|
<fo:inline font-style="italic"><xsl:apply-templates mode="titlesmall"/></fo:inline>
|
1467
1512
|
</xsl:template>
|
1513
|
+
<xsl:template match="ogc:em" mode="titlesimple">
|
1514
|
+
<fo:inline font-style="italic"><xsl:apply-templates mode="titlesimple"/></fo:inline>
|
1515
|
+
</xsl:template>
|
1468
1516
|
|
1469
1517
|
<xsl:template match="ogc:fn" mode="titlesmall">
|
1470
1518
|
<xsl:call-template name="fn"/>
|
1471
1519
|
</xsl:template>
|
1520
|
+
<xsl:template match="ogc:fn" mode="titlesimple">
|
1521
|
+
<xsl:call-template name="fn"/>
|
1522
|
+
</xsl:template>
|
1472
1523
|
<xsl:template match="ogc:tab " mode="titlesmall">
|
1473
1524
|
<xsl:apply-templates select="."/>
|
1474
1525
|
</xsl:template>
|
1526
|
+
<xsl:template match="ogc:tab " mode="titlesimple">
|
1527
|
+
<xsl:apply-templates select="."/>
|
1528
|
+
</xsl:template>
|
1475
1529
|
|
1476
1530
|
<xsl:template match="ogc:br" mode="titlesmall">
|
1477
1531
|
<xsl:value-of select="$linebreak"/>
|
1478
1532
|
</xsl:template>
|
1479
|
-
|
1533
|
+
<xsl:template match="ogc:br" mode="titlesimple">
|
1534
|
+
<xsl:value-of select="$linebreak"/>
|
1535
|
+
</xsl:template>
|
1536
|
+
|
1537
|
+
<xsl:template match="*[local-name() = 'name']/text()[1]" priority="2">
|
1538
|
+
<!-- 0xA0 to space replacement -->
|
1539
|
+
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
1540
|
+
<xsl:variable name="separator" select="' — '"/>
|
1541
|
+
<xsl:choose>
|
1542
|
+
<xsl:when test="contains($text, $separator)">
|
1543
|
+
<fo:inline font-weight="bold"><xsl:value-of select="substring-before($text, $separator)"/></fo:inline>
|
1544
|
+
<xsl:value-of select="$separator"/>
|
1545
|
+
<xsl:value-of select="substring-after($text, $separator)"/>
|
1546
|
+
</xsl:when>
|
1547
|
+
<xsl:otherwise>
|
1548
|
+
<xsl:value-of select="$text"/>
|
1549
|
+
</xsl:otherwise>
|
1550
|
+
</xsl:choose>
|
1551
|
+
</xsl:template>
|
1480
1552
|
|
1481
1553
|
<xsl:template name="insertOrangeHorizontalLine">
|
1482
1554
|
<fo:block-container width="12.7mm" border-top="1pt solid {$color_orange}" margin-top="3mm">
|
@@ -1835,6 +1907,7 @@
|
|
1835
1907
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
1836
1908
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1837
1909
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1910
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
1838
1911
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1839
1912
|
|
1840
1913
|
|
@@ -1914,6 +1987,11 @@
|
|
1914
1987
|
|
1915
1988
|
|
1916
1989
|
|
1990
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
1991
|
+
|
1992
|
+
|
1993
|
+
|
1994
|
+
|
1917
1995
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1918
1996
|
|
1919
1997
|
|
@@ -1994,9 +2072,14 @@
|
|
1994
2072
|
|
1995
2073
|
|
1996
2074
|
|
1997
|
-
<xsl:attribute name="
|
1998
|
-
<xsl:attribute name="margin-
|
1999
|
-
<xsl:attribute name="
|
2075
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
2076
|
+
<!-- <xsl:attribute name="margin-top">12pt</xsl:attribute> -->
|
2077
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
2078
|
+
<!-- <xsl:attribute name="margin-bottom">6pt</xsl:attribute> -->
|
2079
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2080
|
+
<!-- <xsl:attribute name="keep-with-next">always</xsl:attribute> -->
|
2081
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2082
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
2000
2083
|
|
2001
2084
|
|
2002
2085
|
|
@@ -2090,13 +2173,20 @@
|
|
2090
2173
|
|
2091
2174
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
2092
2175
|
|
2093
|
-
</xsl:attribute-set><xsl:
|
2176
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
2177
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2178
|
+
</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">
|
2094
2179
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2095
2180
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2096
2181
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
2097
2182
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
2098
2183
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
2099
|
-
</xsl:template><xsl:template name="
|
2184
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2185
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2186
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2187
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2188
|
+
</xsl:for-each>
|
2189
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
2100
2190
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
2101
2191
|
|
2102
2192
|
<!-- Normative references -->
|
@@ -2109,13 +2199,33 @@
|
|
2109
2199
|
<!-- Bibliography -->
|
2110
2200
|
<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"/>
|
2111
2201
|
|
2112
|
-
</xsl:template><xsl:template name="
|
2202
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2203
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2204
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2205
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2206
|
+
</xsl:for-each>
|
2207
|
+
|
2208
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2209
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2210
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2211
|
+
</xsl:for-each>
|
2212
|
+
|
2213
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2214
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2215
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2216
|
+
</xsl:for-each>
|
2217
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
2113
2218
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
2114
2219
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
2115
2220
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
2116
2221
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
2117
2222
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
2118
|
-
</xsl:template><xsl:template name="
|
2223
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
2224
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2225
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2226
|
+
<xsl:apply-templates select="."/>
|
2227
|
+
</xsl:for-each>
|
2228
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
2119
2229
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
2120
2230
|
|
2121
2231
|
<!-- Normative references -->
|
@@ -2127,6 +2237,22 @@
|
|
2127
2237
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
2128
2238
|
<!-- Bibliography -->
|
2129
2239
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
2240
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
2241
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2242
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2243
|
+
<xsl:apply-templates select="."/>
|
2244
|
+
|
2245
|
+
</xsl:for-each>
|
2246
|
+
|
2247
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2248
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2249
|
+
<xsl:apply-templates select="."/>
|
2250
|
+
</xsl:for-each>
|
2251
|
+
|
2252
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2253
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2254
|
+
<xsl:apply-templates select="."/>
|
2255
|
+
</xsl:for-each>
|
2130
2256
|
</xsl:template><xsl:template match="text()">
|
2131
2257
|
<xsl:value-of select="."/>
|
2132
2258
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -2954,6 +3080,8 @@
|
|
2954
3080
|
|
2955
3081
|
|
2956
3082
|
<xsl:attribute name="border">solid 0pt white</xsl:attribute>
|
3083
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
3084
|
+
<xsl:attribute name="padding-bottom">1mm</xsl:attribute>
|
2957
3085
|
|
2958
3086
|
|
2959
3087
|
|
@@ -2996,9 +3124,8 @@
|
|
2996
3124
|
|
2997
3125
|
<!-- Table's note name (NOTE, for example) -->
|
2998
3126
|
|
2999
|
-
<fo:inline padding-right="2mm">
|
3127
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
3000
3128
|
|
3001
|
-
|
3002
3129
|
|
3003
3130
|
|
3004
3131
|
|
@@ -3626,6 +3753,8 @@
|
|
3626
3753
|
<xsl:if test="$font-size != ''">
|
3627
3754
|
<xsl:attribute name="font-size">
|
3628
3755
|
<xsl:choose>
|
3756
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
3757
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
3629
3758
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3630
3759
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3631
3760
|
</xsl:choose>
|
@@ -4680,6 +4809,13 @@
|
|
4680
4809
|
</xsl:attribute>
|
4681
4810
|
<xsl:apply-templates mode="svg_update"/>
|
4682
4811
|
</xsl:copy>
|
4812
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4813
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4814
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4815
|
+
<xsl:call-template name="image_svg">
|
4816
|
+
<xsl:with-param name="name" select="$name"/>
|
4817
|
+
</xsl:call-template>
|
4818
|
+
</xsl:for-each>
|
4683
4819
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4684
4820
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4685
4821
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4784,7 +4920,7 @@
|
|
4784
4920
|
</fo:basic-link>
|
4785
4921
|
</fo:block>
|
4786
4922
|
</fo:block-container>
|
4787
|
-
</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">
|
4923
|
+
</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">
|
4788
4924
|
<xsl:apply-templates mode="contents"/>
|
4789
4925
|
<xsl:text> </xsl:text>
|
4790
4926
|
</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">
|
@@ -5126,12 +5262,16 @@
|
|
5126
5262
|
<xsl:if test="$font-size != ''">
|
5127
5263
|
<xsl:attribute name="font-size">
|
5128
5264
|
<xsl:choose>
|
5265
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
5266
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
5129
5267
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
5130
5268
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
5131
5269
|
</xsl:choose>
|
5132
5270
|
</xsl:attribute>
|
5133
5271
|
</xsl:if>
|
5134
5272
|
|
5273
|
+
|
5274
|
+
|
5135
5275
|
<xsl:apply-templates/>
|
5136
5276
|
</fo:block>
|
5137
5277
|
|
@@ -5511,14 +5651,15 @@
|
|
5511
5651
|
</xsl:if>
|
5512
5652
|
</xsl:template><xsl:variable name="localized.source">
|
5513
5653
|
<xsl:call-template name="getLocalizedString">
|
5514
|
-
|
5515
|
-
|
5654
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5655
|
+
</xsl:call-template>
|
5516
5656
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
5517
5657
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5518
5658
|
<xsl:if test="normalize-space(@citeas) = ''">
|
5519
5659
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5520
5660
|
</xsl:if>
|
5521
5661
|
|
5662
|
+
<xsl:text>[</xsl:text>
|
5522
5663
|
<fo:inline>
|
5523
5664
|
|
5524
5665
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5528,18 +5669,18 @@
|
|
5528
5669
|
|
5529
5670
|
|
5530
5671
|
|
5531
|
-
|
5532
|
-
<xsl:call-template name="getTitle">
|
5533
|
-
<xsl:with-param name="name" select="'title-source'"/>
|
5534
|
-
</xsl:call-template>
|
5672
|
+
<xsl:value-of select="$localized.source"/>
|
5535
5673
|
<xsl:text>: </xsl:text>
|
5536
5674
|
|
5537
5675
|
|
5676
|
+
|
5677
|
+
|
5538
5678
|
</fo:inline>
|
5539
5679
|
|
5540
5680
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5541
5681
|
<xsl:apply-templates/>
|
5542
5682
|
</fo:inline>
|
5683
|
+
<xsl:text>]</xsl:text>
|
5543
5684
|
</fo:basic-link>
|
5544
5685
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
5545
5686
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -5606,6 +5747,9 @@
|
|
5606
5747
|
|
5607
5748
|
</xsl:if>
|
5608
5749
|
|
5750
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
5751
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
5752
|
+
|
5609
5753
|
|
5610
5754
|
|
5611
5755
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -5619,7 +5763,9 @@
|
|
5619
5763
|
|
5620
5764
|
|
5621
5765
|
</xsl:if>
|
5622
|
-
|
5766
|
+
|
5767
|
+
|
5768
|
+
|
5623
5769
|
<xsl:apply-templates/>
|
5624
5770
|
</fo:basic-link>
|
5625
5771
|
|
@@ -5957,6 +6103,7 @@
|
|
5957
6103
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
5958
6104
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
5959
6105
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
6106
|
+
|
5960
6107
|
<xsl:apply-templates/>
|
5961
6108
|
</fo:block>
|
5962
6109
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -6267,9 +6414,97 @@
|
|
6267
6414
|
<fo:block-container border="1pt solid black" width="50%">
|
6268
6415
|
<fo:block> </fo:block>
|
6269
6416
|
</fo:block-container>
|
6417
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
6418
|
+
<xsl:param name="colwidths"/>
|
6419
|
+
<xsl:variable name="colwidths_">
|
6420
|
+
<xsl:choose>
|
6421
|
+
<xsl:when test="not($colwidths)">
|
6422
|
+
<xsl:variable name="toc_table_simple">
|
6423
|
+
<tbody>
|
6424
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
6425
|
+
</tbody>
|
6426
|
+
</xsl:variable>
|
6427
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
6428
|
+
<xsl:call-template name="calculate-column-widths">
|
6429
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
6430
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
6431
|
+
</xsl:call-template>
|
6432
|
+
</xsl:when>
|
6433
|
+
<xsl:otherwise>
|
6434
|
+
<xsl:copy-of select="$colwidths"/>
|
6435
|
+
</xsl:otherwise>
|
6436
|
+
</xsl:choose>
|
6437
|
+
</xsl:variable>
|
6438
|
+
<fo:block role="TOCI" space-after="16pt">
|
6439
|
+
<fo:table width="100%" table-layout="fixed">
|
6440
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
6441
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
6442
|
+
</xsl:for-each>
|
6443
|
+
<fo:table-body>
|
6444
|
+
<xsl:apply-templates/>
|
6445
|
+
</fo:table-body>
|
6446
|
+
</fo:table>
|
6447
|
+
</fo:block>
|
6448
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
6449
|
+
<fo:table-row min-height="5mm">
|
6450
|
+
<xsl:apply-templates/>
|
6451
|
+
</fo:table-row>
|
6452
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
6453
|
+
<xsl:apply-templates/>
|
6454
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
6455
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
6456
|
+
<xsl:variable name="target" select="@target"/>
|
6457
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
6458
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
6459
|
+
<fo:table-cell>
|
6460
|
+
<fo:block>
|
6461
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
6462
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
6463
|
+
<xsl:choose>
|
6464
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
6465
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
6466
|
+
</xsl:choose>
|
6467
|
+
</xsl:for-each>
|
6468
|
+
</fo:basic-link>
|
6469
|
+
</fo:block>
|
6470
|
+
</fo:table-cell>
|
6471
|
+
</xsl:for-each>
|
6472
|
+
<!-- last column - for page numbers -->
|
6473
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
6474
|
+
<fo:block>
|
6475
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
6476
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
6477
|
+
</fo:basic-link>
|
6478
|
+
</fo:block>
|
6479
|
+
</fo:table-cell>
|
6480
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
6481
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
6482
|
+
</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">
|
6483
|
+
<tr>
|
6484
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
6485
|
+
</tr>
|
6486
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
6487
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
6488
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
6489
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
6490
|
+
<td>
|
6491
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
6492
|
+
<xsl:copy-of select="."/>
|
6493
|
+
</xsl:for-each>
|
6494
|
+
</td>
|
6495
|
+
</xsl:for-each>
|
6496
|
+
<td>333</td> <!-- page number, just for fill -->
|
6270
6497
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
6271
6498
|
<fo:inline padding-right="5mm"> </fo:inline>
|
6272
6499
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6500
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
6501
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
6502
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
6503
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
6504
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
6505
|
+
</svg>
|
6506
|
+
</fo:instream-foreign-object>
|
6507
|
+
</fo:inline>
|
6273
6508
|
</xsl:template><xsl:template name="convertDate">
|
6274
6509
|
<xsl:param name="date"/>
|
6275
6510
|
<xsl:param name="format" select="'short'"/>
|