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.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/html/htmlstyle.css +3 -0
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +179 -21
- data/lib/isodoc/ogc/ogc.best-practice.xsl +179 -21
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +179 -21
- data/lib/isodoc/ogc/ogc.community-practice.xsl +179 -21
- data/lib/isodoc/ogc/ogc.community-standard.xsl +179 -21
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +179 -21
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +179 -21
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +179 -21
- data/lib/isodoc/ogc/ogc.other.xsl +179 -21
- data/lib/isodoc/ogc/ogc.policy.xsl +179 -21
- data/lib/isodoc/ogc/ogc.reference-model.xsl +179 -21
- data/lib/isodoc/ogc/ogc.release-notes.xsl +179 -21
- data/lib/isodoc/ogc/ogc.standard.xsl +179 -21
- data/lib/isodoc/ogc/ogc.test-suite.xsl +179 -21
- data/lib/isodoc/ogc/ogc.user-guide.xsl +179 -21
- data/lib/isodoc/ogc/ogc.white-paper.xsl +179 -21
- data/lib/metanorma/ogc/biblio-standoc.rng +13 -0
- data/lib/metanorma/ogc/biblio.rng +19 -12
- data/lib/metanorma/ogc/front.rb +1 -0
- data/lib/metanorma/ogc/relaton-ogc.rng +28 -0
- data/lib/metanorma/ogc/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: 5dad973d54c8c43e6324a55d4c61433fc7d97d261c63dfa4a465507b173c7eba
|
4
|
+
data.tar.gz: d53e4e00b7aac26b7d22463e10b098f95bfb25c04eecf7a2121fe09a7b18ebfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b47783f85fedcb9aa7667958c9f06b51c743c3842c6b4ec548ca17b9e6d0b47ac238dd17d72543900e3498e86fc90c95f1e1125957faebe417aee5ab391870d1
|
7
|
+
data.tar.gz: 1f00fa77d29a37118ea19e419d0e3865fcca1a7f3ecf3de937bd545d921e0e05fc76764598e5b1ffb6a7316de3de8b75b419130942b070f35cf1d30698362ef3
|
@@ -75,6 +75,9 @@ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
|
75
75
|
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
76
76
|
font-size: {{monospacefontsize}}; }
|
77
77
|
|
78
|
+
sub, sup {
|
79
|
+
font-size: 0.75em; }
|
80
|
+
|
78
81
|
article, aside, details, figcaption, figure,
|
79
82
|
footer, header, hgroup, menu, nav, section {
|
80
83
|
display: block; }
|
@@ -5246,6 +5246,7 @@
|
|
5246
5246
|
|
5247
5247
|
<fo:block role="SKIP">
|
5248
5248
|
<xsl:apply-templates/>
|
5249
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
5249
5250
|
</fo:block>
|
5250
5251
|
</fo:table-cell>
|
5251
5252
|
</xsl:template> <!-- cell in table header row - 'th' -->
|
@@ -5309,6 +5310,8 @@
|
|
5309
5310
|
|
5310
5311
|
<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"/> -->
|
5311
5312
|
|
5313
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
5314
|
+
|
5312
5315
|
</fo:block>
|
5313
5316
|
</fo:table-cell>
|
5314
5317
|
</xsl:template> <!-- td -->
|
@@ -5380,7 +5383,8 @@
|
|
5380
5383
|
</xsl:choose>
|
5381
5384
|
</xsl:variable>
|
5382
5385
|
<xsl:variable name="current_fn_number_text">
|
5383
|
-
|
5386
|
+
|
5387
|
+
<xsl:value-of select="$current_fn_number"/>
|
5384
5388
|
|
5385
5389
|
</xsl:variable>
|
5386
5390
|
|
@@ -5416,8 +5420,10 @@
|
|
5416
5420
|
|
5417
5421
|
<xsl:call-template name="insert_basic_link">
|
5418
5422
|
<xsl:with-param name="element">
|
5419
|
-
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl"
|
5420
|
-
<
|
5423
|
+
<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 -->
|
5424
|
+
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
5425
|
+
<xsl:copy-of select="$current_fn_number_text"/>
|
5426
|
+
</fo:inline>
|
5421
5427
|
</fo:basic-link>
|
5422
5428
|
</xsl:with-param>
|
5423
5429
|
</xsl:call-template>
|
@@ -5704,7 +5710,7 @@
|
|
5704
5710
|
|
5705
5711
|
<xsl:call-template name="refine_fn-reference-style"/>
|
5706
5712
|
|
5707
|
-
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5713
|
+
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5708
5714
|
<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
|
5709
5715
|
<xsl:attribute name="internal-destination">
|
5710
5716
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
@@ -6719,9 +6725,19 @@
|
|
6719
6725
|
</fo:inline>
|
6720
6726
|
</xsl:template>
|
6721
6727
|
|
6722
|
-
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
6728
|
+
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
|
6729
|
+
<xsl:param name="txt"/>
|
6723
6730
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
6724
|
-
<xsl:variable name="text"
|
6731
|
+
<xsl:variable name="text">
|
6732
|
+
<xsl:choose>
|
6733
|
+
<xsl:when test="$txt != ''">
|
6734
|
+
<xsl:value-of select="$txt"/>
|
6735
|
+
</xsl:when>
|
6736
|
+
<xsl:otherwise>
|
6737
|
+
<xsl:value-of select="."/>
|
6738
|
+
</xsl:otherwise>
|
6739
|
+
</xsl:choose>
|
6740
|
+
</xsl:variable>
|
6725
6741
|
<xsl:variable name="ratio_">
|
6726
6742
|
0.75
|
6727
6743
|
</xsl:variable>
|
@@ -8115,14 +8131,16 @@
|
|
8115
8131
|
<xsl:template match="*[local-name()='link']" name="link">
|
8116
8132
|
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
8117
8133
|
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
8134
|
+
<xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
|
8118
8135
|
<xsl:variable name="target">
|
8119
8136
|
<xsl:choose>
|
8120
8137
|
<xsl:when test="@updatetype = 'true'">
|
8121
8138
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
8122
8139
|
</xsl:when>
|
8123
8140
|
<!-- link to the PDF attachment -->
|
8124
|
-
<xsl:when test="
|
8125
|
-
<xsl:
|
8141
|
+
<xsl:when test="$isLinkToEmbeddedFile = 'true'">
|
8142
|
+
<xsl:variable name="target_file" select="java:org.metanorma.fop.Util.getFilenameFromPath(@target)"/>
|
8143
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_file, ')')"/>
|
8126
8144
|
</xsl:when>
|
8127
8145
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
8128
8146
|
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
@@ -8153,6 +8171,11 @@
|
|
8153
8171
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
8154
8172
|
</xsl:if>
|
8155
8173
|
|
8174
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
8175
|
+
<xsl:attribute name="color">inherit</xsl:attribute>
|
8176
|
+
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
8177
|
+
</xsl:if>
|
8178
|
+
|
8156
8179
|
<xsl:call-template name="refine_link-style"/>
|
8157
8180
|
|
8158
8181
|
<xsl:choose>
|
@@ -8160,9 +8183,15 @@
|
|
8160
8183
|
<xsl:apply-templates/>
|
8161
8184
|
</xsl:when>
|
8162
8185
|
<xsl:otherwise>
|
8186
|
+
<xsl:variable name="alt_text">
|
8187
|
+
<xsl:call-template name="getAltText"/>
|
8188
|
+
</xsl:variable>
|
8163
8189
|
<xsl:call-template name="insert_basic_link">
|
8164
8190
|
<xsl:with-param name="element">
|
8165
|
-
<fo:basic-link external-destination="{$target}" fox:alt-text="{$
|
8191
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$alt_text}">
|
8192
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
8193
|
+
<xsl:attribute name="role">Annot</xsl:attribute>
|
8194
|
+
</xsl:if>
|
8166
8195
|
<xsl:choose>
|
8167
8196
|
<xsl:when test="normalize-space(.) = ''">
|
8168
8197
|
<xsl:call-template name="add-zero-spaces-link-java">
|
@@ -8175,6 +8204,10 @@
|
|
8175
8204
|
</xsl:otherwise>
|
8176
8205
|
</xsl:choose>
|
8177
8206
|
</fo:basic-link>
|
8207
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
8208
|
+
<!-- reserve space at right for PaperClip icon -->
|
8209
|
+
<fo:inline keep-with-previous.within-line="always"> </fo:inline>
|
8210
|
+
</xsl:if>
|
8178
8211
|
</xsl:with-param>
|
8179
8212
|
</xsl:call-template>
|
8180
8213
|
</xsl:otherwise>
|
@@ -8182,6 +8215,14 @@
|
|
8182
8215
|
</fo:inline>
|
8183
8216
|
</xsl:template> <!-- link -->
|
8184
8217
|
|
8218
|
+
<xsl:template name="getAltText">
|
8219
|
+
<xsl:choose>
|
8220
|
+
<xsl:when test="normalize-space(.) = ''"><xsl:value-of select="@target"/></xsl:when>
|
8221
|
+
<xsl:otherwise><xsl:value-of select="normalize-space(translate(normalize-space(), ' —', ' -'))"/></xsl:otherwise>
|
8222
|
+
<!-- <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise> -->
|
8223
|
+
</xsl:choose>
|
8224
|
+
</xsl:template>
|
8225
|
+
|
8185
8226
|
<!-- ======================== -->
|
8186
8227
|
<!-- Appendix processing -->
|
8187
8228
|
<!-- ======================== -->
|
@@ -8212,7 +8253,7 @@
|
|
8212
8253
|
<xsl:template match="*[local-name() = 'callout']">
|
8213
8254
|
<xsl:choose>
|
8214
8255
|
<xsl:when test="normalize-space(@target) = ''"><<xsl:apply-templates/>></xsl:when>
|
8215
|
-
<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{
|
8256
|
+
<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{normalize-space()}"><<xsl:apply-templates/>></fo:basic-link></xsl:otherwise>
|
8216
8257
|
</xsl:choose>
|
8217
8258
|
</xsl:template>
|
8218
8259
|
|
@@ -8245,7 +8286,10 @@
|
|
8245
8286
|
<xsl:template match="*[local-name() = 'xref']">
|
8246
8287
|
<xsl:call-template name="insert_basic_link">
|
8247
8288
|
<xsl:with-param name="element">
|
8248
|
-
<
|
8289
|
+
<xsl:variable name="alt_text">
|
8290
|
+
<xsl:call-template name="getAltText"/>
|
8291
|
+
</xsl:variable>
|
8292
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
8249
8293
|
<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'])">
|
8250
8294
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
8251
8295
|
</xsl:if>
|
@@ -10780,12 +10824,14 @@
|
|
10780
10824
|
|
10781
10825
|
<xsl:when test="contains(normalize-space($fo_element), 'list')">
|
10782
10826
|
|
10783
|
-
<xsl:variable name="
|
10827
|
+
<xsl:variable name="provisional_distance_between_starts_">
|
10784
10828
|
7
|
10785
10829
|
</xsl:variable>
|
10786
|
-
<xsl:variable name="
|
10830
|
+
<xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
|
10831
|
+
<xsl:variable name="indent_">
|
10787
10832
|
0
|
10788
10833
|
</xsl:variable>
|
10834
|
+
<xsl:variable name="indent" select="normalize-space($indent_)"/>
|
10789
10835
|
|
10790
10836
|
<fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
|
10791
10837
|
<fo:list-item>
|
@@ -11507,14 +11553,17 @@
|
|
11507
11553
|
</xsl:when>
|
11508
11554
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
11509
11555
|
|
11510
|
-
<xsl:variable name="
|
11556
|
+
<xsl:variable name="type" select="../@type"/>
|
11511
11557
|
|
11512
|
-
|
11558
|
+
<xsl:variable name="label">
|
11513
11559
|
|
11514
11560
|
<xsl:variable name="style_prefix_">
|
11515
11561
|
<xsl:if test="$type = 'roman'">
|
11516
11562
|
<!-- Example: (i) -->
|
11517
11563
|
</xsl:if>
|
11564
|
+
<xsl:if test="$type = 'alphabet'">
|
11565
|
+
|
11566
|
+
</xsl:if>
|
11518
11567
|
</xsl:variable>
|
11519
11568
|
<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
|
11520
11569
|
|
@@ -11540,13 +11589,15 @@
|
|
11540
11589
|
<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
|
11541
11590
|
<xsl:value-of select="$style_prefix"/>
|
11542
11591
|
</xsl:if>
|
11592
|
+
|
11543
11593
|
<xsl:value-of select="@label"/>
|
11594
|
+
|
11544
11595
|
<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
|
11545
11596
|
<xsl:value-of select="$style_suffix"/>
|
11546
11597
|
</xsl:if>
|
11547
11598
|
</xsl:variable>
|
11548
11599
|
|
11549
|
-
|
11600
|
+
<xsl:value-of select="normalize-space($label)"/>
|
11550
11601
|
|
11551
11602
|
</xsl:when>
|
11552
11603
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
@@ -13745,9 +13796,15 @@
|
|
13745
13796
|
</x:xmpmeta>
|
13746
13797
|
<!-- add attachments -->
|
13747
13798
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
13748
|
-
<xsl:variable name="
|
13749
|
-
|
13750
|
-
<
|
13799
|
+
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
13800
|
+
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
13801
|
+
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
13802
|
+
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
|
13803
|
+
<!-- Todo: need update -->
|
13804
|
+
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
|
13805
|
+
<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
|
13806
|
+
|
13807
|
+
<pdf:embedded-file filename="{$filename}" link-as-file-annotation="true">
|
13751
13808
|
<xsl:attribute name="src">
|
13752
13809
|
<xsl:choose>
|
13753
13810
|
<xsl:when test="normalize-space() != ''">
|
@@ -13763,18 +13820,34 @@
|
|
13763
13820
|
<xsl:if test="$description != ''">
|
13764
13821
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13765
13822
|
</xsl:if>
|
13823
|
+
<xsl:if test="$afrelationship != ''">
|
13824
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
13825
|
+
</xsl:if>
|
13826
|
+
<xsl:if test="$volatile != ''">
|
13827
|
+
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
|
13828
|
+
</xsl:if>
|
13766
13829
|
</pdf:embedded-file>
|
13767
13830
|
</xsl:for-each>
|
13768
13831
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
13769
13832
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
13770
13833
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
13771
13834
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
13835
|
+
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
13772
13836
|
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
13773
13837
|
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
13774
|
-
|
13838
|
+
<!-- Todo: need update -->
|
13839
|
+
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
|
13840
|
+
<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
|
13841
|
+
<pdf:embedded-file src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
|
13775
13842
|
<xsl:if test="$description != ''">
|
13776
13843
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13777
13844
|
</xsl:if>
|
13845
|
+
<xsl:if test="$afrelationship != ''">
|
13846
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
13847
|
+
</xsl:if>
|
13848
|
+
<xsl:if test="$volatile != ''">
|
13849
|
+
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
|
13850
|
+
</xsl:if>
|
13778
13851
|
</pdf:embedded-file>
|
13779
13852
|
</xsl:for-each>
|
13780
13853
|
</xsl:if>
|
@@ -13794,6 +13867,12 @@
|
|
13794
13867
|
<!-- Get or calculate depth of the element -->
|
13795
13868
|
<xsl:template name="getLevel">
|
13796
13869
|
<xsl:param name="depth"/>
|
13870
|
+
<!-- <xsl:message>
|
13871
|
+
<xsl:choose>
|
13872
|
+
<xsl:when test="local-name() = 'title'">title=<xsl:value-of select="."/></xsl:when>
|
13873
|
+
<xsl:when test="local-name() = 'clause'">clause/title=<xsl:value-of select="*[local-name() = 'title']"/></xsl:when>
|
13874
|
+
</xsl:choose>
|
13875
|
+
</xsl:message> -->
|
13797
13876
|
<xsl:choose>
|
13798
13877
|
<xsl:when test="normalize-space(@depth) != ''">
|
13799
13878
|
<xsl:value-of select="@depth"/>
|
@@ -13814,8 +13893,48 @@
|
|
13814
13893
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
13815
13894
|
<xsl:value-of select="$level_total - 2"/>
|
13816
13895
|
</xsl:when>
|
13896
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
|
13897
|
+
<!-- determine 'depth' depends on upper clause with title/@depth -->
|
13898
|
+
<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
|
13899
|
+
<xsl:variable name="clause_with_depth_depth" select="ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/*[local-name() = 'title']/@depth"/>
|
13900
|
+
<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
|
13901
|
+
<xsl:variable name="clause_with_depth_level" select="count(ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/ancestor::*)"/>
|
13902
|
+
<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
|
13903
|
+
<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
|
13904
|
+
<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
|
13905
|
+
<!-- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/> -->
|
13906
|
+
<xsl:variable name="curr_clause_depth" select="number($clause_with_depth_depth) + (number($curr_level) - number($clause_with_depth_level)) "/>
|
13907
|
+
<!-- <xsl:message>curr_clause_depth=<xsl:value-of select="$curr_clause_depth"/></xsl:message> -->
|
13908
|
+
<xsl:choose>
|
13909
|
+
<xsl:when test="string(number($curr_clause_depth)) != 'NaN'">
|
13910
|
+
<xsl:value-of select="number($curr_clause_depth)"/>
|
13911
|
+
</xsl:when>
|
13912
|
+
<xsl:otherwise>
|
13913
|
+
<xsl:value-of select="$level_total - 2"/>
|
13914
|
+
</xsl:otherwise>
|
13915
|
+
</xsl:choose>
|
13916
|
+
</xsl:when>
|
13917
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'name'] and parent::*[local-name() = 'term']">
|
13918
|
+
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::*[local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
|
13919
|
+
<xsl:choose>
|
13920
|
+
<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
|
13921
|
+
<xsl:value-of select="number($upper_terms_depth + 1)"/>
|
13922
|
+
</xsl:when>
|
13923
|
+
<xsl:otherwise>
|
13924
|
+
<xsl:value-of select="$level_total - 2"/>
|
13925
|
+
</xsl:otherwise>
|
13926
|
+
</xsl:choose>
|
13927
|
+
</xsl:when>
|
13817
13928
|
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
13818
|
-
<xsl:
|
13929
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause' or local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
|
13930
|
+
<xsl:choose>
|
13931
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13932
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
13933
|
+
</xsl:when>
|
13934
|
+
<xsl:otherwise>
|
13935
|
+
<xsl:value-of select="$level_total - 1"/>
|
13936
|
+
</xsl:otherwise>
|
13937
|
+
</xsl:choose>
|
13819
13938
|
</xsl:when>
|
13820
13939
|
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
13821
13940
|
<xsl:value-of select="$level_total - 1"/>
|
@@ -13823,6 +13942,17 @@
|
|
13823
13942
|
<xsl:when test="parent::*[local-name() = 'annex']">
|
13824
13943
|
<xsl:value-of select="$level_total - 1"/>
|
13825
13944
|
</xsl:when>
|
13945
|
+
<xsl:when test="ancestor::*[local-name() = 'annex'] and self::*[local-name() = 'title']">
|
13946
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
|
13947
|
+
<xsl:choose>
|
13948
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13949
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
13950
|
+
</xsl:when>
|
13951
|
+
<xsl:otherwise>
|
13952
|
+
<xsl:value-of select="$level_total - 1"/>
|
13953
|
+
</xsl:otherwise>
|
13954
|
+
</xsl:choose>
|
13955
|
+
</xsl:when>
|
13826
13956
|
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
13827
13957
|
<xsl:value-of select="$level_total"/>
|
13828
13958
|
</xsl:when>
|
@@ -14181,6 +14311,20 @@
|
|
14181
14311
|
|
14182
14312
|
<!-- END: insert cover page image -->
|
14183
14313
|
|
14314
|
+
<xsl:template name="insertVerticalChar">
|
14315
|
+
<xsl:param name="str"/>
|
14316
|
+
<xsl:if test="string-length($str) > 0">
|
14317
|
+
<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">
|
14318
|
+
<fo:block-container width="1em">
|
14319
|
+
<fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
|
14320
|
+
</fo:block-container>
|
14321
|
+
</fo:inline-container>
|
14322
|
+
<xsl:call-template name="insertVerticalChar">
|
14323
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
14324
|
+
</xsl:call-template>
|
14325
|
+
</xsl:if>
|
14326
|
+
</xsl:template>
|
14327
|
+
|
14184
14328
|
<xsl:template name="number-to-words">
|
14185
14329
|
<xsl:param name="number"/>
|
14186
14330
|
<xsl:param name="first"/>
|
@@ -14468,4 +14612,18 @@
|
|
14468
14612
|
</xsl:if>
|
14469
14613
|
</xsl:template>
|
14470
14614
|
|
14615
|
+
<xsl:template match="@*|node()" mode="set_table_role_skip">
|
14616
|
+
<xsl:copy>
|
14617
|
+
<xsl:apply-templates select="@*|node()" mode="set_table_role_skip"/>
|
14618
|
+
</xsl:copy>
|
14619
|
+
</xsl:template>
|
14620
|
+
|
14621
|
+
<xsl:template match="*[starts-with(local-name(), 'table')]" mode="set_table_role_skip">
|
14622
|
+
<xsl:copy>
|
14623
|
+
<xsl:apply-templates select="@*" mode="set_table_role_skip"/>
|
14624
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
14625
|
+
<xsl:apply-templates select="node()" mode="set_table_role_skip"/>
|
14626
|
+
</xsl:copy>
|
14627
|
+
</xsl:template>
|
14628
|
+
|
14471
14629
|
</xsl:stylesheet>
|