metanorma-ribose 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/ribose/html/htmlstyle.css +3 -0
- data/lib/isodoc/ribose/ribose.standard.xsl +179 -21
- data/lib/metanorma/ribose/biblio-standoc.rng +13 -0
- data/lib/metanorma/ribose/biblio.rng +19 -12
- data/lib/metanorma/ribose/relaton-ribose.rng +1 -0
- data/lib/metanorma/ribose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e2a208e23afd90c2aa649421d15bd39117706eca766ef491431b52f5ea176d6
|
|
4
|
+
data.tar.gz: 9b22ff4c6861fee21e9aac9182f6c064441bd0af71076c4e901b9d6dfcda62f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa20ac0be3b2af9dfef258d583b4d54ea9ffb783cd73fac4621629dd374589d2378cc9a59f5b94559bbf9eb47223bdbe39ec59132bc8a2ab548304208ab127ca
|
|
7
|
+
data.tar.gz: 102e0dbfea1d9b793693cefcb816defe54bca03fd60ff0e0717b9d842f184aaad551c7645b9b5b317b65a4956bb72c4991958f54a6b0a55fbe0d630f4dad9171
|
|
@@ -82,6 +82,9 @@ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
|
|
82
82
|
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
|
83
83
|
font-size: {{monospacefontsize}}; }
|
|
84
84
|
|
|
85
|
+
sub, sup {
|
|
86
|
+
font-size: 0.75em; }
|
|
87
|
+
|
|
85
88
|
article, aside, details, figcaption, figure,
|
|
86
89
|
footer, header, hgroup, menu, nav, section {
|
|
87
90
|
display: block; }
|
|
@@ -4598,6 +4598,7 @@
|
|
|
4598
4598
|
|
|
4599
4599
|
<fo:block role="SKIP">
|
|
4600
4600
|
<xsl:apply-templates/>
|
|
4601
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
|
4601
4602
|
</fo:block>
|
|
4602
4603
|
</fo:table-cell>
|
|
4603
4604
|
</xsl:template> <!-- cell in table header row - 'th' -->
|
|
@@ -4661,6 +4662,8 @@
|
|
|
4661
4662
|
|
|
4662
4663
|
<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"/> -->
|
|
4663
4664
|
|
|
4665
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
|
4666
|
+
|
|
4664
4667
|
</fo:block>
|
|
4665
4668
|
</fo:table-cell>
|
|
4666
4669
|
</xsl:template> <!-- td -->
|
|
@@ -4732,7 +4735,8 @@
|
|
|
4732
4735
|
</xsl:choose>
|
|
4733
4736
|
</xsl:variable>
|
|
4734
4737
|
<xsl:variable name="current_fn_number_text">
|
|
4735
|
-
|
|
4738
|
+
|
|
4739
|
+
<xsl:value-of select="$current_fn_number"/>
|
|
4736
4740
|
|
|
4737
4741
|
</xsl:variable>
|
|
4738
4742
|
|
|
@@ -4768,8 +4772,10 @@
|
|
|
4768
4772
|
|
|
4769
4773
|
<xsl:call-template name="insert_basic_link">
|
|
4770
4774
|
<xsl:with-param name="element">
|
|
4771
|
-
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl"
|
|
4772
|
-
<
|
|
4775
|
+
<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 -->
|
|
4776
|
+
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
|
4777
|
+
<xsl:copy-of select="$current_fn_number_text"/>
|
|
4778
|
+
</fo:inline>
|
|
4773
4779
|
</fo:basic-link>
|
|
4774
4780
|
</xsl:with-param>
|
|
4775
4781
|
</xsl:call-template>
|
|
@@ -5050,7 +5056,7 @@
|
|
|
5050
5056
|
|
|
5051
5057
|
<xsl:call-template name="refine_fn-reference-style"/>
|
|
5052
5058
|
|
|
5053
|
-
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
|
5059
|
+
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
|
5054
5060
|
<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
|
|
5055
5061
|
<xsl:attribute name="internal-destination">
|
|
5056
5062
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
|
@@ -6061,9 +6067,19 @@
|
|
|
6061
6067
|
</fo:inline>
|
|
6062
6068
|
</xsl:template>
|
|
6063
6069
|
|
|
6064
|
-
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
|
6070
|
+
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
|
|
6071
|
+
<xsl:param name="txt"/>
|
|
6065
6072
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
|
6066
|
-
<xsl:variable name="text"
|
|
6073
|
+
<xsl:variable name="text">
|
|
6074
|
+
<xsl:choose>
|
|
6075
|
+
<xsl:when test="$txt != ''">
|
|
6076
|
+
<xsl:value-of select="$txt"/>
|
|
6077
|
+
</xsl:when>
|
|
6078
|
+
<xsl:otherwise>
|
|
6079
|
+
<xsl:value-of select="."/>
|
|
6080
|
+
</xsl:otherwise>
|
|
6081
|
+
</xsl:choose>
|
|
6082
|
+
</xsl:variable>
|
|
6067
6083
|
<xsl:variable name="ratio_">
|
|
6068
6084
|
0.75
|
|
6069
6085
|
</xsl:variable>
|
|
@@ -7457,14 +7473,16 @@
|
|
|
7457
7473
|
<xsl:template match="*[local-name()='link']" name="link">
|
|
7458
7474
|
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
|
7459
7475
|
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
|
7476
|
+
<xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
|
|
7460
7477
|
<xsl:variable name="target">
|
|
7461
7478
|
<xsl:choose>
|
|
7462
7479
|
<xsl:when test="@updatetype = 'true'">
|
|
7463
7480
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
|
7464
7481
|
</xsl:when>
|
|
7465
7482
|
<!-- link to the PDF attachment -->
|
|
7466
|
-
<xsl:when test="
|
|
7467
|
-
<xsl:
|
|
7483
|
+
<xsl:when test="$isLinkToEmbeddedFile = 'true'">
|
|
7484
|
+
<xsl:variable name="target_file" select="java:org.metanorma.fop.Util.getFilenameFromPath(@target)"/>
|
|
7485
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_file, ')')"/>
|
|
7468
7486
|
</xsl:when>
|
|
7469
7487
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
|
7470
7488
|
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
|
@@ -7495,6 +7513,11 @@
|
|
|
7495
7513
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
|
7496
7514
|
</xsl:if>
|
|
7497
7515
|
|
|
7516
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
|
7517
|
+
<xsl:attribute name="color">inherit</xsl:attribute>
|
|
7518
|
+
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
|
7519
|
+
</xsl:if>
|
|
7520
|
+
|
|
7498
7521
|
<xsl:call-template name="refine_link-style"/>
|
|
7499
7522
|
|
|
7500
7523
|
<xsl:choose>
|
|
@@ -7502,9 +7525,15 @@
|
|
|
7502
7525
|
<xsl:apply-templates/>
|
|
7503
7526
|
</xsl:when>
|
|
7504
7527
|
<xsl:otherwise>
|
|
7528
|
+
<xsl:variable name="alt_text">
|
|
7529
|
+
<xsl:call-template name="getAltText"/>
|
|
7530
|
+
</xsl:variable>
|
|
7505
7531
|
<xsl:call-template name="insert_basic_link">
|
|
7506
7532
|
<xsl:with-param name="element">
|
|
7507
|
-
<fo:basic-link external-destination="{$target}" fox:alt-text="{$
|
|
7533
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$alt_text}">
|
|
7534
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
|
7535
|
+
<xsl:attribute name="role">Annot</xsl:attribute>
|
|
7536
|
+
</xsl:if>
|
|
7508
7537
|
<xsl:choose>
|
|
7509
7538
|
<xsl:when test="normalize-space(.) = ''">
|
|
7510
7539
|
<xsl:call-template name="add-zero-spaces-link-java">
|
|
@@ -7517,6 +7546,10 @@
|
|
|
7517
7546
|
</xsl:otherwise>
|
|
7518
7547
|
</xsl:choose>
|
|
7519
7548
|
</fo:basic-link>
|
|
7549
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
|
7550
|
+
<!-- reserve space at right for PaperClip icon -->
|
|
7551
|
+
<fo:inline keep-with-previous.within-line="always"> </fo:inline>
|
|
7552
|
+
</xsl:if>
|
|
7520
7553
|
</xsl:with-param>
|
|
7521
7554
|
</xsl:call-template>
|
|
7522
7555
|
</xsl:otherwise>
|
|
@@ -7524,6 +7557,14 @@
|
|
|
7524
7557
|
</fo:inline>
|
|
7525
7558
|
</xsl:template> <!-- link -->
|
|
7526
7559
|
|
|
7560
|
+
<xsl:template name="getAltText">
|
|
7561
|
+
<xsl:choose>
|
|
7562
|
+
<xsl:when test="normalize-space(.) = ''"><xsl:value-of select="@target"/></xsl:when>
|
|
7563
|
+
<xsl:otherwise><xsl:value-of select="normalize-space(translate(normalize-space(), ' —', ' -'))"/></xsl:otherwise>
|
|
7564
|
+
<!-- <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise> -->
|
|
7565
|
+
</xsl:choose>
|
|
7566
|
+
</xsl:template>
|
|
7567
|
+
|
|
7527
7568
|
<!-- ======================== -->
|
|
7528
7569
|
<!-- Appendix processing -->
|
|
7529
7570
|
<!-- ======================== -->
|
|
@@ -7554,7 +7595,7 @@
|
|
|
7554
7595
|
<xsl:template match="*[local-name() = 'callout']">
|
|
7555
7596
|
<xsl:choose>
|
|
7556
7597
|
<xsl:when test="normalize-space(@target) = ''"><<xsl:apply-templates/>></xsl:when>
|
|
7557
|
-
<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{
|
|
7598
|
+
<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{normalize-space()}"><<xsl:apply-templates/>></fo:basic-link></xsl:otherwise>
|
|
7558
7599
|
</xsl:choose>
|
|
7559
7600
|
</xsl:template>
|
|
7560
7601
|
|
|
@@ -7583,7 +7624,10 @@
|
|
|
7583
7624
|
<xsl:template match="*[local-name() = 'xref']">
|
|
7584
7625
|
<xsl:call-template name="insert_basic_link">
|
|
7585
7626
|
<xsl:with-param name="element">
|
|
7586
|
-
<
|
|
7627
|
+
<xsl:variable name="alt_text">
|
|
7628
|
+
<xsl:call-template name="getAltText"/>
|
|
7629
|
+
</xsl:variable>
|
|
7630
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
|
7587
7631
|
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
|
7588
7632
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
|
7589
7633
|
</xsl:if>
|
|
@@ -10071,12 +10115,14 @@
|
|
|
10071
10115
|
|
|
10072
10116
|
<xsl:when test="contains(normalize-space($fo_element), 'list')">
|
|
10073
10117
|
|
|
10074
|
-
<xsl:variable name="
|
|
10118
|
+
<xsl:variable name="provisional_distance_between_starts_">
|
|
10075
10119
|
7
|
|
10076
10120
|
</xsl:variable>
|
|
10077
|
-
<xsl:variable name="
|
|
10121
|
+
<xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
|
|
10122
|
+
<xsl:variable name="indent_">
|
|
10078
10123
|
0
|
|
10079
10124
|
</xsl:variable>
|
|
10125
|
+
<xsl:variable name="indent" select="normalize-space($indent_)"/>
|
|
10080
10126
|
|
|
10081
10127
|
<fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
|
|
10082
10128
|
<fo:list-item>
|
|
@@ -10802,14 +10848,17 @@
|
|
|
10802
10848
|
</xsl:when>
|
|
10803
10849
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
|
10804
10850
|
|
|
10805
|
-
<xsl:variable name="
|
|
10851
|
+
<xsl:variable name="type" select="../@type"/>
|
|
10806
10852
|
|
|
10807
|
-
|
|
10853
|
+
<xsl:variable name="label">
|
|
10808
10854
|
|
|
10809
10855
|
<xsl:variable name="style_prefix_">
|
|
10810
10856
|
<xsl:if test="$type = 'roman'">
|
|
10811
10857
|
<!-- Example: (i) -->
|
|
10812
10858
|
</xsl:if>
|
|
10859
|
+
<xsl:if test="$type = 'alphabet'">
|
|
10860
|
+
|
|
10861
|
+
</xsl:if>
|
|
10813
10862
|
</xsl:variable>
|
|
10814
10863
|
<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
|
|
10815
10864
|
|
|
@@ -10835,13 +10884,15 @@
|
|
|
10835
10884
|
<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
|
|
10836
10885
|
<xsl:value-of select="$style_prefix"/>
|
|
10837
10886
|
</xsl:if>
|
|
10887
|
+
|
|
10838
10888
|
<xsl:value-of select="@label"/>
|
|
10889
|
+
|
|
10839
10890
|
<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
|
|
10840
10891
|
<xsl:value-of select="$style_suffix"/>
|
|
10841
10892
|
</xsl:if>
|
|
10842
10893
|
</xsl:variable>
|
|
10843
10894
|
|
|
10844
|
-
|
|
10895
|
+
<xsl:value-of select="normalize-space($label)"/>
|
|
10845
10896
|
|
|
10846
10897
|
</xsl:when>
|
|
10847
10898
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
|
@@ -13030,9 +13081,15 @@
|
|
|
13030
13081
|
</x:xmpmeta>
|
|
13031
13082
|
<!-- add attachments -->
|
|
13032
13083
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
13033
|
-
<xsl:variable name="
|
|
13034
|
-
|
|
13035
|
-
<
|
|
13084
|
+
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
|
13085
|
+
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
|
13086
|
+
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
|
13087
|
+
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
|
|
13088
|
+
<!-- Todo: need update -->
|
|
13089
|
+
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
|
|
13090
|
+
<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
|
|
13091
|
+
|
|
13092
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{$filename}" link-as-file-annotation="true">
|
|
13036
13093
|
<xsl:attribute name="src">
|
|
13037
13094
|
<xsl:choose>
|
|
13038
13095
|
<xsl:when test="normalize-space() != ''">
|
|
@@ -13048,18 +13105,34 @@
|
|
|
13048
13105
|
<xsl:if test="$description != ''">
|
|
13049
13106
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
13050
13107
|
</xsl:if>
|
|
13108
|
+
<xsl:if test="$afrelationship != ''">
|
|
13109
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
|
13110
|
+
</xsl:if>
|
|
13111
|
+
<xsl:if test="$volatile != ''">
|
|
13112
|
+
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
|
|
13113
|
+
</xsl:if>
|
|
13051
13114
|
</pdf:embedded-file>
|
|
13052
13115
|
</xsl:for-each>
|
|
13053
13116
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
|
13054
13117
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
|
13055
13118
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
|
13056
13119
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
|
13120
|
+
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
|
13057
13121
|
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
|
13058
13122
|
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
|
13059
|
-
|
|
13123
|
+
<!-- Todo: need update -->
|
|
13124
|
+
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
|
|
13125
|
+
<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
|
|
13126
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
|
|
13060
13127
|
<xsl:if test="$description != ''">
|
|
13061
13128
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
13062
13129
|
</xsl:if>
|
|
13130
|
+
<xsl:if test="$afrelationship != ''">
|
|
13131
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
|
13132
|
+
</xsl:if>
|
|
13133
|
+
<xsl:if test="$volatile != ''">
|
|
13134
|
+
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
|
|
13135
|
+
</xsl:if>
|
|
13063
13136
|
</pdf:embedded-file>
|
|
13064
13137
|
</xsl:for-each>
|
|
13065
13138
|
</xsl:if>
|
|
@@ -13079,6 +13152,12 @@
|
|
|
13079
13152
|
<!-- Get or calculate depth of the element -->
|
|
13080
13153
|
<xsl:template name="getLevel">
|
|
13081
13154
|
<xsl:param name="depth"/>
|
|
13155
|
+
<!-- <xsl:message>
|
|
13156
|
+
<xsl:choose>
|
|
13157
|
+
<xsl:when test="local-name() = 'title'">title=<xsl:value-of select="."/></xsl:when>
|
|
13158
|
+
<xsl:when test="local-name() = 'clause'">clause/title=<xsl:value-of select="*[local-name() = 'title']"/></xsl:when>
|
|
13159
|
+
</xsl:choose>
|
|
13160
|
+
</xsl:message> -->
|
|
13082
13161
|
<xsl:choose>
|
|
13083
13162
|
<xsl:when test="normalize-space(@depth) != ''">
|
|
13084
13163
|
<xsl:value-of select="@depth"/>
|
|
@@ -13099,8 +13178,48 @@
|
|
|
13099
13178
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
|
13100
13179
|
<xsl:value-of select="$level_total - 2"/>
|
|
13101
13180
|
</xsl:when>
|
|
13181
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
|
|
13182
|
+
<!-- determine 'depth' depends on upper clause with title/@depth -->
|
|
13183
|
+
<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
|
|
13184
|
+
<xsl:variable name="clause_with_depth_depth" select="ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/*[local-name() = 'title']/@depth"/>
|
|
13185
|
+
<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
|
|
13186
|
+
<xsl:variable name="clause_with_depth_level" select="count(ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/ancestor::*)"/>
|
|
13187
|
+
<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
|
|
13188
|
+
<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
|
|
13189
|
+
<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
|
|
13190
|
+
<!-- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/> -->
|
|
13191
|
+
<xsl:variable name="curr_clause_depth" select="number($clause_with_depth_depth) + (number($curr_level) - number($clause_with_depth_level)) "/>
|
|
13192
|
+
<!-- <xsl:message>curr_clause_depth=<xsl:value-of select="$curr_clause_depth"/></xsl:message> -->
|
|
13193
|
+
<xsl:choose>
|
|
13194
|
+
<xsl:when test="string(number($curr_clause_depth)) != 'NaN'">
|
|
13195
|
+
<xsl:value-of select="number($curr_clause_depth)"/>
|
|
13196
|
+
</xsl:when>
|
|
13197
|
+
<xsl:otherwise>
|
|
13198
|
+
<xsl:value-of select="$level_total - 2"/>
|
|
13199
|
+
</xsl:otherwise>
|
|
13200
|
+
</xsl:choose>
|
|
13201
|
+
</xsl:when>
|
|
13202
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'name'] and parent::*[local-name() = 'term']">
|
|
13203
|
+
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::*[local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
|
|
13204
|
+
<xsl:choose>
|
|
13205
|
+
<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
|
|
13206
|
+
<xsl:value-of select="number($upper_terms_depth + 1)"/>
|
|
13207
|
+
</xsl:when>
|
|
13208
|
+
<xsl:otherwise>
|
|
13209
|
+
<xsl:value-of select="$level_total - 2"/>
|
|
13210
|
+
</xsl:otherwise>
|
|
13211
|
+
</xsl:choose>
|
|
13212
|
+
</xsl:when>
|
|
13102
13213
|
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
|
13103
|
-
<xsl:
|
|
13214
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause' or local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
|
|
13215
|
+
<xsl:choose>
|
|
13216
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
|
13217
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
|
13218
|
+
</xsl:when>
|
|
13219
|
+
<xsl:otherwise>
|
|
13220
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
13221
|
+
</xsl:otherwise>
|
|
13222
|
+
</xsl:choose>
|
|
13104
13223
|
</xsl:when>
|
|
13105
13224
|
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
|
13106
13225
|
<xsl:value-of select="$level_total - 1"/>
|
|
@@ -13108,6 +13227,17 @@
|
|
|
13108
13227
|
<xsl:when test="parent::*[local-name() = 'annex']">
|
|
13109
13228
|
<xsl:value-of select="$level_total - 1"/>
|
|
13110
13229
|
</xsl:when>
|
|
13230
|
+
<xsl:when test="ancestor::*[local-name() = 'annex'] and self::*[local-name() = 'title']">
|
|
13231
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
|
|
13232
|
+
<xsl:choose>
|
|
13233
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
|
13234
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
|
13235
|
+
</xsl:when>
|
|
13236
|
+
<xsl:otherwise>
|
|
13237
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
13238
|
+
</xsl:otherwise>
|
|
13239
|
+
</xsl:choose>
|
|
13240
|
+
</xsl:when>
|
|
13111
13241
|
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
|
13112
13242
|
<xsl:value-of select="$level_total"/>
|
|
13113
13243
|
</xsl:when>
|
|
@@ -13466,6 +13596,20 @@
|
|
|
13466
13596
|
|
|
13467
13597
|
<!-- END: insert cover page image -->
|
|
13468
13598
|
|
|
13599
|
+
<xsl:template name="insertVerticalChar">
|
|
13600
|
+
<xsl:param name="str"/>
|
|
13601
|
+
<xsl:if test="string-length($str) > 0">
|
|
13602
|
+
<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">
|
|
13603
|
+
<fo:block-container width="1em">
|
|
13604
|
+
<fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
|
|
13605
|
+
</fo:block-container>
|
|
13606
|
+
</fo:inline-container>
|
|
13607
|
+
<xsl:call-template name="insertVerticalChar">
|
|
13608
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
|
13609
|
+
</xsl:call-template>
|
|
13610
|
+
</xsl:if>
|
|
13611
|
+
</xsl:template>
|
|
13612
|
+
|
|
13469
13613
|
<xsl:template name="number-to-words">
|
|
13470
13614
|
<xsl:param name="number"/>
|
|
13471
13615
|
<xsl:param name="first"/>
|
|
@@ -13753,4 +13897,18 @@
|
|
|
13753
13897
|
</xsl:if>
|
|
13754
13898
|
</xsl:template>
|
|
13755
13899
|
|
|
13900
|
+
<xsl:template match="@*|node()" mode="set_table_role_skip">
|
|
13901
|
+
<xsl:copy>
|
|
13902
|
+
<xsl:apply-templates select="@*|node()" mode="set_table_role_skip"/>
|
|
13903
|
+
</xsl:copy>
|
|
13904
|
+
</xsl:template>
|
|
13905
|
+
|
|
13906
|
+
<xsl:template match="*[starts-with(local-name(), 'table')]" mode="set_table_role_skip">
|
|
13907
|
+
<xsl:copy>
|
|
13908
|
+
<xsl:apply-templates select="@*" mode="set_table_role_skip"/>
|
|
13909
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
13910
|
+
<xsl:apply-templates select="node()" mode="set_table_role_skip"/>
|
|
13911
|
+
</xsl:copy>
|
|
13912
|
+
</xsl:template>
|
|
13913
|
+
|
|
13756
13914
|
</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
|
-
<
|
|
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>
|
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.5.
|
|
4
|
+
version: 2.5.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-
|
|
11
|
+
date: 2024-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|