metanorma-ogc 2.6.3 → 2.6.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -4184,7 +4184,8 @@
4184
4184
  </xsl:choose>
4185
4185
  </xsl:variable>
4186
4186
  <xsl:variable name="current_fn_number_text">
4187
- <xsl:value-of select="$current_fn_number"/>
4187
+
4188
+ <xsl:value-of select="$current_fn_number"/>
4188
4189
 
4189
4190
  </xsl:variable>
4190
4191
 
@@ -4202,10 +4203,14 @@
4202
4203
  <xsl:variable name="fn_styles">
4203
4204
  <xsl:choose>
4204
4205
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
4205
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
4206
+ <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
4207
+
4208
+ </fn_styles>
4206
4209
  </xsl:when>
4207
4210
  <xsl:otherwise>
4208
- <fn_styles xsl:use-attribute-sets="fn-num-style"/>
4211
+ <fn_styles xsl:use-attribute-sets="fn-num-style">
4212
+
4213
+ </fn_styles>
4209
4214
  </xsl:otherwise>
4210
4215
  </xsl:choose>
4211
4216
  </xsl:variable>
@@ -4220,8 +4225,10 @@
4220
4225
 
4221
4226
  <xsl:call-template name="insert_basic_link">
4222
4227
  <xsl:with-param name="element">
4223
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
4224
- <xsl:copy-of select="$current_fn_number_text"/>
4228
+ <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 -->
4229
+ <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
4230
+ <xsl:copy-of select="$current_fn_number_text"/>
4231
+ </fo:inline>
4225
4232
  </fo:basic-link>
4226
4233
  </xsl:with-param>
4227
4234
  </xsl:call-template>
@@ -4508,7 +4515,7 @@
4508
4515
 
4509
4516
  <xsl:call-template name="refine_fn-reference-style"/>
4510
4517
 
4511
- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
4518
+ <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
4512
4519
  <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
4513
4520
  <xsl:attribute name="internal-destination">
4514
4521
  <xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
@@ -5516,9 +5523,19 @@
5516
5523
  </fo:inline>
5517
5524
  </xsl:template>
5518
5525
 
5519
- <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
5526
+ <xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
5527
+ <xsl:param name="txt"/>
5520
5528
  <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
5521
- <xsl:variable name="text" select="."/>
5529
+ <xsl:variable name="text">
5530
+ <xsl:choose>
5531
+ <xsl:when test="$txt != ''">
5532
+ <xsl:value-of select="$txt"/>
5533
+ </xsl:when>
5534
+ <xsl:otherwise>
5535
+ <xsl:value-of select="."/>
5536
+ </xsl:otherwise>
5537
+ </xsl:choose>
5538
+ </xsl:variable>
5522
5539
  <xsl:variable name="ratio_">
5523
5540
  0.75
5524
5541
  </xsl:variable>
@@ -6964,9 +6981,12 @@
6964
6981
  <xsl:apply-templates/>
6965
6982
  </xsl:when>
6966
6983
  <xsl:otherwise>
6984
+ <xsl:variable name="alt_text">
6985
+ <xsl:call-template name="getAltText"/>
6986
+ </xsl:variable>
6967
6987
  <xsl:call-template name="insert_basic_link">
6968
6988
  <xsl:with-param name="element">
6969
- <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
6989
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$alt_text}">
6970
6990
  <xsl:if test="$isLinkToEmbeddedFile = 'true'">
6971
6991
  <xsl:attribute name="role">Annot</xsl:attribute>
6972
6992
  </xsl:if>
@@ -6993,6 +7013,14 @@
6993
7013
  </fo:inline>
6994
7014
  </xsl:template> <!-- link -->
6995
7015
 
7016
+ <xsl:template name="getAltText">
7017
+ <xsl:choose>
7018
+ <xsl:when test="normalize-space(.) = ''"><xsl:value-of select="@target"/></xsl:when>
7019
+ <xsl:otherwise><xsl:value-of select="normalize-space(translate(normalize-space(), ' —', ' -'))"/></xsl:otherwise>
7020
+ <!-- <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise> -->
7021
+ </xsl:choose>
7022
+ </xsl:template>
7023
+
6996
7024
  <!-- ======================== -->
6997
7025
  <!-- Appendix processing -->
6998
7026
  <!-- ======================== -->
@@ -7023,7 +7051,7 @@
7023
7051
  <xsl:template match="*[local-name() = 'callout']">
7024
7052
  <xsl:choose>
7025
7053
  <xsl:when test="normalize-space(@target) = ''">&lt;<xsl:apply-templates/>&gt;</xsl:when>
7026
- <xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link></xsl:otherwise>
7054
+ <xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{normalize-space()}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link></xsl:otherwise>
7027
7055
  </xsl:choose>
7028
7056
  </xsl:template>
7029
7057
 
@@ -7052,10 +7080,14 @@
7052
7080
  <xsl:template match="*[local-name() = 'xref']">
7053
7081
  <xsl:call-template name="insert_basic_link">
7054
7082
  <xsl:with-param name="element">
7055
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
7083
+ <xsl:variable name="alt_text">
7084
+ <xsl:call-template name="getAltText"/>
7085
+ </xsl:variable>
7086
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
7056
7087
  <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'])">
7057
7088
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7058
7089
  </xsl:if>
7090
+
7059
7091
  <xsl:if test="parent::*[local-name() = 'add']">
7060
7092
  <xsl:call-template name="append_add-style"/>
7061
7093
  </xsl:if>
@@ -7164,44 +7196,44 @@
7164
7196
 
7165
7197
  <xsl:template match="*[local-name() = 'note']" name="note">
7166
7198
 
7167
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7199
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7168
7200
 
7169
- <xsl:call-template name="setBlockSpanAll"/>
7201
+ <xsl:call-template name="setBlockSpanAll"/>
7170
7202
 
7171
- <xsl:call-template name="refine_note-style"/>
7203
+ <xsl:call-template name="refine_note-style"/>
7172
7204
 
7173
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7205
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7174
7206
 
7175
- <fo:block>
7207
+ <fo:block>
7176
7208
 
7177
- <xsl:call-template name="refine_note_block_style"/>
7209
+ <xsl:call-template name="refine_note_block_style"/>
7178
7210
 
7179
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7211
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7180
7212
 
7181
- <xsl:call-template name="refine_note-name-style"/>
7213
+ <xsl:call-template name="refine_note-name-style"/>
7182
7214
 
7183
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7184
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7185
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7186
- <xsl:call-template name="append_add-style"/>
7187
- </xsl:if>
7215
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7216
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7217
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7218
+ <xsl:call-template name="append_add-style"/>
7219
+ </xsl:if>
7188
7220
 
7189
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7190
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7191
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7192
- <xsl:with-param name="skip">false</xsl:with-param>
7193
- </xsl:apply-templates>
7194
- </xsl:if>
7221
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7222
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7223
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7224
+ <xsl:with-param name="skip">false</xsl:with-param>
7225
+ </xsl:apply-templates>
7226
+ </xsl:if>
7195
7227
 
7196
- <xsl:apply-templates select="*[local-name() = 'name']"/>
7228
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7197
7229
 
7198
- </fo:inline>
7230
+ </fo:inline>
7199
7231
 
7200
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7201
- </fo:block>
7232
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7233
+ </fo:block>
7202
7234
 
7203
- </fo:block-container>
7204
- </fo:block-container>
7235
+ </fo:block-container>
7236
+ </fo:block-container>
7205
7237
 
7206
7238
  </xsl:template>
7207
7239
 
@@ -9554,12 +9586,14 @@
9554
9586
 
9555
9587
  <xsl:when test="contains(normalize-space($fo_element), 'list')">
9556
9588
 
9557
- <xsl:variable name="provisional_distance_between_starts">
9589
+ <xsl:variable name="provisional_distance_between_starts_">
9558
9590
  7
9559
9591
  </xsl:variable>
9560
- <xsl:variable name="indent">
9592
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
9593
+ <xsl:variable name="indent_">
9561
9594
  0
9562
9595
  </xsl:variable>
9596
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
9563
9597
 
9564
9598
  <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
9565
9599
  <fo:list-item>
@@ -9623,6 +9657,7 @@
9623
9657
  </xsl:when>
9624
9658
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
9625
9659
  <fo:block xsl:use-attribute-sets="example-name-style">
9660
+
9626
9661
  <xsl:apply-templates/>
9627
9662
  </fo:block>
9628
9663
  </xsl:when>
@@ -9638,6 +9673,7 @@
9638
9673
 
9639
9674
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
9640
9675
  <fo:inline xsl:use-attribute-sets="example-name-style">
9676
+
9641
9677
  <xsl:apply-templates/>
9642
9678
  </fo:inline>
9643
9679
  </xsl:template>
@@ -10019,12 +10055,14 @@
10019
10055
 
10020
10056
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
10021
10057
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
10058
+
10022
10059
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
10023
10060
  </fo:block>
10024
10061
  </xsl:if>
10025
10062
 
10026
10063
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
10027
10064
  <xsl:call-template name="setStyle_preferred"/>
10065
+
10028
10066
  <xsl:apply-templates/>
10029
10067
  </fo:block>
10030
10068
  </fo:block>
@@ -10293,14 +10331,17 @@
10293
10331
  </xsl:when>
10294
10332
  <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
10295
10333
 
10296
- <xsl:variable name="label">
10334
+ <xsl:variable name="type" select="../@type"/>
10297
10335
 
10298
- <xsl:variable name="type" select="../@type"/>
10336
+ <xsl:variable name="label">
10299
10337
 
10300
10338
  <xsl:variable name="style_prefix_">
10301
10339
  <xsl:if test="$type = 'roman'">
10302
10340
  <!-- Example: (i) -->
10303
10341
  </xsl:if>
10342
+ <xsl:if test="$type = 'alphabet'">
10343
+
10344
+ </xsl:if>
10304
10345
  </xsl:variable>
10305
10346
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
10306
10347
 
@@ -10326,13 +10367,15 @@
10326
10367
  <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
10327
10368
  <xsl:value-of select="$style_prefix"/>
10328
10369
  </xsl:if>
10370
+
10329
10371
  <xsl:value-of select="@label"/>
10372
+
10330
10373
  <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
10331
10374
  <xsl:value-of select="$style_suffix"/>
10332
10375
  </xsl:if>
10333
10376
  </xsl:variable>
10334
10377
 
10335
- <xsl:value-of select="normalize-space($label)"/>
10378
+ <xsl:value-of select="normalize-space($label)"/>
10336
10379
 
10337
10380
  </xsl:when>
10338
10381
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -12536,7 +12579,8 @@
12536
12579
  <xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
12537
12580
  <xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
12538
12581
  <!-- Todo: need update -->
12539
- <xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
12582
+ <xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
12583
+ <xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
12540
12584
 
12541
12585
  <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{$filename}" link-as-file-annotation="true">
12542
12586
  <xsl:attribute name="src">
@@ -12557,6 +12601,9 @@
12557
12601
  <xsl:if test="$afrelationship != ''">
12558
12602
  <xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
12559
12603
  </xsl:if>
12604
+ <xsl:if test="$volatile != ''">
12605
+ <xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
12606
+ </xsl:if>
12560
12607
  </pdf:embedded-file>
12561
12608
  </xsl:for-each>
12562
12609
  <!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
@@ -12567,14 +12614,18 @@
12567
12614
  <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
12568
12615
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
12569
12616
  <!-- Todo: need update -->
12570
- <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
12617
+ <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
12618
+ <xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
12571
12619
  <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
12572
12620
  <xsl:if test="$description != ''">
12573
12621
  <xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
12574
12622
  </xsl:if>
12575
12623
  <xsl:if test="$afrelationship != ''">
12576
- <xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
12577
- </xsl:if>
12624
+ <xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
12625
+ </xsl:if>
12626
+ <xsl:if test="$volatile != ''">
12627
+ <xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
12628
+ </xsl:if>
12578
12629
  </pdf:embedded-file>
12579
12630
  </xsl:for-each>
12580
12631
  </xsl:if>
@@ -12621,10 +12672,31 @@
12621
12672
  <xsl:value-of select="$level_total - 2"/>
12622
12673
  </xsl:when>
12623
12674
  <xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
12624
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
12675
+ <!-- determine 'depth' depends on upper clause with title/@depth -->
12676
+ <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
12677
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/*[local-name() = 'title']/@depth"/>
12678
+ <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
12679
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/ancestor::*)"/>
12680
+ <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
12681
+ <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
12682
+ <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
12683
+ <!-- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/> -->
12684
+ <xsl:variable name="curr_clause_depth" select="number($clause_with_depth_depth) + (number($curr_level) - number($clause_with_depth_level)) "/>
12685
+ <!-- <xsl:message>curr_clause_depth=<xsl:value-of select="$curr_clause_depth"/></xsl:message> -->
12625
12686
  <xsl:choose>
12626
- <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
12627
- <xsl:value-of select="number($upper_clause_depth + 1)"/>
12687
+ <xsl:when test="string(number($curr_clause_depth)) != 'NaN'">
12688
+ <xsl:value-of select="number($curr_clause_depth)"/>
12689
+ </xsl:when>
12690
+ <xsl:otherwise>
12691
+ <xsl:value-of select="$level_total - 2"/>
12692
+ </xsl:otherwise>
12693
+ </xsl:choose>
12694
+ </xsl:when>
12695
+ <xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'name'] and parent::*[local-name() = 'term']">
12696
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::*[local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
12697
+ <xsl:choose>
12698
+ <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
12699
+ <xsl:value-of select="number($upper_terms_depth + 1)"/>
12628
12700
  </xsl:when>
12629
12701
  <xsl:otherwise>
12630
12702
  <xsl:value-of select="$level_total - 2"/>
@@ -12632,7 +12704,7 @@
12632
12704
  </xsl:choose>
12633
12705
  </xsl:when>
12634
12706
  <xsl:when test="ancestor::*[local-name() = 'sections']">
12635
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
12707
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause' or local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
12636
12708
  <xsl:choose>
12637
12709
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
12638
12710
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -12949,9 +13021,10 @@
12949
13021
  <xsl:template name="insertBackgroundPageImage">
12950
13022
  <xsl:param name="number">1</xsl:param>
12951
13023
  <xsl:param name="name">coverpage-image</xsl:param>
13024
+ <xsl:param name="suffix"/>
12952
13025
  <xsl:variable name="num" select="number($number)"/>
12953
13026
  <!-- background image -->
12954
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
13027
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
12955
13028
  <fo:block>
12956
13029
  <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]">
12957
13030
  <xsl:choose>
@@ -13017,16 +13090,29 @@
13017
13090
 
13018
13091
  <!-- END: insert cover page image -->
13019
13092
 
13093
+ <xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
13020
13094
  <xsl:template name="insertVerticalChar">
13021
13095
  <xsl:param name="str"/>
13096
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
13097
+ <xsl:param name="reference-orientation">90</xsl:param>
13022
13098
  <xsl:if test="string-length($str) &gt; 0">
13023
- <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">
13099
+ <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
13100
+ <xsl:if test="normalize-space($writing-mode) != ''">
13101
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
13102
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
13103
+ </xsl:if>
13104
+ <xsl:variable name="char" select="substring($str,1,1)"/>
13105
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
13106
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
13107
+ </xsl:if>
13024
13108
  <fo:block-container width="1em">
13025
- <fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
13109
+ <fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
13026
13110
  </fo:block-container>
13027
13111
  </fo:inline-container>
13028
13112
  <xsl:call-template name="insertVerticalChar">
13029
13113
  <xsl:with-param name="str" select="substring($str, 2)"/>
13114
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
13115
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
13030
13116
  </xsl:call-template>
13031
13117
  </xsl:if>
13032
13118
  </xsl:template>
@@ -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>
@@ -201,12 +201,6 @@ module Metanorma
201
201
  a = node.attr("abbrev") and
202
202
  xml.title a, **attr_code(at)
203
203
  end
204
-
205
- def metadata_ext(node, xml)
206
- metadata_doctype(node, xml)
207
- metadata_subdoctype(node, xml)
208
- metadata_committee(node, xml)
209
- end
210
204
  end
211
205
  end
212
206
  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.3".freeze
3
+ VERSION = "2.6.5".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.3
4
+ version: 2.6.5
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-30 00:00:00.000000000 Z
11
+ date: 2024-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639