metanorma-un 0.9.12 → 0.9.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/un/html/htmlstyle.css +6 -0
- data/lib/isodoc/un/html/wordstyle.css +150 -0
- data/lib/isodoc/un/html/wordstyle.scss +144 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +213 -57
- data/lib/isodoc/un/un.plenary.xsl +213 -57
- data/lib/isodoc/un/un.recommendation.xsl +213 -57
- data/lib/metanorma/un/isodoc.rng +1 -1
- data/lib/metanorma/un/version.rb +1 -1
- metadata +2 -2
@@ -730,6 +730,8 @@
|
|
730
730
|
<xsl:text>iVBORw0KGgoAAAANSUhEUgAAAJkAAAAmCAYAAADXwDkaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+lpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNl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5WfQ24WU8ynKdVem8l80QzUwx2y0exd1OefiZp2SwkH7fIApxnIhHgN/uwSnK9rHMGlTzW27fbttd6WZ4vyOjg6GU1zf67RY5eXlZTt37mz3PliWCaHL5ubmlm7QhsvK9sMi/W48Holu2rQxfTIvEVlcrPTjqe4EZ7CgwBdra9uSmtcPt6eta6FynHEJKYGv2Jd90s86AQpAwNJsRuT5xUAHrKK4IkCd9g6NQAQPIi8vz4f5o72tANZVgO/GMpe59RvrtQvt7JMQLS0dAyI9sst1m7uTuL28gqwJBqfh8pTaWOTqTIvSblYxVtTe2RnbvHlzg/fsEofcLK4oasda9edCs9An49viDe3tm3sS2YHA/gAL39Le/tU2lGFS0mphWYsBlhI432690j5UQnnB0DjXjuv/Pkr/knwu5fQOx46PR+RzPKz5FG+vOtVFmJn08mQq/ix17K4bM722kS3f8O0J0IOnwddK6jo7zqrx5f7EdckzAOrK/5erFeIorlh4YH/pthHXfac7449A8DVAaRXYTgUQ4wdj/xgw8ytFk7xSqrdd135+AIqVLd+k6ICjZETxZhgY8HLnv3VGvTZa/+9kz/qlzuHctP4A89UE73L1sCJO8nXeWcqW3QOHeLyryF/Q4L3BoEhzW+fOO0A12vewbTZxj6/yWeCqz4J31WY1ny3/F6UYkeY68LIzhtsxa8myZailU1K6HlxN/x9kjcPp+HcBBgAS2JZd+kqHSQAAAABJRU5ErkJggg==</xsl:text>
|
731
731
|
</xsl:variable>
|
732
732
|
|
733
|
+
<xsl:strip-space elements="un:xref"/>
|
734
|
+
|
733
735
|
<!-- external parameters -->
|
734
736
|
|
735
737
|
<xsl:param name="svg_images"/> <!-- svg images array -->
|
@@ -1142,6 +1144,14 @@
|
|
1142
1144
|
|
1143
1145
|
</xsl:attribute-set>
|
1144
1146
|
|
1147
|
+
<xsl:attribute-set name="pre-style">
|
1148
|
+
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
1149
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1150
|
+
|
1151
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1152
|
+
|
1153
|
+
</xsl:attribute-set>
|
1154
|
+
|
1145
1155
|
<xsl:attribute-set name="permission-style">
|
1146
1156
|
|
1147
1157
|
</xsl:attribute-set>
|
@@ -2097,17 +2107,22 @@
|
|
2097
2107
|
</xsl:for-each>
|
2098
2108
|
</xsl:template>
|
2099
2109
|
|
2110
|
+
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
2100
2111
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
|
2101
2112
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
|
2102
2113
|
<xsl:template match="text()" name="text">
|
2103
2114
|
|
2104
|
-
<xsl:
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2110
|
-
|
2115
|
+
<xsl:choose>
|
2116
|
+
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
|
2117
|
+
<xsl:otherwise>
|
2118
|
+
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
|
2119
|
+
<xsl:call-template name="replace_fo_inline_tags">
|
2120
|
+
<xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
|
2121
|
+
<xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
|
2122
|
+
<xsl:with-param name="text" select="$text"/>
|
2123
|
+
</xsl:call-template>
|
2124
|
+
</xsl:otherwise>
|
2125
|
+
</xsl:choose>
|
2111
2126
|
|
2112
2127
|
</xsl:template>
|
2113
2128
|
|
@@ -3135,7 +3150,7 @@
|
|
3135
3150
|
<xsl:template match="*[local-name()='tr']">
|
3136
3151
|
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
3137
3152
|
|
3138
|
-
<xsl:if test="*[local-name() = 'th']">
|
3153
|
+
<xsl:if test="count(*) = count(*[local-name() = 'th'])"> <!-- row contains 'th' only -->
|
3139
3154
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3140
3155
|
</xsl:if>
|
3141
3156
|
|
@@ -4102,7 +4117,8 @@
|
|
4102
4117
|
<xsl:copy-of select="node()"/>
|
4103
4118
|
</td>
|
4104
4119
|
<td>
|
4105
|
-
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
4120
|
+
<!-- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/> -->
|
4121
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]" mode="dl_if"/>
|
4106
4122
|
<!-- get paragraphs from nested 'dl' -->
|
4107
4123
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
4108
4124
|
</td>
|
@@ -4110,6 +4126,53 @@
|
|
4110
4126
|
</xsl:template>
|
4111
4127
|
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
|
4112
4128
|
|
4129
|
+
<xsl:template match="*" mode="dl_if">
|
4130
|
+
<xsl:copy-of select="."/>
|
4131
|
+
</xsl:template>
|
4132
|
+
|
4133
|
+
<xsl:template match="*[local-name() = 'p']" mode="dl_if">
|
4134
|
+
<xsl:param name="indent"/>
|
4135
|
+
<p>
|
4136
|
+
<xsl:copy-of select="@*"/>
|
4137
|
+
<xsl:value-of select="$indent"/>
|
4138
|
+
<xsl:copy-of select="node()"/>
|
4139
|
+
</p>
|
4140
|
+
|
4141
|
+
</xsl:template>
|
4142
|
+
|
4143
|
+
<xsl:template match="*[local-name() = 'ul' or local-name() = 'ol']" mode="dl_if">
|
4144
|
+
<xsl:variable name="list_rendered_">
|
4145
|
+
<xsl:apply-templates select="."/>
|
4146
|
+
</xsl:variable>
|
4147
|
+
<xsl:variable name="list_rendered" select="xalan:nodeset($list_rendered_)"/>
|
4148
|
+
|
4149
|
+
<xsl:variable name="indent">
|
4150
|
+
<xsl:for-each select="($list_rendered//fo:block[not(.//fo:block)])[1]">
|
4151
|
+
<xsl:apply-templates select="ancestor::*[@provisional-distance-between-starts]/@provisional-distance-between-starts" mode="dl_if"/>
|
4152
|
+
</xsl:for-each>
|
4153
|
+
</xsl:variable>
|
4154
|
+
|
4155
|
+
<xsl:apply-templates mode="dl_if">
|
4156
|
+
<xsl:with-param name="indent" select="$indent"/>
|
4157
|
+
</xsl:apply-templates>
|
4158
|
+
</xsl:template>
|
4159
|
+
|
4160
|
+
<xsl:template match="*[local-name() = 'li']" mode="dl_if">
|
4161
|
+
<xsl:param name="indent"/>
|
4162
|
+
<xsl:apply-templates mode="dl_if">
|
4163
|
+
<xsl:with-param name="indent" select="$indent"/>
|
4164
|
+
</xsl:apply-templates>
|
4165
|
+
</xsl:template>
|
4166
|
+
|
4167
|
+
<xsl:template match="@provisional-distance-between-starts" mode="dl_if">
|
4168
|
+
<xsl:variable name="value" select="round(substring-before(.,'mm'))"/>
|
4169
|
+
<!-- emulate left indent for list item -->
|
4170
|
+
<xsl:call-template name="repeat">
|
4171
|
+
<xsl:with-param name="char" select="'x'"/>
|
4172
|
+
<xsl:with-param name="count" select="$value"/>
|
4173
|
+
</xsl:call-template>
|
4174
|
+
</xsl:template>
|
4175
|
+
|
4113
4176
|
<xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
|
4114
4177
|
<xsl:for-each select="*[local-name() = 'dt']">
|
4115
4178
|
<p>
|
@@ -4503,6 +4566,7 @@
|
|
4503
4566
|
</word>
|
4504
4567
|
<xsl:call-template name="tokenize_with_tags">
|
4505
4568
|
<xsl:with-param name="text" select="substring-after($text, $separator)"/>
|
4569
|
+
<xsl:with-param name="tags" select="$tags"/>
|
4506
4570
|
</xsl:call-template>
|
4507
4571
|
</xsl:otherwise>
|
4508
4572
|
</xsl:choose>
|
@@ -4542,8 +4606,18 @@
|
|
4542
4606
|
|
4543
4607
|
<xsl:template name="add-zero-spaces-java">
|
4544
4608
|
<xsl:param name="text" select="."/>
|
4545
|
-
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space
|
4546
|
-
<xsl:
|
4609
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, arrow right -->
|
4610
|
+
<xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |→)','$1')"/>
|
4611
|
+
<!-- add zero-width space (#x200B) after characters: 'great than' -->
|
4612
|
+
<xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1), '(\u003e)(?!\u003e)', '$1')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
|
4613
|
+
<!-- add zero-width space (#x200B) before characters: 'less than' -->
|
4614
|
+
<xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(?<!\u003c)(\u003c)', '$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
|
4615
|
+
<!-- add zero-width space (#x200B) before character: { -->
|
4616
|
+
<xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?<!\W)(\{)', '$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
|
4617
|
+
<!-- add zero-width space (#x200B) after character: , -->
|
4618
|
+
<xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(\,)(?!\d)', '$1')"/> <!-- negative lookahead: ',' not followed by digit -->
|
4619
|
+
|
4620
|
+
<xsl:value-of select="$text5"/>
|
4547
4621
|
</xsl:template>
|
4548
4622
|
|
4549
4623
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -4689,7 +4763,7 @@
|
|
4689
4763
|
</xsl:copy>
|
4690
4764
|
</xsl:template>
|
4691
4765
|
|
4692
|
-
<xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p'])]" mode="table-without-br">
|
4766
|
+
<xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p']) and not(*[local-name()='sourcecode'])]" mode="table-without-br">
|
4693
4767
|
<xsl:copy>
|
4694
4768
|
<xsl:copy-of select="@*"/>
|
4695
4769
|
<p>
|
@@ -4737,6 +4811,28 @@
|
|
4737
4811
|
</xsl:for-each>
|
4738
4812
|
</xsl:template>
|
4739
4813
|
|
4814
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']" mode="table-without-br">
|
4815
|
+
<xsl:apply-templates mode="table-without-br"/>
|
4816
|
+
</xsl:template>
|
4817
|
+
|
4818
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']/text()[contains(., ' ') or contains(., ' ')]" mode="table-without-br">
|
4819
|
+
|
4820
|
+
<xsl:variable name="sep">###SOURCECODE_NEWLINE###</xsl:variable>
|
4821
|
+
<xsl:variable name="sourcecode_text" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', $sep)"/>
|
4822
|
+
<xsl:variable name="items">
|
4823
|
+
<xsl:call-template name="split">
|
4824
|
+
<xsl:with-param name="pText" select="$sourcecode_text"/>
|
4825
|
+
<xsl:with-param name="sep" select="$sep"/>
|
4826
|
+
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
4827
|
+
</xsl:call-template>
|
4828
|
+
</xsl:variable>
|
4829
|
+
<xsl:for-each select="xalan:nodeset($items)/*">
|
4830
|
+
<p>
|
4831
|
+
<sourcecode><xsl:copy-of select="node()"/></sourcecode>
|
4832
|
+
</p>
|
4833
|
+
</xsl:for-each>
|
4834
|
+
</xsl:template>
|
4835
|
+
|
4740
4836
|
<!-- remove redundant white spaces -->
|
4741
4837
|
<xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
|
4742
4838
|
<xsl:variable name="text" select="translate(.,'	 ','')"/>
|
@@ -5047,6 +5143,7 @@
|
|
5047
5143
|
<xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
|
5048
5144
|
<xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
|
5049
5145
|
<xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
|
5146
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
|
5050
5147
|
<xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
|
5051
5148
|
</tags>
|
5052
5149
|
</xsl:template>
|
@@ -5535,6 +5632,12 @@
|
|
5535
5632
|
|
5536
5633
|
<fo:block-container margin-left="0mm">
|
5537
5634
|
|
5635
|
+
<!-- <xsl:if test="$namespace = 'iho'">
|
5636
|
+
<xsl:if test="ancestor::iho:td">
|
5637
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
5638
|
+
</xsl:if>
|
5639
|
+
</xsl:if> -->
|
5640
|
+
|
5538
5641
|
<fo:block>
|
5539
5642
|
|
5540
5643
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -6682,44 +6785,22 @@
|
|
6682
6785
|
<xsl:apply-templates mode="contents_item"/>
|
6683
6786
|
</xsl:template>
|
6684
6787
|
|
6685
|
-
<!--
|
6686
|
-
<!-- sourcecode
|
6687
|
-
<!--
|
6788
|
+
<!-- =============== -->
|
6789
|
+
<!-- sourcecode -->
|
6790
|
+
<!-- =============== -->
|
6688
6791
|
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
6689
6792
|
|
6690
|
-
<
|
6691
|
-
|
6692
|
-
|
6693
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
6694
|
-
</xsl:if>
|
6695
|
-
|
6696
|
-
<xsl:if test="ancestor::*[local-name() = 'example']">
|
6697
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
6698
|
-
</xsl:if>
|
6699
|
-
|
6700
|
-
<xsl:copy-of select="@id"/>
|
6701
|
-
|
6702
|
-
<xsl:if test="parent::*[local-name() = 'note']">
|
6703
|
-
<xsl:attribute name="margin-left">
|
6704
|
-
<xsl:choose>
|
6705
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
6706
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
6707
|
-
</xsl:choose>
|
6708
|
-
</xsl:attribute>
|
6709
|
-
|
6710
|
-
</xsl:if>
|
6711
|
-
<fo:block-container margin-left="0mm">
|
6712
|
-
|
6713
|
-
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
6714
|
-
<xsl:variable name="_font-size">
|
6793
|
+
<xsl:variable name="sourcecode_attributes">
|
6794
|
+
<xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
|
6795
|
+
<xsl:variable name="_font-size">
|
6715
6796
|
|
6716
|
-
|
6797
|
+
<!-- 9 -->
|
6717
6798
|
|
6718
|
-
|
6719
|
-
|
6720
|
-
|
6799
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
6800
|
+
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
6801
|
+
</xsl:if> -->
|
6721
6802
|
|
6722
|
-
|
6803
|
+
10
|
6723
6804
|
</xsl:variable>
|
6724
6805
|
|
6725
6806
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -6733,14 +6814,60 @@
|
|
6733
6814
|
</xsl:choose>
|
6734
6815
|
</xsl:attribute>
|
6735
6816
|
</xsl:if>
|
6817
|
+
</xsl:element>
|
6818
|
+
</xsl:variable>
|
6736
6819
|
|
6820
|
+
<xsl:choose>
|
6821
|
+
<xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
|
6822
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
6823
|
+
<xsl:attribute name="{local-name()}">
|
6824
|
+
<xsl:value-of select="."/>
|
6825
|
+
</xsl:attribute>
|
6826
|
+
</xsl:for-each>
|
6737
6827
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
6738
|
-
</
|
6828
|
+
</xsl:when>
|
6739
6829
|
|
6740
|
-
|
6830
|
+
<xsl:otherwise>
|
6831
|
+
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
6741
6832
|
|
6742
|
-
|
6743
|
-
|
6833
|
+
<xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
|
6834
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
6835
|
+
</xsl:if>
|
6836
|
+
|
6837
|
+
<xsl:if test="ancestor::*[local-name() = 'example']">
|
6838
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
6839
|
+
</xsl:if>
|
6840
|
+
|
6841
|
+
<xsl:copy-of select="@id"/>
|
6842
|
+
|
6843
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
6844
|
+
<xsl:attribute name="margin-left">
|
6845
|
+
<xsl:choose>
|
6846
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
6847
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
6848
|
+
</xsl:choose>
|
6849
|
+
</xsl:attribute>
|
6850
|
+
|
6851
|
+
</xsl:if>
|
6852
|
+
<fo:block-container margin-left="0mm">
|
6853
|
+
|
6854
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
6855
|
+
|
6856
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
6857
|
+
<xsl:attribute name="{local-name()}">
|
6858
|
+
<xsl:value-of select="."/>
|
6859
|
+
</xsl:attribute>
|
6860
|
+
</xsl:for-each>
|
6861
|
+
|
6862
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
6863
|
+
</fo:block>
|
6864
|
+
|
6865
|
+
<xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
|
6866
|
+
|
6867
|
+
</fo:block-container>
|
6868
|
+
</fo:block-container>
|
6869
|
+
</xsl:otherwise>
|
6870
|
+
</xsl:choose>
|
6744
6871
|
</xsl:template>
|
6745
6872
|
|
6746
6873
|
<xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -6982,8 +7109,22 @@
|
|
6982
7109
|
</fo:block>
|
6983
7110
|
</xsl:if>
|
6984
7111
|
</xsl:template>
|
6985
|
-
<!--
|
6986
|
-
<!--
|
7112
|
+
<!-- =============== -->
|
7113
|
+
<!-- END sourcecode -->
|
7114
|
+
<!-- =============== -->
|
7115
|
+
|
7116
|
+
<!-- =============== -->
|
7117
|
+
<!-- pre -->
|
7118
|
+
<!-- =============== -->
|
7119
|
+
<xsl:template match="*[local-name()='pre']" name="pre">
|
7120
|
+
<fo:block xsl:use-attribute-sets="pre-style">
|
7121
|
+
<xsl:copy-of select="@id"/>
|
7122
|
+
<xsl:apply-templates/>
|
7123
|
+
</fo:block>
|
7124
|
+
</xsl:template>
|
7125
|
+
<!-- =============== -->
|
7126
|
+
<!-- pre -->
|
7127
|
+
<!-- =============== -->
|
6987
7128
|
|
6988
7129
|
<!-- ========== -->
|
6989
7130
|
<!-- permission -->
|
@@ -8919,7 +9060,9 @@
|
|
8919
9060
|
<!-- ===================================== -->
|
8920
9061
|
<!-- Update xml -->
|
8921
9062
|
<!-- ===================================== -->
|
9063
|
+
<!-- =========================================================================== -->
|
8922
9064
|
<!-- STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
9065
|
+
<!-- =========================================================================== -->
|
8923
9066
|
<xsl:template match="@*|node()" mode="update_xml_step1">
|
8924
9067
|
<xsl:copy>
|
8925
9068
|
<xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
|
@@ -9011,10 +9154,15 @@
|
|
9011
9154
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
9012
9155
|
<xsl:apply-templates mode="update_xml_step1"/>
|
9013
9156
|
</xsl:template>
|
9014
|
-
|
9157
|
+
<!-- =========================================================================== -->
|
9015
9158
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
9159
|
+
<!-- =========================================================================== -->
|
9016
9160
|
|
9161
|
+
<!-- =========================================================================== -->
|
9017
9162
|
<!-- XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
|
9163
|
+
<!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
|
9164
|
+
<!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
|
9165
|
+
<!-- =========================================================================== -->
|
9018
9166
|
<!-- Example: <keep-together_within-line>ISO 10303-51</keep-together_within-line> -->
|
9019
9167
|
<xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
|
9020
9168
|
<xsl:copy>
|
@@ -9030,10 +9178,15 @@
|
|
9030
9178
|
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
9031
9179
|
|
9032
9180
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
9033
|
-
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
9034
9181
|
<xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
|
9035
9182
|
<xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
|
9036
|
-
<xsl:variable name="
|
9183
|
+
<xsl:variable name="text__" select="java:replaceAll(java:java.lang.String.new(.), $regex_standard_reference, concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
|
9184
|
+
<xsl:variable name="text_">
|
9185
|
+
<xsl:choose>
|
9186
|
+
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
|
9187
|
+
<xsl:otherwise><xsl:value-of select="$text__"/></xsl:otherwise>
|
9188
|
+
</xsl:choose>
|
9189
|
+
</xsl:variable>
|
9037
9190
|
<xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
|
9038
9191
|
<xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
|
9039
9192
|
<xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
|
@@ -9049,7 +9202,11 @@
|
|
9049
9202
|
</xsl:variable>
|
9050
9203
|
|
9051
9204
|
<!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
|
9052
|
-
|
9205
|
+
<!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
|
9206
|
+
<!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
|
9207
|
+
<!-- add < and > to \S -->
|
9208
|
+
<xsl:variable name="regex_S">[^\r\n\t\f\v \<>]</xsl:variable>
|
9209
|
+
<xsl:variable name="regex_solidus_units">((\b((<xsl:value-of select="$regex_S"/>{1,3}\/<xsl:value-of select="$regex_S"/>+)|(<xsl:value-of select="$regex_S"/>+\/<xsl:value-of select="$regex_S"/>{1,3}))\b)|(\/<xsl:value-of select="$regex_S"/>{1,3})\b)</xsl:variable>
|
9053
9210
|
<xsl:variable name="text3">
|
9054
9211
|
<text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
|
9055
9212
|
<xsl:choose>
|
@@ -9113,9 +9270,8 @@
|
|
9113
9270
|
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
9114
9271
|
</xsl:choose>
|
9115
9272
|
</xsl:template>
|
9116
|
-
|
9117
9273
|
<!-- ===================================== -->
|
9118
|
-
<!--
|
9274
|
+
<!-- END XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
|
9119
9275
|
<!-- ===================================== -->
|
9120
9276
|
|
9121
9277
|
<!-- for correct rendering combining chars -->
|