metanorma-plateau 0.1.16 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/plateau/plateau.international-standard.xsl +362 -73
- data/lib/metanorma/plateau/isodoc.rng +12 -6
- data/lib/metanorma/plateau/isostandard.rng +30 -33
- data/lib/metanorma/plateau/jis.rng +33 -36
- data/lib/metanorma/plateau/plateau.rng +34 -38
- data/lib/metanorma/plateau/version.rb +1 -1
- data/metanorma-plateau.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc057d7f63ba85f003ce8745ea7016e53cf8eb341e291a03b70571c0eb4ba35f
|
4
|
+
data.tar.gz: d7440561640e70e239ee0efb56dc16e56a7f1a124a9795e8d36f9e2adff2b8d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b2672a0a31db4d891a0a63baa410f5e58218e7ab779ce5126acdb3d69a9f6368ff694dbfa0ccb295969d86013bf7ec8f3d10de8ea974435f844a7cb819d12d6
|
7
|
+
data.tar.gz: a4d13b8dda0e125b14e0f963862f40fb8537f6d8278531bc2a9f315abd485bbbdf69142d2cf307aaf833e4ef02778c94332ad9976270433b33cc3ed95b5677ca
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:plateau="https://www.metanorma.org/ns/
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:plateau="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" xmlns:jeuclid="http://jeuclid.sf.net/ns/ext" xmlns:barcode="http://barcode4j.krysalis.org/ns" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
|
2
2
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
<!-- <xsl:variable name="isIgnoreComplexScripts">true</xsl:variable> -->
|
10
10
|
|
11
|
-
<xsl:variable name="doctype" select="//plateau:
|
11
|
+
<xsl:variable name="doctype" select="//plateau:metanorma[1]/plateau:bibdata/plateau:ext/plateau:doctype[@language = '' or not(@language)]"/>
|
12
12
|
|
13
13
|
<xsl:variable name="i18n_doctype_dict_annex"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">doctype_dict.annex</xsl:with-param></xsl:call-template></xsl:variable>
|
14
14
|
<xsl:variable name="i18n_doctype_dict_technical_report"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">doctype_dict.technical-report</xsl:with-param></xsl:call-template></xsl:variable>
|
@@ -26,14 +26,14 @@
|
|
26
26
|
</xsl:variable>
|
27
27
|
|
28
28
|
<xsl:variable name="contents_">
|
29
|
-
<xsl:variable name="bundle" select="count(//plateau:
|
29
|
+
<xsl:variable name="bundle" select="count(//plateau:metanorma) > 1"/>
|
30
30
|
|
31
31
|
<xsl:if test="normalize-space($bundle) = 'true'">
|
32
32
|
<collection firstpage_id="firstpage_id_0"/>
|
33
33
|
</xsl:if>
|
34
34
|
|
35
|
-
<xsl:for-each select="//plateau:
|
36
|
-
<xsl:variable name="num"><xsl:number level="any" count="plateau:
|
35
|
+
<xsl:for-each select="//plateau:metanorma">
|
36
|
+
<xsl:variable name="num"><xsl:number level="any" count="plateau:metanorma"/></xsl:variable>
|
37
37
|
<xsl:variable name="docnumber"><xsl:value-of select="plateau:bibdata/plateau:docidentifier[@type = 'JIS']"/></xsl:variable>
|
38
38
|
<xsl:variable name="current_document">
|
39
39
|
<xsl:copy-of select="."/>
|
@@ -214,8 +214,8 @@
|
|
214
214
|
</redirect:write>
|
215
215
|
<xsl:message>end redirect</xsl:message> -->
|
216
216
|
|
217
|
-
<xsl:for-each select="$updated_xml_step2//plateau:
|
218
|
-
<xsl:variable name="num"><xsl:number level="any" count="plateau:
|
217
|
+
<xsl:for-each select="$updated_xml_step2//plateau:metanorma">
|
218
|
+
<xsl:variable name="num"><xsl:number level="any" count="plateau:metanorma"/></xsl:variable>
|
219
219
|
|
220
220
|
<!-- <xsl:variable name="current_document">
|
221
221
|
<xsl:copy-of select="."/>
|
@@ -379,7 +379,7 @@
|
|
379
379
|
|
380
380
|
</xsl:for-each>
|
381
381
|
|
382
|
-
<xsl:if test="not(//plateau:
|
382
|
+
<xsl:if test="not(//plateau:metanorma)">
|
383
383
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
384
384
|
<fo:flow flow-name="xsl-region-body">
|
385
385
|
<fo:block><!-- prevent fop error for empty document --></fo:block>
|
@@ -1490,7 +1490,7 @@
|
|
1490
1490
|
<xsl:param name="structured_xml"/>
|
1491
1491
|
<xsl:choose>
|
1492
1492
|
<xsl:when test="not(xalan:nodeset($structured_xml)/*[local-name()='pagebreak'])">
|
1493
|
-
<xsl:element name="page" namespace="
|
1493
|
+
<xsl:element name="page" namespace="{$namespace_full}">
|
1494
1494
|
<xsl:copy-of select="xalan:nodeset($structured_xml)"/>
|
1495
1495
|
</xsl:element>
|
1496
1496
|
</xsl:when>
|
@@ -1500,7 +1500,7 @@
|
|
1500
1500
|
<xsl:variable name="pagebreak_id" select="generate-id()"/>
|
1501
1501
|
|
1502
1502
|
<!-- copy elements before pagebreak -->
|
1503
|
-
<xsl:element name="page" namespace="
|
1503
|
+
<xsl:element name="page" namespace="{$namespace_full}">
|
1504
1504
|
<xsl:if test="not(preceding-sibling::plateau:pagebreak)">
|
1505
1505
|
<xsl:copy-of select="../@*"/>
|
1506
1506
|
</xsl:if>
|
@@ -1512,7 +1512,7 @@
|
|
1512
1512
|
|
1513
1513
|
<!-- copy elements after last page break -->
|
1514
1514
|
<xsl:if test="position() = last() and following-sibling::node()">
|
1515
|
-
<xsl:element name="page" namespace="
|
1515
|
+
<xsl:element name="page" namespace="{$namespace_full}">
|
1516
1516
|
<xsl:copy-of select="@orientation"/>
|
1517
1517
|
<xsl:copy-of select="following-sibling::node()"/>
|
1518
1518
|
</xsl:element>
|
@@ -1567,7 +1567,7 @@
|
|
1567
1567
|
<!-- plateau:term/plateau:preferred2//text() | -->
|
1568
1568
|
|
1569
1569
|
<!-- <name>注記 1</name> to <name>注記<font_en> 1</font_en></name> -->
|
1570
|
-
<xsl:template match="plateau:title/text() | plateau:note/plateau:name/text() | plateau:termnote/plateau:name/text() | plateau:table/plateau:name/text() | plateau:figure/plateau:name/text() | plateau:termexample/plateau:name/text() | plateau:xref//text() | plateau:origin/text()" mode="update_xml_step1">
|
1570
|
+
<xsl:template match="plateau:title/text() | plateau:fmt-title/text() | plateau:note/plateau:name/text() | plateau:note/plateau:fmt-name/text() | plateau:termnote/plateau:name/text() | plateau:termnote/plateau:fmt-name/text() | plateau:table/plateau:name/text() | plateau:table/plateau:fmt-name/text() | plateau:figure/plateau:name/text() | plateau:figure/plateau:fmt-name/text() | plateau:termexample/plateau:name/text() | plateau:termexample/plateau:fmt-name/text() | plateau:xref//text() | plateau:fmt-xref//text() | plateau:origin/text() | plateau:fmt-origin/text()" mode="update_xml_step1">
|
1571
1571
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
|
1572
1572
|
<xsl:variable name="text_en">
|
1573
1573
|
<xsl:element name="text" namespace="{$namespace_full}">
|
@@ -1598,22 +1598,43 @@
|
|
1598
1598
|
</xsl:template>
|
1599
1599
|
|
1600
1600
|
<!-- move example title to the first paragraph -->
|
1601
|
-
|
1601
|
+
<!-- Example:
|
1602
|
+
<example id="_7569d639-c245-acb6-2141-3b746374a9e1" autonum="1">
|
1603
|
+
<name id="_8eac959b-b129-4892-b8bb-fcca2914bd39">(可能性の例)</name>
|
1604
|
+
<fmt-name>
|
1605
|
+
<span class="fmt-caption-label">
|
1606
|
+
<span class="fmt-element-name">例</span>
|
1607
|
+
<semx element="autonum" source="_7569d639-c245-acb6-2141-3b746374a9e1">1</semx>
|
1608
|
+
</span>
|
1609
|
+
<span class="fmt-caption-delim"> — </span>
|
1610
|
+
<semx element="name" source="_8eac959b-b129-4892-b8bb-fcca2914bd39">(可能性の例)</semx>
|
1611
|
+
</fmt-name>
|
1612
|
+
-->
|
1613
|
+
<!-- <xsl:template match="plateau:example[contains(plateau:name/text(), ' — ')]" mode="update_xml_step1"> -->
|
1614
|
+
<xsl:template match="plateau:example[plateau:fmt-name[contains(plateau:span/text(), ' — ')]]" mode="update_xml_step1">
|
1602
1615
|
<xsl:copy>
|
1603
1616
|
<xsl:copy-of select="@*"/>
|
1604
|
-
<xsl:element name="p" namespace="
|
1605
|
-
<xsl:value-of select="substring-after(plateau:name/text(), ' — ')"/>
|
1617
|
+
<xsl:element name="p" namespace="{$namespace_full}">
|
1618
|
+
<!-- <xsl:value-of select="substring-after(plateau:name/text(), ' — ')"/> -->
|
1619
|
+
<xsl:apply-templates select="plateau:fmt-name/plateau:span[contains(., ' — ')][1]/following-sibling::node()" mode="update_xml_step1"/>
|
1606
1620
|
</xsl:element>
|
1607
1621
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1608
1622
|
</xsl:copy>
|
1609
1623
|
</xsl:template>
|
1624
|
+
<xsl:template match="plateau:example/plateau:fmt-name[contains(plateau:span/text(), ' — ')]" mode="update_xml_step1" priority="2">
|
1625
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
1626
|
+
<xsl:copy-of select="@*"/>
|
1627
|
+
<xsl:apply-templates select="*[1]" mode="update_xml_step1"/>
|
1628
|
+
</xsl:element>
|
1629
|
+
</xsl:template>
|
1610
1630
|
<xsl:template match="plateau:example/plateau:name/text()" mode="update_xml_step1">
|
1611
|
-
<xsl:variable name="example_name"
|
1631
|
+
<xsl:variable name="example_name" select="."/>
|
1632
|
+
<!--
|
1612
1633
|
<xsl:choose>
|
1613
1634
|
<xsl:when test="contains(., ' — ')"><xsl:value-of select="substring-before(., ' — ')"/></xsl:when>
|
1614
1635
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
1615
1636
|
</xsl:choose>
|
1616
|
-
</xsl:variable>
|
1637
|
+
</xsl:variable> -->
|
1617
1638
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new($example_name), $regex_en, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
|
1618
1639
|
<xsl:variable name="text_en">
|
1619
1640
|
<xsl:element name="text" namespace="{$namespace_full}">
|
@@ -1942,21 +1963,21 @@
|
|
1942
1963
|
|
1943
1964
|
<xsl:variable name="namespace_full_">
|
1944
1965
|
<xsl:choose>
|
1945
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[
|
1946
|
-
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/
|
1966
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
1967
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
|
1947
1968
|
</xsl:choose>
|
1948
1969
|
</xsl:variable>
|
1949
1970
|
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
1950
1971
|
|
1951
1972
|
<xsl:variable name="root_element_">
|
1952
1973
|
<xsl:choose>
|
1953
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[
|
1954
|
-
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
1974
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
1975
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
|
1955
1976
|
</xsl:choose>
|
1956
1977
|
</xsl:variable>
|
1957
1978
|
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
1958
1979
|
|
1959
|
-
<xsl:variable name="document_scheme" select="normalize-space(//*[
|
1980
|
+
<xsl:variable name="document_scheme" select="normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
|
1960
1981
|
|
1961
1982
|
<!-- external parameters -->
|
1962
1983
|
|
@@ -2057,7 +2078,7 @@
|
|
2057
2078
|
</metanorma-extension>
|
2058
2079
|
-->
|
2059
2080
|
|
2060
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[
|
2081
|
+
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
|
2061
2082
|
<xsl:variable name="papersize_width_">
|
2062
2083
|
<xsl:choose>
|
2063
2084
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -2139,7 +2160,7 @@
|
|
2139
2160
|
<xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
|
2140
2161
|
|
2141
2162
|
<xsl:variable name="layout_columns_default">1</xsl:variable>
|
2142
|
-
<xsl:variable name="layout_columns_" select="normalize-space((//*[
|
2163
|
+
<xsl:variable name="layout_columns_" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
|
2143
2164
|
<xsl:variable name="layout_columns">
|
2144
2165
|
<xsl:choose>
|
2145
2166
|
<xsl:when test="$layout_columns_ != ''"><xsl:value-of select="$layout_columns_"/></xsl:when>
|
@@ -2200,7 +2221,7 @@
|
|
2200
2221
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
2201
2222
|
|
2202
2223
|
<xsl:variable name="title-list-tables">
|
2203
|
-
<xsl:variable name="toc_table_title" select="//*[
|
2224
|
+
<xsl:variable name="toc_table_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
2204
2225
|
<xsl:value-of select="$toc_table_title"/>
|
2205
2226
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
2206
2227
|
<xsl:call-template name="getLocalizedString">
|
@@ -2210,7 +2231,7 @@
|
|
2210
2231
|
</xsl:variable>
|
2211
2232
|
|
2212
2233
|
<xsl:variable name="title-list-figures">
|
2213
|
-
<xsl:variable name="toc_figure_title" select="//*[
|
2234
|
+
<xsl:variable name="toc_figure_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
2214
2235
|
<xsl:value-of select="$toc_figure_title"/>
|
2215
2236
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
2216
2237
|
<xsl:call-template name="getLocalizedString">
|
@@ -2220,7 +2241,7 @@
|
|
2220
2241
|
</xsl:variable>
|
2221
2242
|
|
2222
2243
|
<xsl:variable name="title-list-recommendations">
|
2223
|
-
<xsl:variable name="toc_requirement_title" select="//*[
|
2244
|
+
<xsl:variable name="toc_requirement_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
2224
2245
|
<xsl:value-of select="$toc_requirement_title"/>
|
2225
2246
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
2226
2247
|
<xsl:call-template name="getLocalizedString">
|
@@ -2230,8 +2251,8 @@
|
|
2230
2251
|
</xsl:variable>
|
2231
2252
|
|
2232
2253
|
<xsl:variable name="bibdata">
|
2233
|
-
<xsl:copy-of select="//*[
|
2234
|
-
<xsl:copy-of select="//*[
|
2254
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']"/>
|
2255
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'localized-strings']"/>
|
2235
2256
|
</xsl:variable>
|
2236
2257
|
|
2237
2258
|
<!-- Characters -->
|
@@ -2296,7 +2317,7 @@
|
|
2296
2317
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
2297
2318
|
|
2298
2319
|
<xsl:variable name="additional_fonts_">
|
2299
|
-
<xsl:for-each select="//*[
|
2320
|
+
<xsl:for-each select="//*[local-name() = 'metanorma'][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[local-name() = 'metanorma'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
2300
2321
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
2301
2322
|
</xsl:for-each>
|
2302
2323
|
</xsl:variable>
|
@@ -3585,10 +3606,10 @@
|
|
3585
3606
|
|
3586
3607
|
<xsl:template name="processTablesFigures_Contents">
|
3587
3608
|
<xsl:param name="always"/>
|
3588
|
-
<xsl:if test="(//*[
|
3609
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3589
3610
|
<xsl:call-template name="processTables_Contents"/>
|
3590
3611
|
</xsl:if>
|
3591
|
-
<xsl:if test="(//*[
|
3612
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3592
3613
|
<xsl:call-template name="processFigures_Contents"/>
|
3593
3614
|
</xsl:if>
|
3594
3615
|
</xsl:template>
|
@@ -3668,7 +3689,7 @@
|
|
3668
3689
|
</xsl:template><!-- END: processMainSectionsDefault -->
|
3669
3690
|
|
3670
3691
|
<!-- Example:
|
3671
|
-
<
|
3692
|
+
<metanorma>
|
3672
3693
|
<preface>
|
3673
3694
|
<page_sequence>
|
3674
3695
|
<clause...
|
@@ -3691,7 +3712,7 @@
|
|
3691
3712
|
<page_sequence>
|
3692
3713
|
<annex ..
|
3693
3714
|
</page_sequence>
|
3694
|
-
</
|
3715
|
+
</metanorma>
|
3695
3716
|
-->
|
3696
3717
|
<xsl:template name="processPrefaceAndMainSectionsDefault_items">
|
3697
3718
|
|
@@ -3734,15 +3755,8 @@
|
|
3734
3755
|
</xsl:template> <!-- END: insertPrefaceSectionsPageSequences -->
|
3735
3756
|
|
3736
3757
|
<xsl:template name="insertMainSectionsPageSequences">
|
3737
|
-
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
3738
|
-
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3739
|
-
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3740
|
-
<xsl:sort select="@displayorder" data-type="number"/>
|
3741
|
-
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
3742
3758
|
|
3743
|
-
|
3744
|
-
</xsl:element>
|
3745
|
-
</xsl:element>
|
3759
|
+
<xsl:call-template name="insertSectionsInPageSequence"/>
|
3746
3760
|
|
3747
3761
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3748
3762
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
@@ -3761,6 +3775,18 @@
|
|
3761
3775
|
</xsl:element>
|
3762
3776
|
</xsl:template> <!-- END: insertMainSectionsPageSequences -->
|
3763
3777
|
|
3778
|
+
<xsl:template name="insertSectionsInPageSequence">
|
3779
|
+
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
3780
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3781
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3782
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3783
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
3784
|
+
|
3785
|
+
</xsl:for-each>
|
3786
|
+
</xsl:element>
|
3787
|
+
</xsl:element>
|
3788
|
+
</xsl:template>
|
3789
|
+
|
3764
3790
|
<xsl:template name="insertMainSectionsInSeparatePageSequences">
|
3765
3791
|
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
3766
3792
|
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
@@ -5274,7 +5300,7 @@
|
|
5274
5300
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
5275
5301
|
|
5276
5302
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
5277
|
-
<xsl:variable name="lang" select="ancestor::*[
|
5303
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
5278
5304
|
<xsl:variable name="reference_">
|
5279
5305
|
<xsl:value-of select="@reference"/>
|
5280
5306
|
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
@@ -5395,13 +5421,13 @@
|
|
5395
5421
|
footnotes in bibliography
|
5396
5422
|
footnotes in document's body (except table's head/body/foot and figure text)
|
5397
5423
|
-->
|
5398
|
-
<xsl:for-each select="ancestor::*[
|
5424
|
+
<xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
5399
5425
|
<fn gen_id="{generate-id(.)}">
|
5400
5426
|
<xsl:copy-of select="@*"/>
|
5401
5427
|
<xsl:copy-of select="node()"/>
|
5402
5428
|
</fn>
|
5403
5429
|
</xsl:for-each>
|
5404
|
-
<xsl:for-each select="ancestor::*[
|
5430
|
+
<xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name()='boilerplate']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='preface']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='sections']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='annex'] | ancestor::*[local-name() = 'metanorma']//*[local-name()='bibliography']/*">
|
5405
5431
|
<xsl:sort select="@displayorder" data-type="number"/>
|
5406
5432
|
<!-- commented:
|
5407
5433
|
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
@@ -7766,6 +7792,8 @@
|
|
7766
7792
|
<!-- ======================================= -->
|
7767
7793
|
<!-- math -->
|
7768
7794
|
<!-- ======================================= -->
|
7795
|
+
<xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
|
7796
|
+
|
7769
7797
|
<xsl:template match="mathml:math">
|
7770
7798
|
<xsl:variable name="isAdded" select="@added"/>
|
7771
7799
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -8125,10 +8153,10 @@
|
|
8125
8153
|
<xsl:template match="*[local-name()='localityStack']"/>
|
8126
8154
|
|
8127
8155
|
<xsl:variable name="pdfAttachmentsList_">
|
8128
|
-
<xsl:for-each select="//*[
|
8156
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
8129
8157
|
<attachment filename="{@name}"/>
|
8130
8158
|
</xsl:for-each>
|
8131
|
-
<xsl:if test="not(//*[
|
8159
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
8132
8160
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
8133
8161
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
8134
8162
|
<attachment filename="{$attachment_path}"/>
|
@@ -9594,7 +9622,9 @@
|
|
9594
9622
|
<xsl:apply-templates mode="bookmarks"/>
|
9595
9623
|
</xsl:template>
|
9596
9624
|
|
9597
|
-
<xsl:template match="*[local-name() = '
|
9625
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents"/>
|
9626
|
+
|
9627
|
+
<xsl:template match="*[local-name() = 'title' or local-name() = 'name' or local-name() = 'fmt-title' or local-name() = 'fmt-name']//*[local-name() = 'fmt-stem']" mode="contents">
|
9598
9628
|
<xsl:apply-templates select="."/>
|
9599
9629
|
</xsl:template>
|
9600
9630
|
|
@@ -9611,7 +9641,15 @@
|
|
9611
9641
|
<xsl:apply-templates mode="contents"/>
|
9612
9642
|
</xsl:template>
|
9613
9643
|
|
9614
|
-
<xsl:template match="*[local-name() = '
|
9644
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents"/>
|
9645
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents"/>
|
9646
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents"/>
|
9647
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents"/>
|
9648
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
9649
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
9650
|
+
|
9651
|
+
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
9652
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
9615
9653
|
<xsl:apply-templates mode="bookmarks"/>
|
9616
9654
|
</xsl:template>
|
9617
9655
|
|
@@ -9624,6 +9662,13 @@
|
|
9624
9662
|
<xsl:apply-templates mode="bookmarks"/>
|
9625
9663
|
</xsl:template>
|
9626
9664
|
|
9665
|
+
<xsl:template match="*[local-name() = 'concept']" mode="bookmarks"/>
|
9666
|
+
<xsl:template match="*[local-name() = 'eref']" mode="bookmarks"/>
|
9667
|
+
<xsl:template match="*[local-name() = 'xref']" mode="bookmarks"/>
|
9668
|
+
<xsl:template match="*[local-name() = 'link']" mode="bookmarks"/>
|
9669
|
+
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
9670
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
9671
|
+
|
9627
9672
|
<!-- Bookmarks -->
|
9628
9673
|
<xsl:template name="addBookmarks">
|
9629
9674
|
<xsl:param name="contents"/>
|
@@ -9908,6 +9953,13 @@
|
|
9908
9953
|
|
9909
9954
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
|
9910
9955
|
|
9956
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents_item"/>
|
9957
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents_item"/>
|
9958
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents_item"/>
|
9959
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents_item"/>
|
9960
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents_item"/>
|
9961
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents_item"/>
|
9962
|
+
|
9911
9963
|
<xsl:template name="getSection">
|
9912
9964
|
<xsl:choose>
|
9913
9965
|
<xsl:when test="*[local-name() = 'fmt-title']">
|
@@ -10027,7 +10079,8 @@
|
|
10027
10079
|
</xsl:copy>
|
10028
10080
|
</xsl:template>
|
10029
10081
|
|
10030
|
-
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"
|
10082
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"/>
|
10083
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="contents_item">
|
10031
10084
|
<xsl:copy-of select="."/>
|
10032
10085
|
</xsl:template>
|
10033
10086
|
|
@@ -10091,7 +10144,7 @@
|
|
10091
10144
|
<!-- sourcecode -->
|
10092
10145
|
<!-- =============== -->
|
10093
10146
|
|
10094
|
-
<xsl:variable name="source-highlighter-css_" select="//*[
|
10147
|
+
<xsl:variable name="source-highlighter-css_" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
10095
10148
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
10096
10149
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
10097
10150
|
|
@@ -11534,7 +11587,7 @@
|
|
11534
11587
|
|
11535
11588
|
</xsl:template> <!-- sections_element_style -->
|
11536
11589
|
|
11537
|
-
<xsl:template match="//*[
|
11590
|
+
<xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
|
11538
11591
|
|
11539
11592
|
<fo:block break-after="page"/>
|
11540
11593
|
|
@@ -11638,7 +11691,7 @@
|
|
11638
11691
|
<fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
11639
11692
|
</xsl:when>
|
11640
11693
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
11641
|
-
<xsl:when test="ancestor::*[
|
11694
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
11642
11695
|
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
11643
11696
|
</xsl:when>
|
11644
11697
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
@@ -12993,7 +13046,7 @@
|
|
12993
13046
|
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
12994
13047
|
|
12995
13048
|
<!-- move section 'Normative references' inside 'sections' -->
|
12996
|
-
<xsl:for-each select="* | ancestor::*[
|
13049
|
+
<xsl:for-each select="* | ancestor::*[local-name() = 'metanorma']/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | ancestor::*[local-name() = 'metanorma']/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
12997
13050
|
<xsl:sort select="@displayorder" data-type="number"/>
|
12998
13051
|
|
12999
13052
|
<!-- process Section's title -->
|
@@ -13054,10 +13107,126 @@
|
|
13054
13107
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
13055
13108
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
|
13056
13109
|
|
13057
|
-
<xsl:template match="*[local-name() = 'stem']
|
13110
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
13111
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
13112
|
+
|
13113
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_step1">
|
13114
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
13115
|
+
<xsl:copy-of select="@*"/>
|
13116
|
+
<xsl:choose>
|
13117
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13118
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
13119
|
+
</xsl:when>
|
13120
|
+
<xsl:otherwise>
|
13121
|
+
<xsl:copy-of select="node()"/>
|
13122
|
+
</xsl:otherwise>
|
13123
|
+
</xsl:choose>
|
13124
|
+
</xsl:element>
|
13125
|
+
</xsl:template>
|
13126
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_pres">
|
13127
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
13128
|
+
<xsl:copy-of select="@*"/>
|
13129
|
+
<xsl:choose>
|
13130
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13131
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
13132
|
+
</xsl:when>
|
13133
|
+
<xsl:otherwise>
|
13134
|
+
<xsl:copy-of select="node()"/>
|
13135
|
+
</xsl:otherwise>
|
13136
|
+
</xsl:choose>
|
13137
|
+
</xsl:element>
|
13138
|
+
</xsl:template>
|
13139
|
+
|
13140
|
+
<xsl:template match="*[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
13058
13141
|
<xsl:copy-of select="."/>
|
13059
13142
|
</xsl:template>
|
13060
13143
|
|
13144
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
13145
|
+
<!-- *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] -->
|
13146
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_step1">
|
13147
|
+
<xsl:copy>
|
13148
|
+
<xsl:copy-of select="@*"/>
|
13149
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
13150
|
+
<xsl:choose>
|
13151
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
13152
|
+
<xsl:choose>
|
13153
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
13154
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
13155
|
+
</xsl:when>
|
13156
|
+
<xsl:otherwise>
|
13157
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_step1"/>
|
13158
|
+
</xsl:otherwise>
|
13159
|
+
</xsl:choose>
|
13160
|
+
</xsl:when>
|
13161
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
13162
|
+
<xsl:choose>
|
13163
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
13164
|
+
<xsl:copy-of select="node()"/>
|
13165
|
+
</xsl:when>
|
13166
|
+
<xsl:otherwise>
|
13167
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_step1"/>
|
13168
|
+
</xsl:otherwise>
|
13169
|
+
</xsl:choose>
|
13170
|
+
</xsl:otherwise>
|
13171
|
+
</xsl:choose>
|
13172
|
+
</xsl:copy>
|
13173
|
+
</xsl:template>
|
13174
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_pres">
|
13175
|
+
<xsl:copy>
|
13176
|
+
<xsl:copy-of select="@*"/>
|
13177
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
13178
|
+
<xsl:choose>
|
13179
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
13180
|
+
<xsl:choose>
|
13181
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
13182
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
13183
|
+
</xsl:when>
|
13184
|
+
<xsl:otherwise>
|
13185
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_pres"/>
|
13186
|
+
</xsl:otherwise>
|
13187
|
+
</xsl:choose>
|
13188
|
+
</xsl:when>
|
13189
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
13190
|
+
<xsl:choose>
|
13191
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
13192
|
+
<xsl:copy-of select="node()"/>
|
13193
|
+
</xsl:when>
|
13194
|
+
<xsl:otherwise>
|
13195
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_pres"/>
|
13196
|
+
</xsl:otherwise>
|
13197
|
+
</xsl:choose>
|
13198
|
+
</xsl:otherwise>
|
13199
|
+
</xsl:choose>
|
13200
|
+
</xsl:copy>
|
13201
|
+
</xsl:template>
|
13202
|
+
|
13203
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
13204
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_step1" priority="2">
|
13205
|
+
<xsl:copy>
|
13206
|
+
<xsl:copy-of select="@*"/>
|
13207
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
13208
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_step1"/>
|
13209
|
+
</xsl:copy>
|
13210
|
+
</xsl:template>
|
13211
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_pres" priority="2">
|
13212
|
+
<xsl:copy>
|
13213
|
+
<xsl:copy-of select="@*"/>
|
13214
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
13215
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_pres"/>
|
13216
|
+
</xsl:copy>
|
13217
|
+
</xsl:template>
|
13218
|
+
|
13219
|
+
<!-- https://github.com/metanorma/isodoc/issues/652 -->
|
13220
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']"/>
|
13221
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']"/>
|
13222
|
+
<xsl:template match="*[local-name() = 'amend']"/>
|
13223
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_step1"/>
|
13224
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_step1"/>
|
13225
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_pres"/>
|
13226
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
13227
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
13228
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
13229
|
+
|
13061
13230
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
13062
13231
|
<xsl:copy>
|
13063
13232
|
<xsl:copy-of select="@*"/>
|
@@ -13088,7 +13257,7 @@
|
|
13088
13257
|
<!-- add @id - first element with @id plus '_element_name' -->
|
13089
13258
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
13090
13259
|
<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>
|
13091
|
-
<xsl:variable name="document_suffix" select="ancestor::*[
|
13260
|
+
<xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
|
13092
13261
|
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
13093
13262
|
</xsl:if>
|
13094
13263
|
</xsl:template>
|
@@ -13338,6 +13507,126 @@
|
|
13338
13507
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
|
13339
13508
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
|
13340
13509
|
|
13510
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_step1">
|
13511
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13512
|
+
</xsl:template>
|
13513
|
+
|
13514
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_pres">
|
13515
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13516
|
+
</xsl:template>
|
13517
|
+
|
13518
|
+
<xsl:template match="*[local-name() = 'requirement']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'recommendation']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'permission']/*[not(starts-with(local-name(), 'fmt-'))]" mode="update_xml_step1"/>
|
13519
|
+
|
13520
|
+
<xsl:template match="*[local-name() = 'requirement']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'recommendation']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'permission']/*[not(starts-with(local-name(), 'fmt-'))]" mode="update_xml_pres"/>
|
13521
|
+
|
13522
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_step1">
|
13523
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13524
|
+
</xsl:template>
|
13525
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_pres">
|
13526
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13527
|
+
</xsl:template>
|
13528
|
+
|
13529
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_step1"/>
|
13530
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_pres"/>
|
13531
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_step1">
|
13532
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
13533
|
+
<xsl:copy-of select="@*"/>
|
13534
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13535
|
+
</xsl:element>
|
13536
|
+
</xsl:template>
|
13537
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_pres">
|
13538
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
13539
|
+
<xsl:copy-of select="@*"/>
|
13540
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13541
|
+
</xsl:element>
|
13542
|
+
</xsl:template>
|
13543
|
+
|
13544
|
+
<xsl:template match="*[local-name() = 'concept']"/>
|
13545
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_step1"/>
|
13546
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_pres"/>
|
13547
|
+
|
13548
|
+
<xsl:template match="*[local-name() = 'fmt-concept']">
|
13549
|
+
<xsl:apply-templates/>
|
13550
|
+
</xsl:template>
|
13551
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_step1">
|
13552
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13553
|
+
</xsl:template>
|
13554
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_pres">
|
13555
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13556
|
+
</xsl:template>
|
13557
|
+
|
13558
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_step1"/>
|
13559
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_pres"/>
|
13560
|
+
|
13561
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_step1">
|
13562
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
13563
|
+
<xsl:copy-of select="@*"/>
|
13564
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13565
|
+
</xsl:element>
|
13566
|
+
</xsl:template>
|
13567
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_pres">
|
13568
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
13569
|
+
<xsl:copy-of select="@*"/>
|
13570
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13571
|
+
</xsl:element>
|
13572
|
+
</xsl:template>
|
13573
|
+
|
13574
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_step1"/>
|
13575
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_pres"/>
|
13576
|
+
|
13577
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_step1">
|
13578
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
13579
|
+
<xsl:copy-of select="@*"/>
|
13580
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13581
|
+
</xsl:element>
|
13582
|
+
</xsl:template>
|
13583
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_pres">
|
13584
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
13585
|
+
<xsl:copy-of select="@*"/>
|
13586
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13587
|
+
</xsl:element>
|
13588
|
+
</xsl:template>
|
13589
|
+
|
13590
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_step1"/>
|
13591
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_pres"/>
|
13592
|
+
|
13593
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_step1">
|
13594
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
13595
|
+
<xsl:copy-of select="@*"/>
|
13596
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13597
|
+
</xsl:element>
|
13598
|
+
</xsl:template>
|
13599
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_pres">
|
13600
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
13601
|
+
<xsl:copy-of select="@*"/>
|
13602
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13603
|
+
</xsl:element>
|
13604
|
+
</xsl:template>
|
13605
|
+
|
13606
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_step1"/>
|
13607
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_pres"/>
|
13608
|
+
|
13609
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_step1">
|
13610
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
13611
|
+
<xsl:copy-of select="@*"/>
|
13612
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13613
|
+
</xsl:element>
|
13614
|
+
</xsl:template>
|
13615
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_pres">
|
13616
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
13617
|
+
<xsl:copy-of select="@*"/>
|
13618
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13619
|
+
</xsl:element>
|
13620
|
+
</xsl:template>
|
13621
|
+
|
13622
|
+
<xsl:template match="*[local-name() = 'erefstack']"/>
|
13623
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_step1"/>
|
13624
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_pres"/>
|
13625
|
+
|
13626
|
+
<xsl:template match="*[local-name() = 'svgmap']"/>
|
13627
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
13628
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
13629
|
+
|
13341
13630
|
<!-- END: update new Presentation XML -->
|
13342
13631
|
|
13343
13632
|
<!-- =========================================================================== -->
|
@@ -13410,7 +13699,7 @@
|
|
13410
13699
|
|
13411
13700
|
<xsl:choose>
|
13412
13701
|
<xsl:when test="$page_sequence_at_top = 'true'">
|
13413
|
-
<xsl:for-each select="ancestor::*[ancestor::*[
|
13702
|
+
<xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
|
13414
13703
|
<element pos="{position()}">
|
13415
13704
|
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
13416
13705
|
<xsl:value-of select="name()"/>
|
@@ -13942,7 +14231,7 @@
|
|
13942
14231
|
</xsl:when>
|
13943
14232
|
<xsl:when test="contains($text, $replace)">
|
13944
14233
|
<xsl:value-of select="substring-before($text,$replace)"/>
|
13945
|
-
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/
|
14234
|
+
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/standoc"><xsl:value-of select="$by"/></xsl:element>
|
13946
14235
|
<xsl:call-template name="replaceChar">
|
13947
14236
|
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
|
13948
14237
|
<xsl:with-param name="replace" select="$replace"/>
|
@@ -13979,7 +14268,7 @@
|
|
13979
14268
|
</xsl:variable>
|
13980
14269
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
13981
14270
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
13982
|
-
<xsl:variable name="lang" select="ancestor::*[
|
14271
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
13983
14272
|
<xsl:variable name="reference" select="@reference"/>
|
13984
14273
|
<!-- fn sequence number in document -->
|
13985
14274
|
<xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
@@ -14027,7 +14316,7 @@
|
|
14027
14316
|
</xsl:template>
|
14028
14317
|
|
14029
14318
|
<xsl:template name="printEdition">
|
14030
|
-
<xsl:variable name="edition_i18n" select="normalize-space((//*[
|
14319
|
+
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
14031
14320
|
|
14032
14321
|
<xsl:choose>
|
14033
14322
|
<xsl:when test="$edition_i18n != ''">
|
@@ -14037,7 +14326,7 @@
|
|
14037
14326
|
</xsl:call-template>
|
14038
14327
|
</xsl:when>
|
14039
14328
|
<xsl:otherwise>
|
14040
|
-
<xsl:variable name="edition" select="normalize-space((//*[
|
14329
|
+
<xsl:variable name="edition" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
|
14041
14330
|
<xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
|
14042
14331
|
<xsl:call-template name="capitalize">
|
14043
14332
|
<xsl:with-param name="str">
|
@@ -14171,7 +14460,7 @@
|
|
14171
14460
|
<xsl:param name="charDelim" select="', '"/>
|
14172
14461
|
<xsl:choose>
|
14173
14462
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
14174
|
-
<xsl:for-each select="//*[
|
14463
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
14175
14464
|
<xsl:sort data-type="text" order="ascending"/>
|
14176
14465
|
<xsl:call-template name="insertKeyword">
|
14177
14466
|
<xsl:with-param name="meta" select="$meta"/>
|
@@ -14181,7 +14470,7 @@
|
|
14181
14470
|
</xsl:for-each>
|
14182
14471
|
</xsl:when>
|
14183
14472
|
<xsl:otherwise>
|
14184
|
-
<xsl:for-each select="//*[
|
14473
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
14185
14474
|
<xsl:call-template name="insertKeyword">
|
14186
14475
|
<xsl:with-param name="meta" select="$meta"/>
|
14187
14476
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -14256,7 +14545,7 @@
|
|
14256
14545
|
<!-- Dublin Core properties go here -->
|
14257
14546
|
<dc:title>
|
14258
14547
|
<xsl:variable name="title">
|
14259
|
-
<xsl:for-each select="(//*[
|
14548
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
14260
14549
|
|
14261
14550
|
<xsl:choose>
|
14262
14551
|
<xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
|
@@ -14283,7 +14572,7 @@
|
|
14283
14572
|
</rdf:Alt>
|
14284
14573
|
</dc:title>
|
14285
14574
|
<xsl:variable name="dc_creator">
|
14286
|
-
<xsl:for-each select="(//*[
|
14575
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
14287
14576
|
|
14288
14577
|
<rdf:Seq>
|
14289
14578
|
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
@@ -14305,7 +14594,7 @@
|
|
14305
14594
|
<xsl:variable name="dc_description">
|
14306
14595
|
<xsl:variable name="abstract">
|
14307
14596
|
|
14308
|
-
<xsl:copy-of select="//*[
|
14597
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
|
14309
14598
|
|
14310
14599
|
</xsl:variable>
|
14311
14600
|
<rdf:Alt>
|
@@ -14333,7 +14622,7 @@
|
|
14333
14622
|
</rdf:RDF>
|
14334
14623
|
</x:xmpmeta>
|
14335
14624
|
<!-- add attachments -->
|
14336
|
-
<xsl:for-each select="//*[
|
14625
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
14337
14626
|
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
14338
14627
|
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
14339
14628
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
@@ -14367,7 +14656,7 @@
|
|
14367
14656
|
</pdf:embedded-file>
|
14368
14657
|
</xsl:for-each>
|
14369
14658
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
14370
|
-
<xsl:if test="not(//*[
|
14659
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
14371
14660
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
14372
14661
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
14373
14662
|
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
@@ -14569,9 +14858,9 @@
|
|
14569
14858
|
<xsl:variable name="XSLNS">
|
14570
14859
|
|
14571
14860
|
</xsl:variable>
|
14572
|
-
<xsl:if test="$documentNS != $XSLNS">
|
14861
|
+
<!-- <xsl:if test="$documentNS != $XSLNS">
|
14573
14862
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
14574
|
-
</xsl:if>
|
14863
|
+
</xsl:if> -->
|
14575
14864
|
</xsl:template> <!-- namespaceCheck -->
|
14576
14865
|
|
14577
14866
|
<xsl:template name="getLanguage">
|
@@ -14650,10 +14939,10 @@
|
|
14650
14939
|
|
14651
14940
|
<xsl:variable name="data_value">
|
14652
14941
|
<xsl:choose>
|
14653
|
-
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) !=
|
14942
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
|
14654
14943
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14655
14944
|
</xsl:when>
|
14656
|
-
<xsl:when test="string-length($bibdata_updated) !=
|
14945
|
+
<xsl:when test="string-length($bibdata_updated) != 0">
|
14657
14946
|
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14658
14947
|
</xsl:when>
|
14659
14948
|
<xsl:when test="$formatted = 'true'">
|
@@ -14791,7 +15080,7 @@
|
|
14791
15080
|
<!-- background image -->
|
14792
15081
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14793
15082
|
<fo:block>
|
14794
|
-
<xsl:for-each select="/*[
|
15083
|
+
<xsl:for-each select="/*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
|
14795
15084
|
<xsl:choose>
|
14796
15085
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
14797
15086
|
<fo:instream-foreign-object fox:alt-text="Image Front">
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION
|
20
|
+
<!-- VERSION v2.0.0 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -459,11 +459,14 @@ gives an explicit page orientation</a:documentation>
|
|
459
459
|
<a:documentation>Description of location in a reference, which can be combined with other locations in a single citation</a:documentation>
|
460
460
|
</ref>
|
461
461
|
</zeroOrMore>
|
462
|
-
<
|
463
|
-
<
|
462
|
+
<optional>
|
463
|
+
<element name="display-text">
|
464
464
|
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
465
|
-
|
466
|
-
|
465
|
+
<oneOrMore>
|
466
|
+
<ref name="PureTextElement"/>
|
467
|
+
</oneOrMore>
|
468
|
+
</element>
|
469
|
+
</optional>
|
467
470
|
</define>
|
468
471
|
</include>
|
469
472
|
<!-- end overrides -->
|
@@ -1205,10 +1208,13 @@ numbers</a:documentation>
|
|
1205
1208
|
<value>presentation</value>
|
1206
1209
|
</choice>
|
1207
1210
|
</attribute>
|
1211
|
+
<attribute name="flavor">
|
1212
|
+
<a:documentation>Metanorma flavor, indicating SDO whose requiremnts the realisation aligns to</a:documentation>
|
1213
|
+
</attribute>
|
1208
1214
|
</define>
|
1209
1215
|
<define name="standard-document">
|
1210
1216
|
<a:documentation>Representation of a standardisation document</a:documentation>
|
1211
|
-
<element name="
|
1217
|
+
<element name="metanorma">
|
1212
1218
|
<ref name="Root-Attributes"/>
|
1213
1219
|
<ref name="bibdata">
|
1214
1220
|
<a:documentation>Bibliographic description of the document itself, expressed in the Relaton model</a:documentation>
|
@@ -5,9 +5,6 @@
|
|
5
5
|
default namespace isostandard = "https://www.metanorma.com/ns/iso"
|
6
6
|
-->
|
7
7
|
<include href="isodoc.rng">
|
8
|
-
<start>
|
9
|
-
<ref name="iso-standard"/>
|
10
|
-
</start>
|
11
8
|
<define name="sections">
|
12
9
|
<element name="sections">
|
13
10
|
<zeroOrMore>
|
@@ -238,38 +235,38 @@
|
|
238
235
|
</oneOrMore>
|
239
236
|
</choice>
|
240
237
|
</define>
|
238
|
+
<!--
|
239
|
+
We display the Normative References between scope and terms; but to keep the
|
240
|
+
grammar simple, we keep the references together
|
241
|
+
-->
|
242
|
+
<define name="standard-document">
|
243
|
+
<element name="metanorma">
|
244
|
+
<ref name="Root-Attributes"/>
|
245
|
+
<ref name="bibdata"/>
|
246
|
+
<zeroOrMore>
|
247
|
+
<ref name="termdocsource"/>
|
248
|
+
</zeroOrMore>
|
249
|
+
<optional>
|
250
|
+
<ref name="misccontainer"/>
|
251
|
+
</optional>
|
252
|
+
<optional>
|
253
|
+
<ref name="boilerplate"/>
|
254
|
+
</optional>
|
255
|
+
<ref name="preface"/>
|
256
|
+
<oneOrMore>
|
257
|
+
<ref name="sections"/>
|
258
|
+
</oneOrMore>
|
259
|
+
<zeroOrMore>
|
260
|
+
<ref name="annex"/>
|
261
|
+
</zeroOrMore>
|
262
|
+
<ref name="bibliography"/>
|
263
|
+
<zeroOrMore>
|
264
|
+
<ref name="indexsect"/>
|
265
|
+
</zeroOrMore>
|
266
|
+
</element>
|
267
|
+
</define>
|
241
268
|
</include>
|
242
269
|
<!-- end overrides -->
|
243
|
-
<!--
|
244
|
-
We display the Normative References between scope and terms; but to keep the
|
245
|
-
grammar simple, we keep the references together
|
246
|
-
-->
|
247
|
-
<define name="iso-standard">
|
248
|
-
<element name="iso-standard">
|
249
|
-
<ref name="Root-Attributes"/>
|
250
|
-
<ref name="bibdata"/>
|
251
|
-
<zeroOrMore>
|
252
|
-
<ref name="termdocsource"/>
|
253
|
-
</zeroOrMore>
|
254
|
-
<optional>
|
255
|
-
<ref name="misccontainer"/>
|
256
|
-
</optional>
|
257
|
-
<optional>
|
258
|
-
<ref name="boilerplate"/>
|
259
|
-
</optional>
|
260
|
-
<ref name="preface"/>
|
261
|
-
<oneOrMore>
|
262
|
-
<ref name="sections"/>
|
263
|
-
</oneOrMore>
|
264
|
-
<zeroOrMore>
|
265
|
-
<ref name="annex"/>
|
266
|
-
</zeroOrMore>
|
267
|
-
<ref name="bibliography"/>
|
268
|
-
<zeroOrMore>
|
269
|
-
<ref name="indexsect"/>
|
270
|
-
</zeroOrMore>
|
271
|
-
</element>
|
272
|
-
</define>
|
273
270
|
<define name="clause-hanging-paragraph-with-footnote">
|
274
271
|
<element name="clause">
|
275
272
|
<optional>
|
@@ -6,9 +6,6 @@
|
|
6
6
|
-->
|
7
7
|
<include href="relaton-jis.rng"/>
|
8
8
|
<include href="isostandard.rng">
|
9
|
-
<start>
|
10
|
-
<ref name="jis-standard"/>
|
11
|
-
</start>
|
12
9
|
<define name="annex">
|
13
10
|
<element name="annex">
|
14
11
|
<optional>
|
@@ -19,6 +16,39 @@
|
|
19
16
|
<ref name="Annex-Section"/>
|
20
17
|
</element>
|
21
18
|
</define>
|
19
|
+
<!--
|
20
|
+
We display the Normative References between scope and terms; but to keep the
|
21
|
+
grammar simple, we keep the references together
|
22
|
+
-->
|
23
|
+
<define name="standard-document">
|
24
|
+
<element name="metanorma">
|
25
|
+
<ref name="Root-Attributes"/>
|
26
|
+
<ref name="bibdata"/>
|
27
|
+
<zeroOrMore>
|
28
|
+
<ref name="termdocsource"/>
|
29
|
+
</zeroOrMore>
|
30
|
+
<optional>
|
31
|
+
<ref name="misccontainer"/>
|
32
|
+
</optional>
|
33
|
+
<optional>
|
34
|
+
<ref name="boilerplate"/>
|
35
|
+
</optional>
|
36
|
+
<ref name="preface"/>
|
37
|
+
<oneOrMore>
|
38
|
+
<ref name="sections"/>
|
39
|
+
</oneOrMore>
|
40
|
+
<zeroOrMore>
|
41
|
+
<ref name="annex"/>
|
42
|
+
</zeroOrMore>
|
43
|
+
<ref name="bibliography"/>
|
44
|
+
<zeroOrMore>
|
45
|
+
<ref name="indexsect"/>
|
46
|
+
</zeroOrMore>
|
47
|
+
<optional>
|
48
|
+
<ref name="colophon"/>
|
49
|
+
</optional>
|
50
|
+
</element>
|
51
|
+
</define>
|
22
52
|
</include>
|
23
53
|
<!-- end overrides -->
|
24
54
|
<define name="floating-section-title">
|
@@ -34,37 +64,4 @@
|
|
34
64
|
</zeroOrMore>
|
35
65
|
</element>
|
36
66
|
</define>
|
37
|
-
<!--
|
38
|
-
We display the Normative References between scope and terms; but to keep the
|
39
|
-
grammar simple, we keep the references together
|
40
|
-
-->
|
41
|
-
<define name="jis-standard">
|
42
|
-
<element name="jis-standard">
|
43
|
-
<ref name="Root-Attributes"/>
|
44
|
-
<ref name="bibdata"/>
|
45
|
-
<zeroOrMore>
|
46
|
-
<ref name="termdocsource"/>
|
47
|
-
</zeroOrMore>
|
48
|
-
<optional>
|
49
|
-
<ref name="misccontainer"/>
|
50
|
-
</optional>
|
51
|
-
<optional>
|
52
|
-
<ref name="boilerplate"/>
|
53
|
-
</optional>
|
54
|
-
<ref name="preface"/>
|
55
|
-
<oneOrMore>
|
56
|
-
<ref name="sections"/>
|
57
|
-
</oneOrMore>
|
58
|
-
<zeroOrMore>
|
59
|
-
<ref name="annex"/>
|
60
|
-
</zeroOrMore>
|
61
|
-
<ref name="bibliography"/>
|
62
|
-
<zeroOrMore>
|
63
|
-
<ref name="indexsect"/>
|
64
|
-
</zeroOrMore>
|
65
|
-
<optional>
|
66
|
-
<ref name="colophon"/>
|
67
|
-
</optional>
|
68
|
-
</element>
|
69
|
-
</define>
|
70
67
|
</grammar>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar ns='https://www.metanorma.org/ns/
|
2
|
+
<grammar ns='https://www.metanorma.org/ns/standoc' xmlns="http://relaxng.org/ns/structure/1.0">
|
3
3
|
<!--
|
4
4
|
VERSION v1.2.1
|
5
5
|
default namespace = "https://www.metanorma.com/ns/jis"
|
@@ -9,9 +9,6 @@
|
|
9
9
|
jis.rnc already includes relaton-jis.rnc, if we have distinct metadata, will need to abstract jis-compile.rnc
|
10
10
|
-->
|
11
11
|
<include href="jis.rng">
|
12
|
-
<start>
|
13
|
-
<ref name="plateau-standard"/>
|
14
|
-
</start>
|
15
12
|
<define name="ParagraphFnBody">
|
16
13
|
<zeroOrMore>
|
17
14
|
<choice>
|
@@ -60,39 +57,38 @@
|
|
60
57
|
<ref name="source"/>
|
61
58
|
</zeroOrMore>
|
62
59
|
</define>
|
60
|
+
<!--
|
61
|
+
We display the Normative References between scope and terms; but to keep the
|
62
|
+
grammar simple, we keep the references together
|
63
|
+
-->
|
64
|
+
<define name="standard-document">
|
65
|
+
<element name="metanorma">
|
66
|
+
<ref name="Root-Attributes"/>
|
67
|
+
<ref name="bibdata"/>
|
68
|
+
<zeroOrMore>
|
69
|
+
<ref name="termdocsource"/>
|
70
|
+
</zeroOrMore>
|
71
|
+
<optional>
|
72
|
+
<ref name="misccontainer"/>
|
73
|
+
</optional>
|
74
|
+
<optional>
|
75
|
+
<ref name="boilerplate"/>
|
76
|
+
</optional>
|
77
|
+
<ref name="preface"/>
|
78
|
+
<oneOrMore>
|
79
|
+
<ref name="sections"/>
|
80
|
+
</oneOrMore>
|
81
|
+
<zeroOrMore>
|
82
|
+
<ref name="annex"/>
|
83
|
+
</zeroOrMore>
|
84
|
+
<ref name="bibliography"/>
|
85
|
+
<zeroOrMore>
|
86
|
+
<ref name="indexsect"/>
|
87
|
+
</zeroOrMore>
|
88
|
+
<optional>
|
89
|
+
<ref name="colophon"/>
|
90
|
+
</optional>
|
91
|
+
</element>
|
92
|
+
</define>
|
63
93
|
</include>
|
64
|
-
<!-- end overrides -->
|
65
|
-
<!--
|
66
|
-
We display the Normative References between scope and terms; but to keep the
|
67
|
-
grammar simple, we keep the references together
|
68
|
-
-->
|
69
|
-
<define name="plateau-standard">
|
70
|
-
<element name="plateau-standard">
|
71
|
-
<ref name="Root-Attributes"/>
|
72
|
-
<ref name="bibdata"/>
|
73
|
-
<zeroOrMore>
|
74
|
-
<ref name="termdocsource"/>
|
75
|
-
</zeroOrMore>
|
76
|
-
<optional>
|
77
|
-
<ref name="misccontainer"/>
|
78
|
-
</optional>
|
79
|
-
<optional>
|
80
|
-
<ref name="boilerplate"/>
|
81
|
-
</optional>
|
82
|
-
<ref name="preface"/>
|
83
|
-
<oneOrMore>
|
84
|
-
<ref name="sections"/>
|
85
|
-
</oneOrMore>
|
86
|
-
<zeroOrMore>
|
87
|
-
<ref name="annex"/>
|
88
|
-
</zeroOrMore>
|
89
|
-
<ref name="bibliography"/>
|
90
|
-
<zeroOrMore>
|
91
|
-
<ref name="indexsect"/>
|
92
|
-
</zeroOrMore>
|
93
|
-
<optional>
|
94
|
-
<ref name="colophon"/>
|
95
|
-
</optional>
|
96
|
-
</element>
|
97
|
-
</define>
|
98
94
|
</grammar>
|
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", "~> 0.
|
32
|
+
spec.add_dependency "metanorma-jis", "~> 0.5.0"
|
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: 0.
|
4
|
+
version: 0.2.0
|
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-02-
|
11
|
+
date: 2025-02-17 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: 0.
|
19
|
+
version: 0.5.0
|
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: 0.
|
26
|
+
version: 0.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pubid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|