metanorma-ogc 2.7.5 → 2.7.7

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.
@@ -2252,6 +2252,7 @@
2252
2252
  <xsl:variable name="hair_space"> </xsl:variable>
2253
2253
  <xsl:variable name="en_dash">–</xsl:variable>
2254
2254
  <xsl:variable name="em_dash">—</xsl:variable>
2255
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
2255
2256
  <xsl:variable name="cr">&#13;</xsl:variable>
2256
2257
  <xsl:variable name="lf">
2257
2258
  </xsl:variable>
@@ -10422,11 +10423,11 @@
10422
10423
  </xsl:template>
10423
10424
 
10424
10425
  <!-- figure/fn -->
10425
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
10426
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
10426
10427
  <!-- figure/note -->
10427
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
10428
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
10428
10429
  <!-- figure/example -->
10429
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
10430
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
10430
10431
 
10431
10432
  <!-- figure/note[@type = 'units'] -->
10432
10433
  <!-- image/note[@type = 'units'] -->
@@ -13960,6 +13961,9 @@
13960
13961
  <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
13961
13962
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
13962
13963
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
13964
+ <!-- https://github.com/metanorma/isodoc/issues/687 -->
13965
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
13966
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
13963
13967
 
13964
13968
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
13965
13969
  <xsl:copy>
@@ -14242,6 +14246,20 @@
14242
14246
  </xsl:element>
14243
14247
  </xsl:template>
14244
14248
 
14249
+ <xsl:template match="*[local-name() = 'fmt-source']"/>
14250
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
14251
+ <xsl:element name="source" namespace="{$namespace_full}">
14252
+ <xsl:copy-of select="@*"/>
14253
+ <xsl:apply-templates mode="update_xml_step1"/>
14254
+ </xsl:element>
14255
+ </xsl:template>
14256
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
14257
+ <xsl:element name="source" namespace="{$namespace_full}">
14258
+ <xsl:copy-of select="@*"/>
14259
+ <xsl:apply-templates mode="update_xml_pres"/>
14260
+ </xsl:element>
14261
+ </xsl:template>
14262
+
14245
14263
  <xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
14246
14264
  <xsl:apply-templates mode="update_xml_step1"/>
14247
14265
  </xsl:template>
@@ -15601,6 +15619,12 @@
15601
15619
  </xsl:if>
15602
15620
  </xsl:template>
15603
15621
 
15622
+ <xsl:template name="setIDforNamedDestinationInline">
15623
+ <xsl:if test="@named_dest">
15624
+ <fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
15625
+ </xsl:if>
15626
+ </xsl:template>
15627
+
15604
15628
  <xsl:template name="setNamedDestination">
15605
15629
  <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
15606
15630
  <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
@@ -2252,6 +2252,7 @@
2252
2252
  <xsl:variable name="hair_space"> </xsl:variable>
2253
2253
  <xsl:variable name="en_dash">–</xsl:variable>
2254
2254
  <xsl:variable name="em_dash">—</xsl:variable>
2255
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
2255
2256
  <xsl:variable name="cr">&#13;</xsl:variable>
2256
2257
  <xsl:variable name="lf">
2257
2258
  </xsl:variable>
@@ -10422,11 +10423,11 @@
10422
10423
  </xsl:template>
10423
10424
 
10424
10425
  <!-- figure/fn -->
10425
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
10426
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
10426
10427
  <!-- figure/note -->
10427
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
10428
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
10428
10429
  <!-- figure/example -->
10429
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
10430
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
10430
10431
 
10431
10432
  <!-- figure/note[@type = 'units'] -->
10432
10433
  <!-- image/note[@type = 'units'] -->
@@ -13960,6 +13961,9 @@
13960
13961
  <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
13961
13962
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
13962
13963
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
13964
+ <!-- https://github.com/metanorma/isodoc/issues/687 -->
13965
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
13966
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
13963
13967
 
13964
13968
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
13965
13969
  <xsl:copy>
@@ -14242,6 +14246,20 @@
14242
14246
  </xsl:element>
14243
14247
  </xsl:template>
14244
14248
 
14249
+ <xsl:template match="*[local-name() = 'fmt-source']"/>
14250
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
14251
+ <xsl:element name="source" namespace="{$namespace_full}">
14252
+ <xsl:copy-of select="@*"/>
14253
+ <xsl:apply-templates mode="update_xml_step1"/>
14254
+ </xsl:element>
14255
+ </xsl:template>
14256
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
14257
+ <xsl:element name="source" namespace="{$namespace_full}">
14258
+ <xsl:copy-of select="@*"/>
14259
+ <xsl:apply-templates mode="update_xml_pres"/>
14260
+ </xsl:element>
14261
+ </xsl:template>
14262
+
14245
14263
  <xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
14246
14264
  <xsl:apply-templates mode="update_xml_step1"/>
14247
14265
  </xsl:template>
@@ -15601,6 +15619,12 @@
15601
15619
  </xsl:if>
15602
15620
  </xsl:template>
15603
15621
 
15622
+ <xsl:template name="setIDforNamedDestinationInline">
15623
+ <xsl:if test="@named_dest">
15624
+ <fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
15625
+ </xsl:if>
15626
+ </xsl:template>
15627
+
15604
15628
  <xsl:template name="setNamedDestination">
15605
15629
  <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
15606
15630
  <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
@@ -2252,6 +2252,7 @@
2252
2252
  <xsl:variable name="hair_space"> </xsl:variable>
2253
2253
  <xsl:variable name="en_dash">–</xsl:variable>
2254
2254
  <xsl:variable name="em_dash">—</xsl:variable>
2255
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
2255
2256
  <xsl:variable name="cr">&#13;</xsl:variable>
2256
2257
  <xsl:variable name="lf">
2257
2258
  </xsl:variable>
@@ -10422,11 +10423,11 @@
10422
10423
  </xsl:template>
10423
10424
 
10424
10425
  <!-- figure/fn -->
10425
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
10426
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
10426
10427
  <!-- figure/note -->
10427
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
10428
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
10428
10429
  <!-- figure/example -->
10429
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
10430
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
10430
10431
 
10431
10432
  <!-- figure/note[@type = 'units'] -->
10432
10433
  <!-- image/note[@type = 'units'] -->
@@ -13960,6 +13961,9 @@
13960
13961
  <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
13961
13962
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
13962
13963
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
13964
+ <!-- https://github.com/metanorma/isodoc/issues/687 -->
13965
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
13966
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
13963
13967
 
13964
13968
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
13965
13969
  <xsl:copy>
@@ -14242,6 +14246,20 @@
14242
14246
  </xsl:element>
14243
14247
  </xsl:template>
14244
14248
 
14249
+ <xsl:template match="*[local-name() = 'fmt-source']"/>
14250
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
14251
+ <xsl:element name="source" namespace="{$namespace_full}">
14252
+ <xsl:copy-of select="@*"/>
14253
+ <xsl:apply-templates mode="update_xml_step1"/>
14254
+ </xsl:element>
14255
+ </xsl:template>
14256
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
14257
+ <xsl:element name="source" namespace="{$namespace_full}">
14258
+ <xsl:copy-of select="@*"/>
14259
+ <xsl:apply-templates mode="update_xml_pres"/>
14260
+ </xsl:element>
14261
+ </xsl:template>
14262
+
14245
14263
  <xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
14246
14264
  <xsl:apply-templates mode="update_xml_step1"/>
14247
14265
  </xsl:template>
@@ -15601,6 +15619,12 @@
15601
15619
  </xsl:if>
15602
15620
  </xsl:template>
15603
15621
 
15622
+ <xsl:template name="setIDforNamedDestinationInline">
15623
+ <xsl:if test="@named_dest">
15624
+ <fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
15625
+ </xsl:if>
15626
+ </xsl:template>
15627
+
15604
15628
  <xsl:template name="setNamedDestination">
15605
15629
  <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
15606
15630
  <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
@@ -2252,6 +2252,7 @@
2252
2252
  <xsl:variable name="hair_space"> </xsl:variable>
2253
2253
  <xsl:variable name="en_dash">–</xsl:variable>
2254
2254
  <xsl:variable name="em_dash">—</xsl:variable>
2255
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
2255
2256
  <xsl:variable name="cr">&#13;</xsl:variable>
2256
2257
  <xsl:variable name="lf">
2257
2258
  </xsl:variable>
@@ -10422,11 +10423,11 @@
10422
10423
  </xsl:template>
10423
10424
 
10424
10425
  <!-- figure/fn -->
10425
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
10426
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
10426
10427
  <!-- figure/note -->
10427
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
10428
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
10428
10429
  <!-- figure/example -->
10429
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
10430
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
10430
10431
 
10431
10432
  <!-- figure/note[@type = 'units'] -->
10432
10433
  <!-- image/note[@type = 'units'] -->
@@ -13960,6 +13961,9 @@
13960
13961
  <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
13961
13962
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
13962
13963
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
13964
+ <!-- https://github.com/metanorma/isodoc/issues/687 -->
13965
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
13966
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
13963
13967
 
13964
13968
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
13965
13969
  <xsl:copy>
@@ -14242,6 +14246,20 @@
14242
14246
  </xsl:element>
14243
14247
  </xsl:template>
14244
14248
 
14249
+ <xsl:template match="*[local-name() = 'fmt-source']"/>
14250
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
14251
+ <xsl:element name="source" namespace="{$namespace_full}">
14252
+ <xsl:copy-of select="@*"/>
14253
+ <xsl:apply-templates mode="update_xml_step1"/>
14254
+ </xsl:element>
14255
+ </xsl:template>
14256
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
14257
+ <xsl:element name="source" namespace="{$namespace_full}">
14258
+ <xsl:copy-of select="@*"/>
14259
+ <xsl:apply-templates mode="update_xml_pres"/>
14260
+ </xsl:element>
14261
+ </xsl:template>
14262
+
14245
14263
  <xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
14246
14264
  <xsl:apply-templates mode="update_xml_step1"/>
14247
14265
  </xsl:template>
@@ -15601,6 +15619,12 @@
15601
15619
  </xsl:if>
15602
15620
  </xsl:template>
15603
15621
 
15622
+ <xsl:template name="setIDforNamedDestinationInline">
15623
+ <xsl:if test="@named_dest">
15624
+ <fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
15625
+ </xsl:if>
15626
+ </xsl:template>
15627
+
15604
15628
  <xsl:template name="setNamedDestination">
15605
15629
  <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
15606
15630
  <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
@@ -2252,6 +2252,7 @@
2252
2252
  <xsl:variable name="hair_space"> </xsl:variable>
2253
2253
  <xsl:variable name="en_dash">–</xsl:variable>
2254
2254
  <xsl:variable name="em_dash">—</xsl:variable>
2255
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
2255
2256
  <xsl:variable name="cr">&#13;</xsl:variable>
2256
2257
  <xsl:variable name="lf">
2257
2258
  </xsl:variable>
@@ -10422,11 +10423,11 @@
10422
10423
  </xsl:template>
10423
10424
 
10424
10425
  <!-- figure/fn -->
10425
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
10426
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
10426
10427
  <!-- figure/note -->
10427
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
10428
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
10428
10429
  <!-- figure/example -->
10429
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
10430
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
10430
10431
 
10431
10432
  <!-- figure/note[@type = 'units'] -->
10432
10433
  <!-- image/note[@type = 'units'] -->
@@ -13960,6 +13961,9 @@
13960
13961
  <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
13961
13962
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
13962
13963
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
13964
+ <!-- https://github.com/metanorma/isodoc/issues/687 -->
13965
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
13966
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
13963
13967
 
13964
13968
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
13965
13969
  <xsl:copy>
@@ -14242,6 +14246,20 @@
14242
14246
  </xsl:element>
14243
14247
  </xsl:template>
14244
14248
 
14249
+ <xsl:template match="*[local-name() = 'fmt-source']"/>
14250
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
14251
+ <xsl:element name="source" namespace="{$namespace_full}">
14252
+ <xsl:copy-of select="@*"/>
14253
+ <xsl:apply-templates mode="update_xml_step1"/>
14254
+ </xsl:element>
14255
+ </xsl:template>
14256
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
14257
+ <xsl:element name="source" namespace="{$namespace_full}">
14258
+ <xsl:copy-of select="@*"/>
14259
+ <xsl:apply-templates mode="update_xml_pres"/>
14260
+ </xsl:element>
14261
+ </xsl:template>
14262
+
14245
14263
  <xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
14246
14264
  <xsl:apply-templates mode="update_xml_step1"/>
14247
14265
  </xsl:template>
@@ -15601,6 +15619,12 @@
15601
15619
  </xsl:if>
15602
15620
  </xsl:template>
15603
15621
 
15622
+ <xsl:template name="setIDforNamedDestinationInline">
15623
+ <xsl:if test="@named_dest">
15624
+ <fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
15625
+ </xsl:if>
15626
+ </xsl:template>
15627
+
15604
15628
  <xsl:template name="setNamedDestination">
15605
15629
  <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
15606
15630
  <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
@@ -2252,6 +2252,7 @@
2252
2252
  <xsl:variable name="hair_space"> </xsl:variable>
2253
2253
  <xsl:variable name="en_dash">–</xsl:variable>
2254
2254
  <xsl:variable name="em_dash">—</xsl:variable>
2255
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
2255
2256
  <xsl:variable name="cr">&#13;</xsl:variable>
2256
2257
  <xsl:variable name="lf">
2257
2258
  </xsl:variable>
@@ -10422,11 +10423,11 @@
10422
10423
  </xsl:template>
10423
10424
 
10424
10425
  <!-- figure/fn -->
10425
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
10426
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
10426
10427
  <!-- figure/note -->
10427
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
10428
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
10428
10429
  <!-- figure/example -->
10429
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
10430
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
10430
10431
 
10431
10432
  <!-- figure/note[@type = 'units'] -->
10432
10433
  <!-- image/note[@type = 'units'] -->
@@ -13960,6 +13961,9 @@
13960
13961
  <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
13961
13962
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
13962
13963
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
13964
+ <!-- https://github.com/metanorma/isodoc/issues/687 -->
13965
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
13966
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
13963
13967
 
13964
13968
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
13965
13969
  <xsl:copy>
@@ -14242,6 +14246,20 @@
14242
14246
  </xsl:element>
14243
14247
  </xsl:template>
14244
14248
 
14249
+ <xsl:template match="*[local-name() = 'fmt-source']"/>
14250
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
14251
+ <xsl:element name="source" namespace="{$namespace_full}">
14252
+ <xsl:copy-of select="@*"/>
14253
+ <xsl:apply-templates mode="update_xml_step1"/>
14254
+ </xsl:element>
14255
+ </xsl:template>
14256
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
14257
+ <xsl:element name="source" namespace="{$namespace_full}">
14258
+ <xsl:copy-of select="@*"/>
14259
+ <xsl:apply-templates mode="update_xml_pres"/>
14260
+ </xsl:element>
14261
+ </xsl:template>
14262
+
14245
14263
  <xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
14246
14264
  <xsl:apply-templates mode="update_xml_step1"/>
14247
14265
  </xsl:template>
@@ -15601,6 +15619,12 @@
15601
15619
  </xsl:if>
15602
15620
  </xsl:template>
15603
15621
 
15622
+ <xsl:template name="setIDforNamedDestinationInline">
15623
+ <xsl:if test="@named_dest">
15624
+ <fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
15625
+ </xsl:if>
15626
+ </xsl:template>
15627
+
15604
15628
  <xsl:template name="setNamedDestination">
15605
15629
  <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
15606
15630
  <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
@@ -1052,6 +1052,7 @@
1052
1052
  <xsl:variable name="hair_space"> </xsl:variable>
1053
1053
  <xsl:variable name="en_dash">–</xsl:variable>
1054
1054
  <xsl:variable name="em_dash">—</xsl:variable>
1055
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
1055
1056
  <xsl:variable name="cr">&#13;</xsl:variable>
1056
1057
  <xsl:variable name="lf">
1057
1058
  </xsl:variable>
@@ -9177,11 +9178,11 @@
9177
9178
  </xsl:template>
9178
9179
 
9179
9180
  <!-- figure/fn -->
9180
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
9181
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
9181
9182
  <!-- figure/note -->
9182
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
9183
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
9183
9184
  <!-- figure/example -->
9184
- <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
9185
+ <xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
9185
9186
 
9186
9187
  <!-- figure/note[@type = 'units'] -->
9187
9188
  <!-- image/note[@type = 'units'] -->
@@ -12719,6 +12720,9 @@
12719
12720
  <xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
12720
12721
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
12721
12722
  <xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
12723
+ <!-- https://github.com/metanorma/isodoc/issues/687 -->
12724
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
12725
+ <xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
12722
12726
 
12723
12727
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
12724
12728
  <xsl:copy>
@@ -13001,6 +13005,20 @@
13001
13005
  </xsl:element>
13002
13006
  </xsl:template>
13003
13007
 
13008
+ <xsl:template match="*[local-name() = 'fmt-source']"/>
13009
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
13010
+ <xsl:element name="source" namespace="{$namespace_full}">
13011
+ <xsl:copy-of select="@*"/>
13012
+ <xsl:apply-templates mode="update_xml_step1"/>
13013
+ </xsl:element>
13014
+ </xsl:template>
13015
+ <xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
13016
+ <xsl:element name="source" namespace="{$namespace_full}">
13017
+ <xsl:copy-of select="@*"/>
13018
+ <xsl:apply-templates mode="update_xml_pres"/>
13019
+ </xsl:element>
13020
+ </xsl:template>
13021
+
13004
13022
  <xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
13005
13023
  <xsl:apply-templates mode="update_xml_step1"/>
13006
13024
  </xsl:template>
@@ -14360,6 +14378,12 @@
14360
14378
  </xsl:if>
14361
14379
  </xsl:template>
14362
14380
 
14381
+ <xsl:template name="setIDforNamedDestinationInline">
14382
+ <xsl:if test="@named_dest">
14383
+ <fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
14384
+ </xsl:if>
14385
+ </xsl:template>
14386
+
14363
14387
  <xsl:template name="setNamedDestination">
14364
14388
  <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
14365
14389
  <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
@@ -267,6 +267,10 @@ in a document (e.g. sourcecode annotations)</a:documentation>
267
267
  <value>justified</value>
268
268
  </choice>
269
269
  </define>
270
+ <define name="IdRefType">
271
+ <a:documentation>Type of cross-references to elements. In BasicDoc, these always point to id { xsd:ID } </a:documentation>
272
+ <data type="IDREF"/>
273
+ </define>
270
274
  <define name="RequiredId">
271
275
  <a:documentation>Mandatory anchor of element, to be used for cross-references within the document</a:documentation>
272
276
  <attribute name="id">
@@ -409,13 +413,13 @@ in a document (e.g. sourcecode annotations)</a:documentation>
409
413
  <attribute name="from">
410
414
  <a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
411
415
  If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
412
- <data type="IDREF"/>
416
+ <ref name="IdRefType"/>
413
417
  </attribute>
414
418
  </optional>
415
419
  <optional>
416
420
  <attribute name="to">
417
421
  <a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
418
- <data type="IDREF"/>
422
+ <ref name="IdRefType"/>
419
423
  </attribute>
420
424
  </optional>
421
425
  </define>
@@ -1504,7 +1508,7 @@ Restricted recursively to contain only other such inline elements with no identi
1504
1508
  <attribute name="to">
1505
1509
  <a:documentation>A reference to an anchor element (typically a bookmark),
1506
1510
  to indicate that the index range covers a range of locations between the current index element and the `to` anchor</a:documentation>
1507
- <data type="IDREF"/>
1511
+ <ref name="IdRefType"/>
1508
1512
  </attribute>
1509
1513
  </optional>
1510
1514
  <ref name="index-primary">
@@ -1662,7 +1666,7 @@ which can be bookmarks as well as block or section references</a:documentation>
1662
1666
  <define name="XrefAttributes">
1663
1667
  <attribute name="target">
1664
1668
  <a:documentation>The identifier of a section, block or inlined element being referenced</a:documentation>
1665
- <data type="IDREF"/>
1669
+ <ref name="IdRefType"/>
1666
1670
  </attribute>
1667
1671
  <optional>
1668
1672
  <attribute name="type">
@@ -1723,7 +1727,7 @@ The target of a footnote is the location it is embedded in within the text</a:do
1723
1727
  <attribute name="target">
1724
1728
  <a:documentation>The target of the callout is understood to be the location of the callout within the source code;
1725
1729
  the extent of the target is not expressed overtly</a:documentation>
1726
- <data type="IDREF"/>
1730
+ <ref name="IdRefType"/>
1727
1731
  </attribute>
1728
1732
  <text>
1729
1733
  <a:documentation>The label of the callout, used to identify its target within the source code</a:documentation>
@@ -18,7 +18,7 @@ module Metanorma
18
18
  insert_submitters(xml, sect)
19
19
  end
20
20
 
21
- def add_id
21
+ def add_id_txt
22
22
  %(id="_#{UUIDTools::UUID.random_create}")
23
23
  end
24
24
 
@@ -45,7 +45,7 @@ module Metanorma
45
45
  description = "standard" if %w(standard community-standard)
46
46
  .include?(doctype)
47
47
  <<~CLAUSE
48
- <clause type='security' #{add_id}>
48
+ <clause type='security' #{add_id_txt}>
49
49
  <title>Security considerations</title>
50
50
  <p>#{@i18n.security_empty.sub('%', description)}</p></clause>
51
51
  CLAUSE
@@ -7,9 +7,6 @@ require_relative "cleanup"
7
7
 
8
8
  module Metanorma
9
9
  module Ogc
10
- # A {Converter} implementation that generates RSD output, and a document
11
- # schema encapsulation of the document for validation
12
- #
13
10
  class Converter < Standoc::Converter
14
11
  register_for "ogc"
15
12
 
@@ -83,8 +80,7 @@ module Metanorma
83
80
  when "foreword", "introduction" then "donotrecognise-foreword"
84
81
  when "references" then "normative references"
85
82
  when "glossary" then "terms and definitions"
86
- else
87
- super
83
+ else super
88
84
  end
89
85
  end
90
86
 
@@ -154,6 +150,7 @@ module Metanorma
154
150
  attrs1 = attrs.merge(id: "_#{UUIDTools::UUID.random_create}")
155
151
  xml.annex **attr_code(attrs1) do |xml_section|
156
152
  xml_section.title { |name| name << node.title }
153
+ attrs.delete(:anchor)
157
154
  xml_section.terms **attr_code(attrs) do |terms|
158
155
  (s = node.attr("source")) && s.split(",").each do |s1|
159
156
  terms.termdocsource(nil, **attr_code(bibitemid: s1))
@@ -163,11 +160,6 @@ module Metanorma
163
160
  end
164
161
  end
165
162
 
166
- # KILL
167
- def highlight_parsex(text, xml)
168
- xml.hi { |s| s << text }
169
- end
170
-
171
163
  def set_obligation(attrs, node)
172
164
  if node.attr("style") == "appendix" && node.level == 1
173
165
  attrs[:obligation] = if node.attributes.has_key?("obligation")