metanorma-ogc 2.6.11 → 2.7.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/ogc/ogc.abstract-specification-topic.xsl +405 -115
- data/lib/isodoc/ogc/ogc.best-practice.xsl +405 -115
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +405 -115
- data/lib/isodoc/ogc/ogc.community-practice.xsl +405 -115
- data/lib/isodoc/ogc/ogc.community-standard.xsl +405 -115
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +405 -115
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +405 -115
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +405 -115
- data/lib/isodoc/ogc/ogc.other.xsl +405 -115
- data/lib/isodoc/ogc/ogc.policy.xsl +405 -115
- data/lib/isodoc/ogc/ogc.reference-model.xsl +405 -115
- data/lib/isodoc/ogc/ogc.release-notes.xsl +405 -115
- data/lib/isodoc/ogc/ogc.standard.xsl +405 -115
- data/lib/isodoc/ogc/ogc.test-suite.xsl +405 -115
- data/lib/isodoc/ogc/ogc.user-guide.xsl +405 -115
- data/lib/isodoc/ogc/ogc.white-paper.xsl +377 -87
- data/lib/isodoc/ogc/sections.rb +4 -0
- data/lib/metanorma/ogc/biblio.rng +2 -0
- data/lib/metanorma/ogc/converter.rb +2 -2
- data/lib/metanorma/ogc/isodoc.rng +12 -6
- data/lib/metanorma/ogc/ogc.rng +28 -30
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +4 -4
@@ -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:ogc="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:ogc="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:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
|
2
2
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
@@ -24,8 +24,8 @@
|
|
24
24
|
|
25
25
|
<xsl:variable name="color">rgb(0, 51, 102)</xsl:variable>
|
26
26
|
|
27
|
-
<xsl:variable name="color_text_title" select="/ogc:
|
28
|
-
<xsl:variable name="color_table_header_row" select="/ogc:
|
27
|
+
<xsl:variable name="color_text_title" select="/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-text-title']/ogc:value"/>
|
28
|
+
<xsl:variable name="color_table_header_row" select="/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-table-header']/ogc:value"/>
|
29
29
|
|
30
30
|
<xsl:attribute-set name="title-toc-style">
|
31
31
|
<xsl:attribute name="font-size">26pt</xsl:attribute>
|
@@ -156,7 +156,7 @@
|
|
156
156
|
<fo:block-container margin-left="-12mm" margin-right="-9mm">
|
157
157
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
158
158
|
<fo:block font-size="36pt" background-color="{$color}" color="white" margin-left="2.5mm" padding-top="1mm" padding-left="1mm" role="H1">
|
159
|
-
<xsl:apply-templates select="/ogc:
|
159
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:bibdata/ogc:title/node()"/>
|
160
160
|
</fo:block>
|
161
161
|
</fo:block-container>
|
162
162
|
</fo:block-container>
|
@@ -166,27 +166,27 @@
|
|
166
166
|
</fo:block> -->
|
167
167
|
|
168
168
|
<fo:block text-align="right" font-size="10pt" margin-top="12pt" margin-bottom="24pt">
|
169
|
-
<fo:block margin-top="6pt">Submission Date: <xsl:value-of select="/ogc:
|
170
|
-
<fo:block margin-top="6pt">Approval Date: <xsl:value-of select="/ogc:
|
171
|
-
<fo:block margin-top="6pt">Publication Date: <xsl:value-of select="/ogc:
|
172
|
-
<fo:block margin-top="6pt">External identifier of this OGC® document: <xsl:value-of select="/ogc:
|
173
|
-
<fo:block margin-top="6pt">Internal reference number of this OGC® document: <xsl:value-of select="/ogc:
|
169
|
+
<fo:block margin-top="6pt">Submission Date: <xsl:value-of select="/ogc:metanorma/ogc:bibdata/ogc:date[@type = 'received']/ogc:on"/></fo:block>
|
170
|
+
<fo:block margin-top="6pt">Approval Date: <xsl:value-of select="/ogc:metanorma/ogc:bibdata/ogc:date[@type = 'issued']/ogc:on"/></fo:block>
|
171
|
+
<fo:block margin-top="6pt">Publication Date: <xsl:value-of select="/ogc:metanorma/ogc:bibdata/ogc:date[@type = 'published']/ogc:on"/></fo:block>
|
172
|
+
<fo:block margin-top="6pt">External identifier of this OGC® document: <xsl:value-of select="/ogc:metanorma/ogc:bibdata/ogc:docidentifier[@type = 'ogc-external']"/></fo:block>
|
173
|
+
<fo:block margin-top="6pt">Internal reference number of this OGC® document: <xsl:value-of select="/ogc:metanorma/ogc:bibdata/ogc:docnumber"/></fo:block>
|
174
174
|
|
175
|
-
<xsl:variable name="url" select="/ogc:
|
175
|
+
<xsl:variable name="url" select="/ogc:metanorma/ogc:bibdata/ogc:uri"/>
|
176
176
|
<xsl:if test="normalize-space($url) != ''">
|
177
177
|
<fo:block margin-top="6pt">URL for this OGC® document: <xsl:value-of select="$url"/></fo:block>
|
178
178
|
</xsl:if>
|
179
179
|
|
180
|
-
<xsl:apply-templates select="/ogc:
|
180
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:bibdata/ogc:edition[normalize-space(@language) = '']"/>
|
181
181
|
|
182
182
|
<fo:block margin-top="6pt"><xsl:text>Category: </xsl:text>
|
183
183
|
<xsl:call-template name="capitalizeWords">
|
184
|
-
<xsl:with-param name="str" select="/ogc:
|
184
|
+
<xsl:with-param name="str" select="/ogc:metanorma/ogc:bibdata/ogc:ext/ogc:doctype"/>
|
185
185
|
</xsl:call-template>
|
186
186
|
</fo:block>
|
187
187
|
|
188
188
|
<xsl:variable name="editors">
|
189
|
-
<xsl:for-each select="/ogc:
|
189
|
+
<xsl:for-each select="/ogc:metanorma/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
190
190
|
<xsl:value-of select="."/>
|
191
191
|
<xsl:if test="position() != last()">, </xsl:if>
|
192
192
|
</xsl:for-each>
|
@@ -206,14 +206,14 @@
|
|
206
206
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
207
207
|
<fo:block margin-top="8pt">
|
208
208
|
<xsl:variable name="copyright_statement">
|
209
|
-
<xsl:apply-templates select="/ogc:
|
209
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:copyright-statement" mode="update_xml_step1"/>
|
210
210
|
</xsl:variable>
|
211
211
|
<xsl:apply-templates select="xalan:nodeset($copyright_statement)/*"/>
|
212
212
|
</fo:block>
|
213
213
|
<fo:block margin-top="8pt"> </fo:block>
|
214
214
|
<fo:block margin-top="8pt">
|
215
215
|
<xsl:variable name="legal_statement">
|
216
|
-
<xsl:apply-templates select="/ogc:
|
216
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:legal-statement" mode="update_xml_step1"/>
|
217
217
|
</xsl:variable>
|
218
218
|
<xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
|
219
219
|
</fo:block>
|
@@ -258,8 +258,8 @@
|
|
258
258
|
<xsl:call-template name="insertHeaderFooter"/>
|
259
259
|
<fo:flow flow-name="xsl-region-body">
|
260
260
|
|
261
|
-
<!-- <xsl:apply-templates select="/ogc:
|
262
|
-
<xsl:apply-templates select="/ogc:
|
261
|
+
<!-- <xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:license-statement"/>
|
262
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:feedback-statement"/> -->
|
263
263
|
|
264
264
|
<!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
|
265
265
|
<!-- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
@@ -323,8 +323,8 @@
|
|
323
323
|
|
324
324
|
<xsl:element name="boilerplate" namespace="{$namespace_full}"> <!-- save context element -->
|
325
325
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
326
|
-
<xsl:apply-templates select="/ogc:
|
327
|
-
<xsl:apply-templates select="/ogc:
|
326
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:license-statement" mode="update_xml_step_move_pagebreak"/>
|
327
|
+
<xsl:apply-templates select="/ogc:metanorma/ogc:boilerplate/ogc:feedback-statement" mode="update_xml_step_move_pagebreak"/>
|
328
328
|
</xsl:element>
|
329
329
|
</xsl:element>
|
330
330
|
|
@@ -504,14 +504,14 @@
|
|
504
504
|
<!-- ============================= -->
|
505
505
|
<!-- ============================= -->
|
506
506
|
|
507
|
-
<xsl:template match="/ogc:
|
507
|
+
<xsl:template match="/ogc:metanorma/ogc:bibdata/ogc:uri[not(@type)]">
|
508
508
|
<fo:block margin-bottom="12pt">
|
509
509
|
<xsl:text>URL for this OGC® document: </xsl:text>
|
510
510
|
<xsl:value-of select="."/><xsl:text> </xsl:text>
|
511
511
|
</fo:block>
|
512
512
|
</xsl:template>
|
513
513
|
|
514
|
-
<xsl:template match="/ogc:
|
514
|
+
<xsl:template match="/ogc:metanorma/ogc:bibdata/ogc:edition">
|
515
515
|
<xsl:variable name="edition" select="."/>
|
516
516
|
<xsl:if test="normalize-space($edition) != ''">
|
517
517
|
<fo:block margin-top="6pt">
|
@@ -778,21 +778,21 @@
|
|
778
778
|
|
779
779
|
<xsl:variable name="namespace_full_">
|
780
780
|
<xsl:choose>
|
781
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[
|
782
|
-
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/
|
781
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
782
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
|
783
783
|
</xsl:choose>
|
784
784
|
</xsl:variable>
|
785
785
|
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
786
786
|
|
787
787
|
<xsl:variable name="root_element_">
|
788
788
|
<xsl:choose>
|
789
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[
|
790
|
-
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
789
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
790
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
|
791
791
|
</xsl:choose>
|
792
792
|
</xsl:variable>
|
793
793
|
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
794
794
|
|
795
|
-
<xsl:variable name="document_scheme" select="normalize-space(//*[
|
795
|
+
<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'])"/>
|
796
796
|
|
797
797
|
<!-- external parameters -->
|
798
798
|
|
@@ -893,7 +893,7 @@
|
|
893
893
|
</metanorma-extension>
|
894
894
|
-->
|
895
895
|
|
896
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[
|
896
|
+
<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'])))"/>
|
897
897
|
<xsl:variable name="papersize_width_">
|
898
898
|
<xsl:choose>
|
899
899
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -955,7 +955,7 @@
|
|
955
955
|
<xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
|
956
956
|
|
957
957
|
<xsl:variable name="layout_columns_default">1</xsl:variable>
|
958
|
-
<xsl:variable name="layout_columns_" select="normalize-space((//*[
|
958
|
+
<xsl:variable name="layout_columns_" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
|
959
959
|
<xsl:variable name="layout_columns">
|
960
960
|
<xsl:choose>
|
961
961
|
<xsl:when test="$layout_columns_ != ''"><xsl:value-of select="$layout_columns_"/></xsl:when>
|
@@ -1016,7 +1016,7 @@
|
|
1016
1016
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
1017
1017
|
|
1018
1018
|
<xsl:variable name="title-list-tables">
|
1019
|
-
<xsl:variable name="toc_table_title" select="//*[
|
1019
|
+
<xsl:variable name="toc_table_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
1020
1020
|
<xsl:value-of select="$toc_table_title"/>
|
1021
1021
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
1022
1022
|
<xsl:call-template name="getLocalizedString">
|
@@ -1026,7 +1026,7 @@
|
|
1026
1026
|
</xsl:variable>
|
1027
1027
|
|
1028
1028
|
<xsl:variable name="title-list-figures">
|
1029
|
-
<xsl:variable name="toc_figure_title" select="//*[
|
1029
|
+
<xsl:variable name="toc_figure_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
1030
1030
|
<xsl:value-of select="$toc_figure_title"/>
|
1031
1031
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
1032
1032
|
<xsl:call-template name="getLocalizedString">
|
@@ -1036,7 +1036,7 @@
|
|
1036
1036
|
</xsl:variable>
|
1037
1037
|
|
1038
1038
|
<xsl:variable name="title-list-recommendations">
|
1039
|
-
<xsl:variable name="toc_requirement_title" select="//*[
|
1039
|
+
<xsl:variable name="toc_requirement_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
1040
1040
|
<xsl:value-of select="$toc_requirement_title"/>
|
1041
1041
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
1042
1042
|
<xsl:call-template name="getLocalizedString">
|
@@ -1046,8 +1046,8 @@
|
|
1046
1046
|
</xsl:variable>
|
1047
1047
|
|
1048
1048
|
<xsl:variable name="bibdata">
|
1049
|
-
<xsl:copy-of select="//*[
|
1050
|
-
<xsl:copy-of select="//*[
|
1049
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']"/>
|
1050
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'localized-strings']"/>
|
1051
1051
|
</xsl:variable>
|
1052
1052
|
|
1053
1053
|
<!-- Characters -->
|
@@ -1112,7 +1112,7 @@
|
|
1112
1112
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1113
1113
|
|
1114
1114
|
<xsl:variable name="additional_fonts_">
|
1115
|
-
<xsl:for-each select="//*[
|
1115
|
+
<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']">
|
1116
1116
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1117
1117
|
</xsl:for-each>
|
1118
1118
|
</xsl:variable>
|
@@ -2525,10 +2525,10 @@
|
|
2525
2525
|
|
2526
2526
|
<xsl:template name="processTablesFigures_Contents">
|
2527
2527
|
<xsl:param name="always"/>
|
2528
|
-
<xsl:if test="(//*[
|
2528
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2529
2529
|
<xsl:call-template name="processTables_Contents"/>
|
2530
2530
|
</xsl:if>
|
2531
|
-
<xsl:if test="(//*[
|
2531
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2532
2532
|
<xsl:call-template name="processFigures_Contents"/>
|
2533
2533
|
</xsl:if>
|
2534
2534
|
</xsl:template>
|
@@ -2608,7 +2608,7 @@
|
|
2608
2608
|
</xsl:template><!-- END: processMainSectionsDefault -->
|
2609
2609
|
|
2610
2610
|
<!-- Example:
|
2611
|
-
<
|
2611
|
+
<metanorma>
|
2612
2612
|
<preface>
|
2613
2613
|
<page_sequence>
|
2614
2614
|
<clause...
|
@@ -2631,7 +2631,7 @@
|
|
2631
2631
|
<page_sequence>
|
2632
2632
|
<annex ..
|
2633
2633
|
</page_sequence>
|
2634
|
-
</
|
2634
|
+
</metanorma>
|
2635
2635
|
-->
|
2636
2636
|
<xsl:template name="processPrefaceAndMainSectionsDefault_items">
|
2637
2637
|
|
@@ -2674,15 +2674,8 @@
|
|
2674
2674
|
</xsl:template> <!-- END: insertPrefaceSectionsPageSequences -->
|
2675
2675
|
|
2676
2676
|
<xsl:template name="insertMainSectionsPageSequences">
|
2677
|
-
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
2678
|
-
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
2679
|
-
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2680
|
-
<xsl:sort select="@displayorder" data-type="number"/>
|
2681
|
-
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
2682
2677
|
|
2683
|
-
|
2684
|
-
</xsl:element>
|
2685
|
-
</xsl:element>
|
2678
|
+
<xsl:call-template name="insertSectionsInPageSequence"/>
|
2686
2679
|
|
2687
2680
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
2688
2681
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
@@ -2701,6 +2694,18 @@
|
|
2701
2694
|
</xsl:element>
|
2702
2695
|
</xsl:template> <!-- END: insertMainSectionsPageSequences -->
|
2703
2696
|
|
2697
|
+
<xsl:template name="insertSectionsInPageSequence">
|
2698
|
+
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
2699
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
2700
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2701
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2702
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
2703
|
+
|
2704
|
+
</xsl:for-each>
|
2705
|
+
</xsl:element>
|
2706
|
+
</xsl:element>
|
2707
|
+
</xsl:template>
|
2708
|
+
|
2704
2709
|
<xsl:template name="insertMainSectionsInSeparatePageSequences">
|
2705
2710
|
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
2706
2711
|
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
@@ -4250,7 +4255,7 @@
|
|
4250
4255
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
4251
4256
|
|
4252
4257
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
4253
|
-
<xsl:variable name="lang" select="ancestor::*[
|
4258
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
4254
4259
|
<xsl:variable name="reference_">
|
4255
4260
|
<xsl:value-of select="@reference"/>
|
4256
4261
|
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
@@ -4371,13 +4376,13 @@
|
|
4371
4376
|
footnotes in bibliography
|
4372
4377
|
footnotes in document's body (except table's head/body/foot and figure text)
|
4373
4378
|
-->
|
4374
|
-
<xsl:for-each select="ancestor::*[
|
4379
|
+
<xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
4375
4380
|
<fn gen_id="{generate-id(.)}">
|
4376
4381
|
<xsl:copy-of select="@*"/>
|
4377
4382
|
<xsl:copy-of select="node()"/>
|
4378
4383
|
</fn>
|
4379
4384
|
</xsl:for-each>
|
4380
|
-
<xsl:for-each select="ancestor::*[
|
4385
|
+
<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']/*">
|
4381
4386
|
<xsl:sort select="@displayorder" data-type="number"/>
|
4382
4387
|
<!-- commented:
|
4383
4388
|
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
@@ -6129,9 +6134,14 @@
|
|
6129
6134
|
|
6130
6135
|
<xsl:variable name="simple-table">
|
6131
6136
|
|
6137
|
+
<xsl:variable name="table_without_semantic_elements">
|
6138
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
6139
|
+
</xsl:variable>
|
6140
|
+
|
6132
6141
|
<!-- Step 0. replace <br/> to <p>...</p> -->
|
6133
6142
|
<xsl:variable name="table_without_br">
|
6134
|
-
<xsl:apply-templates mode="table-without-br"/>
|
6143
|
+
<!-- <xsl:apply-templates mode="table-without-br"/> -->
|
6144
|
+
<xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
|
6135
6145
|
</xsl:variable>
|
6136
6146
|
|
6137
6147
|
<!-- Step 1. colspan processing -->
|
@@ -6747,6 +6757,8 @@
|
|
6747
6757
|
<!-- ======================================= -->
|
6748
6758
|
<!-- math -->
|
6749
6759
|
<!-- ======================================= -->
|
6760
|
+
<xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
|
6761
|
+
|
6750
6762
|
<xsl:template match="mathml:math">
|
6751
6763
|
<xsl:variable name="isAdded" select="@added"/>
|
6752
6764
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -7106,10 +7118,10 @@
|
|
7106
7118
|
<xsl:template match="*[local-name()='localityStack']"/>
|
7107
7119
|
|
7108
7120
|
<xsl:variable name="pdfAttachmentsList_">
|
7109
|
-
<xsl:for-each select="//*[
|
7121
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
7110
7122
|
<attachment filename="{@name}"/>
|
7111
7123
|
</xsl:for-each>
|
7112
|
-
<xsl:if test="not(//*[
|
7124
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
7113
7125
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
7114
7126
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
7115
7127
|
<attachment filename="{$attachment_path}"/>
|
@@ -8575,7 +8587,9 @@
|
|
8575
8587
|
<xsl:apply-templates mode="bookmarks"/>
|
8576
8588
|
</xsl:template>
|
8577
8589
|
|
8578
|
-
<xsl:template match="*[local-name() = '
|
8590
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents"/>
|
8591
|
+
|
8592
|
+
<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">
|
8579
8593
|
<xsl:apply-templates select="."/>
|
8580
8594
|
</xsl:template>
|
8581
8595
|
|
@@ -8592,7 +8606,15 @@
|
|
8592
8606
|
<xsl:apply-templates mode="contents"/>
|
8593
8607
|
</xsl:template>
|
8594
8608
|
|
8595
|
-
<xsl:template match="*[local-name() = '
|
8609
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents"/>
|
8610
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents"/>
|
8611
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents"/>
|
8612
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents"/>
|
8613
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
8614
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
8615
|
+
|
8616
|
+
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
8617
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
8596
8618
|
<xsl:apply-templates mode="bookmarks"/>
|
8597
8619
|
</xsl:template>
|
8598
8620
|
|
@@ -8605,6 +8627,13 @@
|
|
8605
8627
|
<xsl:apply-templates mode="bookmarks"/>
|
8606
8628
|
</xsl:template>
|
8607
8629
|
|
8630
|
+
<xsl:template match="*[local-name() = 'concept']" mode="bookmarks"/>
|
8631
|
+
<xsl:template match="*[local-name() = 'eref']" mode="bookmarks"/>
|
8632
|
+
<xsl:template match="*[local-name() = 'xref']" mode="bookmarks"/>
|
8633
|
+
<xsl:template match="*[local-name() = 'link']" mode="bookmarks"/>
|
8634
|
+
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
8635
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
8636
|
+
|
8608
8637
|
<!-- Bookmarks -->
|
8609
8638
|
<xsl:template name="addBookmarks">
|
8610
8639
|
<xsl:param name="contents"/>
|
@@ -8855,6 +8884,13 @@
|
|
8855
8884
|
|
8856
8885
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
|
8857
8886
|
|
8887
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents_item"/>
|
8888
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents_item"/>
|
8889
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents_item"/>
|
8890
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents_item"/>
|
8891
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents_item"/>
|
8892
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents_item"/>
|
8893
|
+
|
8858
8894
|
<xsl:template name="getSection">
|
8859
8895
|
<xsl:choose>
|
8860
8896
|
<xsl:when test="*[local-name() = 'fmt-title']">
|
@@ -8974,7 +9010,8 @@
|
|
8974
9010
|
</xsl:copy>
|
8975
9011
|
</xsl:template>
|
8976
9012
|
|
8977
|
-
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"
|
9013
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"/>
|
9014
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="contents_item">
|
8978
9015
|
<xsl:copy-of select="."/>
|
8979
9016
|
</xsl:template>
|
8980
9017
|
|
@@ -9038,7 +9075,7 @@
|
|
9038
9075
|
<!-- sourcecode -->
|
9039
9076
|
<!-- =============== -->
|
9040
9077
|
|
9041
|
-
<xsl:variable name="source-highlighter-css_" select="//*[
|
9078
|
+
<xsl:variable name="source-highlighter-css_" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
9042
9079
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
9043
9080
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
9044
9081
|
|
@@ -10531,7 +10568,7 @@
|
|
10531
10568
|
|
10532
10569
|
</xsl:template> <!-- sections_element_style -->
|
10533
10570
|
|
10534
|
-
<xsl:template match="//*[
|
10571
|
+
<xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
|
10535
10572
|
|
10536
10573
|
<fo:block break-after="page"/>
|
10537
10574
|
|
@@ -10635,7 +10672,7 @@
|
|
10635
10672
|
<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>
|
10636
10673
|
</xsl:when>
|
10637
10674
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
10638
|
-
<xsl:when test="ancestor::*[
|
10675
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
10639
10676
|
<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>
|
10640
10677
|
</xsl:when>
|
10641
10678
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
@@ -11751,7 +11788,7 @@
|
|
11751
11788
|
|
11752
11789
|
<xsl:call-template name="setBlockSpanAll"/>
|
11753
11790
|
|
11754
|
-
<xsl:variable name="admonition_color" select="normalize-space(/ogc:
|
11791
|
+
<xsl:variable name="admonition_color" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = concat('color-admonition-', @type)]/ogc:value)"/>
|
11755
11792
|
<xsl:if test="$admonition_color != ''">
|
11756
11793
|
<xsl:attribute name="border">0.5pt solid <xsl:value-of select="$admonition_color"/></xsl:attribute>
|
11757
11794
|
<xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
|
@@ -11977,7 +12014,7 @@
|
|
11977
12014
|
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
11978
12015
|
|
11979
12016
|
<!-- move section 'Normative references' inside 'sections' -->
|
11980
|
-
<xsl:for-each select="* | ancestor::*[
|
12017
|
+
<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']]">
|
11981
12018
|
<xsl:sort select="@displayorder" data-type="number"/>
|
11982
12019
|
|
11983
12020
|
<!-- process Section's title -->
|
@@ -12038,10 +12075,126 @@
|
|
12038
12075
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
12039
12076
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
|
12040
12077
|
|
12041
|
-
<xsl:template match="*[local-name() = 'stem']
|
12078
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
12079
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
12080
|
+
|
12081
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_step1">
|
12082
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
12083
|
+
<xsl:copy-of select="@*"/>
|
12084
|
+
<xsl:choose>
|
12085
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
12086
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
12087
|
+
</xsl:when>
|
12088
|
+
<xsl:otherwise>
|
12089
|
+
<xsl:copy-of select="node()"/>
|
12090
|
+
</xsl:otherwise>
|
12091
|
+
</xsl:choose>
|
12092
|
+
</xsl:element>
|
12093
|
+
</xsl:template>
|
12094
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_pres">
|
12095
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
12096
|
+
<xsl:copy-of select="@*"/>
|
12097
|
+
<xsl:choose>
|
12098
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
12099
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
12100
|
+
</xsl:when>
|
12101
|
+
<xsl:otherwise>
|
12102
|
+
<xsl:copy-of select="node()"/>
|
12103
|
+
</xsl:otherwise>
|
12104
|
+
</xsl:choose>
|
12105
|
+
</xsl:element>
|
12106
|
+
</xsl:template>
|
12107
|
+
|
12108
|
+
<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">
|
12042
12109
|
<xsl:copy-of select="."/>
|
12043
12110
|
</xsl:template>
|
12044
12111
|
|
12112
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
12113
|
+
<!-- *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] -->
|
12114
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_step1">
|
12115
|
+
<xsl:copy>
|
12116
|
+
<xsl:copy-of select="@*"/>
|
12117
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
12118
|
+
<xsl:choose>
|
12119
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
12120
|
+
<xsl:choose>
|
12121
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
12122
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
12123
|
+
</xsl:when>
|
12124
|
+
<xsl:otherwise>
|
12125
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_step1"/>
|
12126
|
+
</xsl:otherwise>
|
12127
|
+
</xsl:choose>
|
12128
|
+
</xsl:when>
|
12129
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
12130
|
+
<xsl:choose>
|
12131
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
12132
|
+
<xsl:copy-of select="node()"/>
|
12133
|
+
</xsl:when>
|
12134
|
+
<xsl:otherwise>
|
12135
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_step1"/>
|
12136
|
+
</xsl:otherwise>
|
12137
|
+
</xsl:choose>
|
12138
|
+
</xsl:otherwise>
|
12139
|
+
</xsl:choose>
|
12140
|
+
</xsl:copy>
|
12141
|
+
</xsl:template>
|
12142
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_pres">
|
12143
|
+
<xsl:copy>
|
12144
|
+
<xsl:copy-of select="@*"/>
|
12145
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
12146
|
+
<xsl:choose>
|
12147
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
12148
|
+
<xsl:choose>
|
12149
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
12150
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
12151
|
+
</xsl:when>
|
12152
|
+
<xsl:otherwise>
|
12153
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_pres"/>
|
12154
|
+
</xsl:otherwise>
|
12155
|
+
</xsl:choose>
|
12156
|
+
</xsl:when>
|
12157
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
12158
|
+
<xsl:choose>
|
12159
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
12160
|
+
<xsl:copy-of select="node()"/>
|
12161
|
+
</xsl:when>
|
12162
|
+
<xsl:otherwise>
|
12163
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_pres"/>
|
12164
|
+
</xsl:otherwise>
|
12165
|
+
</xsl:choose>
|
12166
|
+
</xsl:otherwise>
|
12167
|
+
</xsl:choose>
|
12168
|
+
</xsl:copy>
|
12169
|
+
</xsl:template>
|
12170
|
+
|
12171
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
12172
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_step1" priority="2">
|
12173
|
+
<xsl:copy>
|
12174
|
+
<xsl:copy-of select="@*"/>
|
12175
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
12176
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_step1"/>
|
12177
|
+
</xsl:copy>
|
12178
|
+
</xsl:template>
|
12179
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_pres" priority="2">
|
12180
|
+
<xsl:copy>
|
12181
|
+
<xsl:copy-of select="@*"/>
|
12182
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
12183
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_pres"/>
|
12184
|
+
</xsl:copy>
|
12185
|
+
</xsl:template>
|
12186
|
+
|
12187
|
+
<!-- https://github.com/metanorma/isodoc/issues/652 -->
|
12188
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']"/>
|
12189
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']"/>
|
12190
|
+
<xsl:template match="*[local-name() = 'amend']"/>
|
12191
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_step1"/>
|
12192
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_step1"/>
|
12193
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_pres"/>
|
12194
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
12195
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
12196
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
12197
|
+
|
12045
12198
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
12046
12199
|
<xsl:copy>
|
12047
12200
|
<xsl:copy-of select="@*"/>
|
@@ -12072,7 +12225,7 @@
|
|
12072
12225
|
<!-- add @id - first element with @id plus '_element_name' -->
|
12073
12226
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
12074
12227
|
<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>
|
12075
|
-
<xsl:variable name="document_suffix" select="ancestor::*[
|
12228
|
+
<xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
|
12076
12229
|
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
12077
12230
|
</xsl:if>
|
12078
12231
|
</xsl:template>
|
@@ -12187,16 +12340,30 @@
|
|
12187
12340
|
|
12188
12341
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
12189
12342
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
12190
|
-
<xsl:
|
12191
|
-
<xsl:
|
12192
|
-
|
12193
|
-
|
12343
|
+
<xsl:choose>
|
12344
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
12345
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12346
|
+
</xsl:when>
|
12347
|
+
<xsl:otherwise>
|
12348
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
12349
|
+
<xsl:copy-of select="@*"/>
|
12350
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12351
|
+
</xsl:element>
|
12352
|
+
</xsl:otherwise>
|
12353
|
+
</xsl:choose>
|
12194
12354
|
</xsl:template>
|
12195
12355
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
|
12196
|
-
<xsl:
|
12197
|
-
<xsl:
|
12198
|
-
|
12199
|
-
|
12356
|
+
<xsl:choose>
|
12357
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
12358
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12359
|
+
</xsl:when>
|
12360
|
+
<xsl:otherwise>
|
12361
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
12362
|
+
<xsl:copy-of select="@*"/>
|
12363
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12364
|
+
</xsl:element>
|
12365
|
+
</xsl:otherwise>
|
12366
|
+
</xsl:choose>
|
12200
12367
|
</xsl:template>
|
12201
12368
|
|
12202
12369
|
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
@@ -12294,6 +12461,9 @@
|
|
12294
12461
|
<xsl:apply-templates mode="update_xml_pres"/>
|
12295
12462
|
</xsl:template>
|
12296
12463
|
|
12464
|
+
<xsl:template match="*[local-name() = 'semx']">
|
12465
|
+
<xsl:apply-templates/>
|
12466
|
+
</xsl:template>
|
12297
12467
|
<xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
|
12298
12468
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12299
12469
|
</xsl:template>
|
@@ -12305,6 +12475,126 @@
|
|
12305
12475
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
|
12306
12476
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
|
12307
12477
|
|
12478
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_step1">
|
12479
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12480
|
+
</xsl:template>
|
12481
|
+
|
12482
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_pres">
|
12483
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12484
|
+
</xsl:template>
|
12485
|
+
|
12486
|
+
<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"/>
|
12487
|
+
|
12488
|
+
<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"/>
|
12489
|
+
|
12490
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_step1">
|
12491
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12492
|
+
</xsl:template>
|
12493
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_pres">
|
12494
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12495
|
+
</xsl:template>
|
12496
|
+
|
12497
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_step1"/>
|
12498
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_pres"/>
|
12499
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_step1">
|
12500
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
12501
|
+
<xsl:copy-of select="@*"/>
|
12502
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12503
|
+
</xsl:element>
|
12504
|
+
</xsl:template>
|
12505
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_pres">
|
12506
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
12507
|
+
<xsl:copy-of select="@*"/>
|
12508
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12509
|
+
</xsl:element>
|
12510
|
+
</xsl:template>
|
12511
|
+
|
12512
|
+
<xsl:template match="*[local-name() = 'concept']"/>
|
12513
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_step1"/>
|
12514
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_pres"/>
|
12515
|
+
|
12516
|
+
<xsl:template match="*[local-name() = 'fmt-concept']">
|
12517
|
+
<xsl:apply-templates/>
|
12518
|
+
</xsl:template>
|
12519
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_step1">
|
12520
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12521
|
+
</xsl:template>
|
12522
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_pres">
|
12523
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12524
|
+
</xsl:template>
|
12525
|
+
|
12526
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_step1"/>
|
12527
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_pres"/>
|
12528
|
+
|
12529
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_step1">
|
12530
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
12531
|
+
<xsl:copy-of select="@*"/>
|
12532
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12533
|
+
</xsl:element>
|
12534
|
+
</xsl:template>
|
12535
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_pres">
|
12536
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
12537
|
+
<xsl:copy-of select="@*"/>
|
12538
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12539
|
+
</xsl:element>
|
12540
|
+
</xsl:template>
|
12541
|
+
|
12542
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_step1"/>
|
12543
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_pres"/>
|
12544
|
+
|
12545
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_step1">
|
12546
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
12547
|
+
<xsl:copy-of select="@*"/>
|
12548
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12549
|
+
</xsl:element>
|
12550
|
+
</xsl:template>
|
12551
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_pres">
|
12552
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
12553
|
+
<xsl:copy-of select="@*"/>
|
12554
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12555
|
+
</xsl:element>
|
12556
|
+
</xsl:template>
|
12557
|
+
|
12558
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_step1"/>
|
12559
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_pres"/>
|
12560
|
+
|
12561
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_step1">
|
12562
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
12563
|
+
<xsl:copy-of select="@*"/>
|
12564
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12565
|
+
</xsl:element>
|
12566
|
+
</xsl:template>
|
12567
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_pres">
|
12568
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
12569
|
+
<xsl:copy-of select="@*"/>
|
12570
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12571
|
+
</xsl:element>
|
12572
|
+
</xsl:template>
|
12573
|
+
|
12574
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_step1"/>
|
12575
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_pres"/>
|
12576
|
+
|
12577
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_step1">
|
12578
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
12579
|
+
<xsl:copy-of select="@*"/>
|
12580
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12581
|
+
</xsl:element>
|
12582
|
+
</xsl:template>
|
12583
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_pres">
|
12584
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
12585
|
+
<xsl:copy-of select="@*"/>
|
12586
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12587
|
+
</xsl:element>
|
12588
|
+
</xsl:template>
|
12589
|
+
|
12590
|
+
<xsl:template match="*[local-name() = 'erefstack']"/>
|
12591
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_step1"/>
|
12592
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_pres"/>
|
12593
|
+
|
12594
|
+
<xsl:template match="*[local-name() = 'svgmap']"/>
|
12595
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
12596
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
12597
|
+
|
12308
12598
|
<!-- END: update new Presentation XML -->
|
12309
12599
|
|
12310
12600
|
<!-- =========================================================================== -->
|
@@ -12377,7 +12667,7 @@
|
|
12377
12667
|
|
12378
12668
|
<xsl:choose>
|
12379
12669
|
<xsl:when test="$page_sequence_at_top = 'true'">
|
12380
|
-
<xsl:for-each select="ancestor::*[ancestor::*[
|
12670
|
+
<xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
|
12381
12671
|
<element pos="{position()}">
|
12382
12672
|
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
12383
12673
|
<xsl:value-of select="name()"/>
|
@@ -12805,7 +13095,7 @@
|
|
12805
13095
|
</xsl:when>
|
12806
13096
|
<xsl:when test="contains($text, $replace)">
|
12807
13097
|
<xsl:value-of select="substring-before($text,$replace)"/>
|
12808
|
-
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/
|
13098
|
+
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/standoc"><xsl:value-of select="$by"/></xsl:element>
|
12809
13099
|
<xsl:call-template name="replaceChar">
|
12810
13100
|
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
|
12811
13101
|
<xsl:with-param name="replace" select="$replace"/>
|
@@ -12842,7 +13132,7 @@
|
|
12842
13132
|
</xsl:variable>
|
12843
13133
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
12844
13134
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
12845
|
-
<xsl:variable name="lang" select="ancestor::*[
|
13135
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
12846
13136
|
<xsl:variable name="reference" select="@reference"/>
|
12847
13137
|
<!-- fn sequence number in document -->
|
12848
13138
|
<xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
@@ -12887,7 +13177,7 @@
|
|
12887
13177
|
</xsl:template>
|
12888
13178
|
|
12889
13179
|
<xsl:template name="printEdition">
|
12890
|
-
<xsl:variable name="edition_i18n" select="normalize-space((//*[
|
13180
|
+
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
12891
13181
|
|
12892
13182
|
<xsl:choose>
|
12893
13183
|
<xsl:when test="$edition_i18n != ''">
|
@@ -12897,7 +13187,7 @@
|
|
12897
13187
|
</xsl:call-template>
|
12898
13188
|
</xsl:when>
|
12899
13189
|
<xsl:otherwise>
|
12900
|
-
<xsl:variable name="edition" select="normalize-space((//*[
|
13190
|
+
<xsl:variable name="edition" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
|
12901
13191
|
<xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
|
12902
13192
|
<xsl:call-template name="capitalize">
|
12903
13193
|
<xsl:with-param name="str">
|
@@ -13031,7 +13321,7 @@
|
|
13031
13321
|
<xsl:param name="charDelim" select="', '"/>
|
13032
13322
|
<xsl:choose>
|
13033
13323
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
13034
|
-
<xsl:for-each select="//*[
|
13324
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
13035
13325
|
<xsl:sort data-type="text" order="ascending"/>
|
13036
13326
|
<xsl:call-template name="insertKeyword">
|
13037
13327
|
<xsl:with-param name="meta" select="$meta"/>
|
@@ -13041,7 +13331,7 @@
|
|
13041
13331
|
</xsl:for-each>
|
13042
13332
|
</xsl:when>
|
13043
13333
|
<xsl:otherwise>
|
13044
|
-
<xsl:for-each select="//*[
|
13334
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
13045
13335
|
<xsl:call-template name="insertKeyword">
|
13046
13336
|
<xsl:with-param name="meta" select="$meta"/>
|
13047
13337
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -13116,7 +13406,7 @@
|
|
13116
13406
|
<!-- Dublin Core properties go here -->
|
13117
13407
|
<dc:title>
|
13118
13408
|
<xsl:variable name="title">
|
13119
|
-
<xsl:for-each select="(//*[
|
13409
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
13120
13410
|
|
13121
13411
|
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
13122
13412
|
|
@@ -13136,7 +13426,7 @@
|
|
13136
13426
|
</rdf:Alt>
|
13137
13427
|
</dc:title>
|
13138
13428
|
<xsl:variable name="dc_creator">
|
13139
|
-
<xsl:for-each select="(//*[
|
13429
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
13140
13430
|
|
13141
13431
|
<rdf:Seq>
|
13142
13432
|
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
@@ -13158,7 +13448,7 @@
|
|
13158
13448
|
<xsl:variable name="dc_description">
|
13159
13449
|
<xsl:variable name="abstract">
|
13160
13450
|
|
13161
|
-
<xsl:copy-of select="//*[
|
13451
|
+
<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'])]"/>
|
13162
13452
|
|
13163
13453
|
</xsl:variable>
|
13164
13454
|
<rdf:Alt>
|
@@ -13186,7 +13476,7 @@
|
|
13186
13476
|
</rdf:RDF>
|
13187
13477
|
</x:xmpmeta>
|
13188
13478
|
<!-- add attachments -->
|
13189
|
-
<xsl:for-each select="//*[
|
13479
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
13190
13480
|
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
13191
13481
|
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
13192
13482
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
@@ -13220,7 +13510,7 @@
|
|
13220
13510
|
</pdf:embedded-file>
|
13221
13511
|
</xsl:for-each>
|
13222
13512
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
13223
|
-
<xsl:if test="not(//*[
|
13513
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
13224
13514
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
13225
13515
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
13226
13516
|
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
@@ -13424,9 +13714,9 @@
|
|
13424
13714
|
<xsl:value-of select="document('')//*/namespace::ogc"/>
|
13425
13715
|
|
13426
13716
|
</xsl:variable>
|
13427
|
-
<xsl:if test="$documentNS != $XSLNS">
|
13717
|
+
<!-- <xsl:if test="$documentNS != $XSLNS">
|
13428
13718
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
13429
|
-
</xsl:if>
|
13719
|
+
</xsl:if> -->
|
13430
13720
|
</xsl:template> <!-- namespaceCheck -->
|
13431
13721
|
|
13432
13722
|
<xsl:template name="getLanguage">
|
@@ -13505,10 +13795,10 @@
|
|
13505
13795
|
|
13506
13796
|
<xsl:variable name="data_value">
|
13507
13797
|
<xsl:choose>
|
13508
|
-
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) !=
|
13798
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
|
13509
13799
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13510
13800
|
</xsl:when>
|
13511
|
-
<xsl:when test="string-length($bibdata_updated) !=
|
13801
|
+
<xsl:when test="string-length($bibdata_updated) != 0">
|
13512
13802
|
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13513
13803
|
</xsl:when>
|
13514
13804
|
<xsl:when test="$formatted = 'true'">
|
@@ -13646,7 +13936,7 @@
|
|
13646
13936
|
<!-- background image -->
|
13647
13937
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
13648
13938
|
<fo:block>
|
13649
|
-
<xsl:for-each select="/*[
|
13939
|
+
<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]">
|
13650
13940
|
<xsl:choose>
|
13651
13941
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
13652
13942
|
<fo:instream-foreign-object fox:alt-text="Image Front">
|