metanorma-jis 1.0.4 → 1.0.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 +4 -4
- data/lib/isodoc/jis/html/style-human.css +7 -6
- data/lib/isodoc/jis/html/style-human.scss +3 -6
- data/lib/isodoc/jis/html/style-iso.css +7 -5
- data/lib/isodoc/jis/html/style-iso.scss +2 -5
- data/lib/isodoc/jis/jis.international-standard.xsl +164 -59
- data/lib/isodoc/jis/presentation_section.rb +8 -7
- data/lib/isodoc/jis/word_cleanup.rb +5 -2
- data/lib/isodoc/jis/xref.rb +1 -1
- data/lib/metanorma/jis/biblio.rng +4 -4
- data/lib/metanorma/jis/isodoc.rng +77 -28
- data/lib/metanorma/jis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52feb035503f2766a2c0281b2ea081358ca155ce13f606e9a0ce7641144c2bfa
|
|
4
|
+
data.tar.gz: 1f0cef17898c1245e14cece9fac7ff3fe1cabec0d4acac1d8b60e909867ef547
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 473ff382fe45f94e9a7f10811f09e884de519482b43c8da4631ed357788b8d3743c8fde273f8f932d34196d1a11d7eb63782724afd716f243488115692eb32ac
|
|
7
|
+
data.tar.gz: daf7b6b8cab952334628287d116d49312f874be5d8ca1c593681ba0754f7f34b8bf0242c6fc1d94904a54bb47317e296a294410035d9c85ba034907708391cc6
|
|
@@ -319,6 +319,11 @@ svg {
|
|
|
319
319
|
display: block; /* ← removes unwanted inline spacing */
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
+
/* style dfn by override in flavor */
|
|
323
|
+
dfn {
|
|
324
|
+
font-style: inherit;
|
|
325
|
+
}
|
|
326
|
+
|
|
322
327
|
#standard-band {
|
|
323
328
|
background-color: #0AC442;
|
|
324
329
|
}
|
|
@@ -1444,16 +1449,12 @@ span.keyword {
|
|
|
1444
1449
|
}
|
|
1445
1450
|
|
|
1446
1451
|
.Admonition p,
|
|
1447
|
-
.admonition p
|
|
1448
|
-
.zzHelp p {
|
|
1452
|
+
.admonition p {
|
|
1449
1453
|
margin: 0;
|
|
1450
1454
|
}
|
|
1451
1455
|
|
|
1452
|
-
div.
|
|
1456
|
+
div.Admonition.AdmonitionEditorial {
|
|
1453
1457
|
color: green;
|
|
1454
|
-
padding: 0.5em;
|
|
1455
|
-
margin: 1.5em 0 1.5em 0;
|
|
1456
|
-
text-align: left;
|
|
1457
1458
|
}
|
|
1458
1459
|
|
|
1459
1460
|
/* Collapse TOC */
|
|
@@ -752,16 +752,13 @@ span.keyword {
|
|
|
752
752
|
}
|
|
753
753
|
|
|
754
754
|
.Admonition p,
|
|
755
|
-
.admonition p
|
|
756
|
-
|
|
755
|
+
.admonition p
|
|
756
|
+
{
|
|
757
757
|
margin: 0;
|
|
758
758
|
}
|
|
759
759
|
|
|
760
|
-
div.
|
|
760
|
+
div.Admonition.AdmonitionEditorial {
|
|
761
761
|
color: green;
|
|
762
|
-
padding: 0.5em;
|
|
763
|
-
margin: 1.5em 0 1.5em 0;
|
|
764
|
-
text-align: left;
|
|
765
762
|
}
|
|
766
763
|
|
|
767
764
|
/* Collapse TOC */
|
|
@@ -319,6 +319,11 @@ svg {
|
|
|
319
319
|
display: block; /* ← removes unwanted inline spacing */
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
+
/* style dfn by override in flavor */
|
|
323
|
+
dfn {
|
|
324
|
+
font-style: inherit;
|
|
325
|
+
}
|
|
326
|
+
|
|
322
327
|
#standard-band {
|
|
323
328
|
background-color: #0AC442;
|
|
324
329
|
}
|
|
@@ -1274,15 +1279,12 @@ figcaption, .SourceTitle, .AdmonitionTitle, .RecommendationTitle {
|
|
|
1274
1279
|
text-align: left;
|
|
1275
1280
|
}
|
|
1276
1281
|
|
|
1277
|
-
.Admonition p
|
|
1282
|
+
.Admonition p {
|
|
1278
1283
|
margin: 0;
|
|
1279
1284
|
}
|
|
1280
1285
|
|
|
1281
|
-
div.
|
|
1286
|
+
div.Admonition.AdmonitionEditorial {
|
|
1282
1287
|
color: green;
|
|
1283
|
-
padding: 0.5em;
|
|
1284
|
-
margin: 1.5em 0 1.5em 0;
|
|
1285
|
-
text-align: left;
|
|
1286
1288
|
}
|
|
1287
1289
|
|
|
1288
1290
|
/*
|
|
@@ -584,15 +584,12 @@ figure dl {
|
|
|
584
584
|
text-align: left;
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
-
.Admonition p
|
|
587
|
+
.Admonition p {
|
|
588
588
|
margin: 0;
|
|
589
589
|
}
|
|
590
590
|
|
|
591
|
-
div.
|
|
591
|
+
div.Admonition.AdmonitionEditorial {
|
|
592
592
|
color: green;
|
|
593
|
-
padding: 0.5em;
|
|
594
|
-
margin: 1.5em 0 1.5em 0;
|
|
595
|
-
text-align: left;
|
|
596
593
|
}
|
|
597
594
|
|
|
598
595
|
|
|
@@ -619,16 +619,8 @@
|
|
|
619
619
|
|
|
620
620
|
<xsl:if test="$paged_xml_preface/mn:page and count($paged_xml_preface/mn:page/*) != 0">
|
|
621
621
|
<!-- Preface pages -->
|
|
622
|
-
<fo:page-sequence
|
|
623
|
-
|
|
624
|
-
<xsl:if test="$vertical_layout = 'true'">
|
|
625
|
-
<xsl:attribute name="master-reference">document_vertical_layout</xsl:attribute>
|
|
626
|
-
<xsl:attribute name="format">一</xsl:attribute>
|
|
627
|
-
</xsl:if>
|
|
628
|
-
|
|
629
|
-
<xsl:if test="position() = 1">
|
|
630
|
-
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
|
631
|
-
</xsl:if>
|
|
622
|
+
<fo:page-sequence xsl:use-attribute-sets="page-sequence-preface">
|
|
623
|
+
<xsl:call-template name="refine_page-sequence-preface"/>
|
|
632
624
|
|
|
633
625
|
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
|
634
626
|
<fo:block text-align="center" margin-bottom="6pt">
|
|
@@ -681,7 +673,7 @@
|
|
|
681
673
|
<xsl:if test="not($vertical_layout = 'true') and not($doctype = 'technical-specification')">
|
|
682
674
|
|
|
683
675
|
<!-- Document type rendering -->
|
|
684
|
-
<fo:page-sequence
|
|
676
|
+
<fo:page-sequence xsl:use-attribute-sets="page-sequence-preface">
|
|
685
677
|
<xsl:call-template name="insertHeaderFooter">
|
|
686
678
|
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
|
687
679
|
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
|
@@ -777,33 +769,8 @@
|
|
|
777
769
|
|
|
778
770
|
<xsl:variable name="isCommentary" select="normalize-space(.//mn:annex[@commentary = 'true'] and 1 = 1)"/> <!-- true or false -->
|
|
779
771
|
<!-- DEBUG: <xsl:copy-of select="."/> -->
|
|
780
|
-
<fo:page-sequence
|
|
781
|
-
|
|
782
|
-
<xsl:choose>
|
|
783
|
-
<xsl:when test="$vertical_layout = 'true'">
|
|
784
|
-
<xsl:attribute name="master-reference">document_vertical_layout</xsl:attribute>
|
|
785
|
-
<xsl:if test="position() = last()">
|
|
786
|
-
<xsl:attribute name="master-reference">document_vertical_layout_with_last</xsl:attribute>
|
|
787
|
-
</xsl:if>
|
|
788
|
-
|
|
789
|
-
<xsl:attribute name="format">一</xsl:attribute>
|
|
790
|
-
<!-- <xsl:attribute name="fox:number-conversion-features">ア</xsl:attribute> -->
|
|
791
|
-
</xsl:when>
|
|
792
|
-
<xsl:otherwise>
|
|
793
|
-
<xsl:if test="position() = 1">
|
|
794
|
-
<xsl:attribute name="master-reference">document_first_section</xsl:attribute>
|
|
795
|
-
</xsl:if>
|
|
796
|
-
<xsl:if test="@orientation = 'landscape'">
|
|
797
|
-
<xsl:attribute name="master-reference">document-<xsl:value-of select="@orientation"/></xsl:attribute>
|
|
798
|
-
</xsl:if>
|
|
799
|
-
<xsl:if test="$isCommentary = 'true'">
|
|
800
|
-
<xsl:attribute name="master-reference">document_commentary_section</xsl:attribute>
|
|
801
|
-
</xsl:if>
|
|
802
|
-
<xsl:if test="position() = 1">
|
|
803
|
-
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
|
804
|
-
</xsl:if>
|
|
805
|
-
</xsl:otherwise>
|
|
806
|
-
</xsl:choose>
|
|
772
|
+
<fo:page-sequence xsl:use-attribute-sets="page-sequence-main">
|
|
773
|
+
<xsl:call-template name="refine_page-sequence-main"/>
|
|
807
774
|
|
|
808
775
|
<xsl:call-template name="insertFootnoteSeparatorCommon">
|
|
809
776
|
<xsl:with-param name="leader_length">15%</xsl:with-param>
|
|
@@ -1156,13 +1123,7 @@
|
|
|
1156
1123
|
<xsl:apply-templates select="mnx:title"/>
|
|
1157
1124
|
</fo:inline>
|
|
1158
1125
|
<fo:inline keep-together.within-line="always">
|
|
1159
|
-
<fo:leader xsl:use-attribute-sets="toc-leader-style">
|
|
1160
|
-
<xsl:if test="$vertical_layout = 'true'">
|
|
1161
|
-
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
|
1162
|
-
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
|
1163
|
-
<xsl:attribute name="baseline-shift">60%</xsl:attribute>
|
|
1164
|
-
</xsl:if>
|
|
1165
|
-
</fo:leader>
|
|
1126
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
|
|
1166
1127
|
<fo:inline>
|
|
1167
1128
|
<xsl:if test="not($vertical_layout = 'true')">
|
|
1168
1129
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
|
@@ -1826,6 +1787,9 @@
|
|
|
1826
1787
|
<xsl:variable name="title">
|
|
1827
1788
|
<xsl:call-template name="getName"/>
|
|
1828
1789
|
</xsl:variable>
|
|
1790
|
+
<xsl:variable name="variant_title">
|
|
1791
|
+
<xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
|
|
1792
|
+
</xsl:variable>
|
|
1829
1793
|
|
|
1830
1794
|
<xsl:variable name="root">
|
|
1831
1795
|
<xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
|
|
@@ -1837,9 +1801,18 @@
|
|
|
1837
1801
|
<xsl:attribute name="level">1</xsl:attribute>
|
|
1838
1802
|
</xsl:if>
|
|
1839
1803
|
<mnx:title>
|
|
1840
|
-
<xsl:
|
|
1841
|
-
<xsl:
|
|
1842
|
-
|
|
1804
|
+
<xsl:choose>
|
|
1805
|
+
<xsl:when test="normalize-space($variant_title) != ''">
|
|
1806
|
+
<xsl:apply-templates select="xalan:nodeset($variant_title)" mode="contents_item">
|
|
1807
|
+
<xsl:with-param name="mode">contents</xsl:with-param>
|
|
1808
|
+
</xsl:apply-templates>
|
|
1809
|
+
</xsl:when>
|
|
1810
|
+
<xsl:otherwise>
|
|
1811
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
|
|
1812
|
+
<xsl:with-param name="mode">contents</xsl:with-param>
|
|
1813
|
+
</xsl:apply-templates>
|
|
1814
|
+
</xsl:otherwise>
|
|
1815
|
+
</xsl:choose>
|
|
1843
1816
|
</mnx:title>
|
|
1844
1817
|
<xsl:if test="$type != 'index'">
|
|
1845
1818
|
<xsl:apply-templates mode="contents"/>
|
|
@@ -5791,20 +5764,59 @@
|
|
|
5791
5764
|
</xsl:variable>
|
|
5792
5765
|
|
|
5793
5766
|
<xsl:attribute-set name="page-sequence-preface">
|
|
5794
|
-
<xsl:attribute name="
|
|
5795
|
-
|
|
5767
|
+
<xsl:attribute name="master-reference">preface</xsl:attribute>
|
|
5768
|
+
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
|
|
5769
|
+
</xsl:attribute-set> <!-- page-sequence-preface -->
|
|
5796
5770
|
|
|
5797
5771
|
<xsl:template name="refine_page-sequence-preface">
|
|
5798
5772
|
<xsl:param name="layoutVersion"/>
|
|
5799
|
-
|
|
5773
|
+
<xsl:param name="doctype"/>
|
|
5774
|
+
<xsl:param name="num"/>
|
|
5775
|
+
<xsl:param name="skip_force_page_count">false</xsl:param>
|
|
5776
|
+
<xsl:if test="$vertical_layout = 'true'">
|
|
5777
|
+
<xsl:attribute name="master-reference">document_vertical_layout</xsl:attribute>
|
|
5778
|
+
<xsl:attribute name="format">一</xsl:attribute>
|
|
5779
|
+
</xsl:if>
|
|
5800
5780
|
|
|
5801
|
-
|
|
5781
|
+
<xsl:if test="position() = 1">
|
|
5782
|
+
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
|
5783
|
+
</xsl:if>
|
|
5784
|
+
</xsl:template> <!-- refine_page-sequence-preface -->
|
|
5802
5785
|
|
|
5803
|
-
|
|
5786
|
+
<xsl:attribute-set name="page-sequence-main">
|
|
5787
|
+
<xsl:attribute name="master-reference">document</xsl:attribute>
|
|
5788
|
+
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
|
|
5789
|
+
</xsl:attribute-set> <!-- page-sequence-main -->
|
|
5804
5790
|
|
|
5805
5791
|
<xsl:template name="refine_page-sequence-main">
|
|
5806
5792
|
<xsl:param name="layoutVersion"/>
|
|
5807
|
-
|
|
5793
|
+
<xsl:param name="doctype"/>
|
|
5794
|
+
<xsl:choose>
|
|
5795
|
+
<xsl:when test="$vertical_layout = 'true'">
|
|
5796
|
+
<xsl:attribute name="master-reference">document_vertical_layout</xsl:attribute>
|
|
5797
|
+
<xsl:if test="position() = last()">
|
|
5798
|
+
<xsl:attribute name="master-reference">document_vertical_layout_with_last</xsl:attribute>
|
|
5799
|
+
</xsl:if>
|
|
5800
|
+
<xsl:attribute name="format">一</xsl:attribute>
|
|
5801
|
+
<!-- <xsl:attribute name="fox:number-conversion-features">ア</xsl:attribute> -->
|
|
5802
|
+
</xsl:when>
|
|
5803
|
+
<xsl:otherwise>
|
|
5804
|
+
<xsl:if test="position() = 1">
|
|
5805
|
+
<xsl:attribute name="master-reference">document_first_section</xsl:attribute>
|
|
5806
|
+
</xsl:if>
|
|
5807
|
+
<xsl:if test="@orientation = 'landscape'">
|
|
5808
|
+
<xsl:attribute name="master-reference">document-<xsl:value-of select="@orientation"/></xsl:attribute>
|
|
5809
|
+
</xsl:if>
|
|
5810
|
+
<xsl:variable name="isCommentary" select="normalize-space(.//mn:annex[@commentary = 'true'] and 1 = 1)"/>
|
|
5811
|
+
<xsl:if test="$isCommentary = 'true'">
|
|
5812
|
+
<xsl:attribute name="master-reference">document_commentary_section</xsl:attribute>
|
|
5813
|
+
</xsl:if>
|
|
5814
|
+
<xsl:if test="position() = 1">
|
|
5815
|
+
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
|
5816
|
+
</xsl:if>
|
|
5817
|
+
</xsl:otherwise>
|
|
5818
|
+
</xsl:choose>
|
|
5819
|
+
</xsl:template> <!-- refine_page-sequence-main -->
|
|
5808
5820
|
|
|
5809
5821
|
<xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable>
|
|
5810
5822
|
<xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
|
|
@@ -6109,7 +6121,24 @@
|
|
|
6109
6121
|
<xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
|
|
6110
6122
|
|
|
6111
6123
|
<!-- remove image/emf -->
|
|
6112
|
-
<xsl:template match="mn:image
|
|
6124
|
+
<xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
|
|
6125
|
+
|
|
6126
|
+
<!-- https://github.com/metanorma/metanorma/issues/540 -->
|
|
6127
|
+
<xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
|
|
6128
|
+
<xsl:copy>
|
|
6129
|
+
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
|
6130
|
+
<xsl:choose>
|
|
6131
|
+
<xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
|
|
6132
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
|
|
6133
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
|
|
6134
|
+
</xsl:when>
|
|
6135
|
+
<xsl:otherwise>
|
|
6136
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
|
|
6137
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
|
|
6138
|
+
</xsl:otherwise>
|
|
6139
|
+
</xsl:choose>
|
|
6140
|
+
</xsl:copy>
|
|
6141
|
+
</xsl:template>
|
|
6113
6142
|
|
|
6114
6143
|
<!-- remove preprocess-xslt -->
|
|
6115
6144
|
<xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
|
|
@@ -6337,6 +6366,15 @@
|
|
|
6337
6366
|
</xsl:choose>
|
|
6338
6367
|
</xsl:template>
|
|
6339
6368
|
|
|
6369
|
+
<!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
|
|
6370
|
+
<xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
|
|
6371
|
+
<xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
|
|
6372
|
+
</xsl:template>
|
|
6373
|
+
|
|
6374
|
+
<xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
|
|
6375
|
+
<xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
|
|
6376
|
+
</xsl:template>
|
|
6377
|
+
|
|
6340
6378
|
<!-- li/fmt-name -->
|
|
6341
6379
|
<xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
|
|
6342
6380
|
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
|
@@ -9668,6 +9706,8 @@
|
|
|
9668
9706
|
<xsl:if test="ancestor::mn:preface">
|
|
9669
9707
|
<xsl:attribute name="border">none</xsl:attribute>
|
|
9670
9708
|
</xsl:if>
|
|
9709
|
+
|
|
9710
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
9671
9711
|
</xsl:template> <!-- refine_table-style -->
|
|
9672
9712
|
|
|
9673
9713
|
<xsl:attribute-set name="table-number-style">
|
|
@@ -9710,6 +9750,8 @@
|
|
|
9710
9750
|
<xsl:attribute name="border-top">none</xsl:attribute>
|
|
9711
9751
|
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
|
9712
9752
|
</xsl:if>
|
|
9753
|
+
|
|
9754
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
9713
9755
|
</xsl:template> <!-- refine_table-header-row-style -->
|
|
9714
9756
|
|
|
9715
9757
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
|
@@ -9718,6 +9760,8 @@
|
|
|
9718
9760
|
</xsl:attribute-set>
|
|
9719
9761
|
|
|
9720
9762
|
<xsl:template name="refine_table-footer-row-style">
|
|
9763
|
+
|
|
9764
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
9721
9765
|
</xsl:template> <!-- refine_table-footer-row-style -->
|
|
9722
9766
|
|
|
9723
9767
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
|
@@ -9727,6 +9771,8 @@
|
|
|
9727
9771
|
<xsl:template name="refine_table-body-row-style">
|
|
9728
9772
|
|
|
9729
9773
|
<xsl:call-template name="setBordersTableArray"/>
|
|
9774
|
+
|
|
9775
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
9730
9776
|
</xsl:template> <!-- refine_table-body-row-style -->
|
|
9731
9777
|
|
|
9732
9778
|
<xsl:attribute-set name="table-header-cell-style">
|
|
@@ -9753,6 +9799,16 @@
|
|
|
9753
9799
|
</xsl:if>
|
|
9754
9800
|
|
|
9755
9801
|
<xsl:call-template name="setTableCellAttributes"/>
|
|
9802
|
+
|
|
9803
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
9804
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
9805
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
9806
|
+
<xsl:if test="following-sibling::*">
|
|
9807
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
9808
|
+
</xsl:if>
|
|
9809
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
9810
|
+
</xsl:if>
|
|
9811
|
+
|
|
9756
9812
|
</xsl:template> <!-- refine_table-header-cell-style -->
|
|
9757
9813
|
|
|
9758
9814
|
<xsl:attribute-set name="table-cell-style">
|
|
@@ -9774,6 +9830,15 @@
|
|
|
9774
9830
|
<xsl:attribute name="border">none</xsl:attribute>
|
|
9775
9831
|
</xsl:if>
|
|
9776
9832
|
|
|
9833
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
9834
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
9835
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
9836
|
+
<xsl:if test="following-sibling::*">
|
|
9837
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
9838
|
+
</xsl:if>
|
|
9839
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
9840
|
+
</xsl:if>
|
|
9841
|
+
|
|
9777
9842
|
</xsl:template> <!-- refine_table-cell-style -->
|
|
9778
9843
|
|
|
9779
9844
|
<xsl:attribute-set name="table-footer-cell-style">
|
|
@@ -9786,6 +9851,8 @@
|
|
|
9786
9851
|
</xsl:attribute-set> <!-- table-footer-cell-style -->
|
|
9787
9852
|
|
|
9788
9853
|
<xsl:template name="refine_table-footer-cell-style">
|
|
9854
|
+
|
|
9855
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
9789
9856
|
</xsl:template> <!-- refine_table-footer-cell-style -->
|
|
9790
9857
|
|
|
9791
9858
|
<xsl:attribute-set name="table-note-style">
|
|
@@ -9835,6 +9902,16 @@
|
|
|
9835
9902
|
<xsl:template name="refine_table-fn-body-style">
|
|
9836
9903
|
</xsl:template>
|
|
9837
9904
|
|
|
9905
|
+
<xsl:template name="setNoBordersForTableList">
|
|
9906
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
9907
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
|
9908
|
+
<xsl:attribute name="border-top">none</xsl:attribute>
|
|
9909
|
+
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
|
9910
|
+
<xsl:attribute name="border-left">none</xsl:attribute>
|
|
9911
|
+
<xsl:attribute name="border-right">none</xsl:attribute>
|
|
9912
|
+
</xsl:if>
|
|
9913
|
+
</xsl:template>
|
|
9914
|
+
|
|
9838
9915
|
<!-- ========================== -->
|
|
9839
9916
|
<!-- END Table styles -->
|
|
9840
9917
|
<!-- ========================== -->
|
|
@@ -15555,6 +15632,10 @@
|
|
|
15555
15632
|
</fo:list-item>
|
|
15556
15633
|
</xsl:template>
|
|
15557
15634
|
|
|
15635
|
+
<xsl:template match="mn:fmt-ol | mn:fmt-ul">
|
|
15636
|
+
<xsl:apply-templates/>
|
|
15637
|
+
</xsl:template>
|
|
15638
|
+
|
|
15558
15639
|
<!-- ===================================== -->
|
|
15559
15640
|
<!-- END Lists processing -->
|
|
15560
15641
|
<!-- ===================================== -->
|
|
@@ -16926,6 +17007,7 @@
|
|
|
16926
17007
|
</xsl:attribute-set>
|
|
16927
17008
|
|
|
16928
17009
|
<xsl:template name="refine_toc-style">
|
|
17010
|
+
<xsl:copy-of select="@id"/>
|
|
16929
17011
|
<xsl:if test="not($vertical_layout = 'true') and not($lang = 'en')">
|
|
16930
17012
|
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
|
16931
17013
|
</xsl:if>
|
|
@@ -16987,6 +17069,11 @@
|
|
|
16987
17069
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
|
16988
17070
|
|
|
16989
17071
|
<xsl:template name="refine_toc-leader-style">
|
|
17072
|
+
<xsl:if test="$vertical_layout = 'true'">
|
|
17073
|
+
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
|
17074
|
+
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
|
17075
|
+
<xsl:attribute name="baseline-shift">60%</xsl:attribute>
|
|
17076
|
+
</xsl:if>
|
|
16990
17077
|
</xsl:template>
|
|
16991
17078
|
|
|
16992
17079
|
<xsl:attribute-set name="toc-pagenumber-style">
|
|
@@ -17018,13 +17105,13 @@
|
|
|
17018
17105
|
|
|
17019
17106
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
17020
17107
|
<xsl:variable name="nodes_preface_">
|
|
17021
|
-
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc'
|
|
17108
|
+
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
|
|
17022
17109
|
<node id="{@id}"/>
|
|
17023
17110
|
</xsl:for-each>
|
|
17024
17111
|
</xsl:variable>
|
|
17025
17112
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
|
17026
17113
|
|
|
17027
|
-
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc'
|
|
17114
|
+
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
|
|
17028
17115
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
17029
17116
|
|
|
17030
17117
|
<!-- process Section's title -->
|
|
@@ -17037,6 +17124,23 @@
|
|
|
17037
17124
|
</xsl:for-each>
|
|
17038
17125
|
</xsl:template>
|
|
17039
17126
|
|
|
17127
|
+
<xsl:template match="*[@type = 'toc'][mn:title or mn:fmt-title]" mode="contents" priority="2">
|
|
17128
|
+
<xsl:variable name="title">
|
|
17129
|
+
<xsl:call-template name="getName"/>
|
|
17130
|
+
</xsl:variable>
|
|
17131
|
+
<xsl:variable name="root">
|
|
17132
|
+
<xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
|
|
17133
|
+
<xsl:if test="ancestor-or-self::mn:annex">annex</xsl:if>
|
|
17134
|
+
</xsl:variable>
|
|
17135
|
+
<mnx:item id="{@id}" level="1" section="" type="toc" root="{$root}" display="false">
|
|
17136
|
+
<mnx:title>
|
|
17137
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
|
|
17138
|
+
<xsl:with-param name="element" select="$root"/>
|
|
17139
|
+
</xsl:apply-templates>
|
|
17140
|
+
</mnx:title>
|
|
17141
|
+
</mnx:item>
|
|
17142
|
+
</xsl:template>
|
|
17143
|
+
|
|
17040
17144
|
<xsl:template name="processMainSectionsDefault_Contents">
|
|
17041
17145
|
|
|
17042
17146
|
<xsl:variable name="nodes_sections_">
|
|
@@ -18893,16 +18997,17 @@
|
|
|
18893
18997
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
|
18894
18998
|
<xsl:template name="insert_basic_link">
|
|
18895
18999
|
<xsl:param name="element"/>
|
|
19000
|
+
<xsl:param name="wrapper">true</xsl:param>
|
|
18896
19001
|
<xsl:variable name="element_node" select="xalan:nodeset($element)"/>
|
|
18897
19002
|
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
|
18898
19003
|
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
|
18899
19004
|
<xsl:choose>
|
|
18900
|
-
<xsl:when test="$internal-destination = 'true'">
|
|
19005
|
+
<xsl:when test="$internal-destination = 'true' and $wrapper = 'true'">
|
|
18901
19006
|
<fo:wrapper role="Reference">
|
|
18902
19007
|
<xsl:copy-of select="$element_node"/>
|
|
18903
19008
|
</fo:wrapper>
|
|
18904
19009
|
</xsl:when>
|
|
18905
|
-
<xsl:when test="$external-destination = 'true'">
|
|
19010
|
+
<xsl:when test="$internal-destination = 'true' or $external-destination = 'true'">
|
|
18906
19011
|
<xsl:copy-of select="$element_node"/>
|
|
18907
19012
|
</xsl:when>
|
|
18908
19013
|
<xsl:otherwise>
|
|
@@ -6,11 +6,11 @@ module IsoDoc
|
|
|
6
6
|
class PresentationXMLConvert < IsoDoc::Iso::PresentationXMLConvert
|
|
7
7
|
def annex1(elem)
|
|
8
8
|
elem["commentary"] == "true" and return commentary(elem)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def annex_delim(_elem)
|
|
13
|
+
"<br/>"
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def annex(docxml)
|
|
@@ -101,7 +101,7 @@ module IsoDoc
|
|
|
101
101
|
%(#{@meta.get[:"investigative-committee"]} #{@i18n.membership_table})
|
|
102
102
|
y = YAML.safe_load(s.children.to_xml(encoding: "UTF-8"))
|
|
103
103
|
d = clause.at(ns("./key")) || clause.at(ns("./dl"))
|
|
104
|
-
s && y.is_a?(Array) or return [nil, nil, nil, nil]
|
|
104
|
+
(s && y.is_a?(Array)) or return [nil, nil, nil, nil]
|
|
105
105
|
[s, t, y, d]
|
|
106
106
|
end
|
|
107
107
|
|
|
@@ -111,7 +111,8 @@ module IsoDoc
|
|
|
111
111
|
n = y["name"]
|
|
112
112
|
if n.is_a?(Hash)
|
|
113
113
|
n = if @lang == "ja" then "#{n['surname']} #{n['givenname']}"
|
|
114
|
-
else "#{n['givenname']} #{n['surname']}"
|
|
114
|
+
else "#{n['givenname']} #{n['surname']}"
|
|
115
|
+
end
|
|
115
116
|
end
|
|
116
117
|
<<~XML
|
|
117
118
|
<tr #{add_id_text}><td #{add_id_text}>#{r}</td><td #{add_id_text}>#{n}</td><td #{add_id_text}>#{y['affiliation']}</td></tr>
|
|
@@ -64,7 +64,6 @@ module IsoDoc
|
|
|
64
64
|
|
|
65
65
|
def to_word1(result, filename, dir, header)
|
|
66
66
|
result or return
|
|
67
|
-
result = from_xhtml(result).gsub(/-DOUBLE_HYPHEN_ESCAPE-/, "--")
|
|
68
67
|
::Html2Doc::Jis.new(
|
|
69
68
|
filename: filename, imagedir: @localdir,
|
|
70
69
|
stylesheet: @wordstylesheet&.path,
|
|
@@ -76,7 +75,11 @@ module IsoDoc
|
|
|
76
75
|
|
|
77
76
|
def word_split(xml)
|
|
78
77
|
b = xml.dup
|
|
79
|
-
{ _cover: cover_split(xml),
|
|
78
|
+
{ _cover: cover_split(xml),
|
|
79
|
+
"": main_split(b) }.transform_values do |x|
|
|
80
|
+
unescape_amp_in_hrefs(from_xhtml(x)
|
|
81
|
+
.gsub("-DOUBLE_HYPHEN_ESCAPE-", "--"))
|
|
82
|
+
end
|
|
80
83
|
end
|
|
81
84
|
|
|
82
85
|
def cover_split(xml)
|
data/lib/isodoc/jis/xref.rb
CHANGED
|
@@ -1939,10 +1939,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation>
|
|
|
1939
1939
|
<value>hasAnnotation</value>
|
|
1940
1940
|
<value>draftOf</value>
|
|
1941
1941
|
<value>hasDraft</value>
|
|
1942
|
-
<value>
|
|
1943
|
-
<value>
|
|
1944
|
-
<value>
|
|
1945
|
-
<value>
|
|
1942
|
+
<value>predecessorDraftOf</value>
|
|
1943
|
+
<value>hasPredecessorDraft</value>
|
|
1944
|
+
<value>successorDraftOf</value>
|
|
1945
|
+
<value>hasSuccessorDraft</value>
|
|
1946
1946
|
<value>editionOf</value>
|
|
1947
1947
|
<value>hasEdition</value>
|
|
1948
1948
|
<value>updates</value>
|
|
@@ -641,8 +641,85 @@ This is done if the footnote reference is already presented in some other form,
|
|
|
641
641
|
</ref>
|
|
642
642
|
</zeroOrMore>
|
|
643
643
|
</define>
|
|
644
|
+
<define name="altsource">
|
|
645
|
+
<a:documentation>Alternative file to use as media</a:documentation>
|
|
646
|
+
<element name="altsource">
|
|
647
|
+
<ref name="MediaAttributes"/>
|
|
648
|
+
<optional>
|
|
649
|
+
<attribute name="tag">
|
|
650
|
+
<a:documentation>Comma-delimited tag to indicate when the alternate file is to be used,
|
|
651
|
+
at minimum allows contain `html`, `doc`, `pdf` as the main target formats of Metanorma,
|
|
652
|
+
and `default` for the fallback. The presence of an altsource tagged `default` is required</a:documentation>
|
|
653
|
+
</attribute>
|
|
654
|
+
</optional>
|
|
655
|
+
<optional>
|
|
656
|
+
<attribute name="media">
|
|
657
|
+
<a:documentation>CSS media query to indicate when the alternate file is to be used</a:documentation>
|
|
658
|
+
</attribute>
|
|
659
|
+
</optional>
|
|
660
|
+
</element>
|
|
661
|
+
</define>
|
|
662
|
+
<define name="image">
|
|
663
|
+
<a:documentation>Container for image content</a:documentation>
|
|
664
|
+
<choice>
|
|
665
|
+
<element name="image">
|
|
666
|
+
<ref name="RequiredId"/>
|
|
667
|
+
<ref name="ImageAttributes">
|
|
668
|
+
<a:documentation>When specified along with altsource, ImageAttributes give the default image to be rendered</a:documentation>
|
|
669
|
+
</ref>
|
|
670
|
+
<ref name="ImageBody"/>
|
|
671
|
+
</element>
|
|
672
|
+
<element name="svg">
|
|
673
|
+
<a:documentation>Add svg mark up to image</a:documentation>
|
|
674
|
+
<oneOrMore>
|
|
675
|
+
<choice>
|
|
676
|
+
<text/>
|
|
677
|
+
<ref name="AnyElement"/>
|
|
678
|
+
</choice>
|
|
679
|
+
</oneOrMore>
|
|
680
|
+
</element>
|
|
681
|
+
</choice>
|
|
682
|
+
</define>
|
|
683
|
+
<define name="ImageAttributes">
|
|
684
|
+
<optional>
|
|
685
|
+
<ref name="MediaAttributes">
|
|
686
|
+
<a:documentation>If the image contains altsource, the media attributes are given on each of the altsource elements instead of the root node</a:documentation>
|
|
687
|
+
</ref>
|
|
688
|
+
</optional>
|
|
689
|
+
<ref name="MediaAccessibilityAttributes"/>
|
|
690
|
+
<optional>
|
|
691
|
+
<attribute name="width">
|
|
692
|
+
<a:documentation>Height of image</a:documentation>
|
|
693
|
+
<ref name="ImageSize"/>
|
|
694
|
+
</attribute>
|
|
695
|
+
</optional>
|
|
696
|
+
<optional>
|
|
697
|
+
<attribute name="height">
|
|
698
|
+
<a:documentation>Width of image</a:documentation>
|
|
699
|
+
<ref name="ImageSize"/>
|
|
700
|
+
</attribute>
|
|
701
|
+
</optional>
|
|
702
|
+
</define>
|
|
644
703
|
</include>
|
|
645
704
|
<!-- end overrides -->
|
|
705
|
+
<define name="ImageBody">
|
|
706
|
+
<optional>
|
|
707
|
+
<element name="svg">
|
|
708
|
+
<a:documentation>image can contain SVG XML, which is used to access its identifiers within the Metanorma XML</a:documentation>
|
|
709
|
+
<oneOrMore>
|
|
710
|
+
<choice>
|
|
711
|
+
<text/>
|
|
712
|
+
<ref name="AnyElement"/>
|
|
713
|
+
</choice>
|
|
714
|
+
</oneOrMore>
|
|
715
|
+
</element>
|
|
716
|
+
</optional>
|
|
717
|
+
<zeroOrMore>
|
|
718
|
+
<ref name="altsource">
|
|
719
|
+
<a:documentation>Alternative files to use as media</a:documentation>
|
|
720
|
+
</ref>
|
|
721
|
+
</zeroOrMore>
|
|
722
|
+
</define>
|
|
646
723
|
<define name="key">
|
|
647
724
|
<a:documentation>Key to a table, figure, or formula</a:documentation>
|
|
648
725
|
<element name="key">
|
|
@@ -930,34 +1007,6 @@ titlecase, or lowercase</a:documentation>
|
|
|
930
1007
|
<ref name="ReducedBibliographicItem"/>
|
|
931
1008
|
</element>
|
|
932
1009
|
</define>
|
|
933
|
-
<define name="image" combine="choice">
|
|
934
|
-
<choice>
|
|
935
|
-
<element name="image">
|
|
936
|
-
<ref name="RequiredId"/>
|
|
937
|
-
<ref name="ImageAttributes"/>
|
|
938
|
-
<optional>
|
|
939
|
-
<element name="svg">
|
|
940
|
-
<a:documentation>Allow svg in image/svg, for consistency</a:documentation>
|
|
941
|
-
<oneOrMore>
|
|
942
|
-
<choice>
|
|
943
|
-
<text/>
|
|
944
|
-
<ref name="AnyElement"/>
|
|
945
|
-
</choice>
|
|
946
|
-
</oneOrMore>
|
|
947
|
-
</element>
|
|
948
|
-
</optional>
|
|
949
|
-
</element>
|
|
950
|
-
<element name="svg">
|
|
951
|
-
<a:documentation>Add svg mark up to image</a:documentation>
|
|
952
|
-
<oneOrMore>
|
|
953
|
-
<choice>
|
|
954
|
-
<text/>
|
|
955
|
-
<ref name="AnyElement"/>
|
|
956
|
-
</choice>
|
|
957
|
-
</oneOrMore>
|
|
958
|
-
</element>
|
|
959
|
-
</choice>
|
|
960
|
-
</define>
|
|
961
1010
|
<define name="ParagraphFnBody" combine="interleave">
|
|
962
1011
|
<ref name="BlockSource">
|
|
963
1012
|
<a:documentation>Bibliographic source for the information in the paragraph
|
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: 1.0.
|
|
4
|
+
version: 1.0.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: 2026-03-
|
|
11
|
+
date: 2026-03-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: japanese_calendar
|