metanorma-csa 1.6.1 → 1.6.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: d90ee4c2b591b5ec73387e3f6e83e82498161cf8ecc08bc045dafa2b99fa9347
4
- data.tar.gz: ce93ce6f3f8656c4e23ab1fe598d2023d6c7136778ec836b04296adc7d39383e
3
+ metadata.gz: ac6472da7e2e0757b0309861efecb8e2e9382301b33a9a728845fbf577d7d0d5
4
+ data.tar.gz: '09a9e87bb2f99f74494aeb878c8305fd3a05befa08b529745faf8555168ff3f4'
5
5
  SHA512:
6
- metadata.gz: f6b8e0b818eb09fe1173cfda224988d025a0044a7c65c8533355f5432e4ee369363da30dfd413582c19d6492d59e4d82dec3d60427d858bce7546eb27bf8413b
7
- data.tar.gz: '0905c8c9e0556e9373fa36b4f108945a72e004429b7031c67fd1938ce6403c15e7436a76014e0c255ef0c984b8cb2ca4f5e106fcf42ffb26069562091c777d86'
6
+ metadata.gz: 2bd573a70988022a22ab5e0d6a509fc1e6e23c1cd9bea69cf41cb34d643e254399035cb8d67ef2af891f42f4aef8d68777d6f18e0c4e9cc2f13304312c8ed7d5
7
+ data.tar.gz: 4a5e1aa96f4dc2d2469214b4ea6d68f0344649b10d08e37f8587dd6abd8c72c20b2139d412d2b3a0f6a4a6a2965756567bb79a115e9385c2781a6cb5fd0b8571
@@ -61,7 +61,7 @@ module Asciidoctor
61
61
  end
62
62
 
63
63
  def doctype(node)
64
- d = node.attr('doctype')
64
+ d = super
65
65
  unless %w{guidance proposal standard report whitepaper charter policy
66
66
  glossary case-study}.include? d
67
67
  @log.add("Document Attributes", nil,
@@ -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">
@@ -2084,12 +2084,34 @@
2084
2084
  <fo:table-cell>
2085
2085
  <fo:block>
2086
2086
 
2087
-
2087
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2088
+ <xsl:if test="local-name(*[1]) != 'stem'">
2089
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2090
+ </xsl:if>
2091
+ </xsl:if> -->
2088
2092
 
2089
2093
  </fo:block>
2090
2094
  </fo:table-cell>
2091
2095
  </fo:table-row>
2092
-
2096
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2097
+ <xsl:if test="local-name(*[1]) = 'stem'">
2098
+ <fo:table-row>
2099
+ <fo:table-cell>
2100
+ <fo:block margin-top="6pt">
2101
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2102
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2103
+ </xsl:if>
2104
+ <xsl:text>&#xA0;</xsl:text>
2105
+ </fo:block>
2106
+ </fo:table-cell>
2107
+ <fo:table-cell>
2108
+ <fo:block>
2109
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2110
+ </fo:block>
2111
+ </fo:table-cell>
2112
+ </fo:table-row>
2113
+ </xsl:if>
2114
+ </xsl:if> -->
2093
2115
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2094
2116
  <xsl:apply-templates/>
2095
2117
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -2841,22 +2863,30 @@
2841
2863
  </fo:block>
2842
2864
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2843
2865
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
2866
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2867
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2868
+ </xsl:if>
2844
2869
  <fo:block-container margin-left="0mm" margin-right="0mm">
2845
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
2870
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
2871
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2872
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
2873
+ </xsl:if>
2846
2874
  <xsl:variable name="simple-table">
2847
2875
  <xsl:call-template name="getSimpleTable"/>
2848
2876
  </xsl:variable>
2849
2877
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
2850
2878
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
2851
- <fo:table-column column-width="35mm"/>
2852
- <fo:table-column column-width="115mm"/>
2879
+ <!-- <fo:table-column column-width="35mm"/>
2880
+ <fo:table-column column-width="115mm"/> -->
2881
+ <fo:table-column column-width="25%"/>
2882
+ <fo:table-column column-width="75%"/>
2853
2883
  </xsl:if>
2854
2884
  <xsl:apply-templates mode="requirement"/>
2855
2885
  </fo:table>
2856
2886
  <!-- fn processing -->
2857
2887
  <xsl:if test=".//*[local-name() = 'fn']">
2858
2888
  <xsl:for-each select="*[local-name() = 'tbody']">
2859
- <fo:block font-size="90%" border-bottom="1.pt solid black">
2889
+ <fo:block font-size="90%" border-bottom="1pt solid black">
2860
2890
  <xsl:call-template name="fn_display"/>
2861
2891
  </fo:block>
2862
2892
  </xsl:for-each>
@@ -2872,17 +2902,20 @@
2872
2902
  <xsl:apply-templates mode="requirement"/>
2873
2903
  </fo:table-body>
2874
2904
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
2875
- <fo:table-row>
2905
+ <fo:table-row height="7mm">
2906
+ <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
2907
+ <xsl:attribute name="border">1pt solid black</xsl:attribute>
2908
+ </xsl:if>
2876
2909
  <xsl:apply-templates mode="requirement"/>
2877
2910
  </fo:table-row>
2878
2911
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
2879
- <fo:table-cell text-align="{@align}">
2912
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
2880
2913
  <xsl:attribute name="text-align">
2881
2914
  <xsl:choose>
2882
2915
  <xsl:when test="@align">
2883
2916
  <xsl:value-of select="@align"/>
2884
2917
  </xsl:when>
2885
- <xsl:otherwise>center</xsl:otherwise>
2918
+ <xsl:otherwise>left</xsl:otherwise>
2886
2919
  </xsl:choose>
2887
2920
  </xsl:attribute>
2888
2921
  <xsl:if test="@colspan">
@@ -2896,21 +2929,25 @@
2896
2929
  </xsl:attribute>
2897
2930
  </xsl:if>
2898
2931
 
2899
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2932
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2900
2933
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2901
2934
  <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
2902
2935
  </xsl:if>
2903
2936
  <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
2904
2937
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2905
2938
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
2906
- </xsl:if>
2939
+ </xsl:if> -->
2907
2940
 
2908
2941
  <fo:block>
2909
2942
  <xsl:apply-templates/>
2910
2943
  </fo:block>
2911
2944
  </fo:table-cell>
2912
2945
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
2913
- <fo:table-cell text-align="{@align}">
2946
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
2947
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2948
+ <xsl:attribute name="padding">0mm</xsl:attribute>
2949
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
2950
+ </xsl:if>
2914
2951
  <xsl:attribute name="text-align">
2915
2952
  <xsl:choose>
2916
2953
  <xsl:when test="@align">
@@ -2930,24 +2967,25 @@
2930
2967
  </xsl:attribute>
2931
2968
  </xsl:if>
2932
2969
 
2933
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2970
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2934
2971
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
2935
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2936
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
2972
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2973
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
2937
2974
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
2938
2975
  </xsl:if>
2939
- </xsl:if>
2976
+ </xsl:if> -->
2977
+ <!-- 2nd line and below -->
2940
2978
 
2941
2979
  <fo:block>
2942
2980
  <xsl:apply-templates/>
2943
2981
  </fo:block>
2944
2982
  </fo:table-cell>
2945
2983
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
2946
- <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
2984
+ <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
2947
2985
  <xsl:apply-templates/>
2948
2986
  </fo:block>
2949
- </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
2950
- <fo:block margin-bottom="10pt">
2987
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
2988
+ <fo:block> <!-- margin-bottom="10pt" -->
2951
2989
  <xsl:apply-templates/>
2952
2990
  </fo:block>
2953
2991
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
@@ -3276,6 +3314,44 @@
3276
3314
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3277
3315
  <fo:block><xsl:apply-templates/></fo:block>
3278
3316
  </fo:table-cell>
3317
+ </xsl:template><xsl:template name="processBibitem">
3318
+
3319
+ </xsl:template><xsl:template name="processPersonalAuthor">
3320
+ <xsl:choose>
3321
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3322
+ <author>
3323
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3324
+ </author>
3325
+ </xsl:when>
3326
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3327
+ <author>
3328
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3329
+ <xsl:text> </xsl:text>
3330
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3331
+ </author>
3332
+ </xsl:when>
3333
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3334
+ <author>
3335
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3336
+ <xsl:text> </xsl:text>
3337
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3338
+ </author>
3339
+ </xsl:when>
3340
+ <xsl:otherwise>
3341
+ <xsl:apply-templates/>
3342
+ </xsl:otherwise>
3343
+ </xsl:choose>
3344
+ </xsl:template><xsl:template name="renderDate">
3345
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3346
+ <xsl:value-of select="*[local-name() = 'on']"/>
3347
+ </xsl:if>
3348
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3349
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3350
+ </xsl:if>
3351
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3352
+ <xsl:value-of select="translate(.,'. ','')"/>
3353
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3354
+ <xsl:value-of select="substring(.,1,1)"/>
3279
3355
  </xsl:template><xsl:template name="convertDate">
3280
3356
  <xsl:param name="date"/>
3281
3357
  <xsl:param name="format" select="'short'"/>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Metanorma
4
4
  module Csa
5
- VERSION = '1.6.1'
5
+ VERSION = '1.6.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.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