metanorma-ogc 2.5.1 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2152,6 +2152,10 @@
2152
2152
 
2153
2153
  </xsl:attribute-set>
2154
2154
 
2155
+ <xsl:template name="refine_termexample-style">
2156
+
2157
+ </xsl:template>
2158
+
2155
2159
  <xsl:attribute-set name="example-style">
2156
2160
 
2157
2161
  <xsl:attribute name="margin-top">10pt</xsl:attribute>
@@ -3331,6 +3335,36 @@
3331
3335
  </xsl:for-each>
3332
3336
  </xsl:template>
3333
3337
 
3338
+ <xsl:template name="processMainSectionsDefault_flatxml">
3339
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3340
+ <xsl:sort select="@displayorder" data-type="number"/>
3341
+ <xsl:variable name="flatxml">
3342
+ <xsl:apply-templates select="." mode="flatxml"/>
3343
+ </xsl:variable>
3344
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3345
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3346
+
3347
+ </xsl:for-each>
3348
+
3349
+ <xsl:for-each select="/*/*[local-name()='annex']">
3350
+ <xsl:sort select="@displayorder" data-type="number"/>
3351
+ <xsl:variable name="flatxml">
3352
+ <xsl:apply-templates select="." mode="flatxml"/>
3353
+ </xsl:variable>
3354
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3355
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3356
+ </xsl:for-each>
3357
+
3358
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
3359
+ <xsl:sort select="@displayorder" data-type="number"/>
3360
+ <xsl:variable name="flatxml">
3361
+ <xsl:apply-templates select="." mode="flatxml"/>
3362
+ </xsl:variable>
3363
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3364
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3365
+ </xsl:for-each>
3366
+ </xsl:template>
3367
+
3334
3368
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
3335
3369
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
3336
3370
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
@@ -5437,13 +5471,13 @@
5437
5471
  <tr>
5438
5472
  <td>
5439
5473
  <xsl:attribute name="id">
5440
- <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
5474
+ <xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
5441
5475
  </xsl:attribute>
5442
5476
  <xsl:apply-templates/>
5443
5477
  </td>
5444
5478
  <td>
5445
5479
  <xsl:attribute name="id">
5446
- <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
5480
+ <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
5447
5481
  </xsl:attribute>
5448
5482
 
5449
5483
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
@@ -6064,6 +6098,10 @@
6064
6098
  <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
6065
6099
  </xsl:template>
6066
6100
 
6101
+ <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
6102
+ <xsl:value-of select="."/>
6103
+ </xsl:template>
6104
+
6067
6105
  <!-- ========================= -->
6068
6106
  <!-- END Rich text formatting -->
6069
6107
  <!-- ========================= -->
@@ -6694,7 +6732,7 @@
6694
6732
  </xsl:choose>
6695
6733
  </xsl:variable>
6696
6734
  <xsl:attribute name="id">
6697
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
6735
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
6698
6736
  </xsl:attribute>
6699
6737
 
6700
6738
  <xsl:for-each select="*[local-name() = 'p']">
@@ -6702,7 +6740,7 @@
6702
6740
  <xsl:copy-of select="@*"/>
6703
6741
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
6704
6742
  <xsl:attribute name="id">
6705
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6743
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6706
6744
  </xsl:attribute>
6707
6745
 
6708
6746
  <!-- <xsl:copy-of select="node()" /> -->
@@ -6766,7 +6804,7 @@
6766
6804
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
6767
6805
  <xsl:copy>
6768
6806
  <xsl:attribute name="id">
6769
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6807
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6770
6808
  </xsl:attribute>
6771
6809
  <xsl:copy-of select="node()"/>
6772
6810
  </xsl:copy>
@@ -9626,7 +9664,7 @@
9626
9664
  <!-- ====== -->
9627
9665
  <xsl:template match="*[local-name() = 'termexample']">
9628
9666
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
9629
-
9667
+ <xsl:call-template name="refine_termexample-style"/>
9630
9668
  <xsl:call-template name="setBlockSpanAll"/>
9631
9669
 
9632
9670
  <xsl:apply-templates select="*[local-name()='name']"/>
@@ -2152,6 +2152,10 @@
2152
2152
 
2153
2153
  </xsl:attribute-set>
2154
2154
 
2155
+ <xsl:template name="refine_termexample-style">
2156
+
2157
+ </xsl:template>
2158
+
2155
2159
  <xsl:attribute-set name="example-style">
2156
2160
 
2157
2161
  <xsl:attribute name="margin-top">10pt</xsl:attribute>
@@ -3331,6 +3335,36 @@
3331
3335
  </xsl:for-each>
3332
3336
  </xsl:template>
3333
3337
 
3338
+ <xsl:template name="processMainSectionsDefault_flatxml">
3339
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3340
+ <xsl:sort select="@displayorder" data-type="number"/>
3341
+ <xsl:variable name="flatxml">
3342
+ <xsl:apply-templates select="." mode="flatxml"/>
3343
+ </xsl:variable>
3344
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3345
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3346
+
3347
+ </xsl:for-each>
3348
+
3349
+ <xsl:for-each select="/*/*[local-name()='annex']">
3350
+ <xsl:sort select="@displayorder" data-type="number"/>
3351
+ <xsl:variable name="flatxml">
3352
+ <xsl:apply-templates select="." mode="flatxml"/>
3353
+ </xsl:variable>
3354
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3355
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3356
+ </xsl:for-each>
3357
+
3358
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
3359
+ <xsl:sort select="@displayorder" data-type="number"/>
3360
+ <xsl:variable name="flatxml">
3361
+ <xsl:apply-templates select="." mode="flatxml"/>
3362
+ </xsl:variable>
3363
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3364
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3365
+ </xsl:for-each>
3366
+ </xsl:template>
3367
+
3334
3368
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
3335
3369
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
3336
3370
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
@@ -5437,13 +5471,13 @@
5437
5471
  <tr>
5438
5472
  <td>
5439
5473
  <xsl:attribute name="id">
5440
- <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
5474
+ <xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
5441
5475
  </xsl:attribute>
5442
5476
  <xsl:apply-templates/>
5443
5477
  </td>
5444
5478
  <td>
5445
5479
  <xsl:attribute name="id">
5446
- <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
5480
+ <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
5447
5481
  </xsl:attribute>
5448
5482
 
5449
5483
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
@@ -6064,6 +6098,10 @@
6064
6098
  <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
6065
6099
  </xsl:template>
6066
6100
 
6101
+ <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
6102
+ <xsl:value-of select="."/>
6103
+ </xsl:template>
6104
+
6067
6105
  <!-- ========================= -->
6068
6106
  <!-- END Rich text formatting -->
6069
6107
  <!-- ========================= -->
@@ -6694,7 +6732,7 @@
6694
6732
  </xsl:choose>
6695
6733
  </xsl:variable>
6696
6734
  <xsl:attribute name="id">
6697
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
6735
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
6698
6736
  </xsl:attribute>
6699
6737
 
6700
6738
  <xsl:for-each select="*[local-name() = 'p']">
@@ -6702,7 +6740,7 @@
6702
6740
  <xsl:copy-of select="@*"/>
6703
6741
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
6704
6742
  <xsl:attribute name="id">
6705
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6743
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6706
6744
  </xsl:attribute>
6707
6745
 
6708
6746
  <!-- <xsl:copy-of select="node()" /> -->
@@ -6766,7 +6804,7 @@
6766
6804
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
6767
6805
  <xsl:copy>
6768
6806
  <xsl:attribute name="id">
6769
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6807
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6770
6808
  </xsl:attribute>
6771
6809
  <xsl:copy-of select="node()"/>
6772
6810
  </xsl:copy>
@@ -9626,7 +9664,7 @@
9626
9664
  <!-- ====== -->
9627
9665
  <xsl:template match="*[local-name() = 'termexample']">
9628
9666
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
9629
-
9667
+ <xsl:call-template name="refine_termexample-style"/>
9630
9668
  <xsl:call-template name="setBlockSpanAll"/>
9631
9669
 
9632
9670
  <xsl:apply-templates select="*[local-name()='name']"/>
@@ -2152,6 +2152,10 @@
2152
2152
 
2153
2153
  </xsl:attribute-set>
2154
2154
 
2155
+ <xsl:template name="refine_termexample-style">
2156
+
2157
+ </xsl:template>
2158
+
2155
2159
  <xsl:attribute-set name="example-style">
2156
2160
 
2157
2161
  <xsl:attribute name="margin-top">10pt</xsl:attribute>
@@ -3331,6 +3335,36 @@
3331
3335
  </xsl:for-each>
3332
3336
  </xsl:template>
3333
3337
 
3338
+ <xsl:template name="processMainSectionsDefault_flatxml">
3339
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3340
+ <xsl:sort select="@displayorder" data-type="number"/>
3341
+ <xsl:variable name="flatxml">
3342
+ <xsl:apply-templates select="." mode="flatxml"/>
3343
+ </xsl:variable>
3344
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3345
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3346
+
3347
+ </xsl:for-each>
3348
+
3349
+ <xsl:for-each select="/*/*[local-name()='annex']">
3350
+ <xsl:sort select="@displayorder" data-type="number"/>
3351
+ <xsl:variable name="flatxml">
3352
+ <xsl:apply-templates select="." mode="flatxml"/>
3353
+ </xsl:variable>
3354
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3355
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3356
+ </xsl:for-each>
3357
+
3358
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
3359
+ <xsl:sort select="@displayorder" data-type="number"/>
3360
+ <xsl:variable name="flatxml">
3361
+ <xsl:apply-templates select="." mode="flatxml"/>
3362
+ </xsl:variable>
3363
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3364
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3365
+ </xsl:for-each>
3366
+ </xsl:template>
3367
+
3334
3368
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
3335
3369
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
3336
3370
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
@@ -5437,13 +5471,13 @@
5437
5471
  <tr>
5438
5472
  <td>
5439
5473
  <xsl:attribute name="id">
5440
- <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
5474
+ <xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
5441
5475
  </xsl:attribute>
5442
5476
  <xsl:apply-templates/>
5443
5477
  </td>
5444
5478
  <td>
5445
5479
  <xsl:attribute name="id">
5446
- <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
5480
+ <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
5447
5481
  </xsl:attribute>
5448
5482
 
5449
5483
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
@@ -6064,6 +6098,10 @@
6064
6098
  <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
6065
6099
  </xsl:template>
6066
6100
 
6101
+ <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
6102
+ <xsl:value-of select="."/>
6103
+ </xsl:template>
6104
+
6067
6105
  <!-- ========================= -->
6068
6106
  <!-- END Rich text formatting -->
6069
6107
  <!-- ========================= -->
@@ -6694,7 +6732,7 @@
6694
6732
  </xsl:choose>
6695
6733
  </xsl:variable>
6696
6734
  <xsl:attribute name="id">
6697
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
6735
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
6698
6736
  </xsl:attribute>
6699
6737
 
6700
6738
  <xsl:for-each select="*[local-name() = 'p']">
@@ -6702,7 +6740,7 @@
6702
6740
  <xsl:copy-of select="@*"/>
6703
6741
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
6704
6742
  <xsl:attribute name="id">
6705
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6743
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6706
6744
  </xsl:attribute>
6707
6745
 
6708
6746
  <!-- <xsl:copy-of select="node()" /> -->
@@ -6766,7 +6804,7 @@
6766
6804
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
6767
6805
  <xsl:copy>
6768
6806
  <xsl:attribute name="id">
6769
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6807
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6770
6808
  </xsl:attribute>
6771
6809
  <xsl:copy-of select="node()"/>
6772
6810
  </xsl:copy>
@@ -9626,7 +9664,7 @@
9626
9664
  <!-- ====== -->
9627
9665
  <xsl:template match="*[local-name() = 'termexample']">
9628
9666
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
9629
-
9667
+ <xsl:call-template name="refine_termexample-style"/>
9630
9668
  <xsl:call-template name="setBlockSpanAll"/>
9631
9669
 
9632
9670
  <xsl:apply-templates select="*[local-name()='name']"/>
@@ -2152,6 +2152,10 @@
2152
2152
 
2153
2153
  </xsl:attribute-set>
2154
2154
 
2155
+ <xsl:template name="refine_termexample-style">
2156
+
2157
+ </xsl:template>
2158
+
2155
2159
  <xsl:attribute-set name="example-style">
2156
2160
 
2157
2161
  <xsl:attribute name="margin-top">10pt</xsl:attribute>
@@ -3331,6 +3335,36 @@
3331
3335
  </xsl:for-each>
3332
3336
  </xsl:template>
3333
3337
 
3338
+ <xsl:template name="processMainSectionsDefault_flatxml">
3339
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3340
+ <xsl:sort select="@displayorder" data-type="number"/>
3341
+ <xsl:variable name="flatxml">
3342
+ <xsl:apply-templates select="." mode="flatxml"/>
3343
+ </xsl:variable>
3344
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3345
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3346
+
3347
+ </xsl:for-each>
3348
+
3349
+ <xsl:for-each select="/*/*[local-name()='annex']">
3350
+ <xsl:sort select="@displayorder" data-type="number"/>
3351
+ <xsl:variable name="flatxml">
3352
+ <xsl:apply-templates select="." mode="flatxml"/>
3353
+ </xsl:variable>
3354
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3355
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3356
+ </xsl:for-each>
3357
+
3358
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
3359
+ <xsl:sort select="@displayorder" data-type="number"/>
3360
+ <xsl:variable name="flatxml">
3361
+ <xsl:apply-templates select="." mode="flatxml"/>
3362
+ </xsl:variable>
3363
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
3364
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
3365
+ </xsl:for-each>
3366
+ </xsl:template>
3367
+
3334
3368
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
3335
3369
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
3336
3370
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
@@ -5437,13 +5471,13 @@
5437
5471
  <tr>
5438
5472
  <td>
5439
5473
  <xsl:attribute name="id">
5440
- <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
5474
+ <xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
5441
5475
  </xsl:attribute>
5442
5476
  <xsl:apply-templates/>
5443
5477
  </td>
5444
5478
  <td>
5445
5479
  <xsl:attribute name="id">
5446
- <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
5480
+ <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
5447
5481
  </xsl:attribute>
5448
5482
 
5449
5483
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
@@ -6064,6 +6098,10 @@
6064
6098
  <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
6065
6099
  </xsl:template>
6066
6100
 
6101
+ <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
6102
+ <xsl:value-of select="."/>
6103
+ </xsl:template>
6104
+
6067
6105
  <!-- ========================= -->
6068
6106
  <!-- END Rich text formatting -->
6069
6107
  <!-- ========================= -->
@@ -6694,7 +6732,7 @@
6694
6732
  </xsl:choose>
6695
6733
  </xsl:variable>
6696
6734
  <xsl:attribute name="id">
6697
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
6735
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
6698
6736
  </xsl:attribute>
6699
6737
 
6700
6738
  <xsl:for-each select="*[local-name() = 'p']">
@@ -6702,7 +6740,7 @@
6702
6740
  <xsl:copy-of select="@*"/>
6703
6741
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
6704
6742
  <xsl:attribute name="id">
6705
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6743
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6706
6744
  </xsl:attribute>
6707
6745
 
6708
6746
  <!-- <xsl:copy-of select="node()" /> -->
@@ -6766,7 +6804,7 @@
6766
6804
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
6767
6805
  <xsl:copy>
6768
6806
  <xsl:attribute name="id">
6769
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6807
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6770
6808
  </xsl:attribute>
6771
6809
  <xsl:copy-of select="node()"/>
6772
6810
  </xsl:copy>
@@ -9626,7 +9664,7 @@
9626
9664
  <!-- ====== -->
9627
9665
  <xsl:template match="*[local-name() = 'termexample']">
9628
9666
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
9629
-
9667
+ <xsl:call-template name="refine_termexample-style"/>
9630
9668
  <xsl:call-template name="setBlockSpanAll"/>
9631
9669
 
9632
9670
  <xsl:apply-templates select="*[local-name()='name']"/>
@@ -1216,6 +1216,10 @@
1216
1216
 
1217
1217
  </xsl:attribute-set>
1218
1218
 
1219
+ <xsl:template name="refine_termexample-style">
1220
+
1221
+ </xsl:template>
1222
+
1219
1223
  <xsl:attribute-set name="example-style">
1220
1224
 
1221
1225
  <xsl:attribute name="font-size">10pt</xsl:attribute>
@@ -2353,6 +2357,36 @@
2353
2357
  </xsl:for-each>
2354
2358
  </xsl:template>
2355
2359
 
2360
+ <xsl:template name="processMainSectionsDefault_flatxml">
2361
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2362
+ <xsl:sort select="@displayorder" data-type="number"/>
2363
+ <xsl:variable name="flatxml">
2364
+ <xsl:apply-templates select="." mode="flatxml"/>
2365
+ </xsl:variable>
2366
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
2367
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
2368
+
2369
+ </xsl:for-each>
2370
+
2371
+ <xsl:for-each select="/*/*[local-name()='annex']">
2372
+ <xsl:sort select="@displayorder" data-type="number"/>
2373
+ <xsl:variable name="flatxml">
2374
+ <xsl:apply-templates select="." mode="flatxml"/>
2375
+ </xsl:variable>
2376
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
2377
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
2378
+ </xsl:for-each>
2379
+
2380
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2381
+ <xsl:sort select="@displayorder" data-type="number"/>
2382
+ <xsl:variable name="flatxml">
2383
+ <xsl:apply-templates select="." mode="flatxml"/>
2384
+ </xsl:variable>
2385
+ <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
2386
+ <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
2387
+ </xsl:for-each>
2388
+ </xsl:template>
2389
+
2356
2390
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2357
2391
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
2358
2392
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
@@ -4476,13 +4510,13 @@
4476
4510
  <tr>
4477
4511
  <td>
4478
4512
  <xsl:attribute name="id">
4479
- <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
4513
+ <xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
4480
4514
  </xsl:attribute>
4481
4515
  <xsl:apply-templates/>
4482
4516
  </td>
4483
4517
  <td>
4484
4518
  <xsl:attribute name="id">
4485
- <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
4519
+ <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
4486
4520
  </xsl:attribute>
4487
4521
 
4488
4522
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
@@ -5096,6 +5130,10 @@
5096
5130
  <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
5097
5131
  </xsl:template>
5098
5132
 
5133
+ <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
5134
+ <xsl:value-of select="."/>
5135
+ </xsl:template>
5136
+
5099
5137
  <!-- ========================= -->
5100
5138
  <!-- END Rich text formatting -->
5101
5139
  <!-- ========================= -->
@@ -5726,7 +5764,7 @@
5726
5764
  </xsl:choose>
5727
5765
  </xsl:variable>
5728
5766
  <xsl:attribute name="id">
5729
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
5767
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
5730
5768
  </xsl:attribute>
5731
5769
 
5732
5770
  <xsl:for-each select="*[local-name() = 'p']">
@@ -5734,7 +5772,7 @@
5734
5772
  <xsl:copy-of select="@*"/>
5735
5773
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
5736
5774
  <xsl:attribute name="id">
5737
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
5775
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
5738
5776
  </xsl:attribute>
5739
5777
 
5740
5778
  <!-- <xsl:copy-of select="node()" /> -->
@@ -5798,7 +5836,7 @@
5798
5836
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
5799
5837
  <xsl:copy>
5800
5838
  <xsl:attribute name="id">
5801
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
5839
+ <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
5802
5840
  </xsl:attribute>
5803
5841
  <xsl:copy-of select="node()"/>
5804
5842
  </xsl:copy>
@@ -8621,7 +8659,7 @@
8621
8659
  <!-- ====== -->
8622
8660
  <xsl:template match="*[local-name() = 'termexample']">
8623
8661
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
8624
-
8662
+ <xsl:call-template name="refine_termexample-style"/>
8625
8663
  <xsl:call-template name="setBlockSpanAll"/>
8626
8664
 
8627
8665
  <xsl:apply-templates select="*[local-name()='name']"/>
@@ -79,8 +79,8 @@ module Metanorma
79
79
  "OGC"
80
80
  end
81
81
 
82
- def org_abbrev
83
- { "Open Geospatial Consortium" => "OGC" }
82
+ def org_abbrev
83
+ { "Open Geospatial Consortium" => "OGC" }
84
84
  end
85
85
 
86
86
  def metadata_committee(node, xml)
@@ -108,7 +108,7 @@ module Metanorma
108
108
  a = node.attr("abbrev")
109
109
  d && a or return
110
110
  url = "http://www.opengis.net/doc/#{IsoDoc::Ogc::DOCTYPE_ABBR[d]}/#{a}"
111
- v = (node.attr("edition") || node.attr("version")) and url += "/#{v}"
111
+ v = node.attr("edition") || node.attr("version") and url += "/#{v}"
112
112
  url
113
113
  end
114
114
 
@@ -119,7 +119,6 @@ module Metanorma
119
119
  docnumber = node.attr("docnumber") || node.attr("docreference")
120
120
  id = node.attr("docidentifier") || docnumber
121
121
  xml.docidentifier id, type: "ogc-internal"
122
- docnumber and xml.docnumber docnumber
123
122
  end
124
123
 
125
124
  def externalurl(node)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.5.1".freeze
3
+ VERSION = "2.5.2".freeze
4
4
  end
5
5
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
27
27
 
28
28
  spec.add_dependency "iso-639"
29
- spec.add_dependency "metanorma-standoc", "~> 2.8.0"
29
+ spec.add_dependency "metanorma-standoc", "~> 2.8.2"
30
30
 
31
31
  spec.add_development_dependency "debug"
32
32
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-05 00:00:00.000000000 Z
11
+ date: 2024-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.8.0
33
+ version: 2.8.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.8.0
40
+ version: 2.8.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: debug
43
43
  requirement: !ruby/object:Gem::Requirement