metanorma-csa 2.5.12 → 2.6.0
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/csa/csa.standard.xsl +330 -62
- data/lib/metanorma/csa/csa.rng +27 -30
- data/lib/metanorma/csa/isodoc.rng +1 -1
- data/lib/metanorma/csa/version.rb +1 -1
- data/metanorma-csa.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: 316e1ede0ca95381f0e65632fa42960e7c4bee02449170cdc6e7dd4f547fb76e
|
4
|
+
data.tar.gz: 50acc0cce0c6eb6bdc313435d8be4677038459e2d71de4b45dbe8cf24f883229
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1112abd5079ffee24608183bf9e50a5781aaf56d326f7e16f651596281011ffae16c67509c61b8f8a810802ea0d7b7582d4cad9d5467ecb48bc1911c7ae96e19
|
7
|
+
data.tar.gz: b5170bb7e449e1e13c9722b9bb859a8e47eccd64d6bf30e6badd4f6e81e9505bc2918db08376ee49a1e8db8986d4920d68338579f28e36af9c4ff40d1b895957
|
@@ -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:csa="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:csa="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:java="http://xml.apache.org/xalan/java" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java xalan" extension-element-prefixes="redirect" version="1.0">
|
2
2
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="yes"/>
|
4
4
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
<xsl:variable name="copyright">
|
10
10
|
<xsl:text>© Copyright </xsl:text>
|
11
|
-
<xsl:value-of select="/csa:
|
11
|
+
<xsl:value-of select="/csa:metanorma/csa:bibdata/csa:copyright/csa:from"/>
|
12
12
|
<xsl:text>, Cloud Security Alliance. All rights reserved.</xsl:text>
|
13
13
|
</xsl:variable>
|
14
14
|
|
@@ -86,12 +86,12 @@
|
|
86
86
|
|
87
87
|
<fo:block-container width="136mm" margin-bottom="12pt">
|
88
88
|
<fo:block font-size="36pt" font-weight="bold" color="rgb(54, 59, 74)" role="H1">
|
89
|
-
<xsl:value-of select="/csa:
|
89
|
+
<xsl:value-of select="/csa:metanorma/csa:bibdata/csa:title[@language = 'en']"/>
|
90
90
|
</fo:block>
|
91
91
|
</fo:block-container>
|
92
92
|
|
93
93
|
<fo:block font-size="26pt" color="rgb(55, 60, 75)" role="H2">
|
94
|
-
<xsl:value-of select="/csa:
|
94
|
+
<xsl:value-of select="/csa:metanorma/csa:bibdata/csa:title[@language = 'en' and @type = 'subtitle']"/>
|
95
95
|
</fo:block>
|
96
96
|
|
97
97
|
<fo:block-container absolute-position="fixed" left="11mm" top="245mm">
|
@@ -129,7 +129,7 @@
|
|
129
129
|
</fo:block>
|
130
130
|
|
131
131
|
<fo:block-container absolute-position="fixed" left="25mm" top="152mm" width="165mm" height="100mm" display-align="after" color="rgb(165, 169, 172)" line-height="145%">
|
132
|
-
<fo:block>© <xsl:value-of select="/csa:
|
132
|
+
<fo:block>© <xsl:value-of select="/csa:metanorma/csa:bibdata/csa:copyright/csa:from"/> Cloud Security Alliance – All Rights Reserved. You may download, store, display on your
|
133
133
|
computer, view, print, and link to the Cloud Security Alliance at <fo:inline text-decoration="underline">https://cloudsecurityalliance.org</fo:inline>
|
134
134
|
subject to the following: (a) the draft may be used solely for your personal, informational, noncommercial
|
135
135
|
use; (b) the draft may not be modified or altered in any way; (c) the draft may not be
|
@@ -147,7 +147,7 @@
|
|
147
147
|
</fo:block>
|
148
148
|
|
149
149
|
<xsl:variable name="persons">
|
150
|
-
<xsl:for-each select="/csa:
|
150
|
+
<xsl:for-each select="/csa:metanorma/csa:bibdata/csa:contributor[csa:person]">
|
151
151
|
<contributor>
|
152
152
|
<xsl:attribute name="type">
|
153
153
|
<xsl:choose>
|
@@ -673,21 +673,21 @@
|
|
673
673
|
|
674
674
|
<xsl:variable name="namespace_full_">
|
675
675
|
<xsl:choose>
|
676
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[
|
677
|
-
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/
|
676
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
677
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
|
678
678
|
</xsl:choose>
|
679
679
|
</xsl:variable>
|
680
680
|
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
681
681
|
|
682
682
|
<xsl:variable name="root_element_">
|
683
683
|
<xsl:choose>
|
684
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[
|
685
|
-
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
684
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
685
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
|
686
686
|
</xsl:choose>
|
687
687
|
</xsl:variable>
|
688
688
|
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
689
689
|
|
690
|
-
<xsl:variable name="document_scheme" select="normalize-space(//*[
|
690
|
+
<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'])"/>
|
691
691
|
|
692
692
|
<!-- external parameters -->
|
693
693
|
|
@@ -788,7 +788,7 @@
|
|
788
788
|
</metanorma-extension>
|
789
789
|
-->
|
790
790
|
|
791
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[
|
791
|
+
<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'])))"/>
|
792
792
|
<xsl:variable name="papersize_width_">
|
793
793
|
<xsl:choose>
|
794
794
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -850,7 +850,7 @@
|
|
850
850
|
<xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
|
851
851
|
|
852
852
|
<xsl:variable name="layout_columns_default">1</xsl:variable>
|
853
|
-
<xsl:variable name="layout_columns_" select="normalize-space((//*[
|
853
|
+
<xsl:variable name="layout_columns_" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
|
854
854
|
<xsl:variable name="layout_columns">
|
855
855
|
<xsl:choose>
|
856
856
|
<xsl:when test="$layout_columns_ != ''"><xsl:value-of select="$layout_columns_"/></xsl:when>
|
@@ -911,7 +911,7 @@
|
|
911
911
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
912
912
|
|
913
913
|
<xsl:variable name="title-list-tables">
|
914
|
-
<xsl:variable name="toc_table_title" select="//*[
|
914
|
+
<xsl:variable name="toc_table_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
915
915
|
<xsl:value-of select="$toc_table_title"/>
|
916
916
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
917
917
|
<xsl:call-template name="getLocalizedString">
|
@@ -921,7 +921,7 @@
|
|
921
921
|
</xsl:variable>
|
922
922
|
|
923
923
|
<xsl:variable name="title-list-figures">
|
924
|
-
<xsl:variable name="toc_figure_title" select="//*[
|
924
|
+
<xsl:variable name="toc_figure_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
925
925
|
<xsl:value-of select="$toc_figure_title"/>
|
926
926
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
927
927
|
<xsl:call-template name="getLocalizedString">
|
@@ -931,7 +931,7 @@
|
|
931
931
|
</xsl:variable>
|
932
932
|
|
933
933
|
<xsl:variable name="title-list-recommendations">
|
934
|
-
<xsl:variable name="toc_requirement_title" select="//*[
|
934
|
+
<xsl:variable name="toc_requirement_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
935
935
|
<xsl:value-of select="$toc_requirement_title"/>
|
936
936
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
937
937
|
<xsl:call-template name="getLocalizedString">
|
@@ -941,8 +941,8 @@
|
|
941
941
|
</xsl:variable>
|
942
942
|
|
943
943
|
<xsl:variable name="bibdata">
|
944
|
-
<xsl:copy-of select="//*[
|
945
|
-
<xsl:copy-of select="//*[
|
944
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']"/>
|
945
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'localized-strings']"/>
|
946
946
|
</xsl:variable>
|
947
947
|
|
948
948
|
<!-- Characters -->
|
@@ -1007,7 +1007,7 @@
|
|
1007
1007
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1008
1008
|
|
1009
1009
|
<xsl:variable name="additional_fonts_">
|
1010
|
-
<xsl:for-each select="//*[
|
1010
|
+
<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']">
|
1011
1011
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1012
1012
|
</xsl:for-each>
|
1013
1013
|
</xsl:variable>
|
@@ -2317,10 +2317,10 @@
|
|
2317
2317
|
|
2318
2318
|
<xsl:template name="processTablesFigures_Contents">
|
2319
2319
|
<xsl:param name="always"/>
|
2320
|
-
<xsl:if test="(//*[
|
2320
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2321
2321
|
<xsl:call-template name="processTables_Contents"/>
|
2322
2322
|
</xsl:if>
|
2323
|
-
<xsl:if test="(//*[
|
2323
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2324
2324
|
<xsl:call-template name="processFigures_Contents"/>
|
2325
2325
|
</xsl:if>
|
2326
2326
|
</xsl:template>
|
@@ -2400,7 +2400,7 @@
|
|
2400
2400
|
</xsl:template><!-- END: processMainSectionsDefault -->
|
2401
2401
|
|
2402
2402
|
<!-- Example:
|
2403
|
-
<
|
2403
|
+
<metanorma>
|
2404
2404
|
<preface>
|
2405
2405
|
<page_sequence>
|
2406
2406
|
<clause...
|
@@ -2423,7 +2423,7 @@
|
|
2423
2423
|
<page_sequence>
|
2424
2424
|
<annex ..
|
2425
2425
|
</page_sequence>
|
2426
|
-
</
|
2426
|
+
</metanorma>
|
2427
2427
|
-->
|
2428
2428
|
<xsl:template name="processPrefaceAndMainSectionsDefault_items">
|
2429
2429
|
|
@@ -2466,15 +2466,8 @@
|
|
2466
2466
|
</xsl:template> <!-- END: insertPrefaceSectionsPageSequences -->
|
2467
2467
|
|
2468
2468
|
<xsl:template name="insertMainSectionsPageSequences">
|
2469
|
-
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
2470
|
-
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
2471
|
-
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2472
|
-
<xsl:sort select="@displayorder" data-type="number"/>
|
2473
|
-
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
2474
2469
|
|
2475
|
-
|
2476
|
-
</xsl:element>
|
2477
|
-
</xsl:element>
|
2470
|
+
<xsl:call-template name="insertSectionsInPageSequence"/>
|
2478
2471
|
|
2479
2472
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
2480
2473
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
@@ -2493,6 +2486,18 @@
|
|
2493
2486
|
</xsl:element>
|
2494
2487
|
</xsl:template> <!-- END: insertMainSectionsPageSequences -->
|
2495
2488
|
|
2489
|
+
<xsl:template name="insertSectionsInPageSequence">
|
2490
|
+
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
2491
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
2492
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2493
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2494
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
2495
|
+
|
2496
|
+
</xsl:for-each>
|
2497
|
+
</xsl:element>
|
2498
|
+
</xsl:element>
|
2499
|
+
</xsl:template>
|
2500
|
+
|
2496
2501
|
<xsl:template name="insertMainSectionsInSeparatePageSequences">
|
2497
2502
|
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
2498
2503
|
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
@@ -4004,7 +4009,7 @@
|
|
4004
4009
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
4005
4010
|
|
4006
4011
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
4007
|
-
<xsl:variable name="lang" select="ancestor::*[
|
4012
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
4008
4013
|
<xsl:variable name="reference_">
|
4009
4014
|
<xsl:value-of select="@reference"/>
|
4010
4015
|
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
@@ -4125,13 +4130,13 @@
|
|
4125
4130
|
footnotes in bibliography
|
4126
4131
|
footnotes in document's body (except table's head/body/foot and figure text)
|
4127
4132
|
-->
|
4128
|
-
<xsl:for-each select="ancestor::*[
|
4133
|
+
<xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
4129
4134
|
<fn gen_id="{generate-id(.)}">
|
4130
4135
|
<xsl:copy-of select="@*"/>
|
4131
4136
|
<xsl:copy-of select="node()"/>
|
4132
4137
|
</fn>
|
4133
4138
|
</xsl:for-each>
|
4134
|
-
<xsl:for-each select="ancestor::*[
|
4139
|
+
<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']/*">
|
4135
4140
|
<xsl:sort select="@displayorder" data-type="number"/>
|
4136
4141
|
<!-- commented:
|
4137
4142
|
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
@@ -6492,6 +6497,8 @@
|
|
6492
6497
|
<!-- ======================================= -->
|
6493
6498
|
<!-- math -->
|
6494
6499
|
<!-- ======================================= -->
|
6500
|
+
<xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
|
6501
|
+
|
6495
6502
|
<xsl:template match="mathml:math">
|
6496
6503
|
<xsl:variable name="isAdded" select="@added"/>
|
6497
6504
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -6851,10 +6858,10 @@
|
|
6851
6858
|
<xsl:template match="*[local-name()='localityStack']"/>
|
6852
6859
|
|
6853
6860
|
<xsl:variable name="pdfAttachmentsList_">
|
6854
|
-
<xsl:for-each select="//*[
|
6861
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
6855
6862
|
<attachment filename="{@name}"/>
|
6856
6863
|
</xsl:for-each>
|
6857
|
-
<xsl:if test="not(//*[
|
6864
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
6858
6865
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
6859
6866
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
6860
6867
|
<attachment filename="{$attachment_path}"/>
|
@@ -8324,7 +8331,9 @@
|
|
8324
8331
|
<xsl:apply-templates mode="bookmarks"/>
|
8325
8332
|
</xsl:template>
|
8326
8333
|
|
8327
|
-
<xsl:template match="*[local-name() = '
|
8334
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents"/>
|
8335
|
+
|
8336
|
+
<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">
|
8328
8337
|
<xsl:apply-templates select="."/>
|
8329
8338
|
</xsl:template>
|
8330
8339
|
|
@@ -8341,7 +8350,15 @@
|
|
8341
8350
|
<xsl:apply-templates mode="contents"/>
|
8342
8351
|
</xsl:template>
|
8343
8352
|
|
8344
|
-
<xsl:template match="*[local-name() = '
|
8353
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents"/>
|
8354
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents"/>
|
8355
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents"/>
|
8356
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents"/>
|
8357
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
8358
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
8359
|
+
|
8360
|
+
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
8361
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
8345
8362
|
<xsl:apply-templates mode="bookmarks"/>
|
8346
8363
|
</xsl:template>
|
8347
8364
|
|
@@ -8354,6 +8371,13 @@
|
|
8354
8371
|
<xsl:apply-templates mode="bookmarks"/>
|
8355
8372
|
</xsl:template>
|
8356
8373
|
|
8374
|
+
<xsl:template match="*[local-name() = 'concept']" mode="bookmarks"/>
|
8375
|
+
<xsl:template match="*[local-name() = 'eref']" mode="bookmarks"/>
|
8376
|
+
<xsl:template match="*[local-name() = 'xref']" mode="bookmarks"/>
|
8377
|
+
<xsl:template match="*[local-name() = 'link']" mode="bookmarks"/>
|
8378
|
+
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
8379
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
8380
|
+
|
8357
8381
|
<!-- Bookmarks -->
|
8358
8382
|
<xsl:template name="addBookmarks">
|
8359
8383
|
<xsl:param name="contents"/>
|
@@ -8638,6 +8662,13 @@
|
|
8638
8662
|
|
8639
8663
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
|
8640
8664
|
|
8665
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents_item"/>
|
8666
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents_item"/>
|
8667
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents_item"/>
|
8668
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents_item"/>
|
8669
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents_item"/>
|
8670
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents_item"/>
|
8671
|
+
|
8641
8672
|
<xsl:template name="getSection">
|
8642
8673
|
<xsl:choose>
|
8643
8674
|
<xsl:when test="*[local-name() = 'fmt-title']">
|
@@ -8757,7 +8788,8 @@
|
|
8757
8788
|
</xsl:copy>
|
8758
8789
|
</xsl:template>
|
8759
8790
|
|
8760
|
-
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"
|
8791
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"/>
|
8792
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="contents_item">
|
8761
8793
|
<xsl:copy-of select="."/>
|
8762
8794
|
</xsl:template>
|
8763
8795
|
|
@@ -8821,7 +8853,7 @@
|
|
8821
8853
|
<!-- sourcecode -->
|
8822
8854
|
<!-- =============== -->
|
8823
8855
|
|
8824
|
-
<xsl:variable name="source-highlighter-css_" select="//*[
|
8856
|
+
<xsl:variable name="source-highlighter-css_" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
8825
8857
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
8826
8858
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
8827
8859
|
|
@@ -10280,7 +10312,7 @@
|
|
10280
10312
|
|
10281
10313
|
</xsl:template> <!-- sections_element_style -->
|
10282
10314
|
|
10283
|
-
<xsl:template match="//*[
|
10315
|
+
<xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
|
10284
10316
|
|
10285
10317
|
<fo:block break-after="page"/>
|
10286
10318
|
|
@@ -10384,7 +10416,7 @@
|
|
10384
10416
|
<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>
|
10385
10417
|
</xsl:when>
|
10386
10418
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
10387
|
-
<xsl:when test="ancestor::*[
|
10419
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
10388
10420
|
<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>
|
10389
10421
|
</xsl:when>
|
10390
10422
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
@@ -11700,7 +11732,7 @@
|
|
11700
11732
|
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
11701
11733
|
|
11702
11734
|
<!-- move section 'Normative references' inside 'sections' -->
|
11703
|
-
<xsl:for-each select="* | ancestor::*[
|
11735
|
+
<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']]">
|
11704
11736
|
<xsl:sort select="@displayorder" data-type="number"/>
|
11705
11737
|
|
11706
11738
|
<!-- process Section's title -->
|
@@ -11761,10 +11793,126 @@
|
|
11761
11793
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
11762
11794
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
|
11763
11795
|
|
11764
|
-
<xsl:template match="*[local-name() = 'stem']
|
11796
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
11797
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
11798
|
+
|
11799
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_step1">
|
11800
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
11801
|
+
<xsl:copy-of select="@*"/>
|
11802
|
+
<xsl:choose>
|
11803
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
11804
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
11805
|
+
</xsl:when>
|
11806
|
+
<xsl:otherwise>
|
11807
|
+
<xsl:copy-of select="node()"/>
|
11808
|
+
</xsl:otherwise>
|
11809
|
+
</xsl:choose>
|
11810
|
+
</xsl:element>
|
11811
|
+
</xsl:template>
|
11812
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_pres">
|
11813
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
11814
|
+
<xsl:copy-of select="@*"/>
|
11815
|
+
<xsl:choose>
|
11816
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
11817
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
11818
|
+
</xsl:when>
|
11819
|
+
<xsl:otherwise>
|
11820
|
+
<xsl:copy-of select="node()"/>
|
11821
|
+
</xsl:otherwise>
|
11822
|
+
</xsl:choose>
|
11823
|
+
</xsl:element>
|
11824
|
+
</xsl:template>
|
11825
|
+
|
11826
|
+
<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">
|
11765
11827
|
<xsl:copy-of select="."/>
|
11766
11828
|
</xsl:template>
|
11767
11829
|
|
11830
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
11831
|
+
<!-- *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] -->
|
11832
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_step1">
|
11833
|
+
<xsl:copy>
|
11834
|
+
<xsl:copy-of select="@*"/>
|
11835
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
11836
|
+
<xsl:choose>
|
11837
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
11838
|
+
<xsl:choose>
|
11839
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
11840
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
11841
|
+
</xsl:when>
|
11842
|
+
<xsl:otherwise>
|
11843
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_step1"/>
|
11844
|
+
</xsl:otherwise>
|
11845
|
+
</xsl:choose>
|
11846
|
+
</xsl:when>
|
11847
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
11848
|
+
<xsl:choose>
|
11849
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
11850
|
+
<xsl:copy-of select="node()"/>
|
11851
|
+
</xsl:when>
|
11852
|
+
<xsl:otherwise>
|
11853
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_step1"/>
|
11854
|
+
</xsl:otherwise>
|
11855
|
+
</xsl:choose>
|
11856
|
+
</xsl:otherwise>
|
11857
|
+
</xsl:choose>
|
11858
|
+
</xsl:copy>
|
11859
|
+
</xsl:template>
|
11860
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_pres">
|
11861
|
+
<xsl:copy>
|
11862
|
+
<xsl:copy-of select="@*"/>
|
11863
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
11864
|
+
<xsl:choose>
|
11865
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
11866
|
+
<xsl:choose>
|
11867
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
11868
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
11869
|
+
</xsl:when>
|
11870
|
+
<xsl:otherwise>
|
11871
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_pres"/>
|
11872
|
+
</xsl:otherwise>
|
11873
|
+
</xsl:choose>
|
11874
|
+
</xsl:when>
|
11875
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
11876
|
+
<xsl:choose>
|
11877
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
11878
|
+
<xsl:copy-of select="node()"/>
|
11879
|
+
</xsl:when>
|
11880
|
+
<xsl:otherwise>
|
11881
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_pres"/>
|
11882
|
+
</xsl:otherwise>
|
11883
|
+
</xsl:choose>
|
11884
|
+
</xsl:otherwise>
|
11885
|
+
</xsl:choose>
|
11886
|
+
</xsl:copy>
|
11887
|
+
</xsl:template>
|
11888
|
+
|
11889
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
11890
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_step1" priority="2">
|
11891
|
+
<xsl:copy>
|
11892
|
+
<xsl:copy-of select="@*"/>
|
11893
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
11894
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_step1"/>
|
11895
|
+
</xsl:copy>
|
11896
|
+
</xsl:template>
|
11897
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_pres" priority="2">
|
11898
|
+
<xsl:copy>
|
11899
|
+
<xsl:copy-of select="@*"/>
|
11900
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
11901
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_pres"/>
|
11902
|
+
</xsl:copy>
|
11903
|
+
</xsl:template>
|
11904
|
+
|
11905
|
+
<!-- https://github.com/metanorma/isodoc/issues/652 -->
|
11906
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']"/>
|
11907
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']"/>
|
11908
|
+
<xsl:template match="*[local-name() = 'amend']"/>
|
11909
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_step1"/>
|
11910
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_step1"/>
|
11911
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_pres"/>
|
11912
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
11913
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
11914
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
11915
|
+
|
11768
11916
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
11769
11917
|
<xsl:copy>
|
11770
11918
|
<xsl:copy-of select="@*"/>
|
@@ -11795,7 +11943,7 @@
|
|
11795
11943
|
<!-- add @id - first element with @id plus '_element_name' -->
|
11796
11944
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
11797
11945
|
<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>
|
11798
|
-
<xsl:variable name="document_suffix" select="ancestor::*[
|
11946
|
+
<xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
|
11799
11947
|
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
11800
11948
|
</xsl:if>
|
11801
11949
|
</xsl:template>
|
@@ -12045,6 +12193,126 @@
|
|
12045
12193
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
|
12046
12194
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
|
12047
12195
|
|
12196
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_step1">
|
12197
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12198
|
+
</xsl:template>
|
12199
|
+
|
12200
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_pres">
|
12201
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12202
|
+
</xsl:template>
|
12203
|
+
|
12204
|
+
<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"/>
|
12205
|
+
|
12206
|
+
<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"/>
|
12207
|
+
|
12208
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_step1">
|
12209
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12210
|
+
</xsl:template>
|
12211
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_pres">
|
12212
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12213
|
+
</xsl:template>
|
12214
|
+
|
12215
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_step1"/>
|
12216
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_pres"/>
|
12217
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_step1">
|
12218
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
12219
|
+
<xsl:copy-of select="@*"/>
|
12220
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12221
|
+
</xsl:element>
|
12222
|
+
</xsl:template>
|
12223
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_pres">
|
12224
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
12225
|
+
<xsl:copy-of select="@*"/>
|
12226
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12227
|
+
</xsl:element>
|
12228
|
+
</xsl:template>
|
12229
|
+
|
12230
|
+
<xsl:template match="*[local-name() = 'concept']"/>
|
12231
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_step1"/>
|
12232
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_pres"/>
|
12233
|
+
|
12234
|
+
<xsl:template match="*[local-name() = 'fmt-concept']">
|
12235
|
+
<xsl:apply-templates/>
|
12236
|
+
</xsl:template>
|
12237
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_step1">
|
12238
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12239
|
+
</xsl:template>
|
12240
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_pres">
|
12241
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12242
|
+
</xsl:template>
|
12243
|
+
|
12244
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_step1"/>
|
12245
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_pres"/>
|
12246
|
+
|
12247
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_step1">
|
12248
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
12249
|
+
<xsl:copy-of select="@*"/>
|
12250
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12251
|
+
</xsl:element>
|
12252
|
+
</xsl:template>
|
12253
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_pres">
|
12254
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
12255
|
+
<xsl:copy-of select="@*"/>
|
12256
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12257
|
+
</xsl:element>
|
12258
|
+
</xsl:template>
|
12259
|
+
|
12260
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_step1"/>
|
12261
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_pres"/>
|
12262
|
+
|
12263
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_step1">
|
12264
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
12265
|
+
<xsl:copy-of select="@*"/>
|
12266
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12267
|
+
</xsl:element>
|
12268
|
+
</xsl:template>
|
12269
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_pres">
|
12270
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
12271
|
+
<xsl:copy-of select="@*"/>
|
12272
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12273
|
+
</xsl:element>
|
12274
|
+
</xsl:template>
|
12275
|
+
|
12276
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_step1"/>
|
12277
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_pres"/>
|
12278
|
+
|
12279
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_step1">
|
12280
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
12281
|
+
<xsl:copy-of select="@*"/>
|
12282
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12283
|
+
</xsl:element>
|
12284
|
+
</xsl:template>
|
12285
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_pres">
|
12286
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
12287
|
+
<xsl:copy-of select="@*"/>
|
12288
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12289
|
+
</xsl:element>
|
12290
|
+
</xsl:template>
|
12291
|
+
|
12292
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_step1"/>
|
12293
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_pres"/>
|
12294
|
+
|
12295
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_step1">
|
12296
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
12297
|
+
<xsl:copy-of select="@*"/>
|
12298
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12299
|
+
</xsl:element>
|
12300
|
+
</xsl:template>
|
12301
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_pres">
|
12302
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
12303
|
+
<xsl:copy-of select="@*"/>
|
12304
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12305
|
+
</xsl:element>
|
12306
|
+
</xsl:template>
|
12307
|
+
|
12308
|
+
<xsl:template match="*[local-name() = 'erefstack']"/>
|
12309
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_step1"/>
|
12310
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_pres"/>
|
12311
|
+
|
12312
|
+
<xsl:template match="*[local-name() = 'svgmap']"/>
|
12313
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
12314
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
12315
|
+
|
12048
12316
|
<!-- END: update new Presentation XML -->
|
12049
12317
|
|
12050
12318
|
<!-- =========================================================================== -->
|
@@ -12117,7 +12385,7 @@
|
|
12117
12385
|
|
12118
12386
|
<xsl:choose>
|
12119
12387
|
<xsl:when test="$page_sequence_at_top = 'true'">
|
12120
|
-
<xsl:for-each select="ancestor::*[ancestor::*[
|
12388
|
+
<xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
|
12121
12389
|
<element pos="{position()}">
|
12122
12390
|
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
12123
12391
|
<xsl:value-of select="name()"/>
|
@@ -12545,7 +12813,7 @@
|
|
12545
12813
|
</xsl:when>
|
12546
12814
|
<xsl:when test="contains($text, $replace)">
|
12547
12815
|
<xsl:value-of select="substring-before($text,$replace)"/>
|
12548
|
-
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/
|
12816
|
+
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/standoc"><xsl:value-of select="$by"/></xsl:element>
|
12549
12817
|
<xsl:call-template name="replaceChar">
|
12550
12818
|
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
|
12551
12819
|
<xsl:with-param name="replace" select="$replace"/>
|
@@ -12582,7 +12850,7 @@
|
|
12582
12850
|
</xsl:variable>
|
12583
12851
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
12584
12852
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
12585
|
-
<xsl:variable name="lang" select="ancestor::*[
|
12853
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
12586
12854
|
<xsl:variable name="reference" select="@reference"/>
|
12587
12855
|
<!-- fn sequence number in document -->
|
12588
12856
|
<xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
@@ -12627,7 +12895,7 @@
|
|
12627
12895
|
</xsl:template>
|
12628
12896
|
|
12629
12897
|
<xsl:template name="printEdition">
|
12630
|
-
<xsl:variable name="edition_i18n" select="normalize-space((//*[
|
12898
|
+
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
12631
12899
|
|
12632
12900
|
<xsl:choose>
|
12633
12901
|
<xsl:when test="$edition_i18n != ''">
|
@@ -12637,7 +12905,7 @@
|
|
12637
12905
|
</xsl:call-template>
|
12638
12906
|
</xsl:when>
|
12639
12907
|
<xsl:otherwise>
|
12640
|
-
<xsl:variable name="edition" select="normalize-space((//*[
|
12908
|
+
<xsl:variable name="edition" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
|
12641
12909
|
<xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
|
12642
12910
|
<xsl:call-template name="capitalize">
|
12643
12911
|
<xsl:with-param name="str">
|
@@ -12771,7 +13039,7 @@
|
|
12771
13039
|
<xsl:param name="charDelim" select="', '"/>
|
12772
13040
|
<xsl:choose>
|
12773
13041
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
12774
|
-
<xsl:for-each select="//*[
|
13042
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
12775
13043
|
<xsl:sort data-type="text" order="ascending"/>
|
12776
13044
|
<xsl:call-template name="insertKeyword">
|
12777
13045
|
<xsl:with-param name="meta" select="$meta"/>
|
@@ -12781,7 +13049,7 @@
|
|
12781
13049
|
</xsl:for-each>
|
12782
13050
|
</xsl:when>
|
12783
13051
|
<xsl:otherwise>
|
12784
|
-
<xsl:for-each select="//*[
|
13052
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
12785
13053
|
<xsl:call-template name="insertKeyword">
|
12786
13054
|
<xsl:with-param name="meta" select="$meta"/>
|
12787
13055
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -12856,7 +13124,7 @@
|
|
12856
13124
|
<!-- Dublin Core properties go here -->
|
12857
13125
|
<dc:title>
|
12858
13126
|
<xsl:variable name="title">
|
12859
|
-
<xsl:for-each select="(//*[
|
13127
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
12860
13128
|
|
12861
13129
|
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
12862
13130
|
|
@@ -12876,7 +13144,7 @@
|
|
12876
13144
|
</rdf:Alt>
|
12877
13145
|
</dc:title>
|
12878
13146
|
<xsl:variable name="dc_creator">
|
12879
|
-
<xsl:for-each select="(//*[
|
13147
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
12880
13148
|
|
12881
13149
|
<rdf:Seq>
|
12882
13150
|
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
@@ -12898,7 +13166,7 @@
|
|
12898
13166
|
<xsl:variable name="dc_description">
|
12899
13167
|
<xsl:variable name="abstract">
|
12900
13168
|
|
12901
|
-
<xsl:copy-of select="//*[
|
13169
|
+
<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'])]"/>
|
12902
13170
|
|
12903
13171
|
</xsl:variable>
|
12904
13172
|
<rdf:Alt>
|
@@ -12926,7 +13194,7 @@
|
|
12926
13194
|
</rdf:RDF>
|
12927
13195
|
</x:xmpmeta>
|
12928
13196
|
<!-- add attachments -->
|
12929
|
-
<xsl:for-each select="//*[
|
13197
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
12930
13198
|
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
12931
13199
|
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
12932
13200
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
@@ -12960,7 +13228,7 @@
|
|
12960
13228
|
</pdf:embedded-file>
|
12961
13229
|
</xsl:for-each>
|
12962
13230
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
12963
|
-
<xsl:if test="not(//*[
|
13231
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
12964
13232
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
12965
13233
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
12966
13234
|
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
@@ -13164,9 +13432,9 @@
|
|
13164
13432
|
<xsl:value-of select="document('')//*/namespace::csa"/>
|
13165
13433
|
|
13166
13434
|
</xsl:variable>
|
13167
|
-
<xsl:if test="$documentNS != $XSLNS">
|
13435
|
+
<!-- <xsl:if test="$documentNS != $XSLNS">
|
13168
13436
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
13169
|
-
</xsl:if>
|
13437
|
+
</xsl:if> -->
|
13170
13438
|
</xsl:template> <!-- namespaceCheck -->
|
13171
13439
|
|
13172
13440
|
<xsl:template name="getLanguage">
|
@@ -13245,10 +13513,10 @@
|
|
13245
13513
|
|
13246
13514
|
<xsl:variable name="data_value">
|
13247
13515
|
<xsl:choose>
|
13248
|
-
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) !=
|
13516
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
|
13249
13517
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13250
13518
|
</xsl:when>
|
13251
|
-
<xsl:when test="string-length($bibdata_updated) !=
|
13519
|
+
<xsl:when test="string-length($bibdata_updated) != 0">
|
13252
13520
|
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13253
13521
|
</xsl:when>
|
13254
13522
|
<xsl:when test="$formatted = 'true'">
|
@@ -13386,7 +13654,7 @@
|
|
13386
13654
|
<!-- background image -->
|
13387
13655
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
13388
13656
|
<fo:block>
|
13389
|
-
<xsl:for-each select="/*[
|
13657
|
+
<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]">
|
13390
13658
|
<xsl:choose>
|
13391
13659
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
13392
13660
|
<fo:instream-foreign-object fox:alt-text="Image Front">
|
data/lib/metanorma/csa/csa.rng
CHANGED
@@ -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
|
Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
|
@@ -8,9 +8,6 @@
|
|
8
8
|
-->
|
9
9
|
<include href="relaton-csa.rng"/>
|
10
10
|
<include href="isodoc.rng">
|
11
|
-
<start>
|
12
|
-
<ref name="csa-standard"/>
|
13
|
-
</start>
|
14
11
|
<define name="FigureBody">
|
15
12
|
<zeroOrMore>
|
16
13
|
<ref name="source"/>
|
@@ -38,31 +35,31 @@
|
|
38
35
|
</group>
|
39
36
|
</choice>
|
40
37
|
</define>
|
38
|
+
<define name="standard-document">
|
39
|
+
<element name="metanorma">
|
40
|
+
<ref name="Root-Attributes"/>
|
41
|
+
<ref name="bibdata"/>
|
42
|
+
<zeroOrMore>
|
43
|
+
<ref name="termdocsource"/>
|
44
|
+
</zeroOrMore>
|
45
|
+
<optional>
|
46
|
+
<ref name="misccontainer"/>
|
47
|
+
</optional>
|
48
|
+
<optional>
|
49
|
+
<ref name="boilerplate"/>
|
50
|
+
</optional>
|
51
|
+
<ref name="preface"/>
|
52
|
+
<oneOrMore>
|
53
|
+
<ref name="sections"/>
|
54
|
+
</oneOrMore>
|
55
|
+
<zeroOrMore>
|
56
|
+
<ref name="annex"/>
|
57
|
+
</zeroOrMore>
|
58
|
+
<ref name="bibliography"/>
|
59
|
+
<zeroOrMore>
|
60
|
+
<ref name="indexsect"/>
|
61
|
+
</zeroOrMore>
|
62
|
+
</element>
|
63
|
+
</define>
|
41
64
|
</include>
|
42
|
-
<define name="csa-standard">
|
43
|
-
<element name="csa-standard">
|
44
|
-
<ref name="Root-Attributes"/>
|
45
|
-
<ref name="bibdata"/>
|
46
|
-
<zeroOrMore>
|
47
|
-
<ref name="termdocsource"/>
|
48
|
-
</zeroOrMore>
|
49
|
-
<optional>
|
50
|
-
<ref name="misccontainer"/>
|
51
|
-
</optional>
|
52
|
-
<optional>
|
53
|
-
<ref name="boilerplate"/>
|
54
|
-
</optional>
|
55
|
-
<ref name="preface"/>
|
56
|
-
<oneOrMore>
|
57
|
-
<ref name="sections"/>
|
58
|
-
</oneOrMore>
|
59
|
-
<zeroOrMore>
|
60
|
-
<ref name="annex"/>
|
61
|
-
</zeroOrMore>
|
62
|
-
<ref name="bibliography"/>
|
63
|
-
<zeroOrMore>
|
64
|
-
<ref name="indexsect"/>
|
65
|
-
</zeroOrMore>
|
66
|
-
</element>
|
67
|
-
</define>
|
68
65
|
</grammar>
|
@@ -1208,7 +1208,7 @@ numbers</a:documentation>
|
|
1208
1208
|
</define>
|
1209
1209
|
<define name="standard-document">
|
1210
1210
|
<a:documentation>Representation of a standardisation document</a:documentation>
|
1211
|
-
<element name="
|
1211
|
+
<element name="metanorma">
|
1212
1212
|
<ref name="Root-Attributes"/>
|
1213
1213
|
<ref name="bibdata">
|
1214
1214
|
<a:documentation>Bibliographic description of the document itself, expressed in the Relaton model</a:documentation>
|
data/metanorma-csa.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
31
31
|
|
32
|
-
spec.add_dependency "metanorma-generic", "~>
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 3.0.0"
|
33
33
|
|
34
34
|
spec.add_development_dependency "debug"
|
35
35
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-csa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
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-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.0.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:
|
26
|
+
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|