metanorma-m3aawg 1.5.1 → 1.5.2

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: ae84a7856b4d5f36cea484c88fbe01609bf0dc007adb713125e656afc1975120
4
- data.tar.gz: 3256929fca4ec6087c643f162f03c4b053b57697ad4bd0a17042b0c7a46cf11a
3
+ metadata.gz: 22aff62dc924926aa7ab09848015f5e7ff323ea2b59ddb4722105e45fb705ac9
4
+ data.tar.gz: 6fd9fef7b7512f11a6f43746257f4a41d1d9452fe07d39bd6f93166b0e76b047
5
5
  SHA512:
6
- metadata.gz: 908755279322b92655b6ecb755664fba42c7c44f5585ce71d6bb67ff7a0b498b2714e144859faff3e3cb5b725b6b5e6a7118663281f3db7516252d6760e89cf3
7
- data.tar.gz: 23b30dbf41e94a0ff695905dae40eb31ddea82d49ff540d0b363c853386e1ab6923a4a5a60422c698e27be6dfec1066b795939cf3c94f7a185cb9b2dff2735a8
6
+ metadata.gz: 1d32906798587b973eff3894283069181f6add337ee2b3d40522821302a102553c1e0dcb9e4496bcc1078f30b546d4ed4c3e31ee99d449ca883a2af9a01d1fd1
7
+ data.tar.gz: e030f5e5de744da5097a66df718a8c171cec2c9536e50bf9df9ac1f67d119c088f9c223d32a7e99915902761547c98ff8bd08d456ed3b5a0d95b1c0db32d7b7e
@@ -59,7 +59,7 @@ module Asciidoctor
59
59
  end
60
60
 
61
61
  def doctype(node)
62
- d = node.attr("doctype")
62
+ d = super
63
63
  unless %w{policy best-practices supporting-document report}.include? d
64
64
  @log.add("Document Attributes", nil, "#{d} is not a legal document type: reverting to 'report'")
65
65
  d = "report"
@@ -42,8 +42,11 @@
42
42
  </define>
43
43
  <define name="xref">
44
44
  <element name="xref">
45
+ <!-- attribute target { xsd:IDREF }, -->
45
46
  <attribute name="target">
46
- <data type="IDREF"/>
47
+ <data type="string">
48
+ <param name="pattern">\i\c*|\c+#\c+</param>
49
+ </data>
47
50
  </attribute>
48
51
  <optional>
49
52
  <attribute name="type">
@@ -2123,14 +2123,36 @@
2123
2123
  <fo:table-cell>
2124
2124
  <fo:block>
2125
2125
 
2126
-
2126
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2127
+ <xsl:if test="local-name(*[1]) != 'stem'">
2128
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2129
+ </xsl:if>
2130
+ </xsl:if> -->
2127
2131
 
2128
2132
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2129
2133
 
2130
2134
  </fo:block>
2131
2135
  </fo:table-cell>
2132
2136
  </fo:table-row>
2133
-
2137
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2138
+ <xsl:if test="local-name(*[1]) = 'stem'">
2139
+ <fo:table-row>
2140
+ <fo:table-cell>
2141
+ <fo:block margin-top="6pt">
2142
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2143
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2144
+ </xsl:if>
2145
+ <xsl:text>&#xA0;</xsl:text>
2146
+ </fo:block>
2147
+ </fo:table-cell>
2148
+ <fo:table-cell>
2149
+ <fo:block>
2150
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2151
+ </fo:block>
2152
+ </fo:table-cell>
2153
+ </fo:table-row>
2154
+ </xsl:if>
2155
+ </xsl:if> -->
2134
2156
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2135
2157
  <xsl:apply-templates/>
2136
2158
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -2884,22 +2906,30 @@
2884
2906
  </fo:block>
2885
2907
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2886
2908
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
2909
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2910
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2911
+ </xsl:if>
2887
2912
  <fo:block-container margin-left="0mm" margin-right="0mm">
2888
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
2913
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
2914
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2915
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
2916
+ </xsl:if>
2889
2917
  <xsl:variable name="simple-table">
2890
2918
  <xsl:call-template name="getSimpleTable"/>
2891
2919
  </xsl:variable>
2892
2920
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
2893
2921
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
2894
- <fo:table-column column-width="35mm"/>
2895
- <fo:table-column column-width="115mm"/>
2922
+ <!-- <fo:table-column column-width="35mm"/>
2923
+ <fo:table-column column-width="115mm"/> -->
2924
+ <fo:table-column column-width="25%"/>
2925
+ <fo:table-column column-width="75%"/>
2896
2926
  </xsl:if>
2897
2927
  <xsl:apply-templates mode="requirement"/>
2898
2928
  </fo:table>
2899
2929
  <!-- fn processing -->
2900
2930
  <xsl:if test=".//*[local-name() = 'fn']">
2901
2931
  <xsl:for-each select="*[local-name() = 'tbody']">
2902
- <fo:block font-size="90%" border-bottom="1.pt solid black">
2932
+ <fo:block font-size="90%" border-bottom="1pt solid black">
2903
2933
  <xsl:call-template name="fn_display"/>
2904
2934
  </fo:block>
2905
2935
  </xsl:for-each>
@@ -2915,17 +2945,20 @@
2915
2945
  <xsl:apply-templates mode="requirement"/>
2916
2946
  </fo:table-body>
2917
2947
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
2918
- <fo:table-row>
2948
+ <fo:table-row height="7mm">
2949
+ <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
2950
+ <xsl:attribute name="border">1pt solid black</xsl:attribute>
2951
+ </xsl:if>
2919
2952
  <xsl:apply-templates mode="requirement"/>
2920
2953
  </fo:table-row>
2921
2954
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
2922
- <fo:table-cell text-align="{@align}">
2955
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
2923
2956
  <xsl:attribute name="text-align">
2924
2957
  <xsl:choose>
2925
2958
  <xsl:when test="@align">
2926
2959
  <xsl:value-of select="@align"/>
2927
2960
  </xsl:when>
2928
- <xsl:otherwise>center</xsl:otherwise>
2961
+ <xsl:otherwise>left</xsl:otherwise>
2929
2962
  </xsl:choose>
2930
2963
  </xsl:attribute>
2931
2964
  <xsl:if test="@colspan">
@@ -2939,21 +2972,25 @@
2939
2972
  </xsl:attribute>
2940
2973
  </xsl:if>
2941
2974
 
2942
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2975
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2943
2976
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2944
2977
  <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
2945
2978
  </xsl:if>
2946
2979
  <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
2947
2980
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2948
2981
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
2949
- </xsl:if>
2982
+ </xsl:if> -->
2950
2983
 
2951
2984
  <fo:block>
2952
2985
  <xsl:apply-templates/>
2953
2986
  </fo:block>
2954
2987
  </fo:table-cell>
2955
2988
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
2956
- <fo:table-cell text-align="{@align}">
2989
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
2990
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2991
+ <xsl:attribute name="padding">0mm</xsl:attribute>
2992
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
2993
+ </xsl:if>
2957
2994
  <xsl:attribute name="text-align">
2958
2995
  <xsl:choose>
2959
2996
  <xsl:when test="@align">
@@ -2973,24 +3010,25 @@
2973
3010
  </xsl:attribute>
2974
3011
  </xsl:if>
2975
3012
 
2976
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3013
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2977
3014
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
2978
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2979
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
3015
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3016
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
2980
3017
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
2981
3018
  </xsl:if>
2982
- </xsl:if>
3019
+ </xsl:if> -->
3020
+ <!-- 2nd line and below -->
2983
3021
 
2984
3022
  <fo:block>
2985
3023
  <xsl:apply-templates/>
2986
3024
  </fo:block>
2987
3025
  </fo:table-cell>
2988
3026
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
2989
- <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
3027
+ <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
2990
3028
  <xsl:apply-templates/>
2991
3029
  </fo:block>
2992
- </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
2993
- <fo:block margin-bottom="10pt">
3030
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3031
+ <fo:block> <!-- margin-bottom="10pt" -->
2994
3032
  <xsl:apply-templates/>
2995
3033
  </fo:block>
2996
3034
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
@@ -3324,6 +3362,44 @@
3324
3362
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3325
3363
  <fo:block><xsl:apply-templates/></fo:block>
3326
3364
  </fo:table-cell>
3365
+ </xsl:template><xsl:template name="processBibitem">
3366
+
3367
+ </xsl:template><xsl:template name="processPersonalAuthor">
3368
+ <xsl:choose>
3369
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3370
+ <author>
3371
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3372
+ </author>
3373
+ </xsl:when>
3374
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3375
+ <author>
3376
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3377
+ <xsl:text> </xsl:text>
3378
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3379
+ </author>
3380
+ </xsl:when>
3381
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3382
+ <author>
3383
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3384
+ <xsl:text> </xsl:text>
3385
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3386
+ </author>
3387
+ </xsl:when>
3388
+ <xsl:otherwise>
3389
+ <xsl:apply-templates/>
3390
+ </xsl:otherwise>
3391
+ </xsl:choose>
3392
+ </xsl:template><xsl:template name="renderDate">
3393
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3394
+ <xsl:value-of select="*[local-name() = 'on']"/>
3395
+ </xsl:if>
3396
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3397
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3398
+ </xsl:if>
3399
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3400
+ <xsl:value-of select="translate(.,'. ','')"/>
3401
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3402
+ <xsl:value-of select="substring(.,1,1)"/>
3327
3403
  </xsl:template><xsl:template name="convertDate">
3328
3404
  <xsl:param name="date"/>
3329
3405
  <xsl:param name="format" select="'short'"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
3
- VERSION = "1.5.1"
3
+ VERSION = "1.5.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3aawg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-14 00:00:00.000000000 Z
11
+ date: 2020-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities