metanorma-ogc 1.3.8 → 1.4.3
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/boilerplate.xml +6 -6
- data/lib/asciidoctor/ogc/cleanup.rb +173 -0
- data/lib/asciidoctor/ogc/converter.rb +62 -64
- data/lib/asciidoctor/ogc/front.rb +1 -1
- data/lib/asciidoctor/ogc/isodoc.rng +49 -11
- data/lib/asciidoctor/ogc/ogc.rng +13 -13
- data/lib/asciidoctor/ogc/reqt.rng +15 -4
- data/lib/asciidoctor/ogc/validate.rb +35 -20
- data/lib/isodoc/ogc/base_convert.rb +47 -10
- data/lib/isodoc/ogc/biblio.rb +57 -51
- 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/i18n-en.yaml +24 -8
- data/lib/isodoc/ogc/metadata.rb +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +541 -155
- data/lib/isodoc/ogc/ogc.best-practice.xsl +541 -155
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +541 -155
- data/lib/isodoc/ogc/ogc.community-practice.xsl +541 -155
- data/lib/isodoc/ogc/ogc.community-standard.xsl +541 -155
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +541 -155
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +541 -155
- data/lib/isodoc/ogc/ogc.other.xsl +541 -155
- data/lib/isodoc/ogc/ogc.policy.xsl +541 -155
- data/lib/isodoc/ogc/ogc.reference-model.xsl +541 -155
- data/lib/isodoc/ogc/ogc.release-notes.xsl +541 -155
- data/lib/isodoc/ogc/ogc.standard.xsl +541 -155
- data/lib/isodoc/ogc/ogc.test-suite.xsl +541 -155
- data/lib/isodoc/ogc/ogc.user-guide.xsl +541 -155
- data/lib/isodoc/ogc/ogc.white-paper.xsl +400 -96
- data/lib/isodoc/ogc/presentation_xml_convert.rb +58 -48
- data/lib/isodoc/ogc/reqt.rb +90 -36
- data/lib/isodoc/ogc/xref.rb +59 -43
- data/lib/metanorma/ogc/processor.rb +2 -1
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +3 -2
@@ -32,6 +32,7 @@
|
|
32
32
|
<xsl:attribute name="margin-top">18pt</xsl:attribute>
|
33
33
|
<xsl:attribute name="margin-bottom">18pt</xsl:attribute>
|
34
34
|
<xsl:attribute name="line-height">110%</xsl:attribute>
|
35
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
35
36
|
</xsl:attribute-set>
|
36
37
|
|
37
38
|
<xsl:attribute-set name="title-depth2-style">
|
@@ -42,6 +43,7 @@
|
|
42
43
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
43
44
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
44
45
|
<xsl:attribute name="line-height">110%</xsl:attribute>
|
46
|
+
<xsl:attribute name="role">H2</xsl:attribute>
|
45
47
|
</xsl:attribute-set>
|
46
48
|
|
47
49
|
<xsl:attribute-set name="title-depth3-style">
|
@@ -51,7 +53,8 @@
|
|
51
53
|
<xsl:attribute name="color">rgb(21, 43, 77)</xsl:attribute>
|
52
54
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
53
55
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
54
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
56
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
57
|
+
<xsl:attribute name="role">H3</xsl:attribute>
|
55
58
|
</xsl:attribute-set>
|
56
59
|
|
57
60
|
<xsl:attribute-set name="empty-style">
|
@@ -126,7 +129,7 @@
|
|
126
129
|
|
127
130
|
<fo:block-container margin-left="-12mm" margin-right="-9mm">
|
128
131
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
129
|
-
<fo:block font-size="36pt" background-color="{$color}" color="white" margin-left="2.5mm" padding-top="1mm" padding-left="1mm">
|
132
|
+
<fo:block font-size="36pt" background-color="{$color}" color="white" margin-left="2.5mm" padding-top="1mm" padding-left="1mm" role="H1">
|
130
133
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:bibdata/ogc:title/node()"/>
|
131
134
|
</fo:block>
|
132
135
|
</fo:block-container>
|
@@ -216,43 +219,45 @@
|
|
216
219
|
<fo:block break-after="page"/>
|
217
220
|
|
218
221
|
<fo:block-container line-height="1.08" font-family="Lato">
|
219
|
-
<fo:block
|
220
|
-
<
|
221
|
-
|
222
|
-
<xsl:variable name="margin-left">3.9</xsl:variable>
|
223
|
-
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
224
|
-
<fo:block margin-top="8pt" margin-bottom="5pt" margin-left="{(@level - 1) * $margin-left}mm" text-align-last="justify">
|
225
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
226
|
-
<xsl:if test="@section != ''">
|
227
|
-
<xsl:value-of select="@section"/><xsl:text> </xsl:text>
|
228
|
-
</xsl:if>
|
229
|
-
<xsl:apply-templates select="title"/>
|
230
|
-
<fo:inline keep-together.within-line="always">
|
231
|
-
<fo:leader leader-pattern="dots"/>
|
232
|
-
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
233
|
-
</fo:inline>
|
234
|
-
</fo:basic-link>
|
235
|
-
</fo:block>
|
236
|
-
</xsl:for-each>
|
237
|
-
|
238
|
-
<xsl:if test="//ogc:figure[@id and ogc:name] or //ogc:table[@id and ogc:name]">
|
239
|
-
<fo:block font-size="11pt" margin-top="8pt"> </fo:block>
|
240
|
-
<fo:block font-size="11pt" margin-top="8pt"> </fo:block>
|
241
|
-
<fo:block xsl:use-attribute-sets="title-toc-style">
|
242
|
-
<xsl:text>Table of Figures</xsl:text>
|
222
|
+
<fo:block role="TOC">
|
223
|
+
<fo:block xsl:use-attribute-sets="title-toc-style" role="H1">
|
224
|
+
<xsl:text>Table of Contents</xsl:text>
|
243
225
|
</fo:block>
|
244
|
-
<xsl:
|
245
|
-
|
246
|
-
|
247
|
-
|
226
|
+
<xsl:variable name="margin-left">3.9</xsl:variable>
|
227
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
228
|
+
<fo:block margin-top="8pt" margin-bottom="5pt" margin-left="{(@level - 1) * $margin-left}mm" text-align-last="justify" role="TOCI">
|
229
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
230
|
+
<xsl:if test="@section != ''">
|
231
|
+
<xsl:value-of select="@section"/><xsl:text> </xsl:text>
|
232
|
+
</xsl:if>
|
233
|
+
<xsl:apply-templates select="title"/>
|
248
234
|
<fo:inline keep-together.within-line="always">
|
249
235
|
<fo:leader leader-pattern="dots"/>
|
250
|
-
<fo:page-number-citation ref-id="{@id}"
|
236
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
251
237
|
</fo:inline>
|
252
238
|
</fo:basic-link>
|
253
239
|
</fo:block>
|
254
240
|
</xsl:for-each>
|
255
|
-
|
241
|
+
|
242
|
+
<xsl:if test="//ogc:figure[@id and ogc:name] or //ogc:table[@id and ogc:name]">
|
243
|
+
<fo:block font-size="11pt" margin-top="8pt"> </fo:block>
|
244
|
+
<fo:block font-size="11pt" margin-top="8pt"> </fo:block>
|
245
|
+
<fo:block xsl:use-attribute-sets="title-toc-style">
|
246
|
+
<xsl:text>Table of Figures</xsl:text>
|
247
|
+
</fo:block>
|
248
|
+
<xsl:for-each select="//ogc:figure[@id and ogc:name] | //ogc:table[@id and ogc:name]">
|
249
|
+
<fo:block margin-top="8pt" margin-bottom="5pt" text-align-last="justify" role="TOCI">
|
250
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{ogc:name}">
|
251
|
+
<xsl:apply-templates select="ogc:name" mode="contents"/>
|
252
|
+
<fo:inline keep-together.within-line="always">
|
253
|
+
<fo:leader leader-pattern="dots"/>
|
254
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
255
|
+
</fo:inline>
|
256
|
+
</fo:basic-link>
|
257
|
+
</fo:block>
|
258
|
+
</xsl:for-each>
|
259
|
+
</xsl:if>
|
260
|
+
</fo:block>
|
256
261
|
</fo:block-container>
|
257
262
|
|
258
263
|
|
@@ -417,7 +422,10 @@
|
|
417
422
|
</xsl:template>
|
418
423
|
|
419
424
|
<xsl:template match="ogc:license-statement//ogc:title">
|
420
|
-
<
|
425
|
+
<xsl:variable name="level">
|
426
|
+
<xsl:call-template name="getLevel"/>
|
427
|
+
</xsl:variable>
|
428
|
+
<fo:block font-family="Lato" text-align="center" font-weight="bold" margin-top="4pt" role="H{$level}">
|
421
429
|
<xsl:apply-templates/>
|
422
430
|
</fo:block>
|
423
431
|
</xsl:template>
|
@@ -450,7 +458,10 @@
|
|
450
458
|
</xsl:template>
|
451
459
|
|
452
460
|
<xsl:template match="ogc:copyright-statement//ogc:title | ogc:legal-statement//ogc:title">
|
453
|
-
<
|
461
|
+
<xsl:variable name="level">
|
462
|
+
<xsl:call-template name="getLevel"/>
|
463
|
+
</xsl:variable>
|
464
|
+
<fo:block font-family="Lato" text-align="center" font-weight="bold" role="H{$level}">
|
454
465
|
<xsl:apply-templates/>
|
455
466
|
</fo:block>
|
456
467
|
</xsl:template>
|
@@ -489,8 +500,9 @@
|
|
489
500
|
<!-- ====== -->
|
490
501
|
|
491
502
|
<xsl:template match="ogc:annex/ogc:title">
|
492
|
-
<fo:block xsl:use-attribute-sets="title-depth1-style">
|
503
|
+
<fo:block xsl:use-attribute-sets="title-depth1-style" role="H1">
|
493
504
|
<xsl:apply-templates/>
|
505
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
494
506
|
</fo:block>
|
495
507
|
</xsl:template>
|
496
508
|
|
@@ -520,7 +532,7 @@
|
|
520
532
|
</fo:inline>
|
521
533
|
</xsl:when>
|
522
534
|
<xsl:otherwise>
|
523
|
-
<fo:inline font-family="Lato">
|
535
|
+
<fo:inline font-family="Lato" role="H{$level}">
|
524
536
|
<xsl:apply-templates/>
|
525
537
|
</fo:inline>
|
526
538
|
</xsl:otherwise>
|
@@ -531,21 +543,25 @@
|
|
531
543
|
<xsl:when test="$level = 1">
|
532
544
|
<fo:block xsl:use-attribute-sets="title-depth1-style">
|
533
545
|
<xsl:apply-templates/>
|
546
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
534
547
|
</fo:block>
|
535
548
|
</xsl:when>
|
536
549
|
<xsl:when test="$level = 2">
|
537
550
|
<fo:block xsl:use-attribute-sets="title-depth2-style">
|
538
551
|
<xsl:apply-templates/>
|
552
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
539
553
|
</fo:block>
|
540
554
|
</xsl:when>
|
541
555
|
<xsl:when test="$level = 3">
|
542
556
|
<fo:block xsl:use-attribute-sets="title-depth3-style">
|
543
557
|
<xsl:apply-templates/>
|
558
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
544
559
|
</fo:block>
|
545
560
|
</xsl:when>
|
546
561
|
<xsl:otherwise>
|
547
|
-
<fo:block font-family="Lato">
|
562
|
+
<fo:block font-family="Lato" role="H{$level}">
|
548
563
|
<xsl:apply-templates/>
|
564
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
549
565
|
</fo:block>
|
550
566
|
</xsl:otherwise>
|
551
567
|
</xsl:choose>
|
@@ -751,7 +767,10 @@
|
|
751
767
|
<xsl:otherwise>12pt</xsl:otherwise>
|
752
768
|
</xsl:choose>
|
753
769
|
</xsl:variable>
|
754
|
-
<
|
770
|
+
<xsl:variable name="levelTerm">
|
771
|
+
<xsl:call-template name="getLevelTermName"/>
|
772
|
+
</xsl:variable>
|
773
|
+
<fo:block font-size="{$font-size}" role="H{$levelTerm}">
|
755
774
|
<fo:block font-weight="bold" keep-with-next="always">
|
756
775
|
<xsl:apply-templates select="ancestor::ogc:term/ogc:name" mode="presentation"/>
|
757
776
|
</fo:block>
|
@@ -861,13 +880,13 @@
|
|
861
880
|
</fo:block>
|
862
881
|
</fo:static-content>
|
863
882
|
|
864
|
-
<fo:static-content flow-name="header">
|
883
|
+
<fo:static-content flow-name="header" role="artifact">
|
865
884
|
<fo:block-container height="16.5mm" background-color="{$color}">
|
866
885
|
<fo:block> </fo:block>
|
867
886
|
</fo:block-container>
|
868
887
|
</fo:static-content>
|
869
888
|
|
870
|
-
<fo:static-content flow-name="footer">
|
889
|
+
<fo:static-content flow-name="footer" role="artifact">
|
871
890
|
<fo:block-container height="100%" display-align="after">
|
872
891
|
<fo:block-container height="23.5mm" background-color="{$color}" color="rgb(231, 230, 230)" display-align="after">
|
873
892
|
<fo:block-container margin-left="1in" margin-right="1in">
|
@@ -1072,6 +1091,7 @@
|
|
1072
1091
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1073
1092
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1074
1093
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1094
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
1075
1095
|
|
1076
1096
|
|
1077
1097
|
|
@@ -1080,7 +1100,7 @@
|
|
1080
1100
|
|
1081
1101
|
|
1082
1102
|
|
1083
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1103
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
1084
1104
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1085
1105
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1086
1106
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
@@ -1124,8 +1144,13 @@
|
|
1124
1144
|
|
1125
1145
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1126
1146
|
|
1127
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1128
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1147
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
1148
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
1149
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
1150
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
1151
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
1152
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
1153
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
1129
1154
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
1130
1155
|
|
1131
1156
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -1212,6 +1237,7 @@
|
|
1212
1237
|
|
1213
1238
|
|
1214
1239
|
|
1240
|
+
|
1215
1241
|
|
1216
1242
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
1217
1243
|
|
@@ -1364,7 +1390,8 @@
|
|
1364
1390
|
|
1365
1391
|
|
1366
1392
|
|
1367
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1393
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1394
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
1368
1395
|
|
1369
1396
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1370
1397
|
<xsl:attribute name="margin-left">13mm</xsl:attribute>
|
@@ -1463,7 +1490,7 @@
|
|
1463
1490
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1464
1491
|
|
1465
1492
|
|
1466
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1493
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
1467
1494
|
|
1468
1495
|
|
1469
1496
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -1510,13 +1537,20 @@
|
|
1510
1537
|
|
1511
1538
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1512
1539
|
|
1513
|
-
</xsl:attribute-set><xsl:
|
1540
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1541
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1542
|
+
</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">
|
1514
1543
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1515
1544
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1516
1545
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1517
1546
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1518
1547
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1519
|
-
</xsl:template><xsl:template name="
|
1548
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1549
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1550
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1551
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1552
|
+
</xsl:for-each>
|
1553
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1520
1554
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1521
1555
|
|
1522
1556
|
<!-- Normative references -->
|
@@ -1529,13 +1563,33 @@
|
|
1529
1563
|
<!-- Bibliography -->
|
1530
1564
|
<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"/>
|
1531
1565
|
|
1532
|
-
</xsl:template><xsl:template name="
|
1566
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1567
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1568
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1569
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1570
|
+
</xsl:for-each>
|
1571
|
+
|
1572
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1573
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1574
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1575
|
+
</xsl:for-each>
|
1576
|
+
|
1577
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1578
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1579
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1580
|
+
</xsl:for-each>
|
1581
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1533
1582
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1534
1583
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1535
1584
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1536
1585
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1537
1586
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1538
|
-
</xsl:template><xsl:template name="
|
1587
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1588
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1589
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1590
|
+
<xsl:apply-templates select="."/>
|
1591
|
+
</xsl:for-each>
|
1592
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1539
1593
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1540
1594
|
|
1541
1595
|
<!-- Normative references -->
|
@@ -1547,6 +1601,22 @@
|
|
1547
1601
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1548
1602
|
<!-- Bibliography -->
|
1549
1603
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1604
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1605
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1606
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1607
|
+
<xsl:apply-templates select="."/>
|
1608
|
+
|
1609
|
+
</xsl:for-each>
|
1610
|
+
|
1611
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1612
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1613
|
+
<xsl:apply-templates select="."/>
|
1614
|
+
</xsl:for-each>
|
1615
|
+
|
1616
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1617
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1618
|
+
<xsl:apply-templates select="."/>
|
1619
|
+
</xsl:for-each>
|
1550
1620
|
</xsl:template><xsl:template match="text()">
|
1551
1621
|
<xsl:value-of select="."/>
|
1552
1622
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -1575,7 +1645,9 @@
|
|
1575
1645
|
<!-- Display table's name before table as standalone block -->
|
1576
1646
|
<!-- $namespace = 'iso' or -->
|
1577
1647
|
|
1578
|
-
|
1648
|
+
|
1649
|
+
|
1650
|
+
|
1579
1651
|
|
1580
1652
|
<xsl:call-template name="fn_name_display"/>
|
1581
1653
|
|
@@ -1708,6 +1780,8 @@
|
|
1708
1780
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1709
1781
|
</xsl:if>
|
1710
1782
|
|
1783
|
+
|
1784
|
+
|
1711
1785
|
<xsl:choose>
|
1712
1786
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1713
1787
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -1994,9 +2068,9 @@
|
|
1994
2068
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1995
2069
|
<xsl:with-param name="continued">true</xsl:with-param>
|
1996
2070
|
</xsl:apply-templates>
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2071
|
+
|
2072
|
+
|
2073
|
+
|
2000
2074
|
|
2001
2075
|
</fo:table-cell>
|
2002
2076
|
</fo:table-row>
|
@@ -2078,7 +2152,11 @@
|
|
2078
2152
|
|
2079
2153
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2080
2154
|
|
2081
|
-
<xsl:
|
2155
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
2156
|
+
|
2157
|
+
</xsl:variable>
|
2158
|
+
|
2159
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
2082
2160
|
|
2083
2161
|
<xsl:variable name="cols-count">
|
2084
2162
|
<xsl:choose>
|
@@ -2219,6 +2297,19 @@
|
|
2219
2297
|
|
2220
2298
|
</fo:table-body>
|
2221
2299
|
|
2300
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
2301
|
+
<xsl:choose>
|
2302
|
+
<xsl:when test="substring-after(., '—') != ''">
|
2303
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
2304
|
+
</xsl:when>
|
2305
|
+
<xsl:otherwise>
|
2306
|
+
<xsl:value-of select="."/>
|
2307
|
+
</xsl:otherwise>
|
2308
|
+
</xsl:choose>
|
2309
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
2310
|
+
<xsl:apply-templates mode="presentation_name"/>
|
2311
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
2312
|
+
<xsl:apply-templates select="."/>
|
2222
2313
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
2223
2314
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
2224
2315
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -2401,20 +2492,12 @@
|
|
2401
2492
|
<xsl:apply-templates/>
|
2402
2493
|
</xsl:template><xsl:template name="fn_display">
|
2403
2494
|
<xsl:variable name="references">
|
2495
|
+
|
2404
2496
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
2405
|
-
<
|
2406
|
-
|
2407
|
-
|
2408
|
-
<xsl:attribute name="id">
|
2409
|
-
<xsl:value-of select="@reference"/>
|
2410
|
-
<xsl:text>_</xsl:text>
|
2411
|
-
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
2412
|
-
</xsl:attribute>
|
2413
|
-
|
2414
|
-
<xsl:apply-templates/>
|
2415
|
-
</fn>
|
2497
|
+
<xsl:call-template name="create_fn"/>
|
2416
2498
|
</xsl:for-each>
|
2417
2499
|
</xsl:variable>
|
2500
|
+
|
2418
2501
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2419
2502
|
<xsl:variable name="reference" select="@reference"/>
|
2420
2503
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
@@ -2450,6 +2533,18 @@
|
|
2450
2533
|
</fo:block>
|
2451
2534
|
</xsl:if>
|
2452
2535
|
</xsl:for-each>
|
2536
|
+
</xsl:template><xsl:template name="create_fn">
|
2537
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2538
|
+
|
2539
|
+
|
2540
|
+
<xsl:attribute name="id">
|
2541
|
+
<xsl:value-of select="@reference"/>
|
2542
|
+
<xsl:text>_</xsl:text>
|
2543
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
2544
|
+
</xsl:attribute>
|
2545
|
+
|
2546
|
+
<xsl:apply-templates/>
|
2547
|
+
</fn>
|
2453
2548
|
</xsl:template><xsl:template name="fn_name_display">
|
2454
2549
|
<!-- <xsl:variable name="references">
|
2455
2550
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -3442,16 +3537,68 @@
|
|
3442
3537
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3443
3538
|
</xsl:call-template>
|
3444
3539
|
|
3540
|
+
|
3541
|
+
|
3445
3542
|
<xsl:variable name="mathml">
|
3446
3543
|
<xsl:apply-templates select="." mode="mathml"/>
|
3447
3544
|
</xsl:variable>
|
3448
3545
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3449
3546
|
|
3450
3547
|
|
3548
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
3549
|
+
<xsl:variable name="comment_text_">
|
3550
|
+
<xsl:choose>
|
3551
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
3552
|
+
<xsl:value-of select="$comment_text_following"/>
|
3553
|
+
</xsl:when>
|
3554
|
+
<xsl:otherwise>
|
3555
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
3556
|
+
</xsl:otherwise>
|
3557
|
+
</xsl:choose>
|
3558
|
+
</xsl:variable>
|
3559
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
3560
|
+
|
3561
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
3562
|
+
<!-- put Mathin Alternate Text -->
|
3563
|
+
<xsl:attribute name="fox:alt-text">
|
3564
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
3565
|
+
</xsl:attribute>
|
3566
|
+
</xsl:if>
|
3567
|
+
|
3568
|
+
<xsl:variable name="mathml_content">
|
3569
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
3570
|
+
</xsl:variable>
|
3571
|
+
<!-- put MathML in Actual Text -->
|
3572
|
+
<xsl:attribute name="fox:actual-text">
|
3573
|
+
<xsl:value-of select="$mathml_content"/>
|
3574
|
+
</xsl:attribute>
|
3575
|
+
|
3576
|
+
|
3451
3577
|
<!-- <xsl:copy-of select="."/> -->
|
3452
3578
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3453
3579
|
</fo:instream-foreign-object>
|
3454
3580
|
</fo:inline>
|
3581
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
3582
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
3583
|
+
<xsl:text><</xsl:text>
|
3584
|
+
<xsl:value-of select="local-name()"/>
|
3585
|
+
<xsl:if test="local-name() = 'math'">
|
3586
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
3587
|
+
</xsl:if>
|
3588
|
+
<xsl:for-each select="@*">
|
3589
|
+
<xsl:text> </xsl:text>
|
3590
|
+
<xsl:value-of select="local-name()"/>
|
3591
|
+
<xsl:text>="</xsl:text>
|
3592
|
+
<xsl:value-of select="."/>
|
3593
|
+
<xsl:text>"</xsl:text>
|
3594
|
+
</xsl:for-each>
|
3595
|
+
<xsl:text>></xsl:text>
|
3596
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
3597
|
+
<xsl:text></</xsl:text>
|
3598
|
+
<xsl:value-of select="local-name()"/>
|
3599
|
+
<xsl:text>></xsl:text>
|
3600
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
3601
|
+
<xsl:value-of select="normalize-space()"/>
|
3455
3602
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3456
3603
|
<xsl:copy>
|
3457
3604
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -3461,19 +3608,6 @@
|
|
3461
3608
|
<!-- replace start and end spaces to non-break space -->
|
3462
3609
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3463
3610
|
</xsl:copy>
|
3464
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3465
|
-
<xsl:copy>
|
3466
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3467
|
-
</xsl:copy>
|
3468
|
-
<xsl:choose>
|
3469
|
-
<!-- if in msub, then don't add space -->
|
3470
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3471
|
-
<!-- if next char in digit, don't add space -->
|
3472
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3473
|
-
<xsl:otherwise>
|
3474
|
-
<mathml:mspace width="0.5ex"/>
|
3475
|
-
</xsl:otherwise>
|
3476
|
-
</xsl:choose>
|
3477
3611
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3478
3612
|
<xsl:variable name="target">
|
3479
3613
|
<xsl:choose>
|
@@ -3526,7 +3660,10 @@
|
|
3526
3660
|
</fo:block>
|
3527
3661
|
<xsl:apply-templates/>
|
3528
3662
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
3529
|
-
<
|
3663
|
+
<xsl:variable name="level">
|
3664
|
+
<xsl:call-template name="getLevel"/>
|
3665
|
+
</xsl:variable>
|
3666
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
3530
3667
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
3531
3668
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
3532
3669
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3561,9 +3698,10 @@
|
|
3561
3698
|
|
3562
3699
|
</xsl:variable>
|
3563
3700
|
|
3701
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3564
3702
|
<xsl:choose>
|
3565
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3566
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
3703
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
3704
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
3567
3705
|
</xsl:choose>
|
3568
3706
|
<xsl:apply-templates/>
|
3569
3707
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -3713,7 +3851,10 @@
|
|
3713
3851
|
</fo:block>
|
3714
3852
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
3715
3853
|
<xsl:if test="normalize-space() != ''">
|
3716
|
-
<
|
3854
|
+
<xsl:variable name="level">
|
3855
|
+
<xsl:call-template name="getLevelTermName"/>
|
3856
|
+
</xsl:variable>
|
3857
|
+
<fo:inline role="H{$level}">
|
3717
3858
|
<xsl:apply-templates/>
|
3718
3859
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
3719
3860
|
<xsl:text>.</xsl:text>
|
@@ -4014,6 +4155,13 @@
|
|
4014
4155
|
</xsl:attribute>
|
4015
4156
|
<xsl:apply-templates mode="svg_update"/>
|
4016
4157
|
</xsl:copy>
|
4158
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4159
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4160
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4161
|
+
<xsl:call-template name="image_svg">
|
4162
|
+
<xsl:with-param name="name" select="$name"/>
|
4163
|
+
</xsl:call-template>
|
4164
|
+
</xsl:for-each>
|
4017
4165
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4018
4166
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4019
4167
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4118,7 +4266,7 @@
|
|
4118
4266
|
</fo:basic-link>
|
4119
4267
|
</fo:block>
|
4120
4268
|
</fo:block-container>
|
4121
|
-
</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">
|
4269
|
+
</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">
|
4122
4270
|
<xsl:apply-templates mode="contents"/>
|
4123
4271
|
<xsl:text> </xsl:text>
|
4124
4272
|
</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">
|
@@ -4355,6 +4503,7 @@
|
|
4355
4503
|
</xsl:when>
|
4356
4504
|
<xsl:otherwise>
|
4357
4505
|
<xsl:apply-templates/>
|
4506
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
4358
4507
|
</xsl:otherwise>
|
4359
4508
|
</xsl:choose>
|
4360
4509
|
</fo:block>
|
@@ -4503,14 +4652,6 @@
|
|
4503
4652
|
<fo:block>
|
4504
4653
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
4505
4654
|
</fo:block>
|
4506
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4507
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
4508
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4509
|
-
</fo:block>
|
4510
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
4511
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
4512
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4513
|
-
</fo:block>
|
4514
4655
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
4515
4656
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4516
4657
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4527,6 +4668,38 @@
|
|
4527
4668
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4528
4669
|
<xsl:apply-templates/>
|
4529
4670
|
</fo:block>
|
4671
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4672
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4673
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4674
|
+
</fo:block>
|
4675
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
4676
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4677
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4678
|
+
</fo:block>
|
4679
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
4680
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
4681
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4682
|
+
</fo:block>
|
4683
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
4684
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
4685
|
+
<xsl:apply-templates/>
|
4686
|
+
</fo:block>
|
4687
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
4688
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
4689
|
+
<xsl:apply-templates/>
|
4690
|
+
</fo:block>
|
4691
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
4692
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
4693
|
+
<xsl:apply-templates/>
|
4694
|
+
</fo:block>
|
4695
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
4696
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
4697
|
+
<xsl:apply-templates/>
|
4698
|
+
</fo:block>
|
4699
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
4700
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
4701
|
+
<xsl:apply-templates/>
|
4702
|
+
</fo:block>
|
4530
4703
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4531
4704
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4532
4705
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -4678,7 +4851,19 @@
|
|
4678
4851
|
</fo:inline>
|
4679
4852
|
</xsl:if>
|
4680
4853
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
4681
|
-
<
|
4854
|
+
<xsl:variable name="element">inline
|
4855
|
+
|
4856
|
+
</xsl:variable>
|
4857
|
+
<xsl:choose>
|
4858
|
+
<xsl:when test="contains($element, 'block')">
|
4859
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4860
|
+
<xsl:apply-templates/>
|
4861
|
+
</fo:block>
|
4862
|
+
</xsl:when>
|
4863
|
+
<xsl:otherwise>
|
4864
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4865
|
+
</xsl:otherwise>
|
4866
|
+
</xsl:choose>
|
4682
4867
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4683
4868
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4684
4869
|
|
@@ -4780,14 +4965,15 @@
|
|
4780
4965
|
</xsl:if>
|
4781
4966
|
</xsl:template><xsl:variable name="localized.source">
|
4782
4967
|
<xsl:call-template name="getLocalizedString">
|
4783
|
-
|
4784
|
-
|
4968
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4969
|
+
</xsl:call-template>
|
4785
4970
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4786
4971
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4787
4972
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4788
4973
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4789
4974
|
</xsl:if>
|
4790
4975
|
|
4976
|
+
|
4791
4977
|
<fo:inline>
|
4792
4978
|
|
4793
4979
|
|
@@ -4795,6 +4981,7 @@
|
|
4795
4981
|
|
4796
4982
|
|
4797
4983
|
|
4984
|
+
|
4798
4985
|
<xsl:call-template name="getTitle">
|
4799
4986
|
<xsl:with-param name="name" select="'title-source'"/>
|
4800
4987
|
</xsl:call-template>
|
@@ -4806,6 +4993,7 @@
|
|
4806
4993
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4807
4994
|
<xsl:apply-templates/>
|
4808
4995
|
</fo:inline>
|
4996
|
+
|
4809
4997
|
</fo:basic-link>
|
4810
4998
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4811
4999
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4872,6 +5060,9 @@
|
|
4872
5060
|
|
4873
5061
|
</xsl:if>
|
4874
5062
|
|
5063
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
5064
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
5065
|
+
|
4875
5066
|
|
4876
5067
|
|
4877
5068
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4887,7 +5078,9 @@
|
|
4887
5078
|
|
4888
5079
|
|
4889
5080
|
</xsl:if>
|
4890
|
-
|
5081
|
+
|
5082
|
+
|
5083
|
+
|
4891
5084
|
<xsl:apply-templates/>
|
4892
5085
|
</fo:basic-link>
|
4893
5086
|
|
@@ -5229,6 +5422,7 @@
|
|
5229
5422
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
5230
5423
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
5231
5424
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
5425
|
+
|
5232
5426
|
<xsl:apply-templates/>
|
5233
5427
|
</fo:block>
|
5234
5428
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -5268,7 +5462,6 @@
|
|
5268
5462
|
</xsl:template><xsl:template name="processBibitem">
|
5269
5463
|
|
5270
5464
|
|
5271
|
-
<!-- end BIPM bibitem processing-->
|
5272
5465
|
|
5273
5466
|
|
5274
5467
|
<!-- start OGC bibtem processing -->
|
@@ -5538,6 +5731,97 @@
|
|
5538
5731
|
<fo:block-container border="1pt solid black" width="50%">
|
5539
5732
|
<fo:block> </fo:block>
|
5540
5733
|
</fo:block-container>
|
5734
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5735
|
+
<xsl:param name="colwidths"/>
|
5736
|
+
<xsl:variable name="colwidths_">
|
5737
|
+
<xsl:choose>
|
5738
|
+
<xsl:when test="not($colwidths)">
|
5739
|
+
<xsl:variable name="toc_table_simple">
|
5740
|
+
<tbody>
|
5741
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5742
|
+
</tbody>
|
5743
|
+
</xsl:variable>
|
5744
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5745
|
+
<xsl:call-template name="calculate-column-widths">
|
5746
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5747
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5748
|
+
</xsl:call-template>
|
5749
|
+
</xsl:when>
|
5750
|
+
<xsl:otherwise>
|
5751
|
+
<xsl:copy-of select="$colwidths"/>
|
5752
|
+
</xsl:otherwise>
|
5753
|
+
</xsl:choose>
|
5754
|
+
</xsl:variable>
|
5755
|
+
<fo:block role="TOCI" space-after="16pt">
|
5756
|
+
<fo:table width="100%" table-layout="fixed">
|
5757
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5758
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5759
|
+
</xsl:for-each>
|
5760
|
+
<fo:table-body>
|
5761
|
+
<xsl:apply-templates/>
|
5762
|
+
</fo:table-body>
|
5763
|
+
</fo:table>
|
5764
|
+
</fo:block>
|
5765
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5766
|
+
<fo:table-row min-height="5mm">
|
5767
|
+
<xsl:apply-templates/>
|
5768
|
+
</fo:table-row>
|
5769
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5770
|
+
<xsl:apply-templates/>
|
5771
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5772
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5773
|
+
<xsl:variable name="target" select="@target"/>
|
5774
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5775
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5776
|
+
<fo:table-cell>
|
5777
|
+
<fo:block>
|
5778
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5779
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5780
|
+
<xsl:choose>
|
5781
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5782
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5783
|
+
</xsl:choose>
|
5784
|
+
</xsl:for-each>
|
5785
|
+
</fo:basic-link>
|
5786
|
+
</fo:block>
|
5787
|
+
</fo:table-cell>
|
5788
|
+
</xsl:for-each>
|
5789
|
+
<!-- last column - for page numbers -->
|
5790
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5791
|
+
<fo:block>
|
5792
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5793
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5794
|
+
</fo:basic-link>
|
5795
|
+
</fo:block>
|
5796
|
+
</fo:table-cell>
|
5797
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5798
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5799
|
+
</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">
|
5800
|
+
<tr>
|
5801
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5802
|
+
</tr>
|
5803
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5804
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5805
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5806
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5807
|
+
<td>
|
5808
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5809
|
+
<xsl:copy-of select="."/>
|
5810
|
+
</xsl:for-each>
|
5811
|
+
</td>
|
5812
|
+
</xsl:for-each>
|
5813
|
+
<td>333</td> <!-- page number, just for fill -->
|
5814
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5815
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
5816
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5817
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5818
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5819
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5820
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5821
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5822
|
+
</svg>
|
5823
|
+
</fo:instream-foreign-object>
|
5824
|
+
</fo:inline>
|
5541
5825
|
</xsl:template><xsl:template name="convertDate">
|
5542
5826
|
<xsl:param name="date"/>
|
5543
5827
|
<xsl:param name="format" select="'short'"/>
|
@@ -5776,6 +6060,26 @@
|
|
5776
6060
|
<xsl:value-of select="$level"/>
|
5777
6061
|
</xsl:otherwise>
|
5778
6062
|
</xsl:choose>
|
6063
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
6064
|
+
<xsl:choose>
|
6065
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
6066
|
+
<xsl:value-of select="../@depth"/>
|
6067
|
+
</xsl:when>
|
6068
|
+
<xsl:otherwise>
|
6069
|
+
<xsl:variable name="title_level_">
|
6070
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
6071
|
+
<xsl:call-template name="getLevel"/>
|
6072
|
+
</xsl:for-each>
|
6073
|
+
</xsl:variable>
|
6074
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
6075
|
+
<xsl:choose>
|
6076
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
6077
|
+
<xsl:otherwise>
|
6078
|
+
<xsl:call-template name="getLevel"/>
|
6079
|
+
</xsl:otherwise>
|
6080
|
+
</xsl:choose>
|
6081
|
+
</xsl:otherwise>
|
6082
|
+
</xsl:choose>
|
5779
6083
|
</xsl:template><xsl:template name="split">
|
5780
6084
|
<xsl:param name="pText" select="."/>
|
5781
6085
|
<xsl:param name="sep" select="','"/>
|