metanorma-plateau 1.2.4 → 1.2.7
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/plateau/plateau.international-standard.xsl +326 -53
- data/lib/metanorma/plateau/basicdoc.rng +5 -1
- data/lib/metanorma/plateau/biblio.rng +4 -4
- data/lib/metanorma/plateau/cleanup.rb +7 -2
- data/lib/metanorma/plateau/converter.rb +1 -9
- data/lib/metanorma/plateau/isodoc.rng +77 -28
- data/lib/metanorma/plateau/validate.rb +9 -0
- data/lib/metanorma/plateau/version.rb +1 -1
- data/lib/metanorma-plateau.rb +2 -0
- data/metanorma-plateau.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1bfcef686181e7d2d42c733342cbcbbf00fd88bda76e0a2be811b0243fb068b7
|
|
4
|
+
data.tar.gz: 88ae44c810f54247a11d97ffc4626936dadc347955af3596dcbfe7ea68ceb44d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b78ae131f199030b7e9108aaddbe718eea7bb0a0ea6db60972139150d46335939439293a12ce600dc47c96b2495c36e31684a61fdceac265fc3761ca317b579b
|
|
7
|
+
data.tar.gz: 86928c28c962d93740639d1c1c66b32f4673359f4b153fb99345f6ca549b8f94f3609b14fadd85236b91aa3e40123e7332cdd0df68aba3e49e6037379cb98340
|
|
@@ -146,6 +146,27 @@
|
|
|
146
146
|
<fo:region-end region-name="right-region-landscape" extent="{$marginLeftRight2}mm"/>
|
|
147
147
|
</fo:simple-page-master>
|
|
148
148
|
|
|
149
|
+
<!-- Index pages (two columns) -->
|
|
150
|
+
<fo:simple-page-master master-name="index" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
|
151
|
+
<xsl:if test="$vertical_layout = 'true'">
|
|
152
|
+
<xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
|
153
|
+
<xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
|
|
154
|
+
</xsl:if>
|
|
155
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
|
|
156
|
+
<xsl:if test="$vertical_layout != 'true'">
|
|
157
|
+
<xsl:attribute name="column-count">2</xsl:attribute>
|
|
158
|
+
<xsl:attribute name="column-gap">10mm</xsl:attribute>
|
|
159
|
+
</xsl:if>
|
|
160
|
+
<xsl:if test="$vertical_layout = 'true'">
|
|
161
|
+
<xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
|
|
162
|
+
</xsl:if>
|
|
163
|
+
</fo:region-body>
|
|
164
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
|
165
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
|
166
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
|
167
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
|
168
|
+
</fo:simple-page-master>
|
|
169
|
+
|
|
149
170
|
<fo:simple-page-master master-name="back-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
|
150
171
|
<fo:region-body margin-top="179.5mm" margin-bottom="30mm" margin-left="15mm" margin-right="22.7mm"/>
|
|
151
172
|
<fo:region-before region-name="header" extent="179.5mm"/>
|
|
@@ -286,9 +307,8 @@
|
|
|
286
307
|
</xsl:when>
|
|
287
308
|
<xsl:otherwise>
|
|
288
309
|
|
|
289
|
-
<
|
|
290
|
-
|
|
291
|
-
<fo:page-sequence master-reference="preface{$page_orientation}" force-page-count="no-force" font-family="Noto Sans JP" font-size="10pt">
|
|
310
|
+
<fo:page-sequence xsl:use-attribute-sets="page-sequence-preface">
|
|
311
|
+
<xsl:call-template name="refine_page-sequence-preface"/>
|
|
292
312
|
|
|
293
313
|
<fo:static-content flow-name="header" role="artifact" id="__internal_layout__preface_header_{generate-id()}">
|
|
294
314
|
<!-- grey background -->
|
|
@@ -327,11 +347,8 @@
|
|
|
327
347
|
<xsl:for-each select=".//mn:page_sequence[not(parent::mn:preface)][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
|
328
348
|
<xsl:variable name="page_orientation"><xsl:call-template name="getPageSequenceOrientation"/></xsl:variable>
|
|
329
349
|
|
|
330
|
-
<fo:page-sequence
|
|
331
|
-
|
|
332
|
-
<xsl:if test="position() = 1">
|
|
333
|
-
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
|
334
|
-
</xsl:if>
|
|
350
|
+
<fo:page-sequence xsl:use-attribute-sets="page-sequence-main">
|
|
351
|
+
<xsl:call-template name="refine_page-sequence-main"/>
|
|
335
352
|
|
|
336
353
|
<xsl:call-template name="insertFootnoteSeparatorCommon"><xsl:with-param name="leader_length">15%</xsl:with-param></xsl:call-template>
|
|
337
354
|
|
|
@@ -573,7 +590,7 @@
|
|
|
573
590
|
</xsl:if>
|
|
574
591
|
<fo:inline><xsl:apply-templates select="mnx:title"/><xsl:text> </xsl:text></fo:inline>
|
|
575
592
|
<fo:inline keep-together.within-line="always">
|
|
576
|
-
<fo:leader xsl:use-attribute-sets="toc-leader-style"
|
|
593
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
|
|
577
594
|
<fo:inline>
|
|
578
595
|
<xsl:if test="$doctype = 'technical-report'"><xsl:text>- </xsl:text></xsl:if>
|
|
579
596
|
<fo:page-number-citation ref-id="{@id}"/>
|
|
@@ -836,6 +853,9 @@
|
|
|
836
853
|
<xsl:variable name="title">
|
|
837
854
|
<xsl:call-template name="getName"/>
|
|
838
855
|
</xsl:variable>
|
|
856
|
+
<xsl:variable name="variant_title">
|
|
857
|
+
<xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
|
|
858
|
+
</xsl:variable>
|
|
839
859
|
|
|
840
860
|
<xsl:variable name="root">
|
|
841
861
|
<xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
|
|
@@ -847,9 +867,18 @@
|
|
|
847
867
|
<xsl:attribute name="level">1</xsl:attribute>
|
|
848
868
|
</xsl:if>
|
|
849
869
|
<mnx:title>
|
|
850
|
-
<xsl:
|
|
851
|
-
<xsl:
|
|
852
|
-
|
|
870
|
+
<xsl:choose>
|
|
871
|
+
<xsl:when test="normalize-space($variant_title) != ''">
|
|
872
|
+
<xsl:apply-templates select="xalan:nodeset($variant_title)" mode="contents_item">
|
|
873
|
+
<xsl:with-param name="mode">contents</xsl:with-param>
|
|
874
|
+
</xsl:apply-templates>
|
|
875
|
+
</xsl:when>
|
|
876
|
+
<xsl:otherwise>
|
|
877
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
|
|
878
|
+
<xsl:with-param name="mode">contents</xsl:with-param>
|
|
879
|
+
</xsl:apply-templates>
|
|
880
|
+
</xsl:otherwise>
|
|
881
|
+
</xsl:choose>
|
|
853
882
|
</mnx:title>
|
|
854
883
|
<xsl:if test="$type != 'index'">
|
|
855
884
|
<xsl:apply-templates mode="contents"/>
|
|
@@ -1277,7 +1306,7 @@
|
|
|
1277
1306
|
<!-- remove semantic xml -->
|
|
1278
1307
|
<xsl:template match="mn:metanorma-extension/mn:metanorma/mn:source" mode="update_xml_pres"/>
|
|
1279
1308
|
<!-- remove image/emf -->
|
|
1280
|
-
<xsl:template match="mn:image
|
|
1309
|
+
<xsl:template match="mn:image//mn:emf" mode="update_xml_pres"/>
|
|
1281
1310
|
<xsl:template match="mn:preprocess-xslt" mode="update_xml_pres"/>
|
|
1282
1311
|
<xsl:template match="mn:stem" mode="update_xml_pres"/>
|
|
1283
1312
|
|
|
@@ -1654,28 +1683,14 @@
|
|
|
1654
1683
|
<!-- Index processing -->
|
|
1655
1684
|
<!-- =================== -->
|
|
1656
1685
|
<xsl:template match="mn:indexsect">
|
|
1657
|
-
<fo:block id="{@id}"
|
|
1658
|
-
<xsl:apply-templates select="mn:title"/>
|
|
1686
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="indexsect-title-block-style">
|
|
1687
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
|
1659
1688
|
</fo:block>
|
|
1660
1689
|
<fo:block role="Index">
|
|
1661
|
-
<xsl:apply-templates select="*[not(self::mn:title)]"/>
|
|
1690
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-title)]"/>
|
|
1662
1691
|
</fo:block>
|
|
1663
1692
|
</xsl:template>
|
|
1664
1693
|
|
|
1665
|
-
<xsl:template match="mn:xref[@pagenumber = 'true'] | mn:fmt-xref[@pagenumber = 'true']" priority="2">
|
|
1666
|
-
<xsl:call-template name="insert_basic_link">
|
|
1667
|
-
<xsl:with-param name="element">
|
|
1668
|
-
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
|
1669
|
-
<fo:inline>
|
|
1670
|
-
<xsl:if test="@id">
|
|
1671
|
-
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
1672
|
-
</xsl:if>
|
|
1673
|
-
<fo:page-number-citation ref-id="{@target}"/>
|
|
1674
|
-
</fo:inline>
|
|
1675
|
-
</fo:basic-link>
|
|
1676
|
-
</xsl:with-param>
|
|
1677
|
-
</xsl:call-template>
|
|
1678
|
-
</xsl:template>
|
|
1679
1694
|
<!-- =================== -->
|
|
1680
1695
|
<!-- End of Index processing -->
|
|
1681
1696
|
<!-- =================== -->
|
|
@@ -2188,20 +2203,36 @@
|
|
|
2188
2203
|
</xsl:variable>
|
|
2189
2204
|
|
|
2190
2205
|
<xsl:attribute-set name="page-sequence-preface">
|
|
2191
|
-
<xsl:attribute name="
|
|
2192
|
-
|
|
2206
|
+
<xsl:attribute name="master-reference">preface</xsl:attribute>
|
|
2207
|
+
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
|
|
2208
|
+
<xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
|
|
2209
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
2210
|
+
</xsl:attribute-set> <!-- page-sequence-preface -->
|
|
2193
2211
|
|
|
2194
2212
|
<xsl:template name="refine_page-sequence-preface">
|
|
2195
2213
|
<xsl:param name="layoutVersion"/>
|
|
2196
|
-
|
|
2214
|
+
<xsl:param name="doctype"/>
|
|
2215
|
+
<xsl:param name="num"/>
|
|
2216
|
+
<xsl:param name="skip_force_page_count">false</xsl:param>
|
|
2217
|
+
<xsl:attribute name="master-reference">preface<xsl:call-template name="getPageSequenceOrientation"/></xsl:attribute>
|
|
2218
|
+
</xsl:template> <!-- refine_page-sequence-preface -->
|
|
2197
2219
|
|
|
2198
2220
|
<xsl:attribute-set name="page-sequence-main">
|
|
2199
|
-
|
|
2200
|
-
|
|
2221
|
+
<xsl:attribute name="master-reference">document</xsl:attribute>
|
|
2222
|
+
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
|
|
2223
|
+
</xsl:attribute-set> <!-- page-sequence-main -->
|
|
2201
2224
|
|
|
2202
2225
|
<xsl:template name="refine_page-sequence-main">
|
|
2203
2226
|
<xsl:param name="layoutVersion"/>
|
|
2204
|
-
|
|
2227
|
+
<xsl:param name="doctype"/>
|
|
2228
|
+
<xsl:attribute name="master-reference">document<xsl:call-template name="getPageSequenceOrientation"/></xsl:attribute>
|
|
2229
|
+
<xsl:if test="mn:indexsect">
|
|
2230
|
+
<xsl:attribute name="master-reference">index</xsl:attribute>
|
|
2231
|
+
</xsl:if>
|
|
2232
|
+
<xsl:if test="position() = 1">
|
|
2233
|
+
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
|
2234
|
+
</xsl:if>
|
|
2235
|
+
</xsl:template> <!-- refine_page-sequence-main -->
|
|
2205
2236
|
|
|
2206
2237
|
<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>
|
|
2207
2238
|
<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>
|
|
@@ -2506,7 +2537,24 @@
|
|
|
2506
2537
|
<xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
|
|
2507
2538
|
|
|
2508
2539
|
<!-- remove image/emf -->
|
|
2509
|
-
<xsl:template match="mn:image
|
|
2540
|
+
<xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
|
|
2541
|
+
|
|
2542
|
+
<!-- https://github.com/metanorma/metanorma/issues/540 -->
|
|
2543
|
+
<xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
|
|
2544
|
+
<xsl:copy>
|
|
2545
|
+
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
|
2546
|
+
<xsl:choose>
|
|
2547
|
+
<xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
|
|
2548
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
|
|
2549
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
|
|
2550
|
+
</xsl:when>
|
|
2551
|
+
<xsl:otherwise>
|
|
2552
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
|
|
2553
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
|
|
2554
|
+
</xsl:otherwise>
|
|
2555
|
+
</xsl:choose>
|
|
2556
|
+
</xsl:copy>
|
|
2557
|
+
</xsl:template>
|
|
2510
2558
|
|
|
2511
2559
|
<!-- remove preprocess-xslt -->
|
|
2512
2560
|
<xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
|
|
@@ -2734,6 +2782,15 @@
|
|
|
2734
2782
|
</xsl:choose>
|
|
2735
2783
|
</xsl:template>
|
|
2736
2784
|
|
|
2785
|
+
<!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
|
|
2786
|
+
<xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
|
|
2787
|
+
<xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
|
|
2788
|
+
</xsl:template>
|
|
2789
|
+
|
|
2790
|
+
<xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
|
|
2791
|
+
<xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
|
|
2792
|
+
</xsl:template>
|
|
2793
|
+
|
|
2737
2794
|
<!-- li/fmt-name -->
|
|
2738
2795
|
<xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
|
|
2739
2796
|
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
|
@@ -3484,7 +3541,23 @@
|
|
|
3484
3541
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
3485
3542
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
|
3486
3543
|
<xsl:attribute name="main_page_sequence"/>
|
|
3487
|
-
|
|
3544
|
+
|
|
3545
|
+
<!-- from common <xsl:template name="index-pages"> -->
|
|
3546
|
+
<xsl:variable name="docid">
|
|
3547
|
+
<xsl:call-template name="getDocumentId"/>
|
|
3548
|
+
</xsl:variable>
|
|
3549
|
+
|
|
3550
|
+
<xsl:variable name="current_document_index_id">
|
|
3551
|
+
<xsl:apply-templates select="." mode="index_add_id">
|
|
3552
|
+
<xsl:with-param name="docid" select="$docid"/>
|
|
3553
|
+
</xsl:apply-templates>
|
|
3554
|
+
</xsl:variable>
|
|
3555
|
+
<xsl:variable name="current_document_index">
|
|
3556
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
|
|
3557
|
+
</xsl:variable>
|
|
3558
|
+
|
|
3559
|
+
<!-- xalan:nodeset($current_document_index) -->
|
|
3560
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="update_xml_step_move_pagebreak"/>
|
|
3488
3561
|
</xsl:element>
|
|
3489
3562
|
</xsl:for-each>
|
|
3490
3563
|
</xsl:template>
|
|
@@ -4516,6 +4589,7 @@
|
|
|
4516
4589
|
</xsl:template>
|
|
4517
4590
|
|
|
4518
4591
|
<xsl:attribute-set name="tt-style">
|
|
4592
|
+
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
4519
4593
|
</xsl:attribute-set>
|
|
4520
4594
|
|
|
4521
4595
|
<xsl:template name="refine_tt-style">
|
|
@@ -6063,6 +6137,8 @@
|
|
|
6063
6137
|
<xsl:param name="margin-side"/>
|
|
6064
6138
|
|
|
6065
6139
|
<xsl:call-template name="setBordersTableArray"/>
|
|
6140
|
+
|
|
6141
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
6066
6142
|
</xsl:template> <!-- refine_table-style -->
|
|
6067
6143
|
|
|
6068
6144
|
<xsl:attribute-set name="table-number-style">
|
|
@@ -6103,6 +6179,8 @@
|
|
|
6103
6179
|
<xsl:template name="refine_table-header-row-style">
|
|
6104
6180
|
|
|
6105
6181
|
<xsl:call-template name="setBordersTableArray"/>
|
|
6182
|
+
|
|
6183
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
6106
6184
|
</xsl:template> <!-- refine_table-header-row-style -->
|
|
6107
6185
|
|
|
6108
6186
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
|
@@ -6111,6 +6189,8 @@
|
|
|
6111
6189
|
</xsl:attribute-set>
|
|
6112
6190
|
|
|
6113
6191
|
<xsl:template name="refine_table-footer-row-style">
|
|
6192
|
+
|
|
6193
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
6114
6194
|
</xsl:template> <!-- refine_table-footer-row-style -->
|
|
6115
6195
|
|
|
6116
6196
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
|
@@ -6120,6 +6200,8 @@
|
|
|
6120
6200
|
<xsl:template name="refine_table-body-row-style">
|
|
6121
6201
|
|
|
6122
6202
|
<xsl:call-template name="setBordersTableArray"/>
|
|
6203
|
+
|
|
6204
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
6123
6205
|
</xsl:template> <!-- refine_table-body-row-style -->
|
|
6124
6206
|
|
|
6125
6207
|
<xsl:attribute-set name="table-header-cell-style">
|
|
@@ -6142,6 +6224,16 @@
|
|
|
6142
6224
|
</xsl:if>
|
|
6143
6225
|
|
|
6144
6226
|
<xsl:call-template name="setTableCellAttributes"/>
|
|
6227
|
+
|
|
6228
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
6229
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
6230
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
6231
|
+
<xsl:if test="following-sibling::*">
|
|
6232
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
6233
|
+
</xsl:if>
|
|
6234
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
6235
|
+
</xsl:if>
|
|
6236
|
+
|
|
6145
6237
|
</xsl:template> <!-- refine_table-header-cell-style -->
|
|
6146
6238
|
|
|
6147
6239
|
<xsl:attribute-set name="table-cell-style">
|
|
@@ -6160,6 +6252,15 @@
|
|
|
6160
6252
|
|
|
6161
6253
|
<xsl:call-template name="setBordersTableArray"/>
|
|
6162
6254
|
|
|
6255
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
6256
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
6257
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
6258
|
+
<xsl:if test="following-sibling::*">
|
|
6259
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
6260
|
+
</xsl:if>
|
|
6261
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
6262
|
+
</xsl:if>
|
|
6263
|
+
|
|
6163
6264
|
</xsl:template> <!-- refine_table-cell-style -->
|
|
6164
6265
|
|
|
6165
6266
|
<xsl:attribute-set name="table-footer-cell-style">
|
|
@@ -6172,6 +6273,8 @@
|
|
|
6172
6273
|
</xsl:attribute-set> <!-- table-footer-cell-style -->
|
|
6173
6274
|
|
|
6174
6275
|
<xsl:template name="refine_table-footer-cell-style">
|
|
6276
|
+
|
|
6277
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
6175
6278
|
</xsl:template> <!-- refine_table-footer-cell-style -->
|
|
6176
6279
|
|
|
6177
6280
|
<xsl:attribute-set name="table-note-style">
|
|
@@ -6220,6 +6323,16 @@
|
|
|
6220
6323
|
<xsl:template name="refine_table-fn-body-style">
|
|
6221
6324
|
</xsl:template>
|
|
6222
6325
|
|
|
6326
|
+
<xsl:template name="setNoBordersForTableList">
|
|
6327
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
6328
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
|
6329
|
+
<xsl:attribute name="border-top">none</xsl:attribute>
|
|
6330
|
+
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
|
6331
|
+
<xsl:attribute name="border-left">none</xsl:attribute>
|
|
6332
|
+
<xsl:attribute name="border-right">none</xsl:attribute>
|
|
6333
|
+
</xsl:if>
|
|
6334
|
+
</xsl:template>
|
|
6335
|
+
|
|
6223
6336
|
<!-- ========================== -->
|
|
6224
6337
|
<!-- END Table styles -->
|
|
6225
6338
|
<!-- ========================== -->
|
|
@@ -6267,6 +6380,11 @@
|
|
|
6267
6380
|
<!-- Display table's name before table as standalone block -->
|
|
6268
6381
|
<!-- $namespace = 'iso' or -->
|
|
6269
6382
|
<xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
|
|
6383
|
+
<xsl:if test="not(mn:fmt-name)"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
|
|
6384
|
+
<xsl:apply-templates select="mn:name">
|
|
6385
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
|
6386
|
+
</xsl:apply-templates>
|
|
6387
|
+
</xsl:if>
|
|
6270
6388
|
<xsl:call-template name="table_name_fn_display"/>
|
|
6271
6389
|
|
|
6272
6390
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
|
|
@@ -6515,7 +6633,13 @@
|
|
|
6515
6633
|
</xsl:template>
|
|
6516
6634
|
|
|
6517
6635
|
<!-- table/name-->
|
|
6518
|
-
<xsl:template match="
|
|
6636
|
+
<xsl:template match="mn:table[not(mn:fmt-name)]/mn:name"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
|
|
6637
|
+
<xsl:param name="process">false</xsl:param>
|
|
6638
|
+
<xsl:if test="$process = 'true'">
|
|
6639
|
+
<xsl:call-template name="table_name"/>
|
|
6640
|
+
</xsl:if>
|
|
6641
|
+
</xsl:template>
|
|
6642
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-name" name="table_name">
|
|
6519
6643
|
<xsl:param name="continued"/>
|
|
6520
6644
|
<xsl:param name="cols-count"/>
|
|
6521
6645
|
<xsl:if test="normalize-space() != ''">
|
|
@@ -6991,12 +7115,14 @@
|
|
|
6991
7115
|
<xsl:param name="colwidths"/>
|
|
6992
7116
|
<xsl:param name="colgroup"/>
|
|
6993
7117
|
|
|
6994
|
-
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or
|
|
7118
|
+
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or (..//mn:fn[not(parent::mn:fmt-name)] and not(ancestor::mn:table[1]//mn:tfoot//mn:fmt-footnote-container)) or ../mn:fmt-source or ../mn:p"/>
|
|
7119
|
+
<!-- in JIS fmt-footnote-container renders in tfoot, so no need render fn in the separate table -->
|
|
6995
7120
|
|
|
6996
|
-
<xsl:variable name="
|
|
7121
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable_">
|
|
6997
7122
|
</xsl:variable>
|
|
7123
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable" select="normalize-space($isNoteOrFnExistShowAfterTable_)"/>
|
|
6998
7124
|
|
|
6999
|
-
<xsl:if test="$isNoteOrFnExist = 'true' or
|
|
7125
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or $isNoteOrFnExistShowAfterTable = 'true'">
|
|
7000
7126
|
|
|
7001
7127
|
<xsl:variable name="cols-count">
|
|
7002
7128
|
<xsl:choose>
|
|
@@ -9264,6 +9390,18 @@
|
|
|
9264
9390
|
</xsl:with-param>
|
|
9265
9391
|
</xsl:call-template>
|
|
9266
9392
|
</xsl:template> <!-- xref -->
|
|
9393
|
+
<xsl:template match="mn:indexsect//mn:fmt-xref[@pagenumber = 'true']" priority="2">
|
|
9394
|
+
<xsl:call-template name="insert_basic_link">
|
|
9395
|
+
<xsl:with-param name="element">
|
|
9396
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
|
9397
|
+
<fo:inline>
|
|
9398
|
+
<xsl:copy-of select="@id"/>
|
|
9399
|
+
<fo:page-number-citation ref-id="{@target}"/>
|
|
9400
|
+
</fo:inline>
|
|
9401
|
+
</fo:basic-link>
|
|
9402
|
+
</xsl:with-param>
|
|
9403
|
+
</xsl:call-template>
|
|
9404
|
+
</xsl:template>
|
|
9267
9405
|
|
|
9268
9406
|
<!-- command between two xref points to non-standard bibitem -->
|
|
9269
9407
|
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']]]"><xsl:value-of select="."/>
|
|
@@ -11809,6 +11947,10 @@
|
|
|
11809
11947
|
</fo:list-item>
|
|
11810
11948
|
</xsl:template>
|
|
11811
11949
|
|
|
11950
|
+
<xsl:template match="mn:fmt-ol | mn:fmt-ul">
|
|
11951
|
+
<xsl:apply-templates/>
|
|
11952
|
+
</xsl:template>
|
|
11953
|
+
|
|
11812
11954
|
<!-- ===================================== -->
|
|
11813
11955
|
<!-- END Lists processing -->
|
|
11814
11956
|
<!-- ===================================== -->
|
|
@@ -12592,10 +12734,22 @@
|
|
|
12592
12734
|
<!-- End Highlight syntax styles -->
|
|
12593
12735
|
|
|
12594
12736
|
<!-- Index section styles -->
|
|
12737
|
+
|
|
12738
|
+
<xsl:attribute-set name="indexsect-region-body-style">
|
|
12739
|
+
<xsl:attribute name="column-count">2</xsl:attribute>
|
|
12740
|
+
<xsl:attribute name="column-gap">10mm</xsl:attribute>
|
|
12741
|
+
</xsl:attribute-set>
|
|
12742
|
+
|
|
12743
|
+
<xsl:attribute-set name="indexsect-title-block-style">
|
|
12744
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
12745
|
+
<xsl:attribute name="span">all</xsl:attribute>
|
|
12746
|
+
</xsl:attribute-set>
|
|
12747
|
+
|
|
12595
12748
|
<xsl:attribute-set name="indexsect-title-style">
|
|
12596
12749
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
12597
12750
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
12598
|
-
<xsl:attribute name="
|
|
12751
|
+
<xsl:attribute name="margin-bottom">24pt</xsl:attribute>
|
|
12752
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
12599
12753
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
12600
12754
|
</xsl:attribute-set> <!-- indexsect-title-style -->
|
|
12601
12755
|
|
|
@@ -12622,6 +12776,27 @@
|
|
|
12622
12776
|
</xsl:for-each>
|
|
12623
12777
|
</xsl:variable>
|
|
12624
12778
|
|
|
12779
|
+
<xsl:template name="index-pages">
|
|
12780
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
12781
|
+
|
|
12782
|
+
<xsl:variable name="docid">
|
|
12783
|
+
<xsl:call-template name="getDocumentId"/>
|
|
12784
|
+
</xsl:variable>
|
|
12785
|
+
|
|
12786
|
+
<xsl:variable name="current_document_index_id">
|
|
12787
|
+
<xsl:apply-templates select="//mn:indexsect" mode="index_add_id">
|
|
12788
|
+
<xsl:with-param name="docid" select="$docid"/>
|
|
12789
|
+
</xsl:apply-templates>
|
|
12790
|
+
</xsl:variable>
|
|
12791
|
+
<xsl:variable name="current_document_index">
|
|
12792
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
|
|
12793
|
+
</xsl:variable>
|
|
12794
|
+
|
|
12795
|
+
<xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="index">
|
|
12796
|
+
<xsl:with-param name="num" select="$num"/>
|
|
12797
|
+
</xsl:apply-templates>
|
|
12798
|
+
</xsl:template>
|
|
12799
|
+
|
|
12625
12800
|
<xsl:template match="@*|node()" mode="index_add_id">
|
|
12626
12801
|
<xsl:param name="docid"/>
|
|
12627
12802
|
<xsl:copy>
|
|
@@ -12674,7 +12849,7 @@
|
|
|
12674
12849
|
<xsl:template match="mn:indexsect//mn:li" mode="index_update">
|
|
12675
12850
|
<xsl:copy>
|
|
12676
12851
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
|
12677
|
-
|
|
12852
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
|
|
12678
12853
|
</xsl:copy>
|
|
12679
12854
|
</xsl:template>
|
|
12680
12855
|
|
|
@@ -12883,11 +13058,24 @@
|
|
|
12883
13058
|
<!-- End of Index processing -->
|
|
12884
13059
|
<!-- =================== -->
|
|
12885
13060
|
|
|
12886
|
-
|
|
13061
|
+
<xsl:attribute-set name="form-checkbox-style">
|
|
13062
|
+
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
|
13063
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
|
13064
|
+
</xsl:attribute-set>
|
|
13065
|
+
|
|
13066
|
+
<xsl:variable name="METANORMA_FORM_START_PREFIX">_metanorma_form_start</xsl:variable>
|
|
13067
|
+
<xsl:variable name="METANORMA_FORM_ITEM_PREFIX">_metanorma_form_item_</xsl:variable>
|
|
13068
|
+
<xsl:variable name="METANORMA_FORM_ITEM_BORDER">1pt solid black</xsl:variable>
|
|
13069
|
+
|
|
13070
|
+
<!-- =================== -->
|
|
12887
13071
|
<!-- Form's elements processing -->
|
|
12888
13072
|
<!-- =================== -->
|
|
12889
13073
|
<xsl:template match="mn:form">
|
|
12890
13074
|
<fo:block>
|
|
13075
|
+
<fo:inline>
|
|
13076
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_START_PREFIX, '___', @id, '___', @name)"/></xsl:attribute>
|
|
13077
|
+
<xsl:value-of select="$hair_space"/>
|
|
13078
|
+
</fo:inline>
|
|
12891
13079
|
<xsl:apply-templates/>
|
|
12892
13080
|
</fo:block>
|
|
12893
13081
|
</xsl:template>
|
|
@@ -12896,7 +13084,23 @@
|
|
|
12896
13084
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
12897
13085
|
</xsl:template>
|
|
12898
13086
|
|
|
12899
|
-
<xsl:template match="mn:form//mn:input[@type = 'text'
|
|
13087
|
+
<xsl:template match="mn:form//mn:input[@type = 'text']">
|
|
13088
|
+
<!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
|
|
13089
|
+
<fo:inline>
|
|
13090
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
13091
|
+
<xsl:with-param name="add_border_prefix">true</xsl:with-param>
|
|
13092
|
+
</xsl:call-template>
|
|
13093
|
+
<xsl:value-of select="$hair_space"/>
|
|
13094
|
+
</fo:inline>
|
|
13095
|
+
<fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove, this border needs for mn2pdf FOPIFFormsHandler -->
|
|
13096
|
+
<fo:inline>
|
|
13097
|
+
<xsl:call-template name="set_id_metanorma_form_item"/>
|
|
13098
|
+
<xsl:call-template name="text_input"/>
|
|
13099
|
+
</fo:inline>
|
|
13100
|
+
</fo:inline>
|
|
13101
|
+
</xsl:template>
|
|
13102
|
+
|
|
13103
|
+
<xsl:template match="mn:form//mn:input[@type = 'date' or @type = 'file' or @type = 'password']">
|
|
12900
13104
|
<fo:inline>
|
|
12901
13105
|
<xsl:call-template name="text_input"/>
|
|
12902
13106
|
</fo:inline>
|
|
@@ -12928,7 +13132,20 @@
|
|
|
12928
13132
|
</xsl:template>
|
|
12929
13133
|
|
|
12930
13134
|
<xsl:template match="mn:form//mn:input[@type = 'checkbox']">
|
|
12931
|
-
<
|
|
13135
|
+
<xsl:variable name="form_item_type">checkbox</xsl:variable>
|
|
13136
|
+
<!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
|
|
13137
|
+
<fo:inline>
|
|
13138
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
13139
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
13140
|
+
<xsl:with-param name="add_border_prefix">true</xsl:with-param>
|
|
13141
|
+
</xsl:call-template>
|
|
13142
|
+
<xsl:value-of select="$hair_space"/>
|
|
13143
|
+
</fo:inline>
|
|
13144
|
+
|
|
13145
|
+
<fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
|
|
13146
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
13147
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
13148
|
+
</xsl:call-template>
|
|
12932
13149
|
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
|
12933
13150
|
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
|
12934
13151
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
@@ -12938,11 +13155,24 @@
|
|
|
12938
13155
|
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
|
12939
13156
|
</svg>
|
|
12940
13157
|
</fo:instream-foreign-object>
|
|
12941
|
-
</fo:inline>
|
|
13158
|
+
</fo:inline><fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
|
12942
13159
|
</xsl:template>
|
|
12943
13160
|
|
|
12944
13161
|
<xsl:template match="mn:form//mn:input[@type = 'radio']">
|
|
12945
|
-
<
|
|
13162
|
+
<xsl:variable name="form_item_type">radiobutton</xsl:variable>
|
|
13163
|
+
<!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
|
|
13164
|
+
<fo:inline>
|
|
13165
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
13166
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
13167
|
+
<xsl:with-param name="add_border_prefix">true</xsl:with-param>
|
|
13168
|
+
</xsl:call-template>
|
|
13169
|
+
<xsl:value-of select="$hair_space"/>
|
|
13170
|
+
</fo:inline>
|
|
13171
|
+
|
|
13172
|
+
<fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
|
|
13173
|
+
<xsl:call-template name="set_id_metanorma_form_item">
|
|
13174
|
+
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
13175
|
+
</xsl:call-template>
|
|
12946
13176
|
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
|
12947
13177
|
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
|
12948
13178
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
@@ -12954,6 +13184,7 @@
|
|
|
12954
13184
|
</svg>
|
|
12955
13185
|
</fo:instream-foreign-object>
|
|
12956
13186
|
</fo:inline>
|
|
13187
|
+
<fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
|
12957
13188
|
</xsl:template>
|
|
12958
13189
|
|
|
12959
13190
|
<xsl:template match="mn:form//mn:select">
|
|
@@ -12963,11 +13194,28 @@
|
|
|
12963
13194
|
</xsl:template>
|
|
12964
13195
|
|
|
12965
13196
|
<xsl:template match="mn:form//mn:textarea">
|
|
12966
|
-
<fo:block-container border="
|
|
13197
|
+
<fo:block-container border="{$METANORMA_FORM_ITEM_BORDER}" width="50%">
|
|
12967
13198
|
<fo:block> </fo:block>
|
|
12968
13199
|
</fo:block-container>
|
|
12969
13200
|
</xsl:template>
|
|
12970
13201
|
|
|
13202
|
+
<xsl:template name="set_id_metanorma_form_item">
|
|
13203
|
+
<xsl:param name="form_item_type">textfield</xsl:param>
|
|
13204
|
+
<xsl:param name="add_border_prefix">false</xsl:param>
|
|
13205
|
+
<xsl:variable name="border_prefix"><xsl:if test="normalize-space($add_border_prefix) = 'true'">border_</xsl:if></xsl:variable>
|
|
13206
|
+
<xsl:if test="@id">
|
|
13207
|
+
<!-- _metanorma_form_item_border____form_item_type___id___name___value -->
|
|
13208
|
+
<!-- split by '___': [2] - form_item_type, [3] - id, [4] - name, [5] - value -->
|
|
13209
|
+
<xsl:variable name="value">
|
|
13210
|
+
<xsl:choose>
|
|
13211
|
+
<xsl:when test="@type = 'checkbox'"><xsl:value-of select="normalize-space(@checked = 'true')"/><!-- true or false --></xsl:when>
|
|
13212
|
+
<xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise>
|
|
13213
|
+
</xsl:choose>
|
|
13214
|
+
</xsl:variable>
|
|
13215
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_ITEM_PREFIX, $border_prefix, '___', $form_item_type, '___', @id, '___', @name, '___', $value)"/></xsl:attribute>
|
|
13216
|
+
</xsl:if>
|
|
13217
|
+
</xsl:template>
|
|
13218
|
+
|
|
12971
13219
|
<!-- =================== -->
|
|
12972
13220
|
<!-- End Form's elements processing -->
|
|
12973
13221
|
<!-- =================== -->
|
|
@@ -12977,6 +13225,7 @@
|
|
|
12977
13225
|
</xsl:attribute-set>
|
|
12978
13226
|
|
|
12979
13227
|
<xsl:template name="refine_toc-style">
|
|
13228
|
+
<xsl:copy-of select="@id"/>
|
|
12980
13229
|
<xsl:if test="$doctype = 'technical-report'">
|
|
12981
13230
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
12982
13231
|
<xsl:attribute name="line-height">1.2</xsl:attribute>
|
|
@@ -13017,6 +13266,7 @@
|
|
|
13017
13266
|
</xsl:template>
|
|
13018
13267
|
|
|
13019
13268
|
<xsl:attribute-set name="toc-pagenumber-style">
|
|
13269
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
13020
13270
|
</xsl:attribute-set>
|
|
13021
13271
|
|
|
13022
13272
|
<xsl:template name="refine_toc-pagenumber-style">
|
|
@@ -13044,13 +13294,13 @@
|
|
|
13044
13294
|
|
|
13045
13295
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
13046
13296
|
<xsl:variable name="nodes_preface_">
|
|
13047
|
-
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc'
|
|
13297
|
+
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
|
|
13048
13298
|
<node id="{@id}"/>
|
|
13049
13299
|
</xsl:for-each>
|
|
13050
13300
|
</xsl:variable>
|
|
13051
13301
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
|
13052
13302
|
|
|
13053
|
-
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc'
|
|
13303
|
+
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
|
|
13054
13304
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
13055
13305
|
|
|
13056
13306
|
<!-- process Section's title -->
|
|
@@ -13063,6 +13313,23 @@
|
|
|
13063
13313
|
</xsl:for-each>
|
|
13064
13314
|
</xsl:template>
|
|
13065
13315
|
|
|
13316
|
+
<xsl:template match="*[@type = 'toc'][mn:title or mn:fmt-title]" mode="contents" priority="2">
|
|
13317
|
+
<xsl:variable name="title">
|
|
13318
|
+
<xsl:call-template name="getName"/>
|
|
13319
|
+
</xsl:variable>
|
|
13320
|
+
<xsl:variable name="root">
|
|
13321
|
+
<xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
|
|
13322
|
+
<xsl:if test="ancestor-or-self::mn:annex">annex</xsl:if>
|
|
13323
|
+
</xsl:variable>
|
|
13324
|
+
<mnx:item id="{@id}" level="1" section="" type="toc" root="{$root}" display="false">
|
|
13325
|
+
<mnx:title>
|
|
13326
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
|
|
13327
|
+
<xsl:with-param name="element" select="$root"/>
|
|
13328
|
+
</xsl:apply-templates>
|
|
13329
|
+
</mnx:title>
|
|
13330
|
+
</mnx:item>
|
|
13331
|
+
</xsl:template>
|
|
13332
|
+
|
|
13066
13333
|
<xsl:template name="processMainSectionsDefault_Contents">
|
|
13067
13334
|
|
|
13068
13335
|
<xsl:variable name="nodes_sections_">
|
|
@@ -14996,11 +15263,17 @@
|
|
|
14996
15263
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
|
14997
15264
|
<xsl:template name="insert_basic_link">
|
|
14998
15265
|
<xsl:param name="element"/>
|
|
15266
|
+
<xsl:param name="wrapper">true</xsl:param>
|
|
14999
15267
|
<xsl:variable name="element_node" select="xalan:nodeset($element)"/>
|
|
15000
15268
|
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
|
15001
15269
|
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
|
15002
15270
|
<xsl:choose>
|
|
15003
|
-
<xsl:when test="$
|
|
15271
|
+
<xsl:when test="$internal-destination = 'true' and $wrapper = 'true'">
|
|
15272
|
+
<fo:wrapper role="Reference">
|
|
15273
|
+
<xsl:copy-of select="$element_node"/>
|
|
15274
|
+
</fo:wrapper>
|
|
15275
|
+
</xsl:when>
|
|
15276
|
+
<xsl:when test="$internal-destination = 'true' or $external-destination = 'true'">
|
|
15004
15277
|
<xsl:copy-of select="$element_node"/>
|
|
15005
15278
|
</xsl:when>
|
|
15006
15279
|
<xsl:otherwise>
|
|
@@ -208,11 +208,15 @@ Applicable to modify and delete</a:documentation>
|
|
|
208
208
|
</zeroOrMore>
|
|
209
209
|
<optional>
|
|
210
210
|
<element name="newcontent">
|
|
211
|
-
<a:documentation>New content to be added to the document; applicable to add and modify
|
|
211
|
+
<a:documentation>New content to be added to the document; applicable to add and modify.
|
|
212
|
+
Can be blocks and/or sections</a:documentation>
|
|
212
213
|
<ref name="OptionalId"/>
|
|
213
214
|
<zeroOrMore>
|
|
214
215
|
<ref name="BasicBlock"/>
|
|
215
216
|
</zeroOrMore>
|
|
217
|
+
<zeroOrMore>
|
|
218
|
+
<ref name="section"/>
|
|
219
|
+
</zeroOrMore>
|
|
216
220
|
</element>
|
|
217
221
|
</optional>
|
|
218
222
|
<zeroOrMore>
|
|
@@ -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>
|
|
@@ -2,7 +2,11 @@ module Metanorma
|
|
|
2
2
|
module Plateau
|
|
3
3
|
# after term def processed, process source after paragraphs so that
|
|
4
4
|
# the moving of paragraphs there does not include termdef
|
|
5
|
-
class
|
|
5
|
+
class Cleanup < Jis::Cleanup
|
|
6
|
+
def boilerplate_file(_x_orig)
|
|
7
|
+
nil
|
|
8
|
+
end
|
|
9
|
+
|
|
6
10
|
def termdef_cleanup(xmldoc)
|
|
7
11
|
super
|
|
8
12
|
xmldoc.xpath("//source").each do |s|
|
|
@@ -22,7 +26,8 @@ module Metanorma
|
|
|
22
26
|
def boilerplate_cleanup(xmldoc)
|
|
23
27
|
super
|
|
24
28
|
conv = boilerplate_isodoc(xmldoc) or return
|
|
25
|
-
c = process_boilerplate_file(File.join(@libdir, "colophon.adoc"),
|
|
29
|
+
c = process_boilerplate_file(File.join(@libdir, "colophon.adoc"),
|
|
30
|
+
conv)
|
|
26
31
|
xmldoc.root << "<colophon>#{c.children.first.to_xml}</colophon>"
|
|
27
32
|
end
|
|
28
33
|
end
|
|
@@ -10,10 +10,6 @@ module Metanorma
|
|
|
10
10
|
"ogc"
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
def schema_file
|
|
14
|
-
"plateau.rng"
|
|
15
|
-
end
|
|
16
|
-
|
|
17
13
|
def org_abbrev
|
|
18
14
|
super.merge(pub_hash["en"] => "MLIT")
|
|
19
15
|
end
|
|
@@ -22,11 +18,7 @@ module Metanorma
|
|
|
22
18
|
"MLIT"
|
|
23
19
|
end
|
|
24
20
|
|
|
25
|
-
def
|
|
26
|
-
nil
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def init_misc(node)
|
|
21
|
+
def init_metadata(node)
|
|
30
22
|
super
|
|
31
23
|
@default_doctype = "technical-report"
|
|
32
24
|
end
|
|
@@ -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
|
data/lib/metanorma-plateau.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
require "asciidoctor" unless defined? Asciidoctor::Converter
|
|
2
2
|
require_relative "metanorma/plateau/converter"
|
|
3
|
+
require_relative "metanorma/plateau/cleanup"
|
|
4
|
+
require_relative "metanorma/plateau/validate"
|
|
3
5
|
require_relative "metanorma/plateau/version"
|
|
4
6
|
require "isodoc/plateau/html_convert"
|
|
5
7
|
require "isodoc/plateau/pdf_convert"
|
data/metanorma-plateau.gemspec
CHANGED
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
|
31
31
|
|
|
32
|
-
spec.add_dependency "metanorma-jis", "~> 1.0.
|
|
32
|
+
spec.add_dependency "metanorma-jis", "~> 1.0.4"
|
|
33
33
|
spec.add_dependency "pubid"
|
|
34
34
|
|
|
35
35
|
spec.add_development_dependency "debug"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-plateau
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.7
|
|
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-
|
|
11
|
+
date: 2026-03-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-jis
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 1.0.
|
|
19
|
+
version: 1.0.4
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 1.0.
|
|
26
|
+
version: 1.0.4
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: pubid
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -291,6 +291,7 @@ files:
|
|
|
291
291
|
- lib/metanorma/plateau/processor.rb
|
|
292
292
|
- lib/metanorma/plateau/relaton-jis.rng
|
|
293
293
|
- lib/metanorma/plateau/reqt.rng
|
|
294
|
+
- lib/metanorma/plateau/validate.rb
|
|
294
295
|
- lib/metanorma/plateau/version.rb
|
|
295
296
|
- lib/relaton/render-plateau/citations.rb
|
|
296
297
|
- lib/relaton/render-plateau/config-en.yml
|