metanorma-ogc 2.6.2 → 2.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -4047,6 +4047,7 @@
4047
4047
 
4048
4048
  <fo:block role="SKIP">
4049
4049
  <xsl:apply-templates/>
4050
+ <xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
4050
4051
  </fo:block>
4051
4052
  </fo:table-cell>
4052
4053
  </xsl:template> <!-- cell in table header row - 'th' -->
@@ -4110,6 +4111,8 @@
4110
4111
 
4111
4112
  <xsl:if test="$isGenerateTableIF = 'true'"> <fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
4112
4113
 
4114
+ <xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
4115
+
4113
4116
  </fo:block>
4114
4117
  </fo:table-cell>
4115
4118
  </xsl:template> <!-- td -->
@@ -4181,7 +4184,8 @@
4181
4184
  </xsl:choose>
4182
4185
  </xsl:variable>
4183
4186
  <xsl:variable name="current_fn_number_text">
4184
- <xsl:value-of select="$current_fn_number"/>
4187
+
4188
+ <xsl:value-of select="$current_fn_number"/>
4185
4189
 
4186
4190
  </xsl:variable>
4187
4191
 
@@ -4217,8 +4221,10 @@
4217
4221
 
4218
4222
  <xsl:call-template name="insert_basic_link">
4219
4223
  <xsl:with-param name="element">
4220
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
4221
- <xsl:copy-of select="$current_fn_number_text"/>
4224
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
4225
+ <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
4226
+ <xsl:copy-of select="$current_fn_number_text"/>
4227
+ </fo:inline>
4222
4228
  </fo:basic-link>
4223
4229
  </xsl:with-param>
4224
4230
  </xsl:call-template>
@@ -4505,7 +4511,7 @@
4505
4511
 
4506
4512
  <xsl:call-template name="refine_fn-reference-style"/>
4507
4513
 
4508
- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
4514
+ <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
4509
4515
  <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
4510
4516
  <xsl:attribute name="internal-destination">
4511
4517
  <xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
@@ -5513,9 +5519,19 @@
5513
5519
  </fo:inline>
5514
5520
  </xsl:template>
5515
5521
 
5516
- <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
5522
+ <xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
5523
+ <xsl:param name="txt"/>
5517
5524
  <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
5518
- <xsl:variable name="text" select="."/>
5525
+ <xsl:variable name="text">
5526
+ <xsl:choose>
5527
+ <xsl:when test="$txt != ''">
5528
+ <xsl:value-of select="$txt"/>
5529
+ </xsl:when>
5530
+ <xsl:otherwise>
5531
+ <xsl:value-of select="."/>
5532
+ </xsl:otherwise>
5533
+ </xsl:choose>
5534
+ </xsl:variable>
5519
5535
  <xsl:variable name="ratio_">
5520
5536
  0.75
5521
5537
  </xsl:variable>
@@ -6909,14 +6925,16 @@
6909
6925
  <xsl:template match="*[local-name()='link']" name="link">
6910
6926
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
6911
6927
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
6928
+ <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
6912
6929
  <xsl:variable name="target">
6913
6930
  <xsl:choose>
6914
6931
  <xsl:when test="@updatetype = 'true'">
6915
6932
  <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
6916
6933
  </xsl:when>
6917
6934
  <!-- link to the PDF attachment -->
6918
- <xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
6919
- <xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
6935
+ <xsl:when test="$isLinkToEmbeddedFile = 'true'">
6936
+ <xsl:variable name="target_file" select="java:org.metanorma.fop.Util.getFilenameFromPath(@target)"/>
6937
+ <xsl:value-of select="concat('url(embedded-file:', $target_file, ')')"/>
6920
6938
  </xsl:when>
6921
6939
  <!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
6922
6940
  <xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
@@ -6947,6 +6965,11 @@
6947
6965
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6948
6966
  </xsl:if>
6949
6967
 
6968
+ <xsl:if test="$isLinkToEmbeddedFile = 'true'">
6969
+ <xsl:attribute name="color">inherit</xsl:attribute>
6970
+ <xsl:attribute name="text-decoration">none</xsl:attribute>
6971
+ </xsl:if>
6972
+
6950
6973
  <xsl:call-template name="refine_link-style"/>
6951
6974
 
6952
6975
  <xsl:choose>
@@ -6954,9 +6977,15 @@
6954
6977
  <xsl:apply-templates/>
6955
6978
  </xsl:when>
6956
6979
  <xsl:otherwise>
6980
+ <xsl:variable name="alt_text">
6981
+ <xsl:call-template name="getAltText"/>
6982
+ </xsl:variable>
6957
6983
  <xsl:call-template name="insert_basic_link">
6958
6984
  <xsl:with-param name="element">
6959
- <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
6985
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$alt_text}">
6986
+ <xsl:if test="$isLinkToEmbeddedFile = 'true'">
6987
+ <xsl:attribute name="role">Annot</xsl:attribute>
6988
+ </xsl:if>
6960
6989
  <xsl:choose>
6961
6990
  <xsl:when test="normalize-space(.) = ''">
6962
6991
  <xsl:call-template name="add-zero-spaces-link-java">
@@ -6969,6 +6998,10 @@
6969
6998
  </xsl:otherwise>
6970
6999
  </xsl:choose>
6971
7000
  </fo:basic-link>
7001
+ <xsl:if test="$isLinkToEmbeddedFile = 'true'">
7002
+ <!-- reserve space at right for PaperClip icon -->
7003
+ <fo:inline keep-with-previous.within-line="always">        </fo:inline>
7004
+ </xsl:if>
6972
7005
  </xsl:with-param>
6973
7006
  </xsl:call-template>
6974
7007
  </xsl:otherwise>
@@ -6976,6 +7009,14 @@
6976
7009
  </fo:inline>
6977
7010
  </xsl:template> <!-- link -->
6978
7011
 
7012
+ <xsl:template name="getAltText">
7013
+ <xsl:choose>
7014
+ <xsl:when test="normalize-space(.) = ''"><xsl:value-of select="@target"/></xsl:when>
7015
+ <xsl:otherwise><xsl:value-of select="normalize-space(translate(normalize-space(), ' —', ' -'))"/></xsl:otherwise>
7016
+ <!-- <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise> -->
7017
+ </xsl:choose>
7018
+ </xsl:template>
7019
+
6979
7020
  <!-- ======================== -->
6980
7021
  <!-- Appendix processing -->
6981
7022
  <!-- ======================== -->
@@ -7006,7 +7047,7 @@
7006
7047
  <xsl:template match="*[local-name() = 'callout']">
7007
7048
  <xsl:choose>
7008
7049
  <xsl:when test="normalize-space(@target) = ''">&lt;<xsl:apply-templates/>&gt;</xsl:when>
7009
- <xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link></xsl:otherwise>
7050
+ <xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{normalize-space()}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link></xsl:otherwise>
7010
7051
  </xsl:choose>
7011
7052
  </xsl:template>
7012
7053
 
@@ -7035,7 +7076,10 @@
7035
7076
  <xsl:template match="*[local-name() = 'xref']">
7036
7077
  <xsl:call-template name="insert_basic_link">
7037
7078
  <xsl:with-param name="element">
7038
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
7079
+ <xsl:variable name="alt_text">
7080
+ <xsl:call-template name="getAltText"/>
7081
+ </xsl:variable>
7082
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
7039
7083
  <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
7040
7084
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7041
7085
  </xsl:if>
@@ -9537,12 +9581,14 @@
9537
9581
 
9538
9582
  <xsl:when test="contains(normalize-space($fo_element), 'list')">
9539
9583
 
9540
- <xsl:variable name="provisional_distance_between_starts">
9584
+ <xsl:variable name="provisional_distance_between_starts_">
9541
9585
  7
9542
9586
  </xsl:variable>
9543
- <xsl:variable name="indent">
9587
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
9588
+ <xsl:variable name="indent_">
9544
9589
  0
9545
9590
  </xsl:variable>
9591
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
9546
9592
 
9547
9593
  <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
9548
9594
  <fo:list-item>
@@ -10276,14 +10322,17 @@
10276
10322
  </xsl:when>
10277
10323
  <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
10278
10324
 
10279
- <xsl:variable name="label">
10325
+ <xsl:variable name="type" select="../@type"/>
10280
10326
 
10281
- <xsl:variable name="type" select="../@type"/>
10327
+ <xsl:variable name="label">
10282
10328
 
10283
10329
  <xsl:variable name="style_prefix_">
10284
10330
  <xsl:if test="$type = 'roman'">
10285
10331
  <!-- Example: (i) -->
10286
10332
  </xsl:if>
10333
+ <xsl:if test="$type = 'alphabet'">
10334
+
10335
+ </xsl:if>
10287
10336
  </xsl:variable>
10288
10337
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
10289
10338
 
@@ -10309,13 +10358,15 @@
10309
10358
  <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
10310
10359
  <xsl:value-of select="$style_prefix"/>
10311
10360
  </xsl:if>
10361
+
10312
10362
  <xsl:value-of select="@label"/>
10363
+
10313
10364
  <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
10314
10365
  <xsl:value-of select="$style_suffix"/>
10315
10366
  </xsl:if>
10316
10367
  </xsl:variable>
10317
10368
 
10318
- <xsl:value-of select="normalize-space($label)"/>
10369
+ <xsl:value-of select="normalize-space($label)"/>
10319
10370
 
10320
10371
  </xsl:when>
10321
10372
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -12514,9 +12565,15 @@
12514
12565
  </x:xmpmeta>
12515
12566
  <!-- add attachments -->
12516
12567
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
12517
- <xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
12518
-
12519
- <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{@name}">
12568
+ <xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
12569
+ <xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
12570
+ <xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
12571
+ <xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
12572
+ <!-- Todo: need update -->
12573
+ <xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
12574
+ <xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
12575
+
12576
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{$filename}" link-as-file-annotation="true">
12520
12577
  <xsl:attribute name="src">
12521
12578
  <xsl:choose>
12522
12579
  <xsl:when test="normalize-space() != ''">
@@ -12532,18 +12589,34 @@
12532
12589
  <xsl:if test="$description != ''">
12533
12590
  <xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
12534
12591
  </xsl:if>
12592
+ <xsl:if test="$afrelationship != ''">
12593
+ <xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
12594
+ </xsl:if>
12595
+ <xsl:if test="$volatile != ''">
12596
+ <xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
12597
+ </xsl:if>
12535
12598
  </pdf:embedded-file>
12536
12599
  </xsl:for-each>
12537
12600
  <!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
12538
12601
  <xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
12539
12602
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
12540
12603
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
12604
+ <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
12541
12605
  <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
12542
12606
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
12543
- <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_path}">
12607
+ <!-- Todo: need update -->
12608
+ <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
12609
+ <xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
12610
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
12544
12611
  <xsl:if test="$description != ''">
12545
12612
  <xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
12546
12613
  </xsl:if>
12614
+ <xsl:if test="$afrelationship != ''">
12615
+ <xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
12616
+ </xsl:if>
12617
+ <xsl:if test="$volatile != ''">
12618
+ <xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
12619
+ </xsl:if>
12547
12620
  </pdf:embedded-file>
12548
12621
  </xsl:for-each>
12549
12622
  </xsl:if>
@@ -12563,6 +12636,12 @@
12563
12636
  <!-- Get or calculate depth of the element -->
12564
12637
  <xsl:template name="getLevel">
12565
12638
  <xsl:param name="depth"/>
12639
+ <!-- <xsl:message>
12640
+ <xsl:choose>
12641
+ <xsl:when test="local-name() = 'title'">title=<xsl:value-of select="."/></xsl:when>
12642
+ <xsl:when test="local-name() = 'clause'">clause/title=<xsl:value-of select="*[local-name() = 'title']"/></xsl:when>
12643
+ </xsl:choose>
12644
+ </xsl:message> -->
12566
12645
  <xsl:choose>
12567
12646
  <xsl:when test="normalize-space(@depth) != ''">
12568
12647
  <xsl:value-of select="@depth"/>
@@ -12583,8 +12662,48 @@
12583
12662
  <xsl:when test="ancestor::*[local-name() = 'preface']">
12584
12663
  <xsl:value-of select="$level_total - 2"/>
12585
12664
  </xsl:when>
12665
+ <xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
12666
+ <!-- determine 'depth' depends on upper clause with title/@depth -->
12667
+ <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
12668
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/*[local-name() = 'title']/@depth"/>
12669
+ <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
12670
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/ancestor::*)"/>
12671
+ <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
12672
+ <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
12673
+ <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
12674
+ <!-- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/> -->
12675
+ <xsl:variable name="curr_clause_depth" select="number($clause_with_depth_depth) + (number($curr_level) - number($clause_with_depth_level)) "/>
12676
+ <!-- <xsl:message>curr_clause_depth=<xsl:value-of select="$curr_clause_depth"/></xsl:message> -->
12677
+ <xsl:choose>
12678
+ <xsl:when test="string(number($curr_clause_depth)) != 'NaN'">
12679
+ <xsl:value-of select="number($curr_clause_depth)"/>
12680
+ </xsl:when>
12681
+ <xsl:otherwise>
12682
+ <xsl:value-of select="$level_total - 2"/>
12683
+ </xsl:otherwise>
12684
+ </xsl:choose>
12685
+ </xsl:when>
12686
+ <xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'name'] and parent::*[local-name() = 'term']">
12687
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::*[local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
12688
+ <xsl:choose>
12689
+ <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
12690
+ <xsl:value-of select="number($upper_terms_depth + 1)"/>
12691
+ </xsl:when>
12692
+ <xsl:otherwise>
12693
+ <xsl:value-of select="$level_total - 2"/>
12694
+ </xsl:otherwise>
12695
+ </xsl:choose>
12696
+ </xsl:when>
12586
12697
  <xsl:when test="ancestor::*[local-name() = 'sections']">
12587
- <xsl:value-of select="$level_total - 1"/>
12698
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause' or local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
12699
+ <xsl:choose>
12700
+ <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
12701
+ <xsl:value-of select="number($upper_clause_depth + 1)"/>
12702
+ </xsl:when>
12703
+ <xsl:otherwise>
12704
+ <xsl:value-of select="$level_total - 1"/>
12705
+ </xsl:otherwise>
12706
+ </xsl:choose>
12588
12707
  </xsl:when>
12589
12708
  <xsl:when test="ancestor::*[local-name() = 'bibliography']">
12590
12709
  <xsl:value-of select="$level_total - 1"/>
@@ -12592,6 +12711,17 @@
12592
12711
  <xsl:when test="parent::*[local-name() = 'annex']">
12593
12712
  <xsl:value-of select="$level_total - 1"/>
12594
12713
  </xsl:when>
12714
+ <xsl:when test="ancestor::*[local-name() = 'annex'] and self::*[local-name() = 'title']">
12715
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
12716
+ <xsl:choose>
12717
+ <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
12718
+ <xsl:value-of select="number($upper_clause_depth + 1)"/>
12719
+ </xsl:when>
12720
+ <xsl:otherwise>
12721
+ <xsl:value-of select="$level_total - 1"/>
12722
+ </xsl:otherwise>
12723
+ </xsl:choose>
12724
+ </xsl:when>
12595
12725
  <xsl:when test="ancestor::*[local-name() = 'annex']">
12596
12726
  <xsl:value-of select="$level_total"/>
12597
12727
  </xsl:when>
@@ -12950,6 +13080,20 @@
12950
13080
 
12951
13081
  <!-- END: insert cover page image -->
12952
13082
 
13083
+ <xsl:template name="insertVerticalChar">
13084
+ <xsl:param name="str"/>
13085
+ <xsl:if test="string-length($str) &gt; 0">
13086
+ <fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
13087
+ <fo:block-container width="1em">
13088
+ <fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
13089
+ </fo:block-container>
13090
+ </fo:inline-container>
13091
+ <xsl:call-template name="insertVerticalChar">
13092
+ <xsl:with-param name="str" select="substring($str, 2)"/>
13093
+ </xsl:call-template>
13094
+ </xsl:if>
13095
+ </xsl:template>
13096
+
12953
13097
  <xsl:template name="number-to-words">
12954
13098
  <xsl:param name="number"/>
12955
13099
  <xsl:param name="first"/>
@@ -13237,4 +13381,18 @@
13237
13381
  </xsl:if>
13238
13382
  </xsl:template>
13239
13383
 
13384
+ <xsl:template match="@*|node()" mode="set_table_role_skip">
13385
+ <xsl:copy>
13386
+ <xsl:apply-templates select="@*|node()" mode="set_table_role_skip"/>
13387
+ </xsl:copy>
13388
+ </xsl:template>
13389
+
13390
+ <xsl:template match="*[starts-with(local-name(), 'table')]" mode="set_table_role_skip">
13391
+ <xsl:copy>
13392
+ <xsl:apply-templates select="@*" mode="set_table_role_skip"/>
13393
+ <xsl:attribute name="role">SKIP</xsl:attribute>
13394
+ <xsl:apply-templates select="node()" mode="set_table_role_skip"/>
13395
+ </xsl:copy>
13396
+ </xsl:template>
13397
+
13240
13398
  </xsl:stylesheet>
@@ -72,6 +72,9 @@ standards defining organization, and that is rendered in a distinct manner</a:do
72
72
  from other documents in the same doctype</a:documentation>
73
73
  </ref>
74
74
  </optional>
75
+ <ref name="flavor">
76
+ <a:documentation>Flavour of Metanorma used to process this document</a:documentation>
77
+ </ref>
75
78
  <optional>
76
79
  <ref name="editorialgroup">
77
80
  <a:documentation>Groups associated with the production of the standards document, typically within
@@ -113,6 +116,16 @@ a standards definition organization</a:documentation>
113
116
  <define name="DocumentSubtype">
114
117
  <text/>
115
118
  </define>
119
+ <define name="flavor">
120
+ <element name="flavor">
121
+ <ref name="MetanormaFlavor"/>
122
+ </element>
123
+ </define>
124
+ <define name="MetanormaFlavor">
125
+ <a:documentation>This is in fact an enum, as of this writing: standoc iso generic ietf ieee itu nist ogc csa cc iho ribose jis iec bsi bipm plateau.
126
+ However we prefer not to hardcode it, given ongoing extension.</a:documentation>
127
+ <text/>
128
+ </define>
116
129
  <define name="editorialgroup">
117
130
  <a:documentation>A group associated with the production of the standards document, typically within
118
131
  a standards definition organization</a:documentation>
@@ -1382,18 +1382,7 @@ Applies whether the resource has already been created or not, and whether it is
1382
1382
  <define name="bdate">
1383
1383
  <a:documentation>Significant date in the lifecycle of the bibliographic item, including its production and its access</a:documentation>
1384
1384
  <element name="date">
1385
- <attribute name="type">
1386
- <a:documentation>The phase of the production of or access to a bibliographic item</a:documentation>
1387
- <choice>
1388
- <ref name="BibliographicDateType"/>
1389
- <text/>
1390
- </choice>
1391
- </attribute>
1392
- <optional>
1393
- <attribute name="text">
1394
- <a:documentation>An optional textual description of the date, especially when a Gregorian date is not applicable</a:documentation>
1395
- </attribute>
1396
- </optional>
1385
+ <ref name="bDateAttributes"/>
1397
1386
  <optional>
1398
1387
  <choice>
1399
1388
  <group>
@@ -1416,6 +1405,20 @@ Applies whether the resource has already been created or not, and whether it is
1416
1405
  </optional>
1417
1406
  </element>
1418
1407
  </define>
1408
+ <define name="bDateAttributes">
1409
+ <attribute name="type">
1410
+ <a:documentation>The phase of the production of or access to a bibliographic item</a:documentation>
1411
+ <choice>
1412
+ <ref name="BibliographicDateType"/>
1413
+ <text/>
1414
+ </choice>
1415
+ </attribute>
1416
+ <optional>
1417
+ <attribute name="text">
1418
+ <a:documentation>An optional textual description of the date, especially when a Gregorian date is not applicable</a:documentation>
1419
+ </attribute>
1420
+ </optional>
1421
+ </define>
1419
1422
  <define name="docidentifier">
1420
1423
  <a:documentation>An identifier of a bibliographic item in an international standard scheme</a:documentation>
1421
1424
  <element name="docidentifier">
@@ -1884,6 +1887,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation>
1884
1887
  <value>hasAnnotation</value>
1885
1888
  <value>draftOf</value>
1886
1889
  <value>hasDraft</value>
1890
+ <value>preliminaryDraftOf</value>
1891
+ <value>hasPreliminaryDraft</value>
1892
+ <value>revisionDraftOf</value>
1893
+ <value>hasRevisionDraft</value>
1887
1894
  <value>editionOf</value>
1888
1895
  <value>hasEdition</value>
1889
1896
  <value>updates</value>
@@ -205,6 +205,7 @@ module Metanorma
205
205
  def metadata_ext(node, xml)
206
206
  metadata_doctype(node, xml)
207
207
  metadata_subdoctype(node, xml)
208
+ metadata_flavor(node, xml)
208
209
  metadata_committee(node, xml)
209
210
  end
210
211
  end
@@ -55,11 +55,17 @@
55
55
  <optional>
56
56
  <ref name="docsubtype"/>
57
57
  </optional>
58
+ <ref name="flavor"/>
58
59
  <ref name="editorialgroup"/>
59
60
  <zeroOrMore>
60
61
  <ref name="ics"/>
61
62
  </zeroOrMore>
62
63
  </define>
64
+ <define name="stage">
65
+ <element name="stage">
66
+ <ref name="StageType"/>
67
+ </element>
68
+ </define>
63
69
  </include>
64
70
  <define name="committee">
65
71
  <element name="committee">
@@ -80,4 +86,26 @@
80
86
  <ref name="IsoWorkgroup"/>
81
87
  </element>
82
88
  </define>
89
+ <define name="StageType">
90
+ <choice>
91
+ <value>rfc</value>
92
+ <value>candidate</value>
93
+ <value>published</value>
94
+ <value>deprecated</value>
95
+ <value>retired</value>
96
+ <value>legacy</value>
97
+ <value>rescinded</value>
98
+ <value>draft</value>
99
+ <value>work-item-draft</value>
100
+ <value>swg-draft</value>
101
+ <value>oab-review</value>
102
+ <value>public-ref</value>
103
+ <value>tc-vote</value>
104
+ <value>approved</value>
105
+ <value>deprecated</value>
106
+ <value>rescinded</value>
107
+ <value>retired</value>
108
+ <value>legacy</value>
109
+ </choice>
110
+ </define>
83
111
  </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.6.2".freeze
3
+ VERSION = "2.6.4".freeze
4
4
  end
5
5
  end
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.6.2
4
+ version: 2.6.4
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-09-16 00:00:00.000000000 Z
11
+ date: 2024-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639