metanorma-ogc 2.6.12 → 2.7.1

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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/ogc/html/_coverpage.css +132 -91
  3. data/lib/isodoc/ogc/html/_coverpage.scss +2 -0
  4. data/lib/isodoc/ogc/html/htmlstyle.css +772 -580
  5. data/lib/isodoc/ogc/html/htmlstyle.scss +3 -3
  6. data/lib/isodoc/ogc/html/ogc.css +272 -205
  7. data/lib/isodoc/ogc/html/ogc_wp.css +244 -181
  8. data/lib/isodoc/ogc/html/wordstyle.css +480 -411
  9. data/lib/isodoc/ogc/html/wordstyle_wp.css +404 -344
  10. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +369 -101
  11. data/lib/isodoc/ogc/ogc.best-practice.xsl +369 -101
  12. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +369 -101
  13. data/lib/isodoc/ogc/ogc.community-practice.xsl +369 -101
  14. data/lib/isodoc/ogc/ogc.community-standard.xsl +369 -101
  15. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +369 -101
  16. data/lib/isodoc/ogc/ogc.draft-standard.xsl +369 -101
  17. data/lib/isodoc/ogc/ogc.engineering-report.xsl +369 -101
  18. data/lib/isodoc/ogc/ogc.other.xsl +369 -101
  19. data/lib/isodoc/ogc/ogc.policy.xsl +369 -101
  20. data/lib/isodoc/ogc/ogc.reference-model.xsl +369 -101
  21. data/lib/isodoc/ogc/ogc.release-notes.xsl +369 -101
  22. data/lib/isodoc/ogc/ogc.standard.xsl +369 -101
  23. data/lib/isodoc/ogc/ogc.test-suite.xsl +369 -101
  24. data/lib/isodoc/ogc/ogc.user-guide.xsl +369 -101
  25. data/lib/isodoc/ogc/ogc.white-paper.xsl +346 -78
  26. data/lib/isodoc/ogc/presentation_xml_convert.rb +1 -0
  27. data/lib/isodoc/ogc/sections.rb +4 -0
  28. data/lib/metanorma/ogc/basicdoc.rng +37 -32
  29. data/lib/metanorma/ogc/converter.rb +2 -2
  30. data/lib/metanorma/ogc/isodoc.rng +35 -23
  31. data/lib/metanorma/ogc/ogc.rng +28 -30
  32. data/lib/metanorma/ogc/version.rb +1 -1
  33. data/metanorma-ogc.gemspec +4 -3
  34. metadata +26 -12
@@ -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/ogc" 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">
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:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-text-title']/ogc:value"/>
28
- <xsl:variable name="color_table_header_row" select="/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-table-header']/ogc:value"/>
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:ogc-standard/ogc:bibdata/ogc:title/node()"/>
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:ogc-standard/ogc:bibdata/ogc:date[@type = 'received']/ogc:on"/></fo:block>
170
- <fo:block margin-top="6pt">Approval Date: <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'issued']/ogc:on"/></fo:block>
171
- <fo:block margin-top="6pt">Publication Date: <xsl:value-of select="/ogc:ogc-standard/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:ogc-standard/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:ogc-standard/ogc:bibdata/ogc:docnumber"/></fo:block>
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:ogc-standard/ogc:bibdata/ogc:uri"/>
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:ogc-standard/ogc:bibdata/ogc:edition[normalize-space(@language) = '']"/>
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:ogc-standard/ogc:bibdata/ogc:ext/ogc:doctype"/>
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:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
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:ogc-standard/ogc:boilerplate/ogc:copyright-statement" mode="update_xml_step1"/>
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:ogc-standard/ogc:boilerplate/ogc:legal-statement" mode="update_xml_step1"/>
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:ogc-standard/ogc:boilerplate/ogc:license-statement"/>
262
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:feedback-statement"/> -->
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:ogc-standard/ogc:boilerplate/ogc:license-statement" mode="update_xml_step_move_pagebreak"/>
327
- <xsl:apply-templates select="/ogc:ogc-standard/ogc:boilerplate/ogc:feedback-statement" mode="update_xml_step_move_pagebreak"/>
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:ogc-standard/ogc:bibdata/ogc:uri[not(@type)]">
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:ogc-standard/ogc:bibdata/ogc:edition">
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(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
782
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
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(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
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(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
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(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
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((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
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="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
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="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
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="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
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="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1050
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
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="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
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="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
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="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
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
- <iso-standard>
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
- </iso-standard>
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
- </xsl:for-each>
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::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
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::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
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::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]//*[local-name()='bibliography']/*">
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'] |
@@ -6752,6 +6757,8 @@
6752
6757
  <!-- ======================================= -->
6753
6758
  <!-- math -->
6754
6759
  <!-- ======================================= -->
6760
+ <xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
6761
+
6755
6762
  <xsl:template match="mathml:math">
6756
6763
  <xsl:variable name="isAdded" select="@added"/>
6757
6764
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -7111,10 +7118,10 @@
7111
7118
  <xsl:template match="*[local-name()='localityStack']"/>
7112
7119
 
7113
7120
  <xsl:variable name="pdfAttachmentsList_">
7114
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
7121
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
7115
7122
  <attachment filename="{@name}"/>
7116
7123
  </xsl:for-each>
7117
- <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
7124
+ <xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
7118
7125
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
7119
7126
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
7120
7127
  <attachment filename="{$attachment_path}"/>
@@ -8580,7 +8587,9 @@
8580
8587
  <xsl:apply-templates mode="bookmarks"/>
8581
8588
  </xsl:template>
8582
8589
 
8583
- <xsl:template match="*[local-name() = 'title' or local-name() = 'name' or local-name() = 'fmt-title' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
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">
8584
8593
  <xsl:apply-templates select="."/>
8585
8594
  </xsl:template>
8586
8595
 
@@ -8597,7 +8606,15 @@
8597
8606
  <xsl:apply-templates mode="contents"/>
8598
8607
  </xsl:template>
8599
8608
 
8600
- <xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
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">
8601
8618
  <xsl:apply-templates mode="bookmarks"/>
8602
8619
  </xsl:template>
8603
8620
 
@@ -8610,6 +8627,13 @@
8610
8627
  <xsl:apply-templates mode="bookmarks"/>
8611
8628
  </xsl:template>
8612
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
+
8613
8637
  <!-- Bookmarks -->
8614
8638
  <xsl:template name="addBookmarks">
8615
8639
  <xsl:param name="contents"/>
@@ -8860,6 +8884,13 @@
8860
8884
 
8861
8885
  <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
8862
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
+
8863
8894
  <xsl:template name="getSection">
8864
8895
  <xsl:choose>
8865
8896
  <xsl:when test="*[local-name() = 'fmt-title']">
@@ -8979,7 +9010,8 @@
8979
9010
  </xsl:copy>
8980
9011
  </xsl:template>
8981
9012
 
8982
- <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">
8983
9015
  <xsl:copy-of select="."/>
8984
9016
  </xsl:template>
8985
9017
 
@@ -9043,7 +9075,7 @@
9043
9075
  <!-- sourcecode -->
9044
9076
  <!-- =============== -->
9045
9077
 
9046
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
9078
+ <xsl:variable name="source-highlighter-css_" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
9047
9079
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
9048
9080
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
9049
9081
 
@@ -10536,7 +10568,7 @@
10536
10568
 
10537
10569
  </xsl:template> <!-- sections_element_style -->
10538
10570
 
10539
- <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
10571
+ <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
10540
10572
 
10541
10573
  <fo:block break-after="page"/>
10542
10574
 
@@ -10640,7 +10672,7 @@
10640
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>
10641
10673
  </xsl:when>
10642
10674
  <!-- if there isn't element with id 'from', then create 'bookmark' here -->
10643
- <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10675
+ <xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
10644
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>
10645
10677
  </xsl:when>
10646
10678
  <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
@@ -11756,7 +11788,7 @@
11756
11788
 
11757
11789
  <xsl:call-template name="setBlockSpanAll"/>
11758
11790
 
11759
- <xsl:variable name="admonition_color" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = concat('color-admonition-', @type)]/ogc:value)"/>
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)"/>
11760
11792
  <xsl:if test="$admonition_color != ''">
11761
11793
  <xsl:attribute name="border">0.5pt solid <xsl:value-of select="$admonition_color"/></xsl:attribute>
11762
11794
  <xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
@@ -11982,7 +12014,7 @@
11982
12014
  <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
11983
12015
 
11984
12016
  <!-- move section 'Normative references' inside 'sections' -->
11985
- <xsl:for-each select="* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
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']]">
11986
12018
  <xsl:sort select="@displayorder" data-type="number"/>
11987
12019
 
11988
12020
  <!-- process Section's title -->
@@ -12043,10 +12075,126 @@
12043
12075
  <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
12044
12076
  <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
12045
12077
 
12046
- <xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
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">
12047
12109
  <xsl:copy-of select="."/>
12048
12110
  </xsl:template>
12049
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
+
12050
12198
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
12051
12199
  <xsl:copy>
12052
12200
  <xsl:copy-of select="@*"/>
@@ -12077,7 +12225,7 @@
12077
12225
  <!-- add @id - first element with @id plus '_element_name' -->
12078
12226
  <xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
12079
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>
12080
- <xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
12228
+ <xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
12081
12229
  <xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
12082
12230
  </xsl:if>
12083
12231
  </xsl:template>
@@ -12327,6 +12475,126 @@
12327
12475
  <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
12328
12476
  <xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
12329
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
+
12330
12598
  <!-- END: update new Presentation XML -->
12331
12599
 
12332
12600
  <!-- =========================================================================== -->
@@ -12399,7 +12667,7 @@
12399
12667
 
12400
12668
  <xsl:choose>
12401
12669
  <xsl:when test="$page_sequence_at_top = 'true'">
12402
- <xsl:for-each select="ancestor::*[ancestor::*[contains(local-name(), '-standard')]]">
12670
+ <xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
12403
12671
  <element pos="{position()}">
12404
12672
  <xsl:copy-of select="@*[local-name() != 'id']"/>
12405
12673
  <xsl:value-of select="name()"/>
@@ -12827,7 +13095,7 @@
12827
13095
  </xsl:when>
12828
13096
  <xsl:when test="contains($text, $replace)">
12829
13097
  <xsl:value-of select="substring-before($text,$replace)"/>
12830
- <xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/jis"><xsl:value-of select="$by"/></xsl:element>
13098
+ <xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/standoc"><xsl:value-of select="$by"/></xsl:element>
12831
13099
  <xsl:call-template name="replaceChar">
12832
13100
  <xsl:with-param name="text" select="substring-after($text,$replace)"/>
12833
13101
  <xsl:with-param name="replace" select="$replace"/>
@@ -12864,7 +13132,7 @@
12864
13132
  </xsl:variable>
12865
13133
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
12866
13134
  <xsl:variable name="gen_id" select="generate-id(.)"/>
12867
- <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
13135
+ <xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
12868
13136
  <xsl:variable name="reference" select="@reference"/>
12869
13137
  <!-- fn sequence number in document -->
12870
13138
  <xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
@@ -12909,7 +13177,7 @@
12909
13177
  </xsl:template>
12910
13178
 
12911
13179
  <xsl:template name="printEdition">
12912
- <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
13180
+ <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
12913
13181
 
12914
13182
  <xsl:choose>
12915
13183
  <xsl:when test="$edition_i18n != ''">
@@ -12919,7 +13187,7 @@
12919
13187
  </xsl:call-template>
12920
13188
  </xsl:when>
12921
13189
  <xsl:otherwise>
12922
- <xsl:variable name="edition" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
13190
+ <xsl:variable name="edition" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
12923
13191
  <xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
12924
13192
  <xsl:call-template name="capitalize">
12925
13193
  <xsl:with-param name="str">
@@ -13053,7 +13321,7 @@
13053
13321
  <xsl:param name="charDelim" select="', '"/>
13054
13322
  <xsl:choose>
13055
13323
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
13056
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
13324
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
13057
13325
  <xsl:sort data-type="text" order="ascending"/>
13058
13326
  <xsl:call-template name="insertKeyword">
13059
13327
  <xsl:with-param name="meta" select="$meta"/>
@@ -13063,7 +13331,7 @@
13063
13331
  </xsl:for-each>
13064
13332
  </xsl:when>
13065
13333
  <xsl:otherwise>
13066
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
13334
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
13067
13335
  <xsl:call-template name="insertKeyword">
13068
13336
  <xsl:with-param name="meta" select="$meta"/>
13069
13337
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -13138,7 +13406,7 @@
13138
13406
  <!-- Dublin Core properties go here -->
13139
13407
  <dc:title>
13140
13408
  <xsl:variable name="title">
13141
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
13409
+ <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
13142
13410
 
13143
13411
  <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
13144
13412
 
@@ -13158,7 +13426,7 @@
13158
13426
  </rdf:Alt>
13159
13427
  </dc:title>
13160
13428
  <xsl:variable name="dc_creator">
13161
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
13429
+ <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
13162
13430
 
13163
13431
  <rdf:Seq>
13164
13432
  <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
@@ -13180,7 +13448,7 @@
13180
13448
  <xsl:variable name="dc_description">
13181
13449
  <xsl:variable name="abstract">
13182
13450
 
13183
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[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'])]"/>
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'])]"/>
13184
13452
 
13185
13453
  </xsl:variable>
13186
13454
  <rdf:Alt>
@@ -13208,7 +13476,7 @@
13208
13476
  </rdf:RDF>
13209
13477
  </x:xmpmeta>
13210
13478
  <!-- add attachments -->
13211
- <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
13479
+ <xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
13212
13480
  <xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
13213
13481
  <xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
13214
13482
  <xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
@@ -13242,7 +13510,7 @@
13242
13510
  </pdf:embedded-file>
13243
13511
  </xsl:for-each>
13244
13512
  <!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
13245
- <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
13513
+ <xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
13246
13514
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
13247
13515
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
13248
13516
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
@@ -13446,9 +13714,9 @@
13446
13714
  <xsl:value-of select="document('')//*/namespace::ogc"/>
13447
13715
 
13448
13716
  </xsl:variable>
13449
- <xsl:if test="$documentNS != $XSLNS">
13717
+ <!-- <xsl:if test="$documentNS != $XSLNS">
13450
13718
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
13451
- </xsl:if>
13719
+ </xsl:if> -->
13452
13720
  </xsl:template> <!-- namespaceCheck -->
13453
13721
 
13454
13722
  <xsl:template name="getLanguage">
@@ -13527,10 +13795,10 @@
13527
13795
 
13528
13796
  <xsl:variable name="data_value">
13529
13797
  <xsl:choose>
13530
- <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
13798
+ <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
13531
13799
  <xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
13532
13800
  </xsl:when>
13533
- <xsl:when test="string-length($bibdata_updated) != ''">
13801
+ <xsl:when test="string-length($bibdata_updated) != 0">
13534
13802
  <xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
13535
13803
  </xsl:when>
13536
13804
  <xsl:when test="$formatted = 'true'">
@@ -13668,7 +13936,7 @@
13668
13936
  <!-- background image -->
13669
13937
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
13670
13938
  <fo:block>
13671
- <xsl:for-each select="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
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]">
13672
13940
  <xsl:choose>
13673
13941
  <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
13674
13942
  <fo:instream-foreign-object fox:alt-text="Image Front">