metanorma-ogc 2.2.6 → 2.2.7
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 +9 -0
- data/lib/isodoc/ogc/html/wordstyle.css +150 -0
- data/lib/isodoc/ogc/html/wordstyle.scss +144 -0
- data/lib/isodoc/ogc/html/wordstyle_wp.css +126 -0
- data/lib/isodoc/ogc/html/wordstyle_wp.scss +121 -0
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +199 -65
- data/lib/isodoc/ogc/ogc.best-practice.xsl +199 -65
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +199 -65
- data/lib/isodoc/ogc/ogc.community-practice.xsl +199 -65
- data/lib/isodoc/ogc/ogc.community-standard.xsl +199 -65
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +199 -65
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +199 -65
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +199 -65
- data/lib/isodoc/ogc/ogc.other.xsl +199 -65
- data/lib/isodoc/ogc/ogc.policy.xsl +199 -65
- data/lib/isodoc/ogc/ogc.reference-model.xsl +199 -65
- data/lib/isodoc/ogc/ogc.release-notes.xsl +199 -65
- data/lib/isodoc/ogc/ogc.standard.xsl +199 -65
- data/lib/isodoc/ogc/ogc.test-suite.xsl +199 -65
- data/lib/isodoc/ogc/ogc.user-guide.xsl +199 -65
- data/lib/isodoc/ogc/ogc.white-paper.xsl +189 -55
- data/lib/metanorma/ogc/isodoc.rng +1 -1
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -621,6 +621,8 @@
|
|
621
621
|
</xsl:choose>
|
622
622
|
</xsl:template>
|
623
623
|
|
624
|
+
<xsl:strip-space elements="ogc:xref"/>
|
625
|
+
|
624
626
|
<!-- external parameters -->
|
625
627
|
|
626
628
|
<xsl:param name="svg_images"/> <!-- svg images array -->
|
@@ -2115,17 +2117,22 @@
|
|
2115
2117
|
</xsl:for-each>
|
2116
2118
|
</xsl:template>
|
2117
2119
|
|
2120
|
+
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
2118
2121
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
|
2119
2122
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
|
2120
2123
|
<xsl:template match="text()" name="text">
|
2121
2124
|
|
2122
|
-
<xsl:
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
|
2127
|
-
|
2128
|
-
|
2125
|
+
<xsl:choose>
|
2126
|
+
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
|
2127
|
+
<xsl:otherwise>
|
2128
|
+
<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))"/>
|
2129
|
+
<xsl:call-template name="replace_fo_inline_tags">
|
2130
|
+
<xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
|
2131
|
+
<xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
|
2132
|
+
<xsl:with-param name="text" select="$text"/>
|
2133
|
+
</xsl:call-template>
|
2134
|
+
</xsl:otherwise>
|
2135
|
+
</xsl:choose>
|
2129
2136
|
|
2130
2137
|
</xsl:template>
|
2131
2138
|
|
@@ -3179,7 +3186,7 @@
|
|
3179
3186
|
<xsl:template match="*[local-name()='tr']">
|
3180
3187
|
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
3181
3188
|
|
3182
|
-
<xsl:if test="*[local-name() = 'th']">
|
3189
|
+
<xsl:if test="count(*) = count(*[local-name() = 'th'])"> <!-- row contains 'th' only -->
|
3183
3190
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3184
3191
|
</xsl:if>
|
3185
3192
|
|
@@ -4149,7 +4156,8 @@
|
|
4149
4156
|
<xsl:copy-of select="node()"/>
|
4150
4157
|
</td>
|
4151
4158
|
<td>
|
4152
|
-
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
4159
|
+
<!-- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/> -->
|
4160
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]" mode="dl_if"/>
|
4153
4161
|
<!-- get paragraphs from nested 'dl' -->
|
4154
4162
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
4155
4163
|
</td>
|
@@ -4157,6 +4165,53 @@
|
|
4157
4165
|
</xsl:template>
|
4158
4166
|
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
|
4159
4167
|
|
4168
|
+
<xsl:template match="*" mode="dl_if">
|
4169
|
+
<xsl:copy-of select="."/>
|
4170
|
+
</xsl:template>
|
4171
|
+
|
4172
|
+
<xsl:template match="*[local-name() = 'p']" mode="dl_if">
|
4173
|
+
<xsl:param name="indent"/>
|
4174
|
+
<p>
|
4175
|
+
<xsl:copy-of select="@*"/>
|
4176
|
+
<xsl:value-of select="$indent"/>
|
4177
|
+
<xsl:copy-of select="node()"/>
|
4178
|
+
</p>
|
4179
|
+
|
4180
|
+
</xsl:template>
|
4181
|
+
|
4182
|
+
<xsl:template match="*[local-name() = 'ul' or local-name() = 'ol']" mode="dl_if">
|
4183
|
+
<xsl:variable name="list_rendered_">
|
4184
|
+
<xsl:apply-templates select="."/>
|
4185
|
+
</xsl:variable>
|
4186
|
+
<xsl:variable name="list_rendered" select="xalan:nodeset($list_rendered_)"/>
|
4187
|
+
|
4188
|
+
<xsl:variable name="indent">
|
4189
|
+
<xsl:for-each select="($list_rendered//fo:block[not(.//fo:block)])[1]">
|
4190
|
+
<xsl:apply-templates select="ancestor::*[@provisional-distance-between-starts]/@provisional-distance-between-starts" mode="dl_if"/>
|
4191
|
+
</xsl:for-each>
|
4192
|
+
</xsl:variable>
|
4193
|
+
|
4194
|
+
<xsl:apply-templates mode="dl_if">
|
4195
|
+
<xsl:with-param name="indent" select="$indent"/>
|
4196
|
+
</xsl:apply-templates>
|
4197
|
+
</xsl:template>
|
4198
|
+
|
4199
|
+
<xsl:template match="*[local-name() = 'li']" mode="dl_if">
|
4200
|
+
<xsl:param name="indent"/>
|
4201
|
+
<xsl:apply-templates mode="dl_if">
|
4202
|
+
<xsl:with-param name="indent" select="$indent"/>
|
4203
|
+
</xsl:apply-templates>
|
4204
|
+
</xsl:template>
|
4205
|
+
|
4206
|
+
<xsl:template match="@provisional-distance-between-starts" mode="dl_if">
|
4207
|
+
<xsl:variable name="value" select="round(substring-before(.,'mm'))"/>
|
4208
|
+
<!-- emulate left indent for list item -->
|
4209
|
+
<xsl:call-template name="repeat">
|
4210
|
+
<xsl:with-param name="char" select="'x'"/>
|
4211
|
+
<xsl:with-param name="count" select="$value"/>
|
4212
|
+
</xsl:call-template>
|
4213
|
+
</xsl:template>
|
4214
|
+
|
4160
4215
|
<xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
|
4161
4216
|
<xsl:for-each select="*[local-name() = 'dt']">
|
4162
4217
|
<p>
|
@@ -4555,6 +4610,7 @@
|
|
4555
4610
|
</word>
|
4556
4611
|
<xsl:call-template name="tokenize_with_tags">
|
4557
4612
|
<xsl:with-param name="text" select="substring-after($text, $separator)"/>
|
4613
|
+
<xsl:with-param name="tags" select="$tags"/>
|
4558
4614
|
</xsl:call-template>
|
4559
4615
|
</xsl:otherwise>
|
4560
4616
|
</xsl:choose>
|
@@ -4594,8 +4650,18 @@
|
|
4594
4650
|
|
4595
4651
|
<xsl:template name="add-zero-spaces-java">
|
4596
4652
|
<xsl:param name="text" select="."/>
|
4597
|
-
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space
|
4598
|
-
<xsl:
|
4653
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, arrow right -->
|
4654
|
+
<xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |→)','$1')"/>
|
4655
|
+
<!-- add zero-width space (#x200B) after characters: 'great than' -->
|
4656
|
+
<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' -->
|
4657
|
+
<!-- add zero-width space (#x200B) before characters: 'less than' -->
|
4658
|
+
<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' -->
|
4659
|
+
<!-- add zero-width space (#x200B) before character: { -->
|
4660
|
+
<xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?<!\W)(\{)', '$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
|
4661
|
+
<!-- add zero-width space (#x200B) after character: , -->
|
4662
|
+
<xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(\,)(?!\d)', '$1')"/> <!-- negative lookahead: ',' not followed by digit -->
|
4663
|
+
|
4664
|
+
<xsl:value-of select="$text5"/>
|
4599
4665
|
</xsl:template>
|
4600
4666
|
|
4601
4667
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -4741,7 +4807,7 @@
|
|
4741
4807
|
</xsl:copy>
|
4742
4808
|
</xsl:template>
|
4743
4809
|
|
4744
|
-
<xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p'])]" mode="table-without-br">
|
4810
|
+
<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">
|
4745
4811
|
<xsl:copy>
|
4746
4812
|
<xsl:copy-of select="@*"/>
|
4747
4813
|
<p>
|
@@ -4789,6 +4855,28 @@
|
|
4789
4855
|
</xsl:for-each>
|
4790
4856
|
</xsl:template>
|
4791
4857
|
|
4858
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']" mode="table-without-br">
|
4859
|
+
<xsl:apply-templates mode="table-without-br"/>
|
4860
|
+
</xsl:template>
|
4861
|
+
|
4862
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']/text()[contains(., ' ') or contains(., ' ')]" mode="table-without-br">
|
4863
|
+
|
4864
|
+
<xsl:variable name="sep">###SOURCECODE_NEWLINE###</xsl:variable>
|
4865
|
+
<xsl:variable name="sourcecode_text" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', $sep)"/>
|
4866
|
+
<xsl:variable name="items">
|
4867
|
+
<xsl:call-template name="split">
|
4868
|
+
<xsl:with-param name="pText" select="$sourcecode_text"/>
|
4869
|
+
<xsl:with-param name="sep" select="$sep"/>
|
4870
|
+
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
4871
|
+
</xsl:call-template>
|
4872
|
+
</xsl:variable>
|
4873
|
+
<xsl:for-each select="xalan:nodeset($items)/*">
|
4874
|
+
<p>
|
4875
|
+
<sourcecode><xsl:copy-of select="node()"/></sourcecode>
|
4876
|
+
</p>
|
4877
|
+
</xsl:for-each>
|
4878
|
+
</xsl:template>
|
4879
|
+
|
4792
4880
|
<!-- remove redundant white spaces -->
|
4793
4881
|
<xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
|
4794
4882
|
<xsl:variable name="text" select="translate(.,'	 ','')"/>
|
@@ -5099,6 +5187,7 @@
|
|
5099
5187
|
<xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
|
5100
5188
|
<xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
|
5101
5189
|
<xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
|
5190
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
|
5102
5191
|
<xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
|
5103
5192
|
</tags>
|
5104
5193
|
</xsl:template>
|
@@ -5586,6 +5675,12 @@
|
|
5586
5675
|
|
5587
5676
|
<fo:block-container margin-left="0mm">
|
5588
5677
|
|
5678
|
+
<!-- <xsl:if test="$namespace = 'iho'">
|
5679
|
+
<xsl:if test="ancestor::iho:td">
|
5680
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
5681
|
+
</xsl:if>
|
5682
|
+
</xsl:if> -->
|
5683
|
+
|
5589
5684
|
<fo:block>
|
5590
5685
|
|
5591
5686
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
@@ -6722,42 +6817,20 @@
|
|
6722
6817
|
<!-- =============== -->
|
6723
6818
|
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
6724
6819
|
|
6725
|
-
<
|
6726
|
-
|
6727
|
-
|
6728
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
6729
|
-
</xsl:if>
|
6730
|
-
|
6731
|
-
<xsl:if test="ancestor::*[local-name() = 'example']">
|
6732
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
6733
|
-
</xsl:if>
|
6820
|
+
<xsl:variable name="sourcecode_attributes">
|
6821
|
+
<xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
|
6822
|
+
<xsl:variable name="_font-size">
|
6734
6823
|
|
6735
|
-
|
6824
|
+
<!-- 9 -->
|
6736
6825
|
|
6737
|
-
|
6738
|
-
|
6739
|
-
|
6740
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
6741
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
6742
|
-
</xsl:choose>
|
6743
|
-
</xsl:attribute>
|
6744
|
-
|
6745
|
-
</xsl:if>
|
6746
|
-
<fo:block-container margin-left="0mm">
|
6747
|
-
|
6748
|
-
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
6749
|
-
<xsl:variable name="_font-size">
|
6750
|
-
|
6751
|
-
<!-- 9 -->
|
6752
|
-
|
6753
|
-
<!-- <xsl:if test="$namespace = 'ieee'">
|
6754
|
-
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
6755
|
-
</xsl:if> -->
|
6826
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
6827
|
+
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
6828
|
+
</xsl:if> -->
|
6756
6829
|
|
6757
|
-
|
6758
|
-
|
6759
|
-
|
6760
|
-
|
6830
|
+
<xsl:choose>
|
6831
|
+
<xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
|
6832
|
+
<xsl:otherwise>9.5</xsl:otherwise>
|
6833
|
+
</xsl:choose>
|
6761
6834
|
|
6762
6835
|
</xsl:variable>
|
6763
6836
|
|
@@ -6772,14 +6845,60 @@
|
|
6772
6845
|
</xsl:choose>
|
6773
6846
|
</xsl:attribute>
|
6774
6847
|
</xsl:if>
|
6848
|
+
</xsl:element>
|
6849
|
+
</xsl:variable>
|
6775
6850
|
|
6851
|
+
<xsl:choose>
|
6852
|
+
<xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
|
6853
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
6854
|
+
<xsl:attribute name="{local-name()}">
|
6855
|
+
<xsl:value-of select="."/>
|
6856
|
+
</xsl:attribute>
|
6857
|
+
</xsl:for-each>
|
6776
6858
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
6777
|
-
</
|
6859
|
+
</xsl:when>
|
6778
6860
|
|
6779
|
-
|
6861
|
+
<xsl:otherwise>
|
6862
|
+
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
6780
6863
|
|
6781
|
-
|
6782
|
-
|
6864
|
+
<xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
|
6865
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
6866
|
+
</xsl:if>
|
6867
|
+
|
6868
|
+
<xsl:if test="ancestor::*[local-name() = 'example']">
|
6869
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
6870
|
+
</xsl:if>
|
6871
|
+
|
6872
|
+
<xsl:copy-of select="@id"/>
|
6873
|
+
|
6874
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
6875
|
+
<xsl:attribute name="margin-left">
|
6876
|
+
<xsl:choose>
|
6877
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
6878
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
6879
|
+
</xsl:choose>
|
6880
|
+
</xsl:attribute>
|
6881
|
+
|
6882
|
+
</xsl:if>
|
6883
|
+
<fo:block-container margin-left="0mm">
|
6884
|
+
|
6885
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
6886
|
+
|
6887
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
6888
|
+
<xsl:attribute name="{local-name()}">
|
6889
|
+
<xsl:value-of select="."/>
|
6890
|
+
</xsl:attribute>
|
6891
|
+
</xsl:for-each>
|
6892
|
+
|
6893
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
6894
|
+
</fo:block>
|
6895
|
+
|
6896
|
+
<xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
|
6897
|
+
|
6898
|
+
</fo:block-container>
|
6899
|
+
</fo:block-container>
|
6900
|
+
</xsl:otherwise>
|
6901
|
+
</xsl:choose>
|
6783
6902
|
</xsl:template>
|
6784
6903
|
|
6785
6904
|
<xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -9016,7 +9135,9 @@
|
|
9016
9135
|
<!-- ===================================== -->
|
9017
9136
|
<!-- Update xml -->
|
9018
9137
|
<!-- ===================================== -->
|
9138
|
+
<!-- =========================================================================== -->
|
9019
9139
|
<!-- STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
9140
|
+
<!-- =========================================================================== -->
|
9020
9141
|
<xsl:template match="@*|node()" mode="update_xml_step1">
|
9021
9142
|
<xsl:copy>
|
9022
9143
|
<xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
|
@@ -9108,10 +9229,15 @@
|
|
9108
9229
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
9109
9230
|
<xsl:apply-templates mode="update_xml_step1"/>
|
9110
9231
|
</xsl:template>
|
9111
|
-
|
9232
|
+
<!-- =========================================================================== -->
|
9112
9233
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
9234
|
+
<!-- =========================================================================== -->
|
9113
9235
|
|
9236
|
+
<!-- =========================================================================== -->
|
9114
9237
|
<!-- XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
|
9238
|
+
<!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
|
9239
|
+
<!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
|
9240
|
+
<!-- =========================================================================== -->
|
9115
9241
|
<!-- Example: <keep-together_within-line>ISO 10303-51</keep-together_within-line> -->
|
9116
9242
|
<xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
|
9117
9243
|
<xsl:copy>
|
@@ -9127,10 +9253,15 @@
|
|
9127
9253
|
<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">
|
9128
9254
|
|
9129
9255
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
9130
|
-
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
9131
9256
|
<xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
|
9132
9257
|
<xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
|
9133
|
-
<xsl:variable name="
|
9258
|
+
<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))"/>
|
9259
|
+
<xsl:variable name="text_">
|
9260
|
+
<xsl:choose>
|
9261
|
+
<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 -->
|
9262
|
+
<xsl:otherwise><xsl:value-of select="$text__"/></xsl:otherwise>
|
9263
|
+
</xsl:choose>
|
9264
|
+
</xsl:variable>
|
9134
9265
|
<xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
|
9135
9266
|
<xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
|
9136
9267
|
<xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
|
@@ -9146,7 +9277,11 @@
|
|
9146
9277
|
</xsl:variable>
|
9147
9278
|
|
9148
9279
|
<!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
|
9149
|
-
|
9280
|
+
<!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
|
9281
|
+
<!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
|
9282
|
+
<!-- add < and > to \S -->
|
9283
|
+
<xsl:variable name="regex_S">[^\r\n\t\f\v \<>]</xsl:variable>
|
9284
|
+
<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>
|
9150
9285
|
<xsl:variable name="text3">
|
9151
9286
|
<text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
|
9152
9287
|
<xsl:choose>
|
@@ -9210,9 +9345,8 @@
|
|
9210
9345
|
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
9211
9346
|
</xsl:choose>
|
9212
9347
|
</xsl:template>
|
9213
|
-
|
9214
9348
|
<!-- ===================================== -->
|
9215
|
-
<!--
|
9349
|
+
<!-- END XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
|
9216
9350
|
<!-- ===================================== -->
|
9217
9351
|
|
9218
9352
|
<!-- for correct rendering combining chars -->
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso-639
|