metanorma-ieee 1.3.1 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/html2doc/ieee/lists.rb +1 -1
- data/lib/html2doc/ieee/notes.rb +1 -1
- data/lib/html2doc/ieee.rb +1 -1
- data/lib/html2doc/ieee_wp/lists.rb +1 -1
- data/lib/html2doc/ieee_wp.rb +1 -1
- data/lib/isodoc/ieee/base_convert.rb +1 -1
- data/lib/isodoc/ieee/html_convert.rb +1 -1
- data/lib/isodoc/ieee/i18n.rb +1 -1
- data/lib/isodoc/ieee/ieee.amendment.xsl +139 -52
- data/lib/isodoc/ieee/ieee.rb +1 -1
- data/lib/isodoc/ieee/ieee.standard.xsl +139 -52
- data/lib/isodoc/ieee/ieee_xml_convert.rb +2 -2
- data/lib/isodoc/ieee/init.rb +2 -2
- data/lib/isodoc/ieee/metadata.rb +1 -1
- data/lib/isodoc/ieee/pdf_convert.rb +1 -1
- data/lib/isodoc/ieee/presentation_bibdata.rb +1 -1
- data/lib/isodoc/ieee/presentation_ref.rb +7 -8
- data/lib/isodoc/ieee/presentation_terms.rb +1 -1
- data/lib/isodoc/ieee/presentation_xml_convert.rb +1 -1
- data/lib/isodoc/ieee/word_authority.rb +1 -1
- data/lib/isodoc/ieee/word_cleanup.rb +2 -2
- data/lib/isodoc/ieee/word_cleanup_blocks.rb +1 -1
- data/lib/isodoc/ieee/word_convert.rb +2 -2
- data/lib/isodoc/ieee/word_wp_cleanup.rb +2 -2
- data/lib/isodoc/ieee/word_wp_convert.rb +1 -1
- data/lib/isodoc/ieee/xref.rb +1 -1
- data/lib/isodoc/ieee.rb +1 -1
- data/lib/metanorma/ieee/biblio-standoc.rng +13 -0
- data/lib/metanorma/ieee/biblio.rng +19 -12
- data/lib/metanorma/ieee/cleanup.rb +2 -2
- data/lib/metanorma/ieee/cleanup_ref.rb +2 -2
- data/lib/metanorma/ieee/converter.rb +7 -7
- data/lib/metanorma/ieee/front.rb +1 -1
- data/lib/metanorma/ieee/processor.rb +7 -7
- data/lib/metanorma/ieee/relaton-ieee.rng +1 -0
- data/lib/metanorma/ieee/term_lookup_cleanup.rb +1 -1
- data/lib/metanorma/ieee/validate.rb +4 -4
- data/lib/metanorma/ieee/validate_section.rb +1 -1
- data/lib/metanorma/ieee/validate_style.rb +1 -1
- data/lib/metanorma/ieee/version.rb +2 -2
- data/lib/metanorma/ieee.rb +1 -1
- data/lib/metanorma-ieee.rb +1 -1
- data/lib/relaton/render/general.rb +2 -2
- data/lib/relaton/render/parse.rb +1 -1
- data/metanorma-ieee.gemspec +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: 63f97a664f710c4f0bd501b3c896983946bebac162e865e6a32fe9b9bc53122e
|
4
|
+
data.tar.gz: 10c5f1c367b4d585cf1952ea6dac2bb20c28d4be26d3b75002f759c103d0bb28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4b271e84518e5b94e18ec56f15593a68cb34dbf28747ccd711122ee4f0d9b30c8f3d4e8ff2d004c3307265a07a435580bd53995486a2e928664ed3b2753847d
|
7
|
+
data.tar.gz: ee4f212122dfa2a7100b9cb24b07e99056285908c173834ab1b9a9b0c87c404967123a5607ec0f0e7a19d67fc5647f8c6230e7b20849f45e70b615af4ca0d7a5
|
data/lib/html2doc/ieee/lists.rb
CHANGED
data/lib/html2doc/ieee/notes.rb
CHANGED
data/lib/html2doc/ieee.rb
CHANGED
data/lib/html2doc/ieee_wp.rb
CHANGED
data/lib/isodoc/ieee/i18n.rb
CHANGED
@@ -6697,6 +6697,7 @@
|
|
6697
6697
|
</xsl:if>
|
6698
6698
|
|
6699
6699
|
<fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
|
6700
|
+
|
6700
6701
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
6701
6702
|
<xsl:with-param name="continued">true</xsl:with-param>
|
6702
6703
|
</xsl:apply-templates>
|
@@ -7214,7 +7215,8 @@
|
|
7214
7215
|
</xsl:choose>
|
7215
7216
|
</xsl:variable>
|
7216
7217
|
<xsl:variable name="current_fn_number_text">
|
7217
|
-
|
7218
|
+
|
7219
|
+
<xsl:value-of select="$current_fn_number"/>
|
7218
7220
|
|
7219
7221
|
</xsl:variable>
|
7220
7222
|
|
@@ -7232,10 +7234,14 @@
|
|
7232
7234
|
<xsl:variable name="fn_styles">
|
7233
7235
|
<xsl:choose>
|
7234
7236
|
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
7235
|
-
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"
|
7237
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
7238
|
+
|
7239
|
+
</fn_styles>
|
7236
7240
|
</xsl:when>
|
7237
7241
|
<xsl:otherwise>
|
7238
|
-
<fn_styles xsl:use-attribute-sets="fn-num-style"
|
7242
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
7243
|
+
|
7244
|
+
</fn_styles>
|
7239
7245
|
</xsl:otherwise>
|
7240
7246
|
</xsl:choose>
|
7241
7247
|
</xsl:variable>
|
@@ -7250,8 +7256,10 @@
|
|
7250
7256
|
|
7251
7257
|
<xsl:call-template name="insert_basic_link">
|
7252
7258
|
<xsl:with-param name="element">
|
7253
|
-
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl"
|
7254
|
-
<
|
7259
|
+
<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 -->
|
7260
|
+
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
7261
|
+
<xsl:copy-of select="$current_fn_number_text"/>
|
7262
|
+
</fo:inline>
|
7255
7263
|
</fo:basic-link>
|
7256
7264
|
</xsl:with-param>
|
7257
7265
|
</xsl:call-template>
|
@@ -7532,7 +7540,7 @@
|
|
7532
7540
|
|
7533
7541
|
<xsl:call-template name="refine_fn-reference-style"/>
|
7534
7542
|
|
7535
|
-
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
7543
|
+
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
7536
7544
|
<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
|
7537
7545
|
<xsl:attribute name="internal-destination">
|
7538
7546
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
@@ -8530,9 +8538,19 @@
|
|
8530
8538
|
</fo:inline>
|
8531
8539
|
</xsl:template>
|
8532
8540
|
|
8533
|
-
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="text()[ancestor::*[local-name()='smallcap']]">
|
8541
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
|
8542
|
+
<xsl:param name="txt"/>
|
8534
8543
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
8535
|
-
<xsl:variable name="text"
|
8544
|
+
<xsl:variable name="text">
|
8545
|
+
<xsl:choose>
|
8546
|
+
<xsl:when test="$txt != ''">
|
8547
|
+
<xsl:value-of select="$txt"/>
|
8548
|
+
</xsl:when>
|
8549
|
+
<xsl:otherwise>
|
8550
|
+
<xsl:value-of select="."/>
|
8551
|
+
</xsl:otherwise>
|
8552
|
+
</xsl:choose>
|
8553
|
+
</xsl:variable>
|
8536
8554
|
<xsl:variable name="ratio_">
|
8537
8555
|
0.75
|
8538
8556
|
</xsl:variable>
|
@@ -9980,9 +9998,12 @@
|
|
9980
9998
|
<xsl:apply-templates/>
|
9981
9999
|
</xsl:when>
|
9982
10000
|
<xsl:otherwise>
|
10001
|
+
<xsl:variable name="alt_text">
|
10002
|
+
<xsl:call-template name="getAltText"/>
|
10003
|
+
</xsl:variable>
|
9983
10004
|
<xsl:call-template name="insert_basic_link">
|
9984
10005
|
<xsl:with-param name="element">
|
9985
|
-
<fo:basic-link external-destination="{$target}" fox:alt-text="{$
|
10006
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$alt_text}">
|
9986
10007
|
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
9987
10008
|
<xsl:attribute name="role">Annot</xsl:attribute>
|
9988
10009
|
</xsl:if>
|
@@ -10009,6 +10030,14 @@
|
|
10009
10030
|
</fo:inline>
|
10010
10031
|
</xsl:template> <!-- link -->
|
10011
10032
|
|
10033
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="getAltText">
|
10034
|
+
<xsl:choose>
|
10035
|
+
<xsl:when test="normalize-space(.) = ''"><xsl:value-of select="@target"/></xsl:when>
|
10036
|
+
<xsl:otherwise><xsl:value-of select="normalize-space(translate(normalize-space(), ' —', ' -'))"/></xsl:otherwise>
|
10037
|
+
<!-- <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise> -->
|
10038
|
+
</xsl:choose>
|
10039
|
+
</xsl:template>
|
10040
|
+
|
10012
10041
|
<!-- ======================== -->
|
10013
10042
|
<!-- Appendix processing -->
|
10014
10043
|
<!-- ======================== -->
|
@@ -10039,7 +10068,7 @@
|
|
10039
10068
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'callout']">
|
10040
10069
|
<xsl:choose>
|
10041
10070
|
<xsl:when test="normalize-space(@target) = ''"><<xsl:apply-templates/>></xsl:when>
|
10042
|
-
<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{
|
10071
|
+
<xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{normalize-space()}"><<xsl:apply-templates/>></fo:basic-link></xsl:otherwise>
|
10043
10072
|
</xsl:choose>
|
10044
10073
|
</xsl:template>
|
10045
10074
|
|
@@ -10068,10 +10097,14 @@
|
|
10068
10097
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'xref']">
|
10069
10098
|
<xsl:call-template name="insert_basic_link">
|
10070
10099
|
<xsl:with-param name="element">
|
10071
|
-
<
|
10100
|
+
<xsl:variable name="alt_text">
|
10101
|
+
<xsl:call-template name="getAltText"/>
|
10102
|
+
</xsl:variable>
|
10103
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
10072
10104
|
<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'])">
|
10073
10105
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
10074
10106
|
</xsl:if>
|
10107
|
+
|
10075
10108
|
<xsl:if test="parent::*[local-name() = 'add']">
|
10076
10109
|
<xsl:call-template name="append_add-style"/>
|
10077
10110
|
</xsl:if>
|
@@ -10180,44 +10213,44 @@
|
|
10180
10213
|
|
10181
10214
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'note']" name="note">
|
10182
10215
|
|
10183
|
-
|
10216
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
10184
10217
|
|
10185
|
-
|
10218
|
+
<xsl:call-template name="setBlockSpanAll"/>
|
10186
10219
|
|
10187
|
-
|
10220
|
+
<xsl:call-template name="refine_note-style"/>
|
10188
10221
|
|
10189
|
-
|
10222
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
10190
10223
|
|
10191
|
-
|
10224
|
+
<fo:block>
|
10192
10225
|
|
10193
|
-
|
10226
|
+
<xsl:call-template name="refine_note_block_style"/>
|
10194
10227
|
|
10195
|
-
|
10228
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
10196
10229
|
|
10197
|
-
|
10230
|
+
<xsl:call-template name="refine_note-name-style"/>
|
10198
10231
|
|
10199
|
-
|
10200
|
-
|
10201
|
-
|
10202
|
-
|
10203
|
-
|
10232
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
10233
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
10234
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
10235
|
+
<xsl:call-template name="append_add-style"/>
|
10236
|
+
</xsl:if>
|
10204
10237
|
|
10205
|
-
|
10206
|
-
|
10207
|
-
|
10208
|
-
|
10209
|
-
|
10210
|
-
|
10238
|
+
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
10239
|
+
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
10240
|
+
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
10241
|
+
<xsl:with-param name="skip">false</xsl:with-param>
|
10242
|
+
</xsl:apply-templates>
|
10243
|
+
</xsl:if>
|
10211
10244
|
|
10212
|
-
|
10245
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
10213
10246
|
|
10214
|
-
|
10247
|
+
</fo:inline>
|
10215
10248
|
|
10216
|
-
|
10217
|
-
|
10249
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
10250
|
+
</fo:block>
|
10218
10251
|
|
10219
|
-
|
10220
|
-
|
10252
|
+
</fo:block-container>
|
10253
|
+
</fo:block-container>
|
10221
10254
|
|
10222
10255
|
</xsl:template>
|
10223
10256
|
|
@@ -12554,12 +12587,14 @@
|
|
12554
12587
|
|
12555
12588
|
<xsl:when test="contains(normalize-space($fo_element), 'list')">
|
12556
12589
|
|
12557
|
-
<xsl:variable name="
|
12590
|
+
<xsl:variable name="provisional_distance_between_starts_">
|
12558
12591
|
7
|
12559
12592
|
</xsl:variable>
|
12560
|
-
<xsl:variable name="
|
12593
|
+
<xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
|
12594
|
+
<xsl:variable name="indent_">
|
12561
12595
|
0
|
12562
12596
|
</xsl:variable>
|
12597
|
+
<xsl:variable name="indent" select="normalize-space($indent_)"/>
|
12563
12598
|
|
12564
12599
|
<fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
|
12565
12600
|
<fo:list-item>
|
@@ -12623,6 +12658,7 @@
|
|
12623
12658
|
</xsl:when>
|
12624
12659
|
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
12625
12660
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
12661
|
+
|
12626
12662
|
<xsl:apply-templates/>
|
12627
12663
|
</fo:block>
|
12628
12664
|
</xsl:when>
|
@@ -12638,6 +12674,7 @@
|
|
12638
12674
|
|
12639
12675
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
12640
12676
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
12677
|
+
|
12641
12678
|
<xsl:apply-templates/>
|
12642
12679
|
</fo:inline>
|
12643
12680
|
</xsl:template>
|
@@ -13004,12 +13041,14 @@
|
|
13004
13041
|
|
13005
13042
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
13006
13043
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
13044
|
+
|
13007
13045
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
13008
13046
|
</fo:block>
|
13009
13047
|
</xsl:if>
|
13010
13048
|
|
13011
13049
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
13012
13050
|
<xsl:call-template name="setStyle_preferred"/>
|
13051
|
+
|
13013
13052
|
<xsl:apply-templates/>
|
13014
13053
|
</fo:block>
|
13015
13054
|
</fo:block>
|
@@ -13284,14 +13323,17 @@
|
|
13284
13323
|
</xsl:when>
|
13285
13324
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
13286
13325
|
|
13287
|
-
<xsl:variable name="
|
13326
|
+
<xsl:variable name="type" select="../@type"/>
|
13288
13327
|
|
13289
|
-
|
13328
|
+
<xsl:variable name="label">
|
13290
13329
|
|
13291
13330
|
<xsl:variable name="style_prefix_">
|
13292
13331
|
<xsl:if test="$type = 'roman'">
|
13293
13332
|
<!-- Example: (i) -->
|
13294
13333
|
</xsl:if>
|
13334
|
+
<xsl:if test="$type = 'alphabet'">
|
13335
|
+
|
13336
|
+
</xsl:if>
|
13295
13337
|
</xsl:variable>
|
13296
13338
|
<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
|
13297
13339
|
|
@@ -13317,13 +13359,15 @@
|
|
13317
13359
|
<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
|
13318
13360
|
<xsl:value-of select="$style_prefix"/>
|
13319
13361
|
</xsl:if>
|
13362
|
+
|
13320
13363
|
<xsl:value-of select="@label"/>
|
13364
|
+
|
13321
13365
|
<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
|
13322
13366
|
<xsl:value-of select="$style_suffix"/>
|
13323
13367
|
</xsl:if>
|
13324
13368
|
</xsl:variable>
|
13325
13369
|
|
13326
|
-
|
13370
|
+
<xsl:value-of select="normalize-space($label)"/>
|
13327
13371
|
|
13328
13372
|
</xsl:when>
|
13329
13373
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
@@ -15672,7 +15716,8 @@
|
|
15672
15716
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
15673
15717
|
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
|
15674
15718
|
<!-- Todo: need update -->
|
15675
|
-
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = '
|
15719
|
+
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
|
15720
|
+
<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
|
15676
15721
|
|
15677
15722
|
<pdf:embedded-file filename="{$filename}" link-as-file-annotation="true">
|
15678
15723
|
<xsl:attribute name="src">
|
@@ -15693,6 +15738,9 @@
|
|
15693
15738
|
<xsl:if test="$afrelationship != ''">
|
15694
15739
|
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
15695
15740
|
</xsl:if>
|
15741
|
+
<xsl:if test="$volatile != ''">
|
15742
|
+
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
|
15743
|
+
</xsl:if>
|
15696
15744
|
</pdf:embedded-file>
|
15697
15745
|
</xsl:for-each>
|
15698
15746
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
@@ -15703,14 +15751,18 @@
|
|
15703
15751
|
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
15704
15752
|
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
15705
15753
|
<!-- Todo: need update -->
|
15706
|
-
|
15754
|
+
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
|
15755
|
+
<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
|
15707
15756
|
<pdf:embedded-file src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
|
15708
15757
|
<xsl:if test="$description != ''">
|
15709
15758
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
15710
15759
|
</xsl:if>
|
15711
15760
|
<xsl:if test="$afrelationship != ''">
|
15712
|
-
|
15713
|
-
|
15761
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
15762
|
+
</xsl:if>
|
15763
|
+
<xsl:if test="$volatile != ''">
|
15764
|
+
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
|
15765
|
+
</xsl:if>
|
15714
15766
|
</pdf:embedded-file>
|
15715
15767
|
</xsl:for-each>
|
15716
15768
|
</xsl:if>
|
@@ -15757,10 +15809,31 @@
|
|
15757
15809
|
<xsl:value-of select="$level_total - 2"/>
|
15758
15810
|
</xsl:when>
|
15759
15811
|
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
|
15760
|
-
|
15812
|
+
<!-- determine 'depth' depends on upper clause with title/@depth -->
|
15813
|
+
<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
|
15814
|
+
<xsl:variable name="clause_with_depth_depth" select="ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/*[local-name() = 'title']/@depth"/>
|
15815
|
+
<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
|
15816
|
+
<xsl:variable name="clause_with_depth_level" select="count(ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/ancestor::*)"/>
|
15817
|
+
<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
|
15818
|
+
<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
|
15819
|
+
<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
|
15820
|
+
<!-- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/> -->
|
15821
|
+
<xsl:variable name="curr_clause_depth" select="number($clause_with_depth_depth) + (number($curr_level) - number($clause_with_depth_level)) "/>
|
15822
|
+
<!-- <xsl:message>curr_clause_depth=<xsl:value-of select="$curr_clause_depth"/></xsl:message> -->
|
15761
15823
|
<xsl:choose>
|
15762
|
-
<xsl:when test="string(number($
|
15763
|
-
<xsl:value-of select="number($
|
15824
|
+
<xsl:when test="string(number($curr_clause_depth)) != 'NaN'">
|
15825
|
+
<xsl:value-of select="number($curr_clause_depth)"/>
|
15826
|
+
</xsl:when>
|
15827
|
+
<xsl:otherwise>
|
15828
|
+
<xsl:value-of select="$level_total - 2"/>
|
15829
|
+
</xsl:otherwise>
|
15830
|
+
</xsl:choose>
|
15831
|
+
</xsl:when>
|
15832
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'name'] and parent::*[local-name() = 'term']">
|
15833
|
+
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::*[local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
|
15834
|
+
<xsl:choose>
|
15835
|
+
<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
|
15836
|
+
<xsl:value-of select="number($upper_terms_depth + 1)"/>
|
15764
15837
|
</xsl:when>
|
15765
15838
|
<xsl:otherwise>
|
15766
15839
|
<xsl:value-of select="$level_total - 2"/>
|
@@ -15768,7 +15841,7 @@
|
|
15768
15841
|
</xsl:choose>
|
15769
15842
|
</xsl:when>
|
15770
15843
|
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
15771
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
|
15844
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause' or local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
|
15772
15845
|
<xsl:choose>
|
15773
15846
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
15774
15847
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -16085,9 +16158,10 @@
|
|
16085
16158
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertBackgroundPageImage">
|
16086
16159
|
<xsl:param name="number">1</xsl:param>
|
16087
16160
|
<xsl:param name="name">coverpage-image</xsl:param>
|
16161
|
+
<xsl:param name="suffix"/>
|
16088
16162
|
<xsl:variable name="num" select="number($number)"/>
|
16089
16163
|
<!-- background image -->
|
16090
|
-
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="
|
16164
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
16091
16165
|
<fo:block>
|
16092
16166
|
<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]">
|
16093
16167
|
<xsl:choose>
|
@@ -16153,16 +16227,29 @@
|
|
16153
16227
|
|
16154
16228
|
<!-- END: insert cover page image -->
|
16155
16229
|
|
16230
|
+
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
|
16156
16231
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertVerticalChar">
|
16157
16232
|
<xsl:param name="str"/>
|
16233
|
+
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
16234
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
16158
16235
|
<xsl:if test="string-length($str) > 0">
|
16159
|
-
<fo:inline-container
|
16236
|
+
<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">
|
16237
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
16238
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
16239
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
16240
|
+
</xsl:if>
|
16241
|
+
<xsl:variable name="char" select="substring($str,1,1)"/>
|
16242
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
16243
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
16244
|
+
</xsl:if>
|
16160
16245
|
<fo:block-container width="1em">
|
16161
|
-
<fo:block line-height="1em"><xsl:value-of select="
|
16246
|
+
<fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
|
16162
16247
|
</fo:block-container>
|
16163
16248
|
</fo:inline-container>
|
16164
16249
|
<xsl:call-template name="insertVerticalChar">
|
16165
16250
|
<xsl:with-param name="str" select="substring($str, 2)"/>
|
16251
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
16252
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
16166
16253
|
</xsl:call-template>
|
16167
16254
|
</xsl:if>
|
16168
16255
|
</xsl:template>
|