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.
@@ -1442,6 +1442,8 @@
1442
1442
  </fo:static-content>
1443
1443
  </xsl:template>
1444
1444
 
1445
+ <xsl:strip-space elements="ogc:xref"/>
1446
+
1445
1447
  <!-- external parameters -->
1446
1448
 
1447
1449
  <xsl:param name="svg_images"/> <!-- svg images array -->
@@ -2932,17 +2934,22 @@
2932
2934
  </xsl:for-each>
2933
2935
  </xsl:template>
2934
2936
 
2937
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2935
2938
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
2936
2939
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
2937
2940
  <xsl:template match="text()" name="text">
2938
2941
 
2939
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2940
- <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))"/>
2941
- <xsl:call-template name="replace_fo_inline_tags">
2942
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2943
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2944
- <xsl:with-param name="text" select="$text"/>
2945
- </xsl:call-template>
2942
+ <xsl:choose>
2943
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
2944
+ <xsl:otherwise>
2945
+ <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))"/>
2946
+ <xsl:call-template name="replace_fo_inline_tags">
2947
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2948
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2949
+ <xsl:with-param name="text" select="$text"/>
2950
+ </xsl:call-template>
2951
+ </xsl:otherwise>
2952
+ </xsl:choose>
2946
2953
 
2947
2954
  </xsl:template>
2948
2955
 
@@ -3979,7 +3986,7 @@
3979
3986
  <xsl:template match="*[local-name()='tr']">
3980
3987
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3981
3988
 
3982
- <xsl:if test="*[local-name() = 'th']">
3989
+ <xsl:if test="count(*) = count(*[local-name() = 'th'])"> <!-- row contains 'th' only -->
3983
3990
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3984
3991
  </xsl:if>
3985
3992
 
@@ -4963,7 +4970,8 @@
4963
4970
  <xsl:copy-of select="node()"/>
4964
4971
  </td>
4965
4972
  <td>
4966
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4973
+ <!-- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/> -->
4974
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]" mode="dl_if"/>
4967
4975
  <!-- get paragraphs from nested 'dl' -->
4968
4976
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4969
4977
  </td>
@@ -4971,6 +4979,53 @@
4971
4979
  </xsl:template>
4972
4980
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
4973
4981
 
4982
+ <xsl:template match="*" mode="dl_if">
4983
+ <xsl:copy-of select="."/>
4984
+ </xsl:template>
4985
+
4986
+ <xsl:template match="*[local-name() = 'p']" mode="dl_if">
4987
+ <xsl:param name="indent"/>
4988
+ <p>
4989
+ <xsl:copy-of select="@*"/>
4990
+ <xsl:value-of select="$indent"/>
4991
+ <xsl:copy-of select="node()"/>
4992
+ </p>
4993
+
4994
+ </xsl:template>
4995
+
4996
+ <xsl:template match="*[local-name() = 'ul' or local-name() = 'ol']" mode="dl_if">
4997
+ <xsl:variable name="list_rendered_">
4998
+ <xsl:apply-templates select="."/>
4999
+ </xsl:variable>
5000
+ <xsl:variable name="list_rendered" select="xalan:nodeset($list_rendered_)"/>
5001
+
5002
+ <xsl:variable name="indent">
5003
+ <xsl:for-each select="($list_rendered//fo:block[not(.//fo:block)])[1]">
5004
+ <xsl:apply-templates select="ancestor::*[@provisional-distance-between-starts]/@provisional-distance-between-starts" mode="dl_if"/>
5005
+ </xsl:for-each>
5006
+ </xsl:variable>
5007
+
5008
+ <xsl:apply-templates mode="dl_if">
5009
+ <xsl:with-param name="indent" select="$indent"/>
5010
+ </xsl:apply-templates>
5011
+ </xsl:template>
5012
+
5013
+ <xsl:template match="*[local-name() = 'li']" mode="dl_if">
5014
+ <xsl:param name="indent"/>
5015
+ <xsl:apply-templates mode="dl_if">
5016
+ <xsl:with-param name="indent" select="$indent"/>
5017
+ </xsl:apply-templates>
5018
+ </xsl:template>
5019
+
5020
+ <xsl:template match="@provisional-distance-between-starts" mode="dl_if">
5021
+ <xsl:variable name="value" select="round(substring-before(.,'mm'))"/>
5022
+ <!-- emulate left indent for list item -->
5023
+ <xsl:call-template name="repeat">
5024
+ <xsl:with-param name="char" select="'x'"/>
5025
+ <xsl:with-param name="count" select="$value"/>
5026
+ </xsl:call-template>
5027
+ </xsl:template>
5028
+
4974
5029
  <xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
4975
5030
  <xsl:for-each select="*[local-name() = 'dt']">
4976
5031
  <p>
@@ -5369,6 +5424,7 @@
5369
5424
  </word>
5370
5425
  <xsl:call-template name="tokenize_with_tags">
5371
5426
  <xsl:with-param name="text" select="substring-after($text, $separator)"/>
5427
+ <xsl:with-param name="tags" select="$tags"/>
5372
5428
  </xsl:call-template>
5373
5429
  </xsl:otherwise>
5374
5430
  </xsl:choose>
@@ -5408,8 +5464,18 @@
5408
5464
 
5409
5465
  <xsl:template name="add-zero-spaces-java">
5410
5466
  <xsl:param name="text" select="."/>
5411
- <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
5412
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
5467
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, arrow right -->
5468
+ <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |→)','$1​')"/>
5469
+ <!-- add zero-width space (#x200B) after characters: 'great than' -->
5470
+ <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' -->
5471
+ <!-- add zero-width space (#x200B) before characters: 'less than' -->
5472
+ <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(?&lt;!\u003c)(\u003c)', '​$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
5473
+ <!-- add zero-width space (#x200B) before character: { -->
5474
+ <xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
5475
+ <!-- add zero-width space (#x200B) after character: , -->
5476
+ <xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
5477
+
5478
+ <xsl:value-of select="$text5"/>
5413
5479
  </xsl:template>
5414
5480
 
5415
5481
  <xsl:template name="add-zero-spaces-link-java">
@@ -5555,7 +5621,7 @@
5555
5621
  </xsl:copy>
5556
5622
  </xsl:template>
5557
5623
 
5558
- <xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p'])]" mode="table-without-br">
5624
+ <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">
5559
5625
  <xsl:copy>
5560
5626
  <xsl:copy-of select="@*"/>
5561
5627
  <p>
@@ -5603,6 +5669,28 @@
5603
5669
  </xsl:for-each>
5604
5670
  </xsl:template>
5605
5671
 
5672
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']" mode="table-without-br">
5673
+ <xsl:apply-templates mode="table-without-br"/>
5674
+ </xsl:template>
5675
+
5676
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']/text()[contains(., '&#13;') or contains(., '&#10;')]" mode="table-without-br">
5677
+
5678
+ <xsl:variable name="sep">###SOURCECODE_NEWLINE###</xsl:variable>
5679
+ <xsl:variable name="sourcecode_text" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', $sep)"/>
5680
+ <xsl:variable name="items">
5681
+ <xsl:call-template name="split">
5682
+ <xsl:with-param name="pText" select="$sourcecode_text"/>
5683
+ <xsl:with-param name="sep" select="$sep"/>
5684
+ <xsl:with-param name="normalize-space">false</xsl:with-param>
5685
+ </xsl:call-template>
5686
+ </xsl:variable>
5687
+ <xsl:for-each select="xalan:nodeset($items)/*">
5688
+ <p>
5689
+ <sourcecode><xsl:copy-of select="node()"/></sourcecode>
5690
+ </p>
5691
+ </xsl:for-each>
5692
+ </xsl:template>
5693
+
5606
5694
  <!-- remove redundant white spaces -->
5607
5695
  <xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
5608
5696
  <xsl:variable name="text" select="translate(.,'&#9;&#10;&#13;','')"/>
@@ -5913,6 +6001,7 @@
5913
6001
  <xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
5914
6002
  <xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
5915
6003
  <xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
6004
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
5916
6005
  <xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
5917
6006
  </tags>
5918
6007
  </xsl:template>
@@ -6400,6 +6489,12 @@
6400
6489
 
6401
6490
  <fo:block-container margin-left="0mm">
6402
6491
 
6492
+ <!-- <xsl:if test="$namespace = 'iho'">
6493
+ <xsl:if test="ancestor::iho:td">
6494
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
6495
+ </xsl:if>
6496
+ </xsl:if> -->
6497
+
6403
6498
  <fo:block>
6404
6499
 
6405
6500
  <fo:inline xsl:use-attribute-sets="note-name-style">
@@ -7563,46 +7658,20 @@
7563
7658
  <!-- =============== -->
7564
7659
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
7565
7660
 
7566
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
7567
-
7568
- <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
7569
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
7570
- </xsl:if>
7571
-
7572
- <xsl:if test="ancestor::*[local-name() = 'example']">
7573
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
7574
- </xsl:if>
7575
-
7576
- <xsl:copy-of select="@id"/>
7577
-
7578
- <xsl:if test="parent::*[local-name() = 'note']">
7579
- <xsl:attribute name="margin-left">
7580
- <xsl:choose>
7581
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
7582
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7583
- </xsl:choose>
7584
- </xsl:attribute>
7585
-
7586
- </xsl:if>
7587
- <fo:block-container margin-left="0mm">
7588
-
7589
- <xsl:if test="parent::*[local-name() = 'example']">
7590
- <fo:block font-size="1pt" line-height="10%" space-after="4pt"> </fo:block>
7591
- </xsl:if>
7592
-
7593
- <fo:block xsl:use-attribute-sets="sourcecode-style">
7594
- <xsl:variable name="_font-size">
7661
+ <xsl:variable name="sourcecode_attributes">
7662
+ <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
7663
+ <xsl:variable name="_font-size">
7595
7664
 
7596
- <!-- 9 -->
7665
+ <!-- 9 -->
7597
7666
 
7598
- <!-- <xsl:if test="$namespace = 'ieee'">
7599
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
7600
- </xsl:if> -->
7667
+ <!-- <xsl:if test="$namespace = 'ieee'">
7668
+ <xsl:if test="$current_template = 'standard'">8</xsl:if>
7669
+ </xsl:if> -->
7601
7670
 
7602
- <xsl:choose>
7603
- <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
7604
- <xsl:otherwise>9.5</xsl:otherwise>
7605
- </xsl:choose>
7671
+ <xsl:choose>
7672
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
7673
+ <xsl:otherwise>9.5</xsl:otherwise>
7674
+ </xsl:choose>
7606
7675
 
7607
7676
  </xsl:variable>
7608
7677
 
@@ -7617,22 +7686,72 @@
7617
7686
  </xsl:choose>
7618
7687
  </xsl:attribute>
7619
7688
  </xsl:if>
7689
+ </xsl:element>
7690
+ </xsl:variable>
7620
7691
 
7621
- <xsl:if test="parent::*[local-name() = 'example']">
7622
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7692
+ <xsl:choose>
7693
+ <xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
7694
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
7695
+ <xsl:attribute name="{local-name()}">
7696
+ <xsl:value-of select="."/>
7697
+ </xsl:attribute>
7698
+ </xsl:for-each>
7699
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7700
+ </xsl:when>
7701
+
7702
+ <xsl:otherwise>
7703
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
7704
+
7705
+ <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
7706
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
7623
7707
  </xsl:if>
7624
7708
 
7625
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7626
- </fo:block>
7709
+ <xsl:if test="ancestor::*[local-name() = 'example']">
7710
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
7711
+ </xsl:if>
7627
7712
 
7628
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
7713
+ <xsl:copy-of select="@id"/>
7629
7714
 
7630
- <xsl:if test="parent::*[local-name() = 'example']">
7631
- <fo:block font-size="1pt" line-height="10%" space-before="6pt"> </fo:block>
7632
- </xsl:if>
7715
+ <xsl:if test="parent::*[local-name() = 'note']">
7716
+ <xsl:attribute name="margin-left">
7717
+ <xsl:choose>
7718
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
7719
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7720
+ </xsl:choose>
7721
+ </xsl:attribute>
7633
7722
 
7634
- </fo:block-container>
7635
- </fo:block-container>
7723
+ </xsl:if>
7724
+ <fo:block-container margin-left="0mm">
7725
+
7726
+ <xsl:if test="parent::*[local-name() = 'example']">
7727
+ <fo:block font-size="1pt" line-height="10%" space-after="4pt"> </fo:block>
7728
+ </xsl:if>
7729
+
7730
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
7731
+
7732
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
7733
+ <xsl:attribute name="{local-name()}">
7734
+ <xsl:value-of select="."/>
7735
+ </xsl:attribute>
7736
+ </xsl:for-each>
7737
+
7738
+ <xsl:if test="parent::*[local-name() = 'example']">
7739
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7740
+ </xsl:if>
7741
+
7742
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7743
+ </fo:block>
7744
+
7745
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
7746
+
7747
+ <xsl:if test="parent::*[local-name() = 'example']">
7748
+ <fo:block font-size="1pt" line-height="10%" space-before="6pt"> </fo:block>
7749
+ </xsl:if>
7750
+
7751
+ </fo:block-container>
7752
+ </fo:block-container>
7753
+ </xsl:otherwise>
7754
+ </xsl:choose>
7636
7755
  </xsl:template>
7637
7756
 
7638
7757
  <xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -9862,7 +9981,9 @@
9862
9981
  <!-- ===================================== -->
9863
9982
  <!-- Update xml -->
9864
9983
  <!-- ===================================== -->
9984
+ <!-- =========================================================================== -->
9865
9985
  <!-- STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
9986
+ <!-- =========================================================================== -->
9866
9987
  <xsl:template match="@*|node()" mode="update_xml_step1">
9867
9988
  <xsl:copy>
9868
9989
  <xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
@@ -9954,10 +10075,15 @@
9954
10075
  <xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
9955
10076
  <xsl:apply-templates mode="update_xml_step1"/>
9956
10077
  </xsl:template>
9957
-
10078
+ <!-- =========================================================================== -->
9958
10079
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
10080
+ <!-- =========================================================================== -->
9959
10081
 
10082
+ <!-- =========================================================================== -->
9960
10083
  <!-- XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
10084
+ <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
10085
+ <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
10086
+ <!-- =========================================================================== -->
9961
10087
  <!-- Example: <keep-together_within-line>ISO 10303-51</keep-together_within-line> -->
9962
10088
  <xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
9963
10089
  <xsl:copy>
@@ -9973,10 +10099,15 @@
9973
10099
  <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">
9974
10100
 
9975
10101
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
9976
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
9977
10102
  <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
9978
10103
  <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
9979
- <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))"/>
10104
+ <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))"/>
10105
+ <xsl:variable name="text_">
10106
+ <xsl:choose>
10107
+ <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 -->
10108
+ <xsl:otherwise><xsl:value-of select="$text__"/></xsl:otherwise>
10109
+ </xsl:choose>
10110
+ </xsl:variable>
9980
10111
  <xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
9981
10112
  <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
9982
10113
  <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
@@ -9992,7 +10123,11 @@
9992
10123
  </xsl:variable>
9993
10124
 
9994
10125
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
9995
- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable>
10126
+ <!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
10127
+ <!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
10128
+ <!-- add &lt; and &gt; to \S -->
10129
+ <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;]</xsl:variable>
10130
+ <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>
9996
10131
  <xsl:variable name="text3">
9997
10132
  <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
9998
10133
  <xsl:choose>
@@ -10056,9 +10191,8 @@
10056
10191
  <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
10057
10192
  </xsl:choose>
10058
10193
  </xsl:template>
10059
-
10060
10194
  <!-- ===================================== -->
10061
- <!-- End Update xml -->
10195
+ <!-- END XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
10062
10196
  <!-- ===================================== -->
10063
10197
 
10064
10198
  <!-- for correct rendering combining chars -->