metanorma-csa 2.5.11 → 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 +361 -71
- data/lib/metanorma/csa/biblio.rng +2 -0
- 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'] |
|
@@ -5869,9 +5874,14 @@
|
|
5869
5874
|
|
5870
5875
|
<xsl:variable name="simple-table">
|
5871
5876
|
|
5877
|
+
<xsl:variable name="table_without_semantic_elements">
|
5878
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
5879
|
+
</xsl:variable>
|
5880
|
+
|
5872
5881
|
<!-- Step 0. replace <br/> to <p>...</p> -->
|
5873
5882
|
<xsl:variable name="table_without_br">
|
5874
|
-
<xsl:apply-templates mode="table-without-br"/>
|
5883
|
+
<!-- <xsl:apply-templates mode="table-without-br"/> -->
|
5884
|
+
<xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
|
5875
5885
|
</xsl:variable>
|
5876
5886
|
|
5877
5887
|
<!-- Step 1. colspan processing -->
|
@@ -6487,6 +6497,8 @@
|
|
6487
6497
|
<!-- ======================================= -->
|
6488
6498
|
<!-- math -->
|
6489
6499
|
<!-- ======================================= -->
|
6500
|
+
<xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
|
6501
|
+
|
6490
6502
|
<xsl:template match="mathml:math">
|
6491
6503
|
<xsl:variable name="isAdded" select="@added"/>
|
6492
6504
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -6846,10 +6858,10 @@
|
|
6846
6858
|
<xsl:template match="*[local-name()='localityStack']"/>
|
6847
6859
|
|
6848
6860
|
<xsl:variable name="pdfAttachmentsList_">
|
6849
|
-
<xsl:for-each select="//*[
|
6861
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
6850
6862
|
<attachment filename="{@name}"/>
|
6851
6863
|
</xsl:for-each>
|
6852
|
-
<xsl:if test="not(//*[
|
6864
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
6853
6865
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
6854
6866
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
6855
6867
|
<attachment filename="{$attachment_path}"/>
|
@@ -8319,7 +8331,9 @@
|
|
8319
8331
|
<xsl:apply-templates mode="bookmarks"/>
|
8320
8332
|
</xsl:template>
|
8321
8333
|
|
8322
|
-
<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">
|
8323
8337
|
<xsl:apply-templates select="."/>
|
8324
8338
|
</xsl:template>
|
8325
8339
|
|
@@ -8336,7 +8350,15 @@
|
|
8336
8350
|
<xsl:apply-templates mode="contents"/>
|
8337
8351
|
</xsl:template>
|
8338
8352
|
|
8339
|
-
<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">
|
8340
8362
|
<xsl:apply-templates mode="bookmarks"/>
|
8341
8363
|
</xsl:template>
|
8342
8364
|
|
@@ -8349,6 +8371,13 @@
|
|
8349
8371
|
<xsl:apply-templates mode="bookmarks"/>
|
8350
8372
|
</xsl:template>
|
8351
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
|
+
|
8352
8381
|
<!-- Bookmarks -->
|
8353
8382
|
<xsl:template name="addBookmarks">
|
8354
8383
|
<xsl:param name="contents"/>
|
@@ -8633,6 +8662,13 @@
|
|
8633
8662
|
|
8634
8663
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
|
8635
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
|
+
|
8636
8672
|
<xsl:template name="getSection">
|
8637
8673
|
<xsl:choose>
|
8638
8674
|
<xsl:when test="*[local-name() = 'fmt-title']">
|
@@ -8752,7 +8788,8 @@
|
|
8752
8788
|
</xsl:copy>
|
8753
8789
|
</xsl:template>
|
8754
8790
|
|
8755
|
-
<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">
|
8756
8793
|
<xsl:copy-of select="."/>
|
8757
8794
|
</xsl:template>
|
8758
8795
|
|
@@ -8816,7 +8853,7 @@
|
|
8816
8853
|
<!-- sourcecode -->
|
8817
8854
|
<!-- =============== -->
|
8818
8855
|
|
8819
|
-
<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']"/>
|
8820
8857
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
8821
8858
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
8822
8859
|
|
@@ -10275,7 +10312,7 @@
|
|
10275
10312
|
|
10276
10313
|
</xsl:template> <!-- sections_element_style -->
|
10277
10314
|
|
10278
|
-
<xsl:template match="//*[
|
10315
|
+
<xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
|
10279
10316
|
|
10280
10317
|
<fo:block break-after="page"/>
|
10281
10318
|
|
@@ -10379,7 +10416,7 @@
|
|
10379
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>
|
10380
10417
|
</xsl:when>
|
10381
10418
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
10382
|
-
<xsl:when test="ancestor::*[
|
10419
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
10383
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>
|
10384
10421
|
</xsl:when>
|
10385
10422
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
@@ -11695,7 +11732,7 @@
|
|
11695
11732
|
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
11696
11733
|
|
11697
11734
|
<!-- move section 'Normative references' inside 'sections' -->
|
11698
|
-
<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']]">
|
11699
11736
|
<xsl:sort select="@displayorder" data-type="number"/>
|
11700
11737
|
|
11701
11738
|
<!-- process Section's title -->
|
@@ -11756,10 +11793,126 @@
|
|
11756
11793
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
11757
11794
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
|
11758
11795
|
|
11759
|
-
<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">
|
11760
11827
|
<xsl:copy-of select="."/>
|
11761
11828
|
</xsl:template>
|
11762
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
|
+
|
11763
11916
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
11764
11917
|
<xsl:copy>
|
11765
11918
|
<xsl:copy-of select="@*"/>
|
@@ -11790,7 +11943,7 @@
|
|
11790
11943
|
<!-- add @id - first element with @id plus '_element_name' -->
|
11791
11944
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
11792
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>
|
11793
|
-
<xsl:variable name="document_suffix" select="ancestor::*[
|
11946
|
+
<xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
|
11794
11947
|
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
11795
11948
|
</xsl:if>
|
11796
11949
|
</xsl:template>
|
@@ -11905,16 +12058,30 @@
|
|
11905
12058
|
|
11906
12059
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
11907
12060
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
11908
|
-
<xsl:
|
11909
|
-
<xsl:
|
11910
|
-
|
11911
|
-
|
12061
|
+
<xsl:choose>
|
12062
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
12063
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12064
|
+
</xsl:when>
|
12065
|
+
<xsl:otherwise>
|
12066
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
12067
|
+
<xsl:copy-of select="@*"/>
|
12068
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12069
|
+
</xsl:element>
|
12070
|
+
</xsl:otherwise>
|
12071
|
+
</xsl:choose>
|
11912
12072
|
</xsl:template>
|
11913
12073
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
|
11914
|
-
<xsl:
|
11915
|
-
<xsl:
|
11916
|
-
|
11917
|
-
|
12074
|
+
<xsl:choose>
|
12075
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
12076
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12077
|
+
</xsl:when>
|
12078
|
+
<xsl:otherwise>
|
12079
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
12080
|
+
<xsl:copy-of select="@*"/>
|
12081
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12082
|
+
</xsl:element>
|
12083
|
+
</xsl:otherwise>
|
12084
|
+
</xsl:choose>
|
11918
12085
|
</xsl:template>
|
11919
12086
|
|
11920
12087
|
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
@@ -12012,6 +12179,9 @@
|
|
12012
12179
|
<xsl:apply-templates mode="update_xml_pres"/>
|
12013
12180
|
</xsl:template>
|
12014
12181
|
|
12182
|
+
<xsl:template match="*[local-name() = 'semx']">
|
12183
|
+
<xsl:apply-templates/>
|
12184
|
+
</xsl:template>
|
12015
12185
|
<xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
|
12016
12186
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12017
12187
|
</xsl:template>
|
@@ -12023,6 +12193,126 @@
|
|
12023
12193
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
|
12024
12194
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
|
12025
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
|
+
|
12026
12316
|
<!-- END: update new Presentation XML -->
|
12027
12317
|
|
12028
12318
|
<!-- =========================================================================== -->
|
@@ -12095,7 +12385,7 @@
|
|
12095
12385
|
|
12096
12386
|
<xsl:choose>
|
12097
12387
|
<xsl:when test="$page_sequence_at_top = 'true'">
|
12098
|
-
<xsl:for-each select="ancestor::*[ancestor::*[
|
12388
|
+
<xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
|
12099
12389
|
<element pos="{position()}">
|
12100
12390
|
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
12101
12391
|
<xsl:value-of select="name()"/>
|
@@ -12523,7 +12813,7 @@
|
|
12523
12813
|
</xsl:when>
|
12524
12814
|
<xsl:when test="contains($text, $replace)">
|
12525
12815
|
<xsl:value-of select="substring-before($text,$replace)"/>
|
12526
|
-
<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>
|
12527
12817
|
<xsl:call-template name="replaceChar">
|
12528
12818
|
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
|
12529
12819
|
<xsl:with-param name="replace" select="$replace"/>
|
@@ -12560,7 +12850,7 @@
|
|
12560
12850
|
</xsl:variable>
|
12561
12851
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
12562
12852
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
12563
|
-
<xsl:variable name="lang" select="ancestor::*[
|
12853
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
12564
12854
|
<xsl:variable name="reference" select="@reference"/>
|
12565
12855
|
<!-- fn sequence number in document -->
|
12566
12856
|
<xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
@@ -12605,7 +12895,7 @@
|
|
12605
12895
|
</xsl:template>
|
12606
12896
|
|
12607
12897
|
<xsl:template name="printEdition">
|
12608
|
-
<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) != ''])"/>
|
12609
12899
|
|
12610
12900
|
<xsl:choose>
|
12611
12901
|
<xsl:when test="$edition_i18n != ''">
|
@@ -12615,7 +12905,7 @@
|
|
12615
12905
|
</xsl:call-template>
|
12616
12906
|
</xsl:when>
|
12617
12907
|
<xsl:otherwise>
|
12618
|
-
<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'])"/>
|
12619
12909
|
<xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
|
12620
12910
|
<xsl:call-template name="capitalize">
|
12621
12911
|
<xsl:with-param name="str">
|
@@ -12749,7 +13039,7 @@
|
|
12749
13039
|
<xsl:param name="charDelim" select="', '"/>
|
12750
13040
|
<xsl:choose>
|
12751
13041
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
12752
|
-
<xsl:for-each select="//*[
|
13042
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
12753
13043
|
<xsl:sort data-type="text" order="ascending"/>
|
12754
13044
|
<xsl:call-template name="insertKeyword">
|
12755
13045
|
<xsl:with-param name="meta" select="$meta"/>
|
@@ -12759,7 +13049,7 @@
|
|
12759
13049
|
</xsl:for-each>
|
12760
13050
|
</xsl:when>
|
12761
13051
|
<xsl:otherwise>
|
12762
|
-
<xsl:for-each select="//*[
|
13052
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
12763
13053
|
<xsl:call-template name="insertKeyword">
|
12764
13054
|
<xsl:with-param name="meta" select="$meta"/>
|
12765
13055
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -12834,7 +13124,7 @@
|
|
12834
13124
|
<!-- Dublin Core properties go here -->
|
12835
13125
|
<dc:title>
|
12836
13126
|
<xsl:variable name="title">
|
12837
|
-
<xsl:for-each select="(//*[
|
13127
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
12838
13128
|
|
12839
13129
|
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
12840
13130
|
|
@@ -12854,7 +13144,7 @@
|
|
12854
13144
|
</rdf:Alt>
|
12855
13145
|
</dc:title>
|
12856
13146
|
<xsl:variable name="dc_creator">
|
12857
|
-
<xsl:for-each select="(//*[
|
13147
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
12858
13148
|
|
12859
13149
|
<rdf:Seq>
|
12860
13150
|
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
@@ -12876,7 +13166,7 @@
|
|
12876
13166
|
<xsl:variable name="dc_description">
|
12877
13167
|
<xsl:variable name="abstract">
|
12878
13168
|
|
12879
|
-
<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'])]"/>
|
12880
13170
|
|
12881
13171
|
</xsl:variable>
|
12882
13172
|
<rdf:Alt>
|
@@ -12904,7 +13194,7 @@
|
|
12904
13194
|
</rdf:RDF>
|
12905
13195
|
</x:xmpmeta>
|
12906
13196
|
<!-- add attachments -->
|
12907
|
-
<xsl:for-each select="//*[
|
13197
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
12908
13198
|
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
12909
13199
|
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
12910
13200
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
@@ -12938,7 +13228,7 @@
|
|
12938
13228
|
</pdf:embedded-file>
|
12939
13229
|
</xsl:for-each>
|
12940
13230
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
12941
|
-
<xsl:if test="not(//*[
|
13231
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
12942
13232
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
12943
13233
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
12944
13234
|
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
@@ -13142,9 +13432,9 @@
|
|
13142
13432
|
<xsl:value-of select="document('')//*/namespace::csa"/>
|
13143
13433
|
|
13144
13434
|
</xsl:variable>
|
13145
|
-
<xsl:if test="$documentNS != $XSLNS">
|
13435
|
+
<!-- <xsl:if test="$documentNS != $XSLNS">
|
13146
13436
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
13147
|
-
</xsl:if>
|
13437
|
+
</xsl:if> -->
|
13148
13438
|
</xsl:template> <!-- namespaceCheck -->
|
13149
13439
|
|
13150
13440
|
<xsl:template name="getLanguage">
|
@@ -13223,10 +13513,10 @@
|
|
13223
13513
|
|
13224
13514
|
<xsl:variable name="data_value">
|
13225
13515
|
<xsl:choose>
|
13226
|
-
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) !=
|
13516
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
|
13227
13517
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13228
13518
|
</xsl:when>
|
13229
|
-
<xsl:when test="string-length($bibdata_updated) !=
|
13519
|
+
<xsl:when test="string-length($bibdata_updated) != 0">
|
13230
13520
|
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13231
13521
|
</xsl:when>
|
13232
13522
|
<xsl:when test="$formatted = 'true'">
|
@@ -13364,7 +13654,7 @@
|
|
13364
13654
|
<!-- background image -->
|
13365
13655
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
13366
13656
|
<fo:block>
|
13367
|
-
<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]">
|
13368
13658
|
<xsl:choose>
|
13369
13659
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
13370
13660
|
<fo:instream-foreign-object fox:alt-text="Image Front">
|
@@ -947,6 +947,8 @@ May be electronic (e.g. Twitter direct message, email) or voice (e.g. a remark m
|
|
947
947
|
typically cited as "personal communication")</a:documentation>
|
948
948
|
<value>conversation</value>
|
949
949
|
<a:documentation>An exchange of messages between two or more persons. May be electronic (e.g. web chat) or voice (e.g. phone call)</a:documentation>
|
950
|
+
<value>collection</value>
|
951
|
+
<a:documentation>A compound resource consisting of other resources, which are themselves presupposed to have their type specified..</a:documentation>
|
950
952
|
<value>misc</value>
|
951
953
|
<a:documentation>Bibliographic type not adequately described in the foregoing</a:documentation>
|
952
954
|
</choice>
|
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-
|
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
|