metanorma-m3aawg 1.7.9 → 1.7.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/m3aawg/basicdoc.rng +21 -4
- data/lib/asciidoctor/m3aawg/converter.rb +3 -2
- data/lib/asciidoctor/m3aawg/isodoc.rng +241 -61
- data/lib/asciidoctor/m3aawg/reqt.rng +23 -2
- data/lib/isodoc/m3aawg/html/wordstyle.css +12 -1
- data/lib/isodoc/m3aawg/html/wordstyle.scss +12 -1
- data/lib/isodoc/m3aawg/m3aawg.policy.xsl +318 -35
- data/lib/isodoc/m3aawg/m3aawg.report.xsl +318 -35
- data/lib/metanorma/m3aawg/version.rb +1 -1
- metadata +2 -2
@@ -114,7 +114,7 @@
|
|
114
114
|
</fo:block>
|
115
115
|
</fo:block-container>
|
116
116
|
</fo:static-content>
|
117
|
-
<fo:static-content flow-name="footer">
|
117
|
+
<fo:static-content flow-name="footer" role="artifact">
|
118
118
|
<fo:block-container height="31mm" font-size="10pt">
|
119
119
|
<fo:block text-align-last="justify" margin-top="2mm">
|
120
120
|
<fo:inline font-weight="bold">
|
@@ -173,7 +173,7 @@
|
|
173
173
|
</fo:inline>
|
174
174
|
</fo:block>
|
175
175
|
|
176
|
-
<fo:block font-size="22pt" margin-bottom="12pt">
|
176
|
+
<fo:block font-size="22pt" margin-bottom="12pt" role="H1">
|
177
177
|
<xsl:value-of select="$title-en"/>
|
178
178
|
</fo:block>
|
179
179
|
<!-- Version 1.0 -->
|
@@ -225,8 +225,8 @@
|
|
225
225
|
<xsl:with-param name="name" select="'title-toc'"/>
|
226
226
|
</xsl:call-template>
|
227
227
|
</xsl:variable>
|
228
|
-
<fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt"><xsl:value-of select="$title-toc"/></fo:block>
|
229
|
-
<fo:block font-size="10pt">
|
228
|
+
<fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
|
229
|
+
<fo:block font-size="10pt" role="TOC">
|
230
230
|
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
231
231
|
<xsl:choose>
|
232
232
|
<xsl:when test="@section = ''">
|
@@ -235,7 +235,7 @@
|
|
235
235
|
<fo:table-body>
|
236
236
|
<fo:table-row height="6mm">
|
237
237
|
<fo:table-cell>
|
238
|
-
<fo:block text-align-last="justify">
|
238
|
+
<fo:block text-align-last="justify" role="TOCI">
|
239
239
|
<xsl:if test="@level = 1">
|
240
240
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
241
241
|
</xsl:if>
|
@@ -261,7 +261,7 @@
|
|
261
261
|
<fo:table-body>
|
262
262
|
<fo:table-row height="6mm">
|
263
263
|
<fo:table-cell>
|
264
|
-
<fo:block font-weight="bold">
|
264
|
+
<fo:block font-weight="bold" role="TOCI">
|
265
265
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
266
266
|
<xsl:choose>
|
267
267
|
<!-- <xsl:when test="@section = ''">
|
@@ -279,7 +279,7 @@
|
|
279
279
|
</fo:block>
|
280
280
|
</fo:table-cell>
|
281
281
|
<fo:table-cell>
|
282
|
-
<fo:block text-align-last="justify">
|
282
|
+
<fo:block text-align-last="justify" role="TOCI">
|
283
283
|
<xsl:if test="@level = 1">
|
284
284
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
285
285
|
</xsl:if>
|
@@ -447,7 +447,10 @@
|
|
447
447
|
<!-- ====== -->
|
448
448
|
|
449
449
|
<xsl:template match="m3d:boilerplate//m3d:title">
|
450
|
-
<
|
450
|
+
<xsl:variable name="level">
|
451
|
+
<xsl:call-template name="getLevel"/>
|
452
|
+
</xsl:variable>
|
453
|
+
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always" role="H{$level}">
|
451
454
|
<xsl:apply-templates/>
|
452
455
|
</fo:block>
|
453
456
|
</xsl:template>
|
@@ -463,8 +466,9 @@
|
|
463
466
|
<xsl:otherwise>12pt</xsl:otherwise>
|
464
467
|
</xsl:choose>
|
465
468
|
</xsl:variable>
|
466
|
-
<fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always">
|
469
|
+
<fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always" role="H1">
|
467
470
|
<xsl:apply-templates/>
|
471
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
468
472
|
</fo:block>
|
469
473
|
</xsl:template>
|
470
474
|
|
@@ -511,8 +515,10 @@
|
|
511
515
|
</xsl:choose>
|
512
516
|
</xsl:attribute>
|
513
517
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
518
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
514
519
|
|
515
520
|
<xsl:apply-templates/>
|
521
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
516
522
|
|
517
523
|
</xsl:element>
|
518
524
|
|
@@ -1066,6 +1072,7 @@
|
|
1066
1072
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1067
1073
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1068
1074
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1075
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
1069
1076
|
|
1070
1077
|
|
1071
1078
|
|
@@ -1090,8 +1097,13 @@
|
|
1090
1097
|
|
1091
1098
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
1092
1099
|
|
1093
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1094
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1100
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
1101
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
1102
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
1103
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
1104
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
1105
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
1106
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
1095
1107
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
1096
1108
|
|
1097
1109
|
|
@@ -1273,6 +1285,11 @@
|
|
1273
1285
|
|
1274
1286
|
|
1275
1287
|
|
1288
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
1289
|
+
|
1290
|
+
|
1291
|
+
|
1292
|
+
|
1276
1293
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1277
1294
|
|
1278
1295
|
|
@@ -1303,7 +1320,8 @@
|
|
1303
1320
|
|
1304
1321
|
|
1305
1322
|
|
1306
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1323
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1324
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
1307
1325
|
|
1308
1326
|
|
1309
1327
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1432,13 +1450,20 @@
|
|
1432
1450
|
|
1433
1451
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1434
1452
|
|
1435
|
-
</xsl:attribute-set><xsl:
|
1453
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1454
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1455
|
+
</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">
|
1436
1456
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1437
1457
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1438
1458
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1439
1459
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1440
1460
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1441
|
-
</xsl:template><xsl:template name="
|
1461
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1462
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1463
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1464
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1465
|
+
</xsl:for-each>
|
1466
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1442
1467
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1443
1468
|
|
1444
1469
|
<!-- Normative references -->
|
@@ -1451,13 +1476,33 @@
|
|
1451
1476
|
<!-- Bibliography -->
|
1452
1477
|
<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"/>
|
1453
1478
|
|
1454
|
-
</xsl:template><xsl:template name="
|
1479
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1480
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1481
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1482
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1483
|
+
</xsl:for-each>
|
1484
|
+
|
1485
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1486
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1487
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1488
|
+
</xsl:for-each>
|
1489
|
+
|
1490
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1491
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1492
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1493
|
+
</xsl:for-each>
|
1494
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1455
1495
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1456
1496
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1457
1497
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1458
1498
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1459
1499
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1460
|
-
</xsl:template><xsl:template name="
|
1500
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1501
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1502
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1503
|
+
<xsl:apply-templates select="."/>
|
1504
|
+
</xsl:for-each>
|
1505
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1461
1506
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1462
1507
|
|
1463
1508
|
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
@@ -1473,6 +1518,28 @@
|
|
1473
1518
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1474
1519
|
<!-- Bibliography -->
|
1475
1520
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1521
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1522
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1523
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1524
|
+
<xsl:apply-templates select="."/>
|
1525
|
+
|
1526
|
+
<xsl:if test="local-name()='clause' and @type='scope'">
|
1527
|
+
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1528
|
+
<fo:block break-after="page"/>
|
1529
|
+
</xsl:if>
|
1530
|
+
</xsl:if>
|
1531
|
+
|
1532
|
+
</xsl:for-each>
|
1533
|
+
|
1534
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1535
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1536
|
+
<xsl:apply-templates select="."/>
|
1537
|
+
</xsl:for-each>
|
1538
|
+
|
1539
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1540
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1541
|
+
<xsl:apply-templates select="."/>
|
1542
|
+
</xsl:for-each>
|
1476
1543
|
</xsl:template><xsl:template match="text()">
|
1477
1544
|
<xsl:value-of select="."/>
|
1478
1545
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -1503,7 +1570,9 @@
|
|
1503
1570
|
|
1504
1571
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1505
1572
|
|
1506
|
-
|
1573
|
+
|
1574
|
+
|
1575
|
+
|
1507
1576
|
|
1508
1577
|
<xsl:call-template name="fn_name_display"/>
|
1509
1578
|
|
@@ -2305,9 +2374,8 @@
|
|
2305
2374
|
|
2306
2375
|
<!-- Table's note name (NOTE, for example) -->
|
2307
2376
|
|
2308
|
-
<fo:inline padding-right="2mm">
|
2377
|
+
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
2309
2378
|
|
2310
|
-
|
2311
2379
|
|
2312
2380
|
|
2313
2381
|
|
@@ -2922,6 +2990,8 @@
|
|
2922
2990
|
<xsl:if test="$font-size != ''">
|
2923
2991
|
<xsl:attribute name="font-size">
|
2924
2992
|
<xsl:choose>
|
2993
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
2994
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
2925
2995
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2926
2996
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2927
2997
|
</xsl:choose>
|
@@ -3356,16 +3426,68 @@
|
|
3356
3426
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3357
3427
|
</xsl:call-template>
|
3358
3428
|
|
3429
|
+
|
3430
|
+
|
3359
3431
|
<xsl:variable name="mathml">
|
3360
3432
|
<xsl:apply-templates select="." mode="mathml"/>
|
3361
3433
|
</xsl:variable>
|
3362
3434
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3363
3435
|
|
3364
3436
|
|
3437
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
3438
|
+
<xsl:variable name="comment_text_">
|
3439
|
+
<xsl:choose>
|
3440
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
3441
|
+
<xsl:value-of select="$comment_text_following"/>
|
3442
|
+
</xsl:when>
|
3443
|
+
<xsl:otherwise>
|
3444
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
3445
|
+
</xsl:otherwise>
|
3446
|
+
</xsl:choose>
|
3447
|
+
</xsl:variable>
|
3448
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
3449
|
+
|
3450
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
3451
|
+
<!-- put Mathin Alternate Text -->
|
3452
|
+
<xsl:attribute name="fox:alt-text">
|
3453
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
3454
|
+
</xsl:attribute>
|
3455
|
+
</xsl:if>
|
3456
|
+
|
3457
|
+
<xsl:variable name="mathml_content">
|
3458
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
3459
|
+
</xsl:variable>
|
3460
|
+
<!-- put MathML in Actual Text -->
|
3461
|
+
<xsl:attribute name="fox:actual-text">
|
3462
|
+
<xsl:value-of select="$mathml_content"/>
|
3463
|
+
</xsl:attribute>
|
3464
|
+
|
3465
|
+
|
3365
3466
|
<!-- <xsl:copy-of select="."/> -->
|
3366
3467
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3367
3468
|
</fo:instream-foreign-object>
|
3368
3469
|
</fo:inline>
|
3470
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
3471
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
3472
|
+
<xsl:text><</xsl:text>
|
3473
|
+
<xsl:value-of select="local-name()"/>
|
3474
|
+
<xsl:if test="local-name() = 'math'">
|
3475
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
3476
|
+
</xsl:if>
|
3477
|
+
<xsl:for-each select="@*">
|
3478
|
+
<xsl:text> </xsl:text>
|
3479
|
+
<xsl:value-of select="local-name()"/>
|
3480
|
+
<xsl:text>="</xsl:text>
|
3481
|
+
<xsl:value-of select="."/>
|
3482
|
+
<xsl:text>"</xsl:text>
|
3483
|
+
</xsl:for-each>
|
3484
|
+
<xsl:text>></xsl:text>
|
3485
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
3486
|
+
<xsl:text></</xsl:text>
|
3487
|
+
<xsl:value-of select="local-name()"/>
|
3488
|
+
<xsl:text>></xsl:text>
|
3489
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
3490
|
+
<xsl:value-of select="normalize-space()"/>
|
3369
3491
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3370
3492
|
<xsl:copy>
|
3371
3493
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -3427,7 +3549,10 @@
|
|
3427
3549
|
</fo:block>
|
3428
3550
|
<xsl:apply-templates/>
|
3429
3551
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
3430
|
-
<
|
3552
|
+
<xsl:variable name="level">
|
3553
|
+
<xsl:call-template name="getLevel"/>
|
3554
|
+
</xsl:variable>
|
3555
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
3431
3556
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
3432
3557
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
3433
3558
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3462,9 +3587,10 @@
|
|
3462
3587
|
|
3463
3588
|
</xsl:variable>
|
3464
3589
|
|
3590
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3465
3591
|
<xsl:choose>
|
3466
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3467
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
3592
|
+
<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>
|
3593
|
+
<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>
|
3468
3594
|
</xsl:choose>
|
3469
3595
|
<xsl:apply-templates/>
|
3470
3596
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -3614,7 +3740,10 @@
|
|
3614
3740
|
</fo:block>
|
3615
3741
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
3616
3742
|
<xsl:if test="normalize-space() != ''">
|
3617
|
-
<
|
3743
|
+
<xsl:variable name="level">
|
3744
|
+
<xsl:call-template name="getLevelTermName"/>
|
3745
|
+
</xsl:variable>
|
3746
|
+
<fo:inline role="H{$level}">
|
3618
3747
|
<xsl:apply-templates/>
|
3619
3748
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
3620
3749
|
<xsl:text>.</xsl:text>
|
@@ -3915,6 +4044,13 @@
|
|
3915
4044
|
</xsl:attribute>
|
3916
4045
|
<xsl:apply-templates mode="svg_update"/>
|
3917
4046
|
</xsl:copy>
|
4047
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4048
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4049
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4050
|
+
<xsl:call-template name="image_svg">
|
4051
|
+
<xsl:with-param name="name" select="$name"/>
|
4052
|
+
</xsl:call-template>
|
4053
|
+
</xsl:for-each>
|
3918
4054
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
3919
4055
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3920
4056
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4019,7 +4155,7 @@
|
|
4019
4155
|
</fo:basic-link>
|
4020
4156
|
</fo:block>
|
4021
4157
|
</fo:block-container>
|
4022
|
-
</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">
|
4158
|
+
</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">
|
4023
4159
|
<xsl:apply-templates mode="contents"/>
|
4024
4160
|
<xsl:text> </xsl:text>
|
4025
4161
|
</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">
|
@@ -4245,6 +4381,7 @@
|
|
4245
4381
|
</xsl:when>
|
4246
4382
|
<xsl:otherwise>
|
4247
4383
|
<xsl:apply-templates/>
|
4384
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
4248
4385
|
</xsl:otherwise>
|
4249
4386
|
</xsl:choose>
|
4250
4387
|
</fo:block>
|
@@ -4317,12 +4454,16 @@
|
|
4317
4454
|
<xsl:if test="$font-size != ''">
|
4318
4455
|
<xsl:attribute name="font-size">
|
4319
4456
|
<xsl:choose>
|
4457
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4458
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4320
4459
|
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4321
4460
|
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4322
4461
|
</xsl:choose>
|
4323
4462
|
</xsl:attribute>
|
4324
4463
|
</xsl:if>
|
4325
4464
|
|
4465
|
+
|
4466
|
+
|
4326
4467
|
<xsl:apply-templates/>
|
4327
4468
|
</fo:block>
|
4328
4469
|
|
@@ -4385,14 +4526,6 @@
|
|
4385
4526
|
<fo:block>
|
4386
4527
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
4387
4528
|
</fo:block>
|
4388
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4389
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
4390
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4391
|
-
</fo:block>
|
4392
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
4393
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
4394
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4395
|
-
</fo:block>
|
4396
4529
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
4397
4530
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4398
4531
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4409,6 +4542,38 @@
|
|
4409
4542
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4410
4543
|
<xsl:apply-templates/>
|
4411
4544
|
</fo:block>
|
4545
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4546
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4547
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4548
|
+
</fo:block>
|
4549
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
4550
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4551
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4552
|
+
</fo:block>
|
4553
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
4554
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
4555
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4556
|
+
</fo:block>
|
4557
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
4558
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
4559
|
+
<xsl:apply-templates/>
|
4560
|
+
</fo:block>
|
4561
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
4562
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
4563
|
+
<xsl:apply-templates/>
|
4564
|
+
</fo:block>
|
4565
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
4566
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
4567
|
+
<xsl:apply-templates/>
|
4568
|
+
</fo:block>
|
4569
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
4570
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
4571
|
+
<xsl:apply-templates/>
|
4572
|
+
</fo:block>
|
4573
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
4574
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
4575
|
+
<xsl:apply-templates/>
|
4576
|
+
</fo:block>
|
4412
4577
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4413
4578
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4414
4579
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -4674,8 +4839,8 @@
|
|
4674
4839
|
</xsl:if>
|
4675
4840
|
</xsl:template><xsl:variable name="localized.source">
|
4676
4841
|
<xsl:call-template name="getLocalizedString">
|
4677
|
-
|
4678
|
-
|
4842
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4843
|
+
</xsl:call-template>
|
4679
4844
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4680
4845
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4681
4846
|
<xsl:if test="normalize-space(@citeas) = ''">
|
@@ -4685,6 +4850,7 @@
|
|
4685
4850
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4686
4851
|
<xsl:apply-templates/>
|
4687
4852
|
</fo:inline>
|
4853
|
+
|
4688
4854
|
</fo:basic-link>
|
4689
4855
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4690
4856
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -4751,6 +4917,9 @@
|
|
4751
4917
|
|
4752
4918
|
</xsl:if>
|
4753
4919
|
|
4920
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
4921
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
4922
|
+
|
4754
4923
|
|
4755
4924
|
|
4756
4925
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4763,7 +4932,9 @@
|
|
4763
4932
|
|
4764
4933
|
|
4765
4934
|
</xsl:if>
|
4766
|
-
|
4935
|
+
|
4936
|
+
|
4937
|
+
|
4767
4938
|
<xsl:apply-templates/>
|
4768
4939
|
</fo:basic-link>
|
4769
4940
|
|
@@ -5106,6 +5277,7 @@
|
|
5106
5277
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
5107
5278
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
5108
5279
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
5280
|
+
|
5109
5281
|
<xsl:apply-templates/>
|
5110
5282
|
</fo:block>
|
5111
5283
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -5274,6 +5446,97 @@
|
|
5274
5446
|
<fo:block-container border="1pt solid black" width="50%">
|
5275
5447
|
<fo:block> </fo:block>
|
5276
5448
|
</fo:block-container>
|
5449
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5450
|
+
<xsl:param name="colwidths"/>
|
5451
|
+
<xsl:variable name="colwidths_">
|
5452
|
+
<xsl:choose>
|
5453
|
+
<xsl:when test="not($colwidths)">
|
5454
|
+
<xsl:variable name="toc_table_simple">
|
5455
|
+
<tbody>
|
5456
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5457
|
+
</tbody>
|
5458
|
+
</xsl:variable>
|
5459
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5460
|
+
<xsl:call-template name="calculate-column-widths">
|
5461
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5462
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5463
|
+
</xsl:call-template>
|
5464
|
+
</xsl:when>
|
5465
|
+
<xsl:otherwise>
|
5466
|
+
<xsl:copy-of select="$colwidths"/>
|
5467
|
+
</xsl:otherwise>
|
5468
|
+
</xsl:choose>
|
5469
|
+
</xsl:variable>
|
5470
|
+
<fo:block role="TOCI" space-after="16pt">
|
5471
|
+
<fo:table width="100%" table-layout="fixed">
|
5472
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5473
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5474
|
+
</xsl:for-each>
|
5475
|
+
<fo:table-body>
|
5476
|
+
<xsl:apply-templates/>
|
5477
|
+
</fo:table-body>
|
5478
|
+
</fo:table>
|
5479
|
+
</fo:block>
|
5480
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5481
|
+
<fo:table-row min-height="5mm">
|
5482
|
+
<xsl:apply-templates/>
|
5483
|
+
</fo:table-row>
|
5484
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5485
|
+
<xsl:apply-templates/>
|
5486
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5487
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5488
|
+
<xsl:variable name="target" select="@target"/>
|
5489
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5490
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5491
|
+
<fo:table-cell>
|
5492
|
+
<fo:block>
|
5493
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5494
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5495
|
+
<xsl:choose>
|
5496
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5497
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5498
|
+
</xsl:choose>
|
5499
|
+
</xsl:for-each>
|
5500
|
+
</fo:basic-link>
|
5501
|
+
</fo:block>
|
5502
|
+
</fo:table-cell>
|
5503
|
+
</xsl:for-each>
|
5504
|
+
<!-- last column - for page numbers -->
|
5505
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5506
|
+
<fo:block>
|
5507
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5508
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5509
|
+
</fo:basic-link>
|
5510
|
+
</fo:block>
|
5511
|
+
</fo:table-cell>
|
5512
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5513
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5514
|
+
</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">
|
5515
|
+
<tr>
|
5516
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5517
|
+
</tr>
|
5518
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5519
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5520
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5521
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5522
|
+
<td>
|
5523
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5524
|
+
<xsl:copy-of select="."/>
|
5525
|
+
</xsl:for-each>
|
5526
|
+
</td>
|
5527
|
+
</xsl:for-each>
|
5528
|
+
<td>333</td> <!-- page number, just for fill -->
|
5529
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5530
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
5531
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5532
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5533
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5534
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5535
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5536
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5537
|
+
</svg>
|
5538
|
+
</fo:instream-foreign-object>
|
5539
|
+
</fo:inline>
|
5277
5540
|
</xsl:template><xsl:template name="convertDate">
|
5278
5541
|
<xsl:param name="date"/>
|
5279
5542
|
<xsl:param name="format" select="'short'"/>
|
@@ -5512,6 +5775,26 @@
|
|
5512
5775
|
<xsl:value-of select="$level"/>
|
5513
5776
|
</xsl:otherwise>
|
5514
5777
|
</xsl:choose>
|
5778
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
5779
|
+
<xsl:choose>
|
5780
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
5781
|
+
<xsl:value-of select="../@depth"/>
|
5782
|
+
</xsl:when>
|
5783
|
+
<xsl:otherwise>
|
5784
|
+
<xsl:variable name="title_level_">
|
5785
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
5786
|
+
<xsl:call-template name="getLevel"/>
|
5787
|
+
</xsl:for-each>
|
5788
|
+
</xsl:variable>
|
5789
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
5790
|
+
<xsl:choose>
|
5791
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
5792
|
+
<xsl:otherwise>
|
5793
|
+
<xsl:call-template name="getLevel"/>
|
5794
|
+
</xsl:otherwise>
|
5795
|
+
</xsl:choose>
|
5796
|
+
</xsl:otherwise>
|
5797
|
+
</xsl:choose>
|
5515
5798
|
</xsl:template><xsl:template name="split">
|
5516
5799
|
<xsl:param name="pText" select="."/>
|
5517
5800
|
<xsl:param name="sep" select="','"/>
|