metanorma-jis 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da9709b15e71dab76fa533ab0b25ebaceaa4e6ce54d873d1d7a1cf42badaaff2
|
4
|
+
data.tar.gz: 97b4c270b01ebd428b741db1a297575c830be52d8754c365bf9e50848602cf7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 939759f056436000c2b3f809a5b16466928a76d6eb237b99cb3caf17b034a0bd078e3fc8302241b7c9a762944526ce0fe7538628b1781b4d041d49d51d70f12c
|
7
|
+
data.tar.gz: 498e749399c5bce3c30e213381f619378a33f0c0843eb9711c8835c091c0b70dfa10df6ab761bb953a733575e6dc5e89306329c47e83b4d84ae0c62b7d81d343
|
@@ -4,22 +4,6 @@ require "metanorma-iso"
|
|
4
4
|
module IsoDoc
|
5
5
|
module Jis
|
6
6
|
module BaseConvert
|
7
|
-
# KILL
|
8
|
-
def termnote_parsex(node, out)
|
9
|
-
name = node.at(ns("./name"))&.remove
|
10
|
-
out.div **note_attrs(node) do |div|
|
11
|
-
div.p do |p|
|
12
|
-
if name
|
13
|
-
p.span class: "note_label" do |s|
|
14
|
-
name.children.each { |n| parse(n, s) }
|
15
|
-
end
|
16
|
-
p << " "
|
17
|
-
end
|
18
|
-
para_then_remainder(node.first_element_child, node, p, div)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
7
|
def make_tr_attr(cell, row, totalrows, header, bordered)
|
24
8
|
cell["border"] == "0" and bordered = false
|
25
9
|
super
|
@@ -11,6 +11,13 @@
|
|
11
11
|
<xsl:variable name="vertical_layout" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:vertical-layout)"/>
|
12
12
|
<xsl:variable name="vertical_layout_rotate_clause_numbers" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:vertical-layout-rotate-clause-numbers)"/>
|
13
13
|
|
14
|
+
<xsl:variable name="autonumbering_style" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:autonumbering-style)"/>
|
15
|
+
|
16
|
+
<xsl:variable name="numbers_japanese_">
|
17
|
+
<xsl:copy-of select="/*/jis:localized-strings/jis:localized-string[starts-with(@key,'0') or starts-with(@key,'1') or starts-with(@key,'2') or starts-with(@key,'3') or starts-with(@key,'4') or starts-with(@key,'5') or starts-with(@key,'6') or starts-with(@key,'7') or starts-with(@key,'8') or starts-with(@key,'9')]"/>
|
18
|
+
</xsl:variable>
|
19
|
+
<xsl:variable name="numbers_japanese" select="xalan:nodeset($numbers_japanese_)"/>
|
20
|
+
|
14
21
|
<xsl:variable name="contents_">
|
15
22
|
<xsl:variable name="bundle" select="count(//jis:jis-standard) > 1"/>
|
16
23
|
|
@@ -428,9 +435,9 @@
|
|
428
435
|
</xsl:if>
|
429
436
|
|
430
437
|
<xsl:variable name="updated_xml_step0">
|
431
|
-
<xsl:if test="$vertical_layout = 'true'">
|
432
|
-
|
433
|
-
</xsl:if>
|
438
|
+
<!-- <xsl:if test="$vertical_layout = 'true'"> -->
|
439
|
+
<xsl:apply-templates mode="update_xml_step0"/>
|
440
|
+
<!-- </xsl:if> -->
|
434
441
|
</xsl:variable>
|
435
442
|
<xsl:if test="$debug = 'true'">
|
436
443
|
<redirect:write file="update_xml_step0.xml">
|
@@ -439,14 +446,15 @@
|
|
439
446
|
</xsl:if>
|
440
447
|
|
441
448
|
<xsl:variable name="updated_xml_step1">
|
442
|
-
<xsl:choose>
|
449
|
+
<!-- <xsl:choose>
|
443
450
|
<xsl:when test="$vertical_layout = 'true'">
|
444
451
|
<xsl:apply-templates select="xalan:nodeset($updated_xml_step0)" mode="update_xml_step1"/>
|
445
452
|
</xsl:when>
|
446
453
|
<xsl:otherwise>
|
447
454
|
<xsl:apply-templates mode="update_xml_step1"/>
|
448
455
|
</xsl:otherwise>
|
449
|
-
</xsl:choose>
|
456
|
+
</xsl:choose> -->
|
457
|
+
<xsl:apply-templates select="xalan:nodeset($updated_xml_step0)" mode="update_xml_step1"/>
|
450
458
|
</xsl:variable>
|
451
459
|
<!-- DEBUG: updated_xml_step1=<xsl:copy-of select="$updated_xml_step1"/> -->
|
452
460
|
<xsl:if test="$debug = 'true'">
|
@@ -492,13 +500,18 @@
|
|
492
500
|
<xsl:apply-templates select="xalan:nodeset($docidentifier__)/node()"/>
|
493
501
|
</xsl:variable>
|
494
502
|
|
495
|
-
<xsl:variable name="
|
496
|
-
<xsl:
|
497
|
-
|
498
|
-
|
499
|
-
<xsl:
|
500
|
-
|
503
|
+
<xsl:variable name="copyrightText_">
|
504
|
+
<xsl:variable name="backpage_boilerplate_text" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:backpage-boilerplate-text)"/>
|
505
|
+
<xsl:value-of select="$backpage_boilerplate_text"/>
|
506
|
+
<xsl:if test="$backpage_boilerplate_text = ''">
|
507
|
+
<xsl:call-template name="getLocalizedString">
|
508
|
+
<xsl:with-param name="key">permission_footer</xsl:with-param>
|
509
|
+
<xsl:with-param name="formatted" select="$vertical_layout"/> <!-- $vertical_layout = 'true' -->
|
510
|
+
<xsl:with-param name="bibdata_updated" select="/*/jis:bibdata"/> <!-- $vertical_layout = 'true' -->
|
511
|
+
</xsl:call-template>
|
512
|
+
</xsl:if>
|
501
513
|
</xsl:variable>
|
514
|
+
<xsl:variable name="copyrightText" select="normalize-space($copyrightText_)"/>
|
502
515
|
|
503
516
|
<xsl:variable name="doctype" select="/*/jis:bibdata/jis:ext/jis:doctype"/>
|
504
517
|
|
@@ -1121,7 +1134,7 @@
|
|
1121
1134
|
|
1122
1135
|
<xsl:template name="insertTocItem">
|
1123
1136
|
<fo:block text-align-last="justify" role="SKIP">
|
1124
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
1137
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{normalize-space(title)}">
|
1125
1138
|
<fo:inline>
|
1126
1139
|
<xsl:if test="$vertical_layout = 'true'">
|
1127
1140
|
<xsl:attribute name="padding-right">7.5mm</xsl:attribute>
|
@@ -1273,7 +1286,15 @@
|
|
1273
1286
|
</fo:page-sequence>
|
1274
1287
|
</xsl:template> <!-- insertCoverPageJSA -->
|
1275
1288
|
|
1276
|
-
<xsl:variable name="
|
1289
|
+
<xsl:variable name="i18n_JIS_">
|
1290
|
+
<xsl:variable name="coverpage_header" select="normalize-space(/*/jis:metanorma-extension/jis:presentation-metadata/jis:coverpage-header)"/>
|
1291
|
+
<xsl:value-of select="$coverpage_header"/>
|
1292
|
+
<xsl:if test="$coverpage_header = ''">
|
1293
|
+
<xsl:call-template name="getLocalizedString"><xsl:with-param name="key">JIS</xsl:with-param></xsl:call-template>
|
1294
|
+
</xsl:if>
|
1295
|
+
</xsl:variable>
|
1296
|
+
<xsl:variable name="i18n_JIS" select="normalize-space($i18n_JIS_)"/>
|
1297
|
+
|
1277
1298
|
<xsl:template name="insertCoverPage2024">
|
1278
1299
|
<xsl:param name="num"/>
|
1279
1300
|
<xsl:param name="docidentifier_jis"/>
|
@@ -1343,23 +1364,25 @@
|
|
1343
1364
|
<fo:table-column column-width="proportional-column-width(3)"/>
|
1344
1365
|
<fo:table-column column-width="proportional-column-width(2.2)"/>
|
1345
1366
|
<fo:table-column column-width="proportional-column-width(3)"/>
|
1367
|
+
<xsl:variable name="publisher" select="/*/jis:bibdata/jis:contributor[jis:role/@type = 'publisher']/jis:organization/jis:name/jis:variant[@language = 'ja']"/>
|
1368
|
+
<xsl:variable name="authorizer" select="/*/jis:bibdata/jis:contributor[jis:role/@type = 'authorizer']//jis:organization/jis:name"/>
|
1346
1369
|
<fo:table-body>
|
1347
1370
|
<fo:table-row height="50mm">
|
1348
1371
|
<fo:table-cell>
|
1349
|
-
<fo:block><xsl:value-of select="
|
1372
|
+
<fo:block id="__internal_layout__coverpage_footer_block1_{$num}_{generate-id()}"><xsl:value-of select="$publisher"/></fo:block>
|
1350
1373
|
</fo:table-cell>
|
1351
|
-
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
1374
|
+
<fo:table-cell><fo:block id="__internal_layout__coverpage_footer_block2_{$num}_{generate-id()}"> </fo:block></fo:table-cell>
|
1352
1375
|
<fo:table-cell>
|
1353
|
-
<fo:block><xsl:value-of select="
|
1376
|
+
<fo:block id="__internal_layout__coverpage_footer_block3_{$num}_{generate-id()}"><xsl:value-of select="$authorizer"/></fo:block>
|
1354
1377
|
</fo:table-cell>
|
1355
1378
|
</fo:table-row>
|
1356
1379
|
<fo:table-row>
|
1357
1380
|
<fo:table-cell>
|
1358
|
-
<fo:block>発行</fo:block>
|
1381
|
+
<fo:block id="__internal_layout__coverpage_footer_block4_{$num}_{generate-id()}"><xsl:if test="normalize-space($publisher) != ''">発行</xsl:if></fo:block>
|
1359
1382
|
</fo:table-cell>
|
1360
|
-
<fo:table-cell><fo:block> </fo:block></fo:table-cell>
|
1383
|
+
<fo:table-cell><fo:block id="__internal_layout__coverpage_footer_block5_{$num}_{generate-id()}"> </fo:block></fo:table-cell>
|
1361
1384
|
<fo:table-cell>
|
1362
|
-
<fo:block>審議</fo:block>
|
1385
|
+
<fo:block id="__internal_layout__coverpage_footer_block6_{$num}_{generate-id()}"><xsl:if test="normalize-space($authorizer) != ''">審議</xsl:if></fo:block>
|
1363
1386
|
</fo:table-cell>
|
1364
1387
|
</fo:table-row>
|
1365
1388
|
</fo:table-body>
|
@@ -1410,7 +1433,7 @@
|
|
1410
1433
|
</xsl:for-each>
|
1411
1434
|
</xsl:variable>
|
1412
1435
|
<xsl:attribute name="width"><xsl:value-of select="sum(xalan:nodeset($blocksWidth)//width)"/>em</xsl:attribute>
|
1413
|
-
<fo:block-container width="1em">
|
1436
|
+
<fo:block-container width="1em" id="__internal_layout__coverpage_block1_{$num}_{generate-id()}">
|
1414
1437
|
<xsl:copy-of select="$blocks"/>
|
1415
1438
|
</fo:block-container>
|
1416
1439
|
</fo:inline-container>
|
@@ -1418,7 +1441,7 @@
|
|
1418
1441
|
<fo:inline font-size="8.16pt" baseline-shift="20%">:</fo:inline>
|
1419
1442
|
|
1420
1443
|
<fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
1421
|
-
<fo:block-container width="1em">
|
1444
|
+
<fo:block-container width="1em" id="__internal_layout__coverpage_block2_{$num}_{generate-id()}">
|
1422
1445
|
<fo:block line-height="1em" margin-top="0.2em"/>
|
1423
1446
|
<fo:block font-size="8.16pt" baseline-shift="20%">
|
1424
1447
|
<xsl:call-template name="insertEachCharInBlock">
|
@@ -1448,7 +1471,8 @@
|
|
1448
1471
|
</fo:block>
|
1449
1472
|
|
1450
1473
|
<fo:block margin-top="6.5mm" font-size="8pt" font-weight="500">
|
1451
|
-
<
|
1474
|
+
<xsl:variable name="revised_date"><xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'revised']/text()"/></xsl:variable>
|
1475
|
+
<xsl:if test="normalize-space($revised_date) != ''"><fo:inline padding-right="5mm"><xsl:copy-of select="$revised_date"/></fo:inline>改正</xsl:if>
|
1452
1476
|
</fo:block>
|
1453
1477
|
|
1454
1478
|
</fo:flow>
|
@@ -1477,19 +1501,31 @@
|
|
1477
1501
|
<fo:flow flow-name="xsl-region-body">
|
1478
1502
|
<!-- publication date -->
|
1479
1503
|
<fo:block font-size="8pt" margin-left="90mm" text-align-last="justify" letter-spacing="0.5mm">
|
1480
|
-
<xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'published']/text()"
|
1481
|
-
<
|
1482
|
-
|
1483
|
-
<xsl:
|
1484
|
-
|
1504
|
+
<xsl:variable name="date_published"><xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'published']/text()"/></xsl:variable>
|
1505
|
+
<xsl:copy-of select="$date_published"/>
|
1506
|
+
<xsl:choose>
|
1507
|
+
<xsl:when test="normalize-space($date_published) != ''">
|
1508
|
+
<fo:inline keep-together.within-line="always">
|
1509
|
+
<fo:leader leader-pattern="space"/>
|
1510
|
+
<xsl:text>発行</xsl:text>
|
1511
|
+
</fo:inline>
|
1512
|
+
</xsl:when>
|
1513
|
+
<xsl:otherwise> </xsl:otherwise>
|
1514
|
+
</xsl:choose>
|
1485
1515
|
</fo:block>
|
1486
1516
|
<!-- revision date -->
|
1487
1517
|
<fo:block font-size="8pt" margin-left="90mm" text-align-last="justify" letter-spacing="0.5mm">
|
1488
|
-
<xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'revised']/text()"
|
1489
|
-
<
|
1490
|
-
|
1491
|
-
<xsl:
|
1492
|
-
|
1518
|
+
<xsl:variable name="date_revised"><xsl:apply-templates select="/*/jis:bibdata/jis:date[@type = 'revised']/text()"/></xsl:variable>
|
1519
|
+
<xsl:copy-of select="$date_revised"/>
|
1520
|
+
<xsl:choose>
|
1521
|
+
<xsl:when test="normalize-space($date_revised) != ''">
|
1522
|
+
<fo:inline keep-together.within-line="always">
|
1523
|
+
<fo:leader leader-pattern="space"/>
|
1524
|
+
<xsl:text>改正</xsl:text>
|
1525
|
+
</fo:inline>
|
1526
|
+
</xsl:when>
|
1527
|
+
<xsl:otherwise> </xsl:otherwise>
|
1528
|
+
</xsl:choose>
|
1493
1529
|
</fo:block>
|
1494
1530
|
<fo:block font-size="12pt" margin-top="7mm" text-align="right">
|
1495
1531
|
<!-- <xsl:value-of select="$copyrightText"/> -->
|
@@ -2441,58 +2477,78 @@
|
|
2441
2477
|
<xsl:value-of select="$text10"/>
|
2442
2478
|
</xsl:template>
|
2443
2479
|
|
2480
|
+
<!-- enclose surrogate pair characters into the tag 'spair' -->
|
2481
|
+
<xsl:variable name="element_name_spair">spair</xsl:variable>
|
2482
|
+
<xsl:variable name="tag_spair_open">###<xsl:value-of select="$element_name_spair"/>###</xsl:variable>
|
2483
|
+
<xsl:variable name="tag_spair_close">###/<xsl:value-of select="$element_name_spair"/>###</xsl:variable>
|
2484
|
+
|
2444
2485
|
<!-- replace horizontal to vertical oriented character -->
|
2445
2486
|
<xsl:template match="text()" mode="update_xml_step0" name="replace_horizontal_to_vertical_form">
|
2446
2487
|
<xsl:param name="text" select="."/>
|
2447
|
-
<xsl:
|
2448
|
-
<xsl:
|
2449
|
-
|
2450
|
-
|
2451
|
-
|
2452
|
-
|
2453
|
-
|
2454
|
-
|
2455
|
-
|
2456
|
-
|
2457
|
-
|
2458
|
-
|
2459
|
-
|
2460
|
-
|
2461
|
-
|
2462
|
-
|
2463
|
-
|
2464
|
-
|
2465
|
-
|
2466
|
-
|
2467
|
-
|
2488
|
+
<xsl:variable name="text_replaced">
|
2489
|
+
<xsl:choose>
|
2490
|
+
<xsl:when test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
|
2491
|
+
<!-- from https://github.com/metanorma/docs/blob/main/109.adoc -->
|
2492
|
+
<!--
|
2493
|
+
U+3001 IDEOGRAPHIC COMMA (、)
|
2494
|
+
to
|
2495
|
+
U+FE11 PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC COMMA (︑)
|
2496
|
+
|
2497
|
+
U+FE50 SMALL COMMA (﹐)
|
2498
|
+
to
|
2499
|
+
U+FE10 PRESENTATION FORM FOR VERTICAL COMMA (︐)
|
2500
|
+
|
2501
|
+
U+FE51 SMALL IDEOGRAPHIC COMMA (﹑)
|
2502
|
+
to
|
2503
|
+
U+FE11 PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC COMMA (︑)
|
2504
|
+
|
2505
|
+
U+FF0C FULLWIDTH COMMA (,)
|
2506
|
+
to
|
2507
|
+
U+FE10 PRESENTATION FORM FOR VERTICAL COMMA (︐)
|
2508
|
+
-->
|
2509
|
+
<xsl:variable name="text1" select="translate($text,'、﹐﹑,','︑︐︑︐')"/>
|
2468
2510
|
|
2469
|
-
|
2470
|
-
|
2471
|
-
|
2472
|
-
|
2473
|
-
|
2474
|
-
|
2475
|
-
|
2476
|
-
|
2477
|
-
|
2478
|
-
|
2511
|
+
<!--
|
2512
|
+
U+FF1A FULLWIDTH COLON (:)
|
2513
|
+
to
|
2514
|
+
U+FE13 PRESENTATION FORM FOR VERTICAL COLON (︓)
|
2515
|
+
|
2516
|
+
U+FF1B FULLWIDTH SEMICOLON (;)
|
2517
|
+
to
|
2518
|
+
U+FE14 PRESENTATION FORM FOR VERTICAL SEMICOLON (︔)
|
2519
|
+
-->
|
2520
|
+
<xsl:variable name="text2" select="translate($text1,':;','︓︔')"/>
|
2521
|
+
|
2522
|
+
<!--
|
2523
|
+
U+FF01 FULLWIDTH EXCLAMATION MARK (!)
|
2524
|
+
to
|
2525
|
+
U+FE15 PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK (︕)
|
2526
|
+
|
2527
|
+
U+FF1F FULLWIDTH QUESTION MARK (?)
|
2528
|
+
to
|
2529
|
+
U+FE16 PRESENTATION FORM FOR VERTICAL QUESTION MARK (︖)
|
2530
|
+
-->
|
2531
|
+
<xsl:variable name="text3" select="translate($text2,'!?','︕︖')"/>
|
2532
|
+
<xsl:value-of select="$text3"/>
|
2533
|
+
</xsl:when>
|
2534
|
+
<xsl:otherwise>
|
2535
|
+
<xsl:value-of select="$text"/>
|
2536
|
+
</xsl:otherwise>
|
2537
|
+
</xsl:choose>
|
2538
|
+
</xsl:variable>
|
2539
|
+
|
2540
|
+
<xsl:variable name="text_spair_" select="java:replaceAll(java:java.lang.String.new($text_replaced), $regex_surrogate_pairs, concat($tag_spair_open,'$1',$tag_spair_close))"/>
|
2541
|
+
<xsl:variable name="text_spair">
|
2542
|
+
<xsl:element name="text" namespace="{$namespace_full}">
|
2543
|
+
<xsl:call-template name="replace_text_tags">
|
2544
|
+
<xsl:with-param name="tag_open" select="$tag_spair_open"/>
|
2545
|
+
<xsl:with-param name="tag_close" select="$tag_spair_close"/>
|
2546
|
+
<xsl:with-param name="text" select="$text_spair_"/>
|
2547
|
+
</xsl:call-template>
|
2548
|
+
</xsl:element>
|
2549
|
+
</xsl:variable>
|
2550
|
+
<xsl:copy-of select="xalan:nodeset($text_spair)/*[local-name() = 'text']/node()"/>
|
2479
2551
|
|
2480
|
-
<!--
|
2481
|
-
U+FF01 FULLWIDTH EXCLAMATION MARK (!)
|
2482
|
-
to
|
2483
|
-
U+FE15 PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK (︕)
|
2484
|
-
|
2485
|
-
U+FF1F FULLWIDTH QUESTION MARK (?)
|
2486
|
-
to
|
2487
|
-
U+FE16 PRESENTATION FORM FOR VERTICAL QUESTION MARK (︖)
|
2488
|
-
-->
|
2489
|
-
<xsl:variable name="text3" select="translate($text2,'!?','︕︖')"/>
|
2490
|
-
<xsl:value-of select="$text3"/>
|
2491
|
-
</xsl:when>
|
2492
|
-
<xsl:otherwise>
|
2493
|
-
<xsl:value-of select="$text"/>
|
2494
|
-
</xsl:otherwise>
|
2495
|
-
</xsl:choose>
|
2496
2552
|
</xsl:template>
|
2497
2553
|
|
2498
2554
|
<!-- =========================================================================== -->
|
@@ -2610,8 +2666,12 @@
|
|
2610
2666
|
<xsl:copy-of select="."/>
|
2611
2667
|
</xsl:template>
|
2612
2668
|
|
2669
|
+
<!-- https://github.com/metanorma/laozi/issues/8 -->
|
2670
|
+
<xsl:variable name="surrogate_pairs">\ud800\udc00-\udbff\udfff\ud800-\udfff</xsl:variable>
|
2671
|
+
<xsl:variable name="regex_surrogate_pairs">([<xsl:value-of select="$surrogate_pairs"/>])</xsl:variable>
|
2672
|
+
|
2613
2673
|
<!-- if vertical_layout = 'true', then font_en and font_en_bold are using for text rotation -->
|
2614
|
-
<xsl:variable name="regex_en_base">\u00A0\u2002-\u200B\u3000-\u9FFF\uF900-\uFFFF
|
2674
|
+
<xsl:variable name="regex_en_base">\u00A0\u2002-\u200B\u3000-\u9FFF\uF900-\uFFFF<xsl:value-of select="$surrogate_pairs"/></xsl:variable>
|
2615
2675
|
<xsl:variable name="regex_en_">
|
2616
2676
|
<xsl:choose>
|
2617
2677
|
<!-- ( ) [ ] _ { } U+FF08 FULLWIDTH LEFT PARENTHESIS U+FF09 FULLWIDTH RIGHT PARENTHESIS-->
|
@@ -2964,7 +3024,12 @@
|
|
2964
3024
|
|
2965
3025
|
<!-- bold English text in non-vertical layout -->
|
2966
3026
|
<xsl:template match="*[local-name() = 'font_en_bold'][normalize-space() != '']">
|
2967
|
-
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']"
|
3027
|
+
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
|
3028
|
+
<xsl:choose>
|
3029
|
+
<xsl:when test="$isGenerateTableIF = 'false'"><fo:inline font-size="0.1pt"><xsl:text> </xsl:text></fo:inline></xsl:when>
|
3030
|
+
<xsl:otherwise><fo:inline><xsl:value-of select="$zero_width_space"/></fo:inline></xsl:otherwise>
|
3031
|
+
</xsl:choose>
|
3032
|
+
</xsl:if>
|
2968
3033
|
<fo:inline>
|
2969
3034
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2970
3035
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -2973,12 +3038,22 @@
|
|
2973
3038
|
</xsl:if>
|
2974
3039
|
<xsl:apply-templates/>
|
2975
3040
|
</fo:inline>
|
2976
|
-
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']"
|
3041
|
+
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
|
3042
|
+
<xsl:choose>
|
3043
|
+
<xsl:when test="$isGenerateTableIF = 'false'"><fo:inline font-size="0.1pt"><xsl:text> </xsl:text></fo:inline></xsl:when>
|
3044
|
+
<xsl:otherwise><fo:inline><xsl:value-of select="$zero_width_space"/></fo:inline></xsl:otherwise>
|
3045
|
+
</xsl:choose>
|
3046
|
+
</xsl:if>
|
2977
3047
|
</xsl:template>
|
2978
3048
|
|
2979
3049
|
<!-- English text in non-vertical layout -->
|
2980
3050
|
<xsl:template match="*[local-name() = 'font_en'][normalize-space() != '']">
|
2981
|
-
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']"
|
3051
|
+
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
|
3052
|
+
<xsl:choose>
|
3053
|
+
<xsl:when test="$isGenerateTableIF = 'false'"><fo:inline font-size="0.1pt"><xsl:text> </xsl:text></fo:inline></xsl:when>
|
3054
|
+
<xsl:otherwise><fo:inline><xsl:value-of select="$zero_width_space"/></fo:inline></xsl:otherwise>
|
3055
|
+
</xsl:choose>
|
3056
|
+
</xsl:if>
|
2982
3057
|
<fo:inline>
|
2983
3058
|
<xsl:if test="not(ancestor::jis:p[@class = 'zzSTDTitle2']) and not(ancestor::jis:span[@class = 'JIS'])">
|
2984
3059
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
@@ -2988,7 +3063,12 @@
|
|
2988
3063
|
</xsl:if>
|
2989
3064
|
<xsl:apply-templates/>
|
2990
3065
|
</fo:inline>
|
2991
|
-
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']"
|
3066
|
+
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
|
3067
|
+
<xsl:choose>
|
3068
|
+
<xsl:when test="$isGenerateTableIF = 'false'"><fo:inline font-size="0.1pt"><xsl:text> </xsl:text></fo:inline></xsl:when>
|
3069
|
+
<xsl:otherwise><fo:inline><xsl:value-of select="$zero_width_space"/></fo:inline></xsl:otherwise>
|
3070
|
+
</xsl:choose>
|
3071
|
+
</xsl:if>
|
2992
3072
|
</xsl:template>
|
2993
3073
|
|
2994
3074
|
<!-- English text in vertical layout -->
|
@@ -3051,6 +3131,10 @@
|
|
3051
3131
|
<!-- END: Allocate non-Japanese text -->
|
3052
3132
|
<!-- ========================= -->
|
3053
3133
|
|
3134
|
+
<xsl:template match="*[local-name() = 'spair'][normalize-space() != '']">
|
3135
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
3136
|
+
</xsl:template>
|
3137
|
+
|
3054
3138
|
<!-- patch for correct list-item-label rendering: enclose each char in inline-container -->
|
3055
3139
|
<xsl:template match="*[local-name() = 'note' or local-name() = 'example']/*[local-name() = 'name']/text()" priority="3">
|
3056
3140
|
<xsl:choose>
|
@@ -3265,7 +3349,7 @@
|
|
3265
3349
|
<fo:static-content flow-name="header-last" role="artifact">
|
3266
3350
|
<fo:block font-size="12pt" font-weight="bold" margin-left="10mm">
|
3267
3351
|
<fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
3268
|
-
<fo:block-container width="1em">
|
3352
|
+
<fo:block-container width="1em" id="__internal_layout__lastpage_{generate-id()}">
|
3269
3353
|
<xsl:call-template name="insertEachCharInBlock">
|
3270
3354
|
<xsl:with-param name="str">JIS <xsl:value-of select="$docidentifier_number"/></xsl:with-param>
|
3271
3355
|
<xsl:with-param name="spaceIndent">0.5em</xsl:with-param>
|
@@ -3318,7 +3402,10 @@
|
|
3318
3402
|
<fo:static-content flow-name="left-region"> <!-- role="artifact" commented, because there is <fo:retrieve-marker below, occurs java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 -->
|
3319
3403
|
<fo:block-container absolute-position="fixed" left="0mm" top="0" width="6mm" height="{$pageHeightA5}mm" background-color="{$cover_header_footer_background}">
|
3320
3404
|
<fo:block-container font-size="9pt" color="white" text-align="center">
|
3321
|
-
<
|
3405
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
3406
|
+
<xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
|
3407
|
+
</xsl:if>
|
3408
|
+
<fo:block margin-top="131mm" margin-right="1mm">
|
3322
3409
|
<fo:page-number/>
|
3323
3410
|
</fo:block> <!-- 二 -->
|
3324
3411
|
</fo:block-container>
|
@@ -6735,6 +6822,9 @@
|
|
6735
6822
|
|
6736
6823
|
</xsl:attribute-set>
|
6737
6824
|
|
6825
|
+
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
6826
|
+
</xsl:attribute-set>
|
6827
|
+
|
6738
6828
|
<xsl:attribute-set name="definition-style">
|
6739
6829
|
|
6740
6830
|
<xsl:attribute name="space-before">2pt</xsl:attribute>
|
@@ -6892,6 +6982,10 @@
|
|
6892
6982
|
<xsl:if test="not($vertical_layout = 'true')">
|
6893
6983
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
6894
6984
|
</xsl:if>
|
6985
|
+
<xsl:if test="$vertical_layout = 'true'">
|
6986
|
+
<xsl:attribute name="vertical-align">baseline</xsl:attribute>
|
6987
|
+
<xsl:attribute name="font-size">100%</xsl:attribute>
|
6988
|
+
</xsl:if>
|
6895
6989
|
|
6896
6990
|
</xsl:template> <!-- refine_fn-body-num-style -->
|
6897
6991
|
|
@@ -8925,9 +9019,14 @@
|
|
8925
9019
|
</xsl:variable>
|
8926
9020
|
<xsl:variable name="current_fn_number_text">
|
8927
9021
|
|
8928
|
-
<xsl:
|
8929
|
-
|
8930
|
-
|
9022
|
+
<xsl:choose>
|
9023
|
+
<xsl:when test="$autonumbering_style = 'japanese'">
|
9024
|
+
<xsl:text> </xsl:text>
|
9025
|
+
<xsl:value-of select="$numbers_japanese//jis:localized-string[@key = $current_fn_number]"/>
|
9026
|
+
<xsl:text> </xsl:text>
|
9027
|
+
</xsl:when>
|
9028
|
+
<xsl:otherwise><xsl:value-of select="$current_fn_number"/><fo:inline font-weight="normal">)</fo:inline></xsl:otherwise>
|
9029
|
+
</xsl:choose>
|
8931
9030
|
|
8932
9031
|
</xsl:variable>
|
8933
9032
|
|
@@ -8959,6 +9058,11 @@
|
|
8959
9058
|
<xsl:if test="not($vertical_layout = 'true')">
|
8960
9059
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
8961
9060
|
</xsl:if>
|
9061
|
+
<xsl:if test="$vertical_layout = 'true'">
|
9062
|
+
<xsl:attribute name="vertical-align">baseline</xsl:attribute>
|
9063
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
9064
|
+
<xsl:attribute name="baseline-shift">20%</xsl:attribute>
|
9065
|
+
</xsl:if>
|
8962
9066
|
|
8963
9067
|
</fn_styles>
|
8964
9068
|
</xsl:otherwise>
|
@@ -8977,7 +9081,18 @@
|
|
8977
9081
|
<xsl:with-param name="element">
|
8978
9082
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
|
8979
9083
|
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
9084
|
+
|
9085
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
9086
|
+
<xsl:call-template name="insertVerticalChar">
|
9087
|
+
<xsl:with-param name="str" select="'〔'"/>
|
9088
|
+
</xsl:call-template>
|
9089
|
+
|
8980
9090
|
<xsl:copy-of select="$current_fn_number_text"/>
|
9091
|
+
|
9092
|
+
<xsl:call-template name="insertVerticalChar">
|
9093
|
+
<xsl:with-param name="str" select="'〕'"/>
|
9094
|
+
</xsl:call-template>
|
9095
|
+
|
8981
9096
|
</fo:inline>
|
8982
9097
|
</fo:basic-link>
|
8983
9098
|
</xsl:with-param>
|
@@ -8996,8 +9111,7 @@
|
|
8996
9111
|
|
8997
9112
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
8998
9113
|
|
8999
|
-
<
|
9000
|
-
|
9114
|
+
<xsl:variable name="fn_block">
|
9001
9115
|
<xsl:call-template name="refine_fn-body-style"/>
|
9002
9116
|
|
9003
9117
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
@@ -9005,9 +9119,51 @@
|
|
9005
9119
|
<xsl:call-template name="refine_fn-body-num-style"/>
|
9006
9120
|
|
9007
9121
|
<xsl:value-of select="$current_fn_number_text"/>
|
9122
|
+
|
9008
9123
|
</fo:inline>
|
9009
9124
|
<xsl:apply-templates/>
|
9010
|
-
</
|
9125
|
+
</xsl:variable>
|
9126
|
+
|
9127
|
+
<xsl:choose>
|
9128
|
+
<xsl:when test="$vertical_layout = 'true'">
|
9129
|
+
<fo:list-block xsl:use-attribute-sets="fn-body-style" role="SKIP" provisional-distance-between-starts="25mm">
|
9130
|
+
<xsl:call-template name="refine_fn-body-style"/>
|
9131
|
+
<fo:list-item role="SKIP">
|
9132
|
+
<fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()" role="SKIP">
|
9133
|
+
<fo:block role="SKIP">
|
9134
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
9135
|
+
|
9136
|
+
<xsl:call-template name="refine_fn-body-num-style"/>
|
9137
|
+
|
9138
|
+
<xsl:call-template name="insertVerticalChar">
|
9139
|
+
<xsl:with-param name="str" select="'〔'"/>
|
9140
|
+
</xsl:call-template>
|
9141
|
+
|
9142
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
9143
|
+
|
9144
|
+
<xsl:call-template name="insertVerticalChar">
|
9145
|
+
<xsl:with-param name="str" select="'〕'"/>
|
9146
|
+
</xsl:call-template>
|
9147
|
+
|
9148
|
+
</fo:inline>
|
9149
|
+
</fo:block>
|
9150
|
+
</fo:list-item-label>
|
9151
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style" role="SKIP">
|
9152
|
+
<fo:block role="SKIP">
|
9153
|
+
<xsl:apply-templates/>
|
9154
|
+
</fo:block>
|
9155
|
+
</fo:list-item-body>
|
9156
|
+
</fo:list-item>
|
9157
|
+
</fo:list-block>
|
9158
|
+
</xsl:when>
|
9159
|
+
<xsl:otherwise>
|
9160
|
+
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
9161
|
+
<xsl:copy-of select="$fn_block"/>
|
9162
|
+
</fo:block>
|
9163
|
+
</xsl:otherwise>
|
9164
|
+
</xsl:choose>
|
9165
|
+
<!-- jis -->
|
9166
|
+
|
9011
9167
|
</fo:block-container>
|
9012
9168
|
</fo:footnote-body>
|
9013
9169
|
</fo:footnote>
|
@@ -10812,9 +10968,14 @@
|
|
10812
10968
|
|
10813
10969
|
<xsl:variable name="simple-table">
|
10814
10970
|
|
10971
|
+
<xsl:variable name="table_without_semantic_elements">
|
10972
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
10973
|
+
</xsl:variable>
|
10974
|
+
|
10815
10975
|
<!-- Step 0. replace <br/> to <p>...</p> -->
|
10816
10976
|
<xsl:variable name="table_without_br">
|
10817
|
-
<xsl:apply-templates mode="table-without-br"/>
|
10977
|
+
<!-- <xsl:apply-templates mode="table-without-br"/> -->
|
10978
|
+
<xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
|
10818
10979
|
</xsl:variable>
|
10819
10980
|
|
10820
10981
|
<!-- Step 1. colspan processing -->
|
@@ -15061,14 +15222,17 @@
|
|
15061
15222
|
</fo:block>
|
15062
15223
|
</xsl:template>
|
15063
15224
|
|
15064
|
-
<xsl:template match="*[local-name() = 'domain']">
|
15225
|
+
<!-- <xsl:template match="*[local-name() = 'domain']"> -->
|
15065
15226
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
15066
15227
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
15067
15228
|
<xsl:text> </xsl:text> -->
|
15068
|
-
<xsl:if test="not(@hidden = 'true')">
|
15229
|
+
<!-- <xsl:if test="not(@hidden = 'true')">
|
15069
15230
|
<xsl:apply-templates/>
|
15070
15231
|
</xsl:if>
|
15071
|
-
</xsl:template>
|
15232
|
+
</xsl:template> -->
|
15233
|
+
|
15234
|
+
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
15235
|
+
<xsl:template match="*[local-name() = 'domain']"/>
|
15072
15236
|
|
15073
15237
|
<xsl:template match="*[local-name() = 'admitted']">
|
15074
15238
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
@@ -15083,9 +15247,11 @@
|
|
15083
15247
|
</xsl:template>
|
15084
15248
|
|
15085
15249
|
<xsl:template name="setStyle_preferred">
|
15086
|
-
|
15087
|
-
|
15088
|
-
|
15250
|
+
|
15251
|
+
<xsl:if test="*[local-name() = 'strong']">
|
15252
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
15253
|
+
</xsl:if>
|
15254
|
+
|
15089
15255
|
</xsl:template>
|
15090
15256
|
|
15091
15257
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
@@ -15095,6 +15261,17 @@
|
|
15095
15261
|
</xsl:template>
|
15096
15262
|
<!-- End Preferred, admitted, deprecated -->
|
15097
15263
|
|
15264
|
+
<xsl:template match="*[local-name() = 'fmt-related']">
|
15265
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
15266
|
+
<xsl:apply-templates/>
|
15267
|
+
</fo:block>
|
15268
|
+
</xsl:template>
|
15269
|
+
<xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
|
15270
|
+
<fo:block>
|
15271
|
+
<xsl:apply-templates/>
|
15272
|
+
</fo:block>
|
15273
|
+
</xsl:template>
|
15274
|
+
|
15098
15275
|
<!-- ========== -->
|
15099
15276
|
<!-- definition -->
|
15100
15277
|
<!-- ========== -->
|
@@ -16035,6 +16212,7 @@
|
|
16035
16212
|
|
16036
16213
|
<!-- Normative references -->
|
16037
16214
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
16215
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
16038
16216
|
|
16039
16217
|
<fo:block-container margin-left="6mm" role="SKIP">
|
16040
16218
|
<fo:block-container margin-left="0mm" role="SKIP">
|
@@ -16756,7 +16934,8 @@
|
|
16756
16934
|
<!-- add @id - first element with @id plus '_element_name' -->
|
16757
16935
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
16758
16936
|
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
|
16759
|
-
<xsl:
|
16937
|
+
<xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
|
16938
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
16760
16939
|
</xsl:if>
|
16761
16940
|
</xsl:template>
|
16762
16941
|
|
@@ -16813,6 +16992,31 @@
|
|
16813
16992
|
<xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
|
16814
16993
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
16815
16994
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
|
16995
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
16996
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
|
16997
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
|
16998
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
|
16999
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
17000
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
|
17001
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
|
17002
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
|
17003
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
|
17004
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
|
17005
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
|
17006
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
|
17007
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
|
17008
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
|
17009
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
|
17010
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
|
17011
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
|
17012
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
|
17013
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
|
17014
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
|
17015
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
|
17016
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
|
17017
|
+
|
17018
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
17019
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
|
16816
17020
|
|
16817
17021
|
<xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
|
16818
17022
|
<xsl:copy>
|
@@ -16845,13 +17049,115 @@
|
|
16845
17049
|
|
16846
17050
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
16847
17051
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
16848
|
-
<xsl:
|
17052
|
+
<xsl:choose>
|
17053
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
17054
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17055
|
+
</xsl:when>
|
17056
|
+
<xsl:otherwise>
|
17057
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
17058
|
+
<xsl:copy-of select="@*"/>
|
17059
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17060
|
+
</xsl:element>
|
17061
|
+
</xsl:otherwise>
|
17062
|
+
</xsl:choose>
|
17063
|
+
</xsl:template>
|
17064
|
+
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
|
17065
|
+
<xsl:choose>
|
17066
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
17067
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17068
|
+
</xsl:when>
|
17069
|
+
<xsl:otherwise>
|
17070
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
17071
|
+
<xsl:copy-of select="@*"/>
|
17072
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17073
|
+
</xsl:element>
|
17074
|
+
</xsl:otherwise>
|
17075
|
+
</xsl:choose>
|
17076
|
+
</xsl:template>
|
17077
|
+
|
17078
|
+
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
17079
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
17080
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17081
|
+
</xsl:template>
|
17082
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
|
17083
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
16849
17084
|
<xsl:copy-of select="@*"/>
|
16850
17085
|
<xsl:apply-templates mode="update_xml_step1"/>
|
16851
17086
|
</xsl:element>
|
16852
17087
|
</xsl:template>
|
16853
|
-
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
|
16854
|
-
<xsl:
|
17088
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
|
17089
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17090
|
+
</xsl:template>
|
17091
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
|
17092
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
17093
|
+
<xsl:copy-of select="@*"/>
|
17094
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17095
|
+
</xsl:element>
|
17096
|
+
</xsl:template>
|
17097
|
+
|
17098
|
+
<xsl:template match="*[local-name() = 'fmt-admitted']"/>
|
17099
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
|
17100
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17101
|
+
</xsl:template>
|
17102
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
|
17103
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
17104
|
+
<xsl:copy-of select="@*"/>
|
17105
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17106
|
+
</xsl:element>
|
17107
|
+
</xsl:template>
|
17108
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
|
17109
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17110
|
+
</xsl:template>
|
17111
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
|
17112
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
17113
|
+
<xsl:copy-of select="@*"/>
|
17114
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17115
|
+
</xsl:element>
|
17116
|
+
</xsl:template>
|
17117
|
+
|
17118
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates']"/>
|
17119
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
|
17120
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17121
|
+
</xsl:template>
|
17122
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
|
17123
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
17124
|
+
<xsl:copy-of select="@*"/>
|
17125
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17126
|
+
</xsl:element>
|
17127
|
+
</xsl:template>
|
17128
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
|
17129
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17130
|
+
</xsl:template>
|
17131
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
|
17132
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
17133
|
+
<xsl:copy-of select="@*"/>
|
17134
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17135
|
+
</xsl:element>
|
17136
|
+
</xsl:template>
|
17137
|
+
|
17138
|
+
<xsl:template match="*[local-name() = 'fmt-definition']"/>
|
17139
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
|
17140
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
17141
|
+
<xsl:copy-of select="@*"/>
|
17142
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17143
|
+
</xsl:element>
|
17144
|
+
</xsl:template>
|
17145
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
|
17146
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
17147
|
+
<xsl:copy-of select="@*"/>
|
17148
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17149
|
+
</xsl:element>
|
17150
|
+
</xsl:template>
|
17151
|
+
|
17152
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']"/>
|
17153
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
|
17154
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
17155
|
+
<xsl:copy-of select="@*"/>
|
17156
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17157
|
+
</xsl:element>
|
17158
|
+
</xsl:template>
|
17159
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
|
17160
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
16855
17161
|
<xsl:copy-of select="@*"/>
|
16856
17162
|
<xsl:apply-templates mode="update_xml_pres"/>
|
16857
17163
|
</xsl:element>
|
@@ -16864,6 +17170,9 @@
|
|
16864
17170
|
<xsl:apply-templates mode="update_xml_pres"/>
|
16865
17171
|
</xsl:template>
|
16866
17172
|
|
17173
|
+
<xsl:template match="*[local-name() = 'semx']">
|
17174
|
+
<xsl:apply-templates/>
|
17175
|
+
</xsl:template>
|
16867
17176
|
<xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
|
16868
17177
|
<xsl:apply-templates mode="update_xml_step1"/>
|
16869
17178
|
</xsl:template>
|
@@ -18102,7 +18411,7 @@
|
|
18102
18411
|
</xsl:template>
|
18103
18412
|
|
18104
18413
|
<xsl:template name="namespaceCheck">
|
18105
|
-
<xsl:variable name="documentNS" select="namespace-uri(/*)
|
18414
|
+
<xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
|
18106
18415
|
<xsl:variable name="XSLNS">
|
18107
18416
|
|
18108
18417
|
</xsl:variable>
|
@@ -18190,6 +18499,9 @@
|
|
18190
18499
|
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
|
18191
18500
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
18192
18501
|
</xsl:when>
|
18502
|
+
<xsl:when test="string-length($bibdata_updated) != ''">
|
18503
|
+
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
18504
|
+
</xsl:when>
|
18193
18505
|
<xsl:when test="$formatted = 'true'">
|
18194
18506
|
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
18195
18507
|
</xsl:when>
|
@@ -42,7 +42,10 @@ module IsoDoc
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def admits(elem)
|
45
|
-
elem.children.first.previous = @i18n.l10n("#{@i18n.admitted}: ")
|
45
|
+
#elem.children.first.previous = @i18n.l10n("#{@i18n.admitted}: ")
|
46
|
+
elem.xpath(ns(".//semx[@element = 'admitted']")).each do |t|
|
47
|
+
t.previous = @i18n.l10n("#{@i18n.admitted}: ")
|
48
|
+
end
|
46
49
|
end
|
47
50
|
|
48
51
|
def dl(docxml)
|
@@ -127,6 +130,7 @@ module IsoDoc
|
|
127
130
|
"<tr><td border='0' colspan='#{cols}'>#{elem}</td></tr>"
|
128
131
|
end
|
129
132
|
|
133
|
+
# KILL
|
130
134
|
def tablesource(elem)
|
131
135
|
while elem&.next_element&.name == "source"
|
132
136
|
elem << "; #{to_xml(elem.next_element.remove.children)}"
|
@@ -134,6 +138,20 @@ module IsoDoc
|
|
134
138
|
elem.children = l10n("#{@i18n.source}: #{to_xml(elem.children).strip}")
|
135
139
|
end
|
136
140
|
|
141
|
+
# TODO preserve original Semantic XML source
|
142
|
+
def tablesource(elem)
|
143
|
+
ret = [semx_fmt_dup(elem)]
|
144
|
+
while elem&.next_element&.name == "source"
|
145
|
+
ret << semx_fmt_dup(elem.next_element.remove)
|
146
|
+
end
|
147
|
+
s = ret.map { |x| to_xml(x) }.map(&:strip).join("; ")
|
148
|
+
tablesource_label(elem, s)
|
149
|
+
end
|
150
|
+
|
151
|
+
def tablesource_label(elem, sources)
|
152
|
+
elem.children = l10n("#{@i18n.source}: #{sources}")
|
153
|
+
end
|
154
|
+
|
137
155
|
def table_fn1(_table, fnote, _idx)
|
138
156
|
fnote["reference"] += ")"
|
139
157
|
end
|
@@ -947,6 +947,8 @@ May be electronic (e.g. Twitter direct message, email) or voice (e.g. a remark m
|
|
947
947
|
typically cited as "personal communication")</a:documentation>
|
948
948
|
<value>conversation</value>
|
949
949
|
<a:documentation>An exchange of messages between two or more persons. May be electronic (e.g. web chat) or voice (e.g. phone call)</a:documentation>
|
950
|
+
<value>collection</value>
|
951
|
+
<a:documentation>A compound resource consisting of other resources, which are themselves presupposed to have their type specified..</a:documentation>
|
950
952
|
<value>misc</value>
|
951
953
|
<a:documentation>Bibliographic type not adequately described in the foregoing</a:documentation>
|
952
954
|
</choice>
|
@@ -1277,17 +1279,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
1277
1279
|
</define>
|
1278
1280
|
<define name="validityBegins">
|
1279
1281
|
<element name="validityBegins">
|
1280
|
-
<ref name="
|
1282
|
+
<ref name="ISO8601Date"/>
|
1281
1283
|
</element>
|
1282
1284
|
</define>
|
1283
1285
|
<define name="validityEnds">
|
1284
1286
|
<element name="validityEnds">
|
1285
|
-
<ref name="
|
1287
|
+
<ref name="ISO8601Date"/>
|
1286
1288
|
</element>
|
1287
1289
|
</define>
|
1288
1290
|
<define name="validityRevision">
|
1289
1291
|
<element name="revision">
|
1290
|
-
<ref name="
|
1292
|
+
<ref name="ISO8601Date"/>
|
1291
1293
|
</element>
|
1292
1294
|
</define>
|
1293
1295
|
<define name="TypedTitleString">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-jis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: japanese_calendar
|