metanorma-ribose 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a6232179686f66cbd2c5eff24711ccfc03c241075f8338c74ff0dd9b62ab305
4
- data.tar.gz: bd5d151cd18b5b372b9b7bdd9fb0d49ed4137fb0f297f766244363a0cd46f9c6
3
+ metadata.gz: fb795cd22cf6cdc75bf3a53c1b9d979799a89b8d0733a6510c4de6b6af975b8e
4
+ data.tar.gz: 14eeadada4566d22bc576b9a28bc903d45cbaf17536ff62db78e59b8d167e75c
5
5
  SHA512:
6
- metadata.gz: f7c60b4dec2755741d5e109311acda0ef95a3c7cd9bde3c8701360fcde125c7b883e0678a3ab76a98ecd5da8337cd738f93b9a4ea1223b067365b079880b66ed
7
- data.tar.gz: 4f6924cf224c226380ba24a208e80afdb5b129d962541002823bf75901190b616fdd3dd0e08d424e77f7e1d9e5120a16b90469b0fbe07034700ae6096876fccb
6
+ metadata.gz: 9225d6ff20a31be5bac5e041f4b566a87e6f49bd04ae3a8f05fa745a75367463321cd206865a47da30bbb3fc4c56049a4ef7bdb0aa25644cda7daa2265a0bbc5
7
+ data.tar.gz: 7b18bff8d19e7c72cb36a6c64a60f498c4aca7a4664b9e7e69a67f2d966dec57fd51f9be7f72b04dab6a828b9c2adf6d4d740fce42d3a9ee015cfd1ad44e47e0
@@ -622,8 +622,11 @@ a:hover {
622
622
  background: #1661AD;
623
623
  box-shadow: 3px 0 0 #1661AD, -3px 0 0 #1661AD; }
624
624
 
625
- ::selection,
626
- ::-moz-selection {
625
+ *::selection {
626
+ background: #1661AD;
627
+ color: white; }
628
+
629
+ *::-moz-selection {
627
630
  background: #1661AD;
628
631
  color: white; }
629
632
 
@@ -2030,6 +2030,10 @@
2030
2030
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2031
2031
  </xsl:attribute-set>
2032
2032
 
2033
+ <xsl:attribute-set name="figure-block-style">
2034
+
2035
+ </xsl:attribute-set>
2036
+
2033
2037
  <xsl:attribute-set name="figure-style">
2034
2038
  <!-- background for image -->
2035
2039
  <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
@@ -3478,6 +3482,10 @@
3478
3482
  <xsl:with-param name="continued">true</xsl:with-param>
3479
3483
  </xsl:apply-templates>
3480
3484
 
3485
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
3486
+ <fo:block/>
3487
+ </xsl:if>
3488
+
3481
3489
  </fo:table-cell>
3482
3490
  </fo:table-row>
3483
3491
  </xsl:template> <!-- table-header-title -->
@@ -3867,7 +3875,22 @@
3867
3875
 
3868
3876
  <xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
3869
3877
  <xsl:variable name="footnote_inline">
3870
- <fo:inline xsl:use-attribute-sets="fn-num-style">
3878
+ <fo:inline>
3879
+
3880
+ <xsl:variable name="fn_styles">
3881
+ <xsl:choose>
3882
+ <xsl:when test="ancestor::*[local-name() = 'bibitem']">
3883
+ <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
3884
+ </xsl:when>
3885
+ <xsl:otherwise>
3886
+ <fn_styles xsl:use-attribute-sets="fn-num-style"/>
3887
+ </xsl:otherwise>
3888
+ </xsl:choose>
3889
+ </xsl:variable>
3890
+
3891
+ <xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
3892
+ <xsl:copy-of select="."/>
3893
+ </xsl:for-each>
3871
3894
 
3872
3895
  <xsl:if test="following-sibling::*[1][local-name() = 'fn']">
3873
3896
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
@@ -3931,7 +3954,10 @@
3931
3954
  </xsl:for-each>
3932
3955
  <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
3933
3956
  <xsl:sort select="@displayorder" data-type="number"/>
3934
- <xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
3957
+ <!-- commented:
3958
+ .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
3959
+ because 'fn' there is in biblio-tag -->
3960
+ <xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
3935
3961
  <!-- copy unique fn -->
3936
3962
  <fn gen_id="{generate-id(.)}">
3937
3963
  <xsl:copy-of select="@*"/>
@@ -4788,7 +4814,7 @@
4788
4814
 
4789
4815
  <xsl:variable name="_font-size">
4790
4816
 
4791
- <!-- 10 -->
4817
+ <!-- inherit -->
4792
4818
 
4793
4819
  <xsl:choose>
4794
4820
  <xsl:when test="ancestor::*[local-name() = 'table']">inherit</xsl:when>
@@ -5761,6 +5787,33 @@
5761
5787
  </xsl:choose>
5762
5788
  </xsl:template>
5763
5789
 
5790
+ <xsl:template name="getLang_fromCurrentNode">
5791
+ <xsl:variable name="language_current" select="normalize-space(.//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
5792
+ <xsl:variable name="language">
5793
+ <xsl:choose>
5794
+ <xsl:when test="$language_current != ''">
5795
+ <xsl:value-of select="$language_current"/>
5796
+ </xsl:when>
5797
+ <xsl:otherwise>
5798
+ <xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
5799
+ <xsl:choose>
5800
+ <xsl:when test="$language_current_2 != ''">
5801
+ <xsl:value-of select="$language_current_2"/>
5802
+ </xsl:when>
5803
+ <xsl:otherwise>
5804
+ <xsl:value-of select=".//*[local-name()='bibdata']//*[local-name()='language']"/>
5805
+ </xsl:otherwise>
5806
+ </xsl:choose>
5807
+ </xsl:otherwise>
5808
+ </xsl:choose>
5809
+ </xsl:variable>
5810
+
5811
+ <xsl:choose>
5812
+ <xsl:when test="$language = 'English'">en</xsl:when>
5813
+ <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
5814
+ </xsl:choose>
5815
+ </xsl:template>
5816
+
5764
5817
  <xsl:template name="capitalizeWords">
5765
5818
  <xsl:param name="str"/>
5766
5819
  <xsl:variable name="str2" select="translate($str, '-', ' ')"/>
@@ -6390,7 +6443,7 @@
6390
6443
  <xsl:template match="*[local-name() = 'figure']" name="figure">
6391
6444
  <xsl:variable name="isAdded" select="@added"/>
6392
6445
  <xsl:variable name="isDeleted" select="@deleted"/>
6393
- <fo:block-container id="{@id}">
6446
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
6394
6447
 
6395
6448
  <xsl:call-template name="setTrackChangesStyles">
6396
6449
  <xsl:with-param name="isAdded" select="$isAdded"/>
@@ -7377,7 +7430,13 @@
7377
7430
  </xsl:template>
7378
7431
 
7379
7432
  <xsl:template match="text()" mode="contents_item">
7380
- <xsl:call-template name="keep_together_standard_number"/>
7433
+ <xsl:variable name="text">
7434
+ <!-- to split by '_' and other chars -->
7435
+ <text><xsl:call-template name="add-zero-spaces-java"/></text>
7436
+ </xsl:variable>
7437
+ <xsl:for-each select="xalan:nodeset($text)/text/text()">
7438
+ <xsl:call-template name="keep_together_standard_number"/>
7439
+ </xsl:for-each>
7381
7440
  </xsl:template>
7382
7441
 
7383
7442
  <!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
@@ -7388,39 +7447,57 @@
7388
7447
  <!-- =============== -->
7389
7448
  <!-- sourcecode -->
7390
7449
  <!-- =============== -->
7391
- <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
7392
7450
 
7393
- <xsl:variable name="sourcecode_attributes">
7394
- <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
7395
- <xsl:variable name="_font-size">
7451
+ <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
7452
+ <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
7453
+ <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
7396
7454
 
7397
- <!-- 9 -->
7455
+ <xsl:template match="*[local-name() = 'property']" mode="css">
7456
+ <xsl:attribute name="{@name}">
7457
+ <xsl:value-of select="@value"/>
7458
+ </xsl:attribute>
7459
+ </xsl:template>
7398
7460
 
7399
- <!-- <xsl:if test="$namespace = 'ieee'">
7400
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
7401
- </xsl:if> -->
7461
+ <xsl:template name="get_sourcecode_attributes">
7462
+ <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
7463
+ <xsl:variable name="_font-size">
7402
7464
 
7403
- <xsl:choose>
7404
- <xsl:when test="ancestor::*[local-name() = 'table']">inherit</xsl:when>
7405
- <xsl:otherwise>95%</xsl:otherwise><!-- 110% -->
7406
- </xsl:choose>
7465
+ <!-- inherit -->
7407
7466
 
7408
- </xsl:variable>
7467
+ <!-- <xsl:if test="$namespace = 'ieee'">
7468
+ <xsl:if test="$current_template = 'standard'">8</xsl:if>
7469
+ </xsl:if> -->
7409
7470
 
7410
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
7411
- <xsl:if test="$font-size != ''">
7412
- <xsl:attribute name="font-size">
7413
- <xsl:choose>
7414
- <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
7415
- <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
7416
- <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
7417
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
7418
- </xsl:choose>
7419
- </xsl:attribute>
7420
- </xsl:if>
7421
- </xsl:element>
7471
+ <xsl:choose>
7472
+ <xsl:when test="ancestor::*[local-name() = 'table'][not(@type = 'sourcecode')]">inherit</xsl:when>
7473
+ <xsl:otherwise>95%</xsl:otherwise><!-- 110% -->
7474
+ </xsl:choose>
7475
+
7476
+ </xsl:variable>
7477
+
7478
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
7479
+ <xsl:if test="$font-size != ''">
7480
+ <xsl:attribute name="font-size">
7481
+ <xsl:choose>
7482
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
7483
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
7484
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
7485
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
7486
+ </xsl:choose>
7487
+ </xsl:attribute>
7488
+ </xsl:if>
7489
+ <xsl:apply-templates select="$sourcecode_css//class[@name = 'sourcecode']" mode="css"/>
7490
+ </xsl:element>
7491
+ </xsl:template>
7492
+
7493
+ <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
7494
+
7495
+ <xsl:variable name="sourcecode_attributes">
7496
+ <xsl:call-template name="get_sourcecode_attributes"/>
7422
7497
  </xsl:variable>
7423
7498
 
7499
+ <!-- <xsl:copy-of select="$sourcecode_css"/> -->
7500
+
7424
7501
  <xsl:choose>
7425
7502
  <xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
7426
7503
  <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
@@ -7488,9 +7565,10 @@
7488
7565
  </xsl:choose>
7489
7566
  </xsl:template>
7490
7567
 
7491
- <xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
7568
+ <xsl:template match="*[local-name()='sourcecode']/text() | *[local-name()='sourcecode']//*[local-name()='span']/text()" priority="2">
7492
7569
  <xsl:choose>
7493
- <xsl:when test="normalize-space($syntax-highlight) = 'true' and normalize-space(../@lang) != ''"> <!-- condition for turn on of highlighting -->
7570
+ <!-- disabled -->
7571
+ <xsl:when test="1 = 2 and normalize-space($syntax-highlight) = 'true' and normalize-space(../@lang) != ''"> <!-- condition for turn on of highlighting -->
7494
7572
  <xsl:variable name="syntax" select="java:org.metanorma.fop.Util.syntaxHighlight(., ../@lang)"/>
7495
7573
  <xsl:choose>
7496
7574
  <xsl:when test="normalize-space($syntax) != ''"><!-- if there is highlighted result -->
@@ -7505,8 +7583,75 @@
7505
7583
  <xsl:call-template name="add_spaces_to_sourcecode"/>
7506
7584
  </xsl:otherwise>
7507
7585
  </xsl:choose>
7586
+ </xsl:template>
7587
+
7588
+ <!-- add sourcecode highlighting -->
7589
+ <xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
7590
+ <xsl:variable name="class" select="@class"/>
7591
+ <xsl:choose>
7592
+ <xsl:when test="$sourcecode_css//class[@name = $class]">
7593
+ <fo:inline>
7594
+ <xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
7595
+ <xsl:apply-templates/>
7596
+ </fo:inline>
7597
+ </xsl:when>
7598
+ <xsl:otherwise>
7599
+ <xsl:apply-templates/>
7600
+ </xsl:otherwise>
7601
+ </xsl:choose>
7602
+ </xsl:template>
7508
7603
 
7604
+ <!-- outer table with line numbers for sourcecode -->
7605
+ <xsl:template match="*[local-name()='table'][@type = 'sourcecode']" priority="2">
7606
+ <fo:block>
7607
+ <fo:table width="100%" table-layout="fixed">
7608
+ <xsl:copy-of select="@id"/>
7609
+ <fo:table-column column-width="8%"/>
7610
+ <fo:table-column column-width="92%"/>
7611
+ <fo:table-body>
7612
+ <xsl:apply-templates/>
7613
+ </fo:table-body>
7614
+ </fo:table>
7615
+ </fo:block>
7509
7616
  </xsl:template>
7617
+ <xsl:template match="*[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody']" priority="2">
7618
+ <xsl:apply-templates/>
7619
+ </xsl:template>
7620
+ <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']" priority="2">
7621
+ <fo:table-row>
7622
+ <xsl:apply-templates/>
7623
+ </fo:table-row>
7624
+ </xsl:template>
7625
+ <!-- first td with line numbers -->
7626
+ <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2">
7627
+ <fo:table-cell>
7628
+ <fo:block>
7629
+
7630
+ <!-- set attibutes for line numbers - same as sourcecode -->
7631
+ <xsl:variable name="sourcecode_attributes">
7632
+ <xsl:for-each select="following-sibling::*[local-name() = 'td']/*[local-name() = 'sourcecode']">
7633
+ <xsl:call-template name="get_sourcecode_attributes"/>
7634
+ </xsl:for-each>
7635
+ </xsl:variable>
7636
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
7637
+ <xsl:attribute name="{local-name()}">
7638
+ <xsl:value-of select="."/>
7639
+ </xsl:attribute>
7640
+ </xsl:for-each>
7641
+
7642
+ <xsl:apply-templates/>
7643
+ </fo:block>
7644
+ </fo:table-cell>
7645
+ </xsl:template>
7646
+ <!-- second td with sourcecode -->
7647
+ <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2">
7648
+ <fo:table-cell>
7649
+ <fo:block>
7650
+ <xsl:apply-templates/>
7651
+ </fo:block>
7652
+ </fo:table-cell>
7653
+ </xsl:template>
7654
+ <!-- END outer table with line numbers for sourcecode -->
7510
7655
 
7511
7656
  <xsl:template name="add_spaces_to_sourcecode">
7512
7657
  <xsl:variable name="text_step1">
@@ -9183,27 +9328,16 @@
9183
9328
  <fo:list-item>
9184
9329
  <fo:list-item-label end-indent="label-end()">
9185
9330
  <fo:block>
9186
- <fo:inline>
9187
-
9188
- <xsl:number format="1." count="*[local-name()='bibitem'][not(@hidden = 'true')]"/>
9189
-
9190
- </fo:inline>
9331
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
9332
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
9333
+ </xsl:apply-templates>
9191
9334
  </fo:block>
9192
9335
  </fo:list-item-label>
9193
9336
  <fo:list-item-body start-indent="body-start()">
9194
9337
  <fo:block>
9195
- <xsl:variable name="docidentifier">
9196
- <xsl:choose>
9197
- <xsl:when test="rsd:docidentifier/@type = 'metanorma'"/>
9198
- <xsl:otherwise>
9199
- <xsl:value-of select="rsd:docidentifier[not(@type = 'metanorma-ordinal')]"/>
9200
- </xsl:otherwise>
9201
- </xsl:choose>
9202
- </xsl:variable>
9203
- <xsl:value-of select="$docidentifier"/>
9204
- <xsl:if test="normalize-space($docidentifier) != '' and rsd:formattedref">
9205
- <xsl:text>, </xsl:text>
9206
- </xsl:if>
9338
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
9339
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
9340
+ </xsl:apply-templates>
9207
9341
  <xsl:apply-templates select="rsd:formattedref"/>
9208
9342
  </fo:block>
9209
9343
  </fo:list-item-body>
@@ -9214,170 +9348,51 @@
9214
9348
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
9215
9349
 
9216
9350
  <xsl:template name="processBibitem">
9351
+ <xsl:param name="biblio_tag_part">both</xsl:param>
9217
9352
 
9218
- <!-- start RSD bibitem processing -->
9219
- <xsl:if test=".//rsd:fn">
9353
+ <!-- start bibitem processing -->
9354
+ <xsl:if test=".//*[local-name() = 'fn']">
9220
9355
  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
9221
9356
  </xsl:if>
9222
- <xsl:variable name="docidentifier" select="rsd:docidentifier"/>
9223
- <xsl:value-of select="$docidentifier"/>
9224
- <xsl:apply-templates select="rsd:note"/>
9225
- <xsl:if test="normalize-space($docidentifier) != '' and rsd:formattedref">, </xsl:if>
9226
- <xsl:apply-templates select="rsd:formattedref"/>
9227
- <!-- END RSD bibitem processing -->
9357
+
9358
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
9359
+ <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
9360
+ </xsl:apply-templates>
9361
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
9362
+ <!-- end bibitem processing -->
9228
9363
 
9229
9364
  </xsl:template> <!-- processBibitem (bibitem) -->
9230
9365
 
9231
- <xsl:template name="processBibitemDocId">
9232
- <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
9233
- <xsl:choose>
9234
- <xsl:when test="normalize-space($_doc_ident) != ''">
9235
- <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
9236
- <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
9237
- <xsl:value-of select="$type"/><xsl:text> </xsl:text>
9238
- </xsl:if> -->
9239
- <xsl:value-of select="$_doc_ident"/>
9240
- </xsl:when>
9241
- <xsl:otherwise>
9242
- <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
9243
- <xsl:if test="$type != ''">
9244
- <xsl:value-of select="$type"/><xsl:text> </xsl:text>
9245
- </xsl:if> -->
9246
- <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
9247
- </xsl:otherwise>
9248
- </xsl:choose>
9249
- </xsl:template> <!-- processBibitemDocId -->
9366
+ <xsl:template match="*[local-name() = 'title']" mode="title">
9367
+ <fo:inline><xsl:apply-templates/></fo:inline>
9368
+ </xsl:template>
9369
+
9370
+ <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
9250
9371
 
9251
- <xsl:template name="processPersonalAuthor">
9372
+ <xsl:template match="*[local-name() = 'formattedref']">
9373
+ <!-- <xsl:if test="$namespace = 'unece' or $namespace = 'unece-rec'">
9374
+ <xsl:text>, </xsl:text>
9375
+ </xsl:if> -->
9376
+ <xsl:apply-templates/>
9377
+ </xsl:template>
9378
+
9379
+ <xsl:template match="*[local-name() = 'biblio-tag']">
9380
+ <xsl:param name="biblio_tag_part">both</xsl:param>
9252
9381
  <xsl:choose>
9253
- <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
9254
- <author>
9255
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
9256
- </author>
9382
+ <xsl:when test="$biblio_tag_part = 'first' and *[local-name() = 'tab']">
9383
+ <xsl:apply-templates select="./*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
9257
9384
  </xsl:when>
9258
- <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
9259
- <author>
9260
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
9261
- <xsl:text> </xsl:text>
9262
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
9263
- </author>
9264
- </xsl:when>
9265
- <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
9266
- <author>
9267
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
9268
- <xsl:text> </xsl:text>
9269
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
9270
- </author>
9385
+ <xsl:when test="$biblio_tag_part = 'last'">
9386
+ <xsl:apply-templates select="./*[local-name() = 'tab'][1]/following-sibling::node()"/>
9271
9387
  </xsl:when>
9272
9388
  <xsl:otherwise>
9273
9389
  <xsl:apply-templates/>
9274
9390
  </xsl:otherwise>
9275
9391
  </xsl:choose>
9276
- </xsl:template> <!-- processPersonalAuthor -->
9277
-
9278
- <xsl:template name="renderDate">
9279
- <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
9280
- <xsl:value-of select="*[local-name() = 'on']"/>
9281
- </xsl:if>
9282
- <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
9283
- <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
9284
- </xsl:if>
9285
- </xsl:template>
9286
-
9287
- <xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
9288
- <xsl:value-of select="translate(.,'. ','')"/>
9289
- </xsl:template>
9290
-
9291
- <xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
9292
- <xsl:value-of select="substring(.,1,1)"/>
9293
- </xsl:template>
9294
-
9295
- <xsl:template match="*[local-name() = 'title']" mode="title">
9296
- <fo:inline><xsl:apply-templates/></fo:inline>
9297
9392
  </xsl:template>
9298
9393
 
9299
- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
9300
- <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
9301
- <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
9302
- <xsl:apply-templates/>
9303
- </fo:inline>
9304
- </xsl:template>
9305
-
9306
- <!-- bibitem/note renders as footnote -->
9307
- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
9308
-
9309
- <!-- list of footnotes to calculate actual footnotes number -->
9310
- <xsl:variable name="p_fn_">
9311
- <xsl:call-template name="get_fn_list"/>
9312
- </xsl:variable>
9313
- <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
9314
- <xsl:variable name="gen_id" select="generate-id(.)"/>
9315
- <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
9316
- <!-- fn sequence number in document -->
9317
- <xsl:variable name="current_fn_number">
9318
- <xsl:choose>
9319
- <xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
9320
- <xsl:otherwise>
9321
- <!-- <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1" /> -->
9322
- <xsl:value-of select="count($p_fn//fn[@gen_id = $gen_id]/preceding-sibling::fn) + 1"/>
9323
- </xsl:otherwise>
9324
- </xsl:choose>
9325
- </xsl:variable>
9326
- <fo:footnote>
9327
- <xsl:variable name="number">
9328
-
9329
- <xsl:choose>
9330
- <xsl:when test="ancestor::*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]">
9331
- <xsl:number level="any" count="*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]//*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
9332
- </xsl:when>
9333
- <xsl:otherwise>
9334
- <xsl:value-of select="$current_fn_number"/>
9335
- </xsl:otherwise>
9336
- </xsl:choose>
9337
-
9338
- </xsl:variable>
9339
-
9340
- <xsl:variable name="current_fn_number_text">
9341
- <xsl:value-of select="$number"/>
9342
-
9343
- </xsl:variable>
9344
-
9345
- <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
9346
- <fo:basic-link internal-destination="{$gen_id}" fox:alt-text="footnote {$number}">
9347
- <xsl:value-of select="$current_fn_number_text"/>
9348
- </fo:basic-link>
9349
- </fo:inline>
9350
- <fo:footnote-body>
9351
- <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
9352
- <fo:inline id="{$gen_id}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
9353
- <xsl:value-of select="$current_fn_number_text"/>
9354
- </fo:inline>
9355
- <xsl:apply-templates/>
9356
- </fo:block>
9357
- </fo:footnote-body>
9358
- </fo:footnote>
9359
- </xsl:template>
9360
-
9361
- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
9362
- <xsl:text> edition </xsl:text>
9363
- <xsl:value-of select="."/>
9364
- </xsl:template>
9365
-
9366
- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
9367
- <xsl:text> (</xsl:text>
9368
- <fo:inline xsl:use-attribute-sets="link-style">
9369
- <fo:basic-link external-destination="." fox:alt-text=".">
9370
- <xsl:value-of select="."/>
9371
- </fo:basic-link>
9372
- </fo:inline>
9373
- <xsl:text>)</xsl:text>
9374
- </xsl:template>
9375
-
9376
- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
9377
-
9378
- <xsl:template match="*[local-name() = 'formattedref']">
9379
-
9380
- <xsl:apply-templates/>
9394
+ <xsl:template match="*[local-name() = 'biblio-tag']/*[local-name() = 'tab']" priority="2">
9395
+ <xsl:text> </xsl:text>
9381
9396
  </xsl:template>
9382
9397
 
9383
9398
  <!-- ======================= -->
@@ -9806,6 +9821,12 @@
9806
9821
  <xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
9807
9822
  <xsl:apply-templates mode="update_xml_step1"/>
9808
9823
  </xsl:template>
9824
+ <xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
9825
+ <xsl:copy>
9826
+ <xsl:copy-of select="@*"/>
9827
+ <xsl:apply-templates mode="update_xml_step1"/>
9828
+ </xsl:copy>
9829
+ </xsl:template>
9809
9830
  <!-- =========================================================================== -->
9810
9831
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
9811
9832
  <!-- =========================================================================== -->
@@ -10286,6 +10307,10 @@
10286
10307
  <xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
10287
10308
  </xsl:template>
10288
10309
 
10310
+ <xsl:template name="getDocumentId_fromCurrentNode">
10311
+ <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
10312
+ </xsl:template>
10313
+
10289
10314
  <xsl:template name="namespaceCheck">
10290
10315
  <xsl:variable name="documentNS" select="namespace-uri(/*)"/>
10291
10316
  <xsl:variable name="XSLNS">
@@ -571,6 +571,11 @@
571
571
  <ref name="MultilingualRenderingType"/>
572
572
  </attribute>
573
573
  </optional>
574
+ <optional>
575
+ <attribute name="linenums">
576
+ <data type="boolean"/>
577
+ </attribute>
578
+ </optional>
574
579
  <optional>
575
580
  <ref name="tname"/>
576
581
  </optional>
@@ -1238,6 +1243,11 @@
1238
1243
  </define>
1239
1244
  <define name="concept">
1240
1245
  <element name="concept">
1246
+ <optional>
1247
+ <attribute name="bold">
1248
+ <data type="boolean"/>
1249
+ </attribute>
1250
+ </optional>
1241
1251
  <optional>
1242
1252
  <attribute name="ital">
1243
1253
  <data type="boolean"/>
@@ -2653,7 +2663,7 @@
2653
2663
  <value>full</value>
2654
2664
  <value>short</value>
2655
2665
  <value>id</value>
2656
- <value>modspec</value>
2666
+ <text/>
2657
2667
  </choice>
2658
2668
  </define>
2659
2669
  <define name="erefTypeWithConnective">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.2.0".freeze
3
+ VERSION = "2.2.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-05 00:00:00.000000000 Z
11
+ date: 2022-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic