|
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 | 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 | 8165 |
|
8161 | 8166 | <xsl:template match="*[local-name() = 'note']" name="note">
|
8162 | 8167 |
|
8163 |
| - <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP"> |
| 8168 | + <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP"> |
8164 | 8169 |
|
8165 |
| - <xsl:call-template name="setBlockSpanAll"/> |
| 8170 | + <xsl:call-template name="setBlockSpanAll"/> |
8166 | 8171 |
|
8167 |
| - <xsl:call-template name="refine_note-style"/> |
| 8172 | + <xsl:call-template name="refine_note-style"/> |
8168 | 8173 |
|
8169 |
| - <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP"> |
| 8174 | + <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP"> |
8170 | 8175 |
|
8171 |
| - <fo:block> |
| 8176 | + <fo:block> |
8172 | 8177 |
|
8173 |
| - <xsl:call-template name="refine_note_block_style"/> |
| 8178 | + <xsl:call-template name="refine_note_block_style"/> |
8174 | 8179 |
|
8175 |
| - <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP"> |
| 8180 | + <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP"> |
8176 | 8181 |
|
8177 |
| - <xsl:call-template name="refine_note-name-style"/> |
| 8182 | + <xsl:call-template name="refine_note-name-style"/> |
8178 | 8183 |
|
8179 |
| - <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' --> |
8180 |
| - <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> --> |
8181 |
| - <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]"> |
8182 |
| - <xsl:call-template name="append_add-style"/> |
8183 |
| - </xsl:if> |
| 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 |
| - <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name--> |
8186 |
| - <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"> |
8187 |
| - <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]"> |
8188 |
| - <xsl:with-param name="skip">false</xsl:with-param> |
8189 |
| - </xsl:apply-templates> |
8190 |
| - </xsl:if> |
| 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 |
| - <xsl:apply-templates select="*[local-name() = 'name']"/> |
| 8197 | + <xsl:apply-templates select="*[local-name() = 'name']"/> |
8193 | 8198 |
|
8194 |
| - </fo:inline> |
| 8199 | + </fo:inline> |
8195 | 8200 |
|
8196 |
| - <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> |
8197 |
| - </fo:block> |
| 8201 | + <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> |
| 8202 | + </fo:block> |
8198 | 8203 |
|
8199 |
| - </fo:block-container> |
8200 |
| - </fo:block-container> |
| 8204 | + </fo:block-container> |
| 8205 | + </fo:block-container> |
8201 | 8206 |
|
8202 | 8207 | </xsl:template>
|
8203 | 8208 |
|
|
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 | 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 | 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="__internal_layout__coverpage_{$name}_{$number}_{generate-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 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"> |
| 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="substring($str,1,1)"/></fo:block> |
| 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>
|
|
0 commit comments