metanorma-plateau 0.1.8 → 0.1.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab9e5b170ac05003c3091580f6846e16b52599553cc6fbcaa7bc1ab11ebdd37f
|
4
|
+
data.tar.gz: 0d53ba47be6206dd65ca377f008e2b6e7a8c062691d70b15e5e7bfc02e476794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af32cb85caa4f2ff962894f8c3d93ca4580b008e245715f3905ebc5a4c4cb26348c943438ebe43456aa36c6b23a352c04a9337a14224ce5465d6918f09e9ee48
|
7
|
+
data.tar.gz: 664b495f66e07b6e557cb9e47e72d297a164063a512db4b94ae3be3d844e2b27c5ea52f75b96028bc912abcd279ad0d0ec826a3cdd41311662aac0135580b597
|
@@ -5182,10 +5182,14 @@
|
|
5182
5182
|
<xsl:variable name="fn_styles">
|
5183
5183
|
<xsl:choose>
|
5184
5184
|
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
5185
|
-
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"
|
5185
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
5186
|
+
|
5187
|
+
</fn_styles>
|
5186
5188
|
</xsl:when>
|
5187
5189
|
<xsl:otherwise>
|
5188
|
-
<fn_styles xsl:use-attribute-sets="fn-num-style"
|
5190
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
5191
|
+
|
5192
|
+
</fn_styles>
|
5189
5193
|
</xsl:otherwise>
|
5190
5194
|
</xsl:choose>
|
5191
5195
|
</xsl:variable>
|
@@ -8052,6 +8056,7 @@
|
|
8052
8056
|
<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'])">
|
8053
8057
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
8054
8058
|
</xsl:if>
|
8059
|
+
|
8055
8060
|
<xsl:if test="parent::*[local-name() = 'add']">
|
8056
8061
|
<xsl:call-template name="append_add-style"/>
|
8057
8062
|
</xsl:if>
|
@@ -8160,44 +8165,44 @@
|
|
8160
8165
|
|
8161
8166
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
8162
8167
|
|
8163
|
-
|
8168
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
8164
8169
|
|
8165
|
-
|
8170
|
+
<xsl:call-template name="setBlockSpanAll"/>
|
8166
8171
|
|
8167
|
-
|
8172
|
+
<xsl:call-template name="refine_note-style"/>
|
8168
8173
|
|
8169
|
-
|
8174
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8170
8175
|
|
8171
|
-
|
8176
|
+
<fo:block>
|
8172
8177
|
|
8173
|
-
|
8178
|
+
<xsl:call-template name="refine_note_block_style"/>
|
8174
8179
|
|
8175
|
-
|
8180
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
8176
8181
|
|
8177
|
-
|
8182
|
+
<xsl:call-template name="refine_note-name-style"/>
|
8178
8183
|
|
8179
|
-
|
8180
|
-
|
8181
|
-
|
8182
|
-
|
8183
|
-
|
8184
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
8185
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
8186
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
8187
|
+
<xsl:call-template name="append_add-style"/>
|
8188
|
+
</xsl:if>
|
8184
8189
|
|
8185
|
-
|
8186
|
-
|
8187
|
-
|
8188
|
-
|
8189
|
-
|
8190
|
-
|
8190
|
+
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
8191
|
+
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
8192
|
+
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
8193
|
+
<xsl:with-param name="skip">false</xsl:with-param>
|
8194
|
+
</xsl:apply-templates>
|
8195
|
+
</xsl:if>
|
8191
8196
|
|
8192
|
-
|
8197
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
8193
8198
|
|
8194
|
-
|
8199
|
+
</fo:inline>
|
8195
8200
|
|
8196
|
-
|
8197
|
-
|
8201
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
8202
|
+
</fo:block>
|
8198
8203
|
|
8199
|
-
|
8200
|
-
|
8204
|
+
</fo:block-container>
|
8205
|
+
</fo:block-container>
|
8201
8206
|
|
8202
8207
|
</xsl:template>
|
8203
8208
|
|
@@ -10597,6 +10602,7 @@
|
|
10597
10602
|
</xsl:when>
|
10598
10603
|
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
10599
10604
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
10605
|
+
|
10600
10606
|
<xsl:apply-templates/>
|
10601
10607
|
</fo:block>
|
10602
10608
|
</xsl:when>
|
@@ -10612,6 +10618,7 @@
|
|
10612
10618
|
|
10613
10619
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
10614
10620
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
10621
|
+
|
10615
10622
|
<xsl:apply-templates/>
|
10616
10623
|
</fo:inline>
|
10617
10624
|
</xsl:template>
|
@@ -10975,12 +10982,14 @@
|
|
10975
10982
|
|
10976
10983
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
10977
10984
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
10985
|
+
|
10978
10986
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
10979
10987
|
</fo:block>
|
10980
10988
|
</xsl:if>
|
10981
10989
|
|
10982
10990
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
10983
10991
|
<xsl:call-template name="setStyle_preferred"/>
|
10992
|
+
|
10984
10993
|
<xsl:apply-templates/>
|
10985
10994
|
</fo:block>
|
10986
10995
|
</fo:block>
|
@@ -14050,9 +14059,10 @@
|
|
14050
14059
|
<xsl:template name="insertBackgroundPageImage">
|
14051
14060
|
<xsl:param name="number">1</xsl:param>
|
14052
14061
|
<xsl:param name="name">coverpage-image</xsl:param>
|
14062
|
+
<xsl:param name="suffix"/>
|
14053
14063
|
<xsl:variable name="num" select="number($number)"/>
|
14054
14064
|
<!-- background image -->
|
14055
|
-
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="
|
14065
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14056
14066
|
<fo:block>
|
14057
14067
|
<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]">
|
14058
14068
|
<xsl:choose>
|
@@ -14118,16 +14128,29 @@
|
|
14118
14128
|
|
14119
14129
|
<!-- END: insert cover page image -->
|
14120
14130
|
|
14131
|
+
<xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
|
14121
14132
|
<xsl:template name="insertVerticalChar">
|
14122
14133
|
<xsl:param name="str"/>
|
14134
|
+
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
14135
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
14123
14136
|
<xsl:if test="string-length($str) > 0">
|
14124
|
-
<fo:inline-container
|
14137
|
+
<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">
|
14138
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
14139
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
14140
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
14141
|
+
</xsl:if>
|
14142
|
+
<xsl:variable name="char" select="substring($str,1,1)"/>
|
14143
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
14144
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
14145
|
+
</xsl:if>
|
14125
14146
|
<fo:block-container width="1em">
|
14126
|
-
<fo:block line-height="1em"><xsl:value-of select="
|
14147
|
+
<fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
|
14127
14148
|
</fo:block-container>
|
14128
14149
|
</fo:inline-container>
|
14129
14150
|
<xsl:call-template name="insertVerticalChar">
|
14130
14151
|
<xsl:with-param name="str" select="substring($str, 2)"/>
|
14152
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
14153
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
14131
14154
|
</xsl:call-template>
|
14132
14155
|
</xsl:if>
|
14133
14156
|
</xsl:template>
|
@@ -1,22 +1,6 @@
|
|
1
1
|
module Metanorma
|
2
2
|
module Plateau
|
3
3
|
class Converter < Jis::Converter
|
4
|
-
def bibdata_cleanup(xmldoc)
|
5
|
-
super
|
6
|
-
coverpage_images(xmldoc)
|
7
|
-
end
|
8
|
-
|
9
|
-
def coverpage_images(xmldoc)
|
10
|
-
%w(coverpage-image).each do |n|
|
11
|
-
xmldoc.xpath("//bibdata/ext/#{n}").each do |x|
|
12
|
-
ins = add_misc_container(xmldoc)
|
13
|
-
ins << "<presentation-metadata><name>#{n}</name>" \
|
14
|
-
"<value>#{x.remove.children.to_xml}</value>" \
|
15
|
-
"</presentation-metadata>"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
4
|
def blocksource_cleanup(xmldoc)
|
21
5
|
xmldoc.xpath("//termsource").each do |s|
|
22
6
|
p = s.previous_element or next
|
@@ -44,23 +44,6 @@ module Metanorma
|
|
44
44
|
"#{@doctype} is not a recognised document type")
|
45
45
|
end
|
46
46
|
|
47
|
-
def metadata_ext(node, xml)
|
48
|
-
super
|
49
|
-
metadata_coverpage_images(node, xml)
|
50
|
-
end
|
51
|
-
|
52
|
-
def metadata_coverpage_images(node, xml)
|
53
|
-
%w(coverpage-image).each do |n|
|
54
|
-
if a = node.attr(n)
|
55
|
-
xml.send n do |c|
|
56
|
-
a.split(",").each do |x|
|
57
|
-
c.image src: x
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
47
|
def metadata_id(node, xml)
|
65
48
|
if id = node.attr("docidentifier")
|
66
49
|
xml.docidentifier "PLATEAU #{id.sub(/^PLATEAU /, '')}",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-plateau
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-jis
|