metanorma-un 0.6.1 → 0.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: 9c90de3003be5bb327042c4c18599a7370ce7a301dfab79344ccdf3a8d9d870c
4
- data.tar.gz: 380402b9b954aeac4986fe2599d44b5334367db790b68e8bc01a524d6fab6833
3
+ metadata.gz: ac07ef36025bf48f602b707379d4b10aff6d5acee7e2cb8fb3f22229c123aaeb
4
+ data.tar.gz: 15e6019bbc953ff7dcfc98199f006c79b06f222986a0cc86081ab0b2226d9168
5
5
  SHA512:
6
- metadata.gz: 0bc101d08b76185ec9a6f9ebd8f5edb9829a60dde96c0bd98f7871734cc09a541cb539b7cc64762d0de2b9ed598ab81aa2e8f3ace9c82c20b79ff2a94d497412
7
- data.tar.gz: 104ccc6eb3d64ba0d96b20ed9b14b682d90e0c3407291a7580779a5da1f276d5c044ddf6c37113b5374c8fd2950001b70d95e2de7bb8864718645cb55e08136a
6
+ metadata.gz: cdadfe44c99f83c5f209fa56e1d65e92d1a36368e019eb50273ee0cde17df9276165152e9f470c38af6e18c3fee52e46354fd4589f8e2f37f19edd0c1497eb7d
7
+ data.tar.gz: '09730915844ff8c66f922138c6fa4c551f5351313551180a29181690ea73ecdac94b889948bdd30b7d4e31f3ecb79c41fb4174ccd6eb0d35969bbfe1a6fa0462'
data/.rubocop.yml CHANGED
@@ -10,5 +10,3 @@ AllCops:
10
10
  DisplayCopNames: false
11
11
  StyleGuideCopsOnly: false
12
12
  TargetRubyVersion: 2.4
13
- Rails:
14
- Enabled: true
@@ -876,6 +876,18 @@
876
876
  </zeroOrMore>
877
877
  </element>
878
878
  </define>
879
+ <define name="pagebreak">
880
+ <element name="pagebreak">
881
+ <optional>
882
+ <attribute name="orientation">
883
+ <choice>
884
+ <value>landscape</value>
885
+ <value>portrait</value>
886
+ </choice>
887
+ </attribute>
888
+ </optional>
889
+ </element>
890
+ </define>
879
891
  </include>
880
892
  <!-- end overrides -->
881
893
  <define name="colgroup">
@@ -943,8 +955,170 @@
943
955
  <ref name="permission"/>
944
956
  <ref name="imagemap"/>
945
957
  <ref name="svgmap"/>
958
+ <ref name="inputform"/>
959
+ </choice>
960
+ </define>
961
+ <define name="inputform">
962
+ <element name="form">
963
+ <attribute name="id">
964
+ <data type="ID"/>
965
+ </attribute>
966
+ <attribute name="name"/>
967
+ <attribute name="action"/>
968
+ <zeroOrMore>
969
+ <choice>
970
+ <ref name="TextElement"/>
971
+ <ref name="FormInput"/>
972
+ </choice>
973
+ </zeroOrMore>
974
+ </element>
975
+ </define>
976
+ <define name="FormInput">
977
+ <choice>
978
+ <ref name="input"/>
979
+ <ref name="formlabel"/>
980
+ <ref name="select"/>
981
+ <ref name="textarea"/>
982
+ </choice>
983
+ </define>
984
+ <define name="InputType">
985
+ <choice>
986
+ <value>button</value>
987
+ <value>checkbox</value>
988
+ <value>date</value>
989
+ <value>file</value>
990
+ <value>password</value>
991
+ <value>radio</value>
992
+ <value>submit</value>
993
+ <value>text</value>
946
994
  </choice>
947
995
  </define>
996
+ <define name="input">
997
+ <element name="input">
998
+ <attribute name="type">
999
+ <ref name="InputType"/>
1000
+ </attribute>
1001
+ <optional>
1002
+ <attribute name="checked">
1003
+ <data type="boolean"/>
1004
+ </attribute>
1005
+ </optional>
1006
+ <optional>
1007
+ <attribute name="disabled">
1008
+ <data type="boolean"/>
1009
+ </attribute>
1010
+ </optional>
1011
+ <optional>
1012
+ <attribute name="readonly">
1013
+ <data type="boolean"/>
1014
+ </attribute>
1015
+ </optional>
1016
+ <optional>
1017
+ <attribute name="maxlength">
1018
+ <data type="int"/>
1019
+ </attribute>
1020
+ </optional>
1021
+ <optional>
1022
+ <attribute name="minlength">
1023
+ <data type="int"/>
1024
+ </attribute>
1025
+ </optional>
1026
+ <optional>
1027
+ <attribute name="name"/>
1028
+ </optional>
1029
+ <optional>
1030
+ <attribute name="value"/>
1031
+ </optional>
1032
+ <optional>
1033
+ <attribute name="id">
1034
+ <data type="ID"/>
1035
+ </attribute>
1036
+ </optional>
1037
+ </element>
1038
+ </define>
1039
+ <define name="formlabel">
1040
+ <element name="label">
1041
+ <attribute name="for">
1042
+ <data type="IDREF"/>
1043
+ </attribute>
1044
+ <zeroOrMore>
1045
+ <ref name="PureTextElement"/>
1046
+ </zeroOrMore>
1047
+ </element>
1048
+ </define>
1049
+ <define name="select">
1050
+ <element name="select">
1051
+ <optional>
1052
+ <attribute name="name"/>
1053
+ </optional>
1054
+ <optional>
1055
+ <attribute name="value"/>
1056
+ </optional>
1057
+ <optional>
1058
+ <attribute name="id">
1059
+ <data type="ID"/>
1060
+ </attribute>
1061
+ </optional>
1062
+ <optional>
1063
+ <attribute name="disabled">
1064
+ <data type="boolean"/>
1065
+ </attribute>
1066
+ </optional>
1067
+ <optional>
1068
+ <attribute name="multiple">
1069
+ <data type="boolean"/>
1070
+ </attribute>
1071
+ </optional>
1072
+ <optional>
1073
+ <attribute name="size">
1074
+ <data type="int"/>
1075
+ </attribute>
1076
+ </optional>
1077
+ <oneOrMore>
1078
+ <ref name="option"/>
1079
+ </oneOrMore>
1080
+ </element>
1081
+ </define>
1082
+ <define name="option">
1083
+ <element name="option">
1084
+ <optional>
1085
+ <attribute name="disabled">
1086
+ <data type="boolean"/>
1087
+ </attribute>
1088
+ </optional>
1089
+ <optional>
1090
+ <attribute name="value"/>
1091
+ </optional>
1092
+ <zeroOrMore>
1093
+ <ref name="PureTextElement"/>
1094
+ </zeroOrMore>
1095
+ </element>
1096
+ </define>
1097
+ <define name="textarea">
1098
+ <element name="textarea">
1099
+ <optional>
1100
+ <attribute name="name"/>
1101
+ </optional>
1102
+ <optional>
1103
+ <attribute name="value"/>
1104
+ </optional>
1105
+ <optional>
1106
+ <attribute name="id">
1107
+ <data type="ID"/>
1108
+ </attribute>
1109
+ </optional>
1110
+ <optional>
1111
+ <attribute name="rows">
1112
+ <data type="int"/>
1113
+ </attribute>
1114
+ </optional>
1115
+ <optional>
1116
+ <attribute name="cols">
1117
+ <data type="int"/>
1118
+ </attribute>
1119
+ </optional>
1120
+ </element>
1121
+ </define>
948
1122
  <define name="bibliography">
949
1123
  <element name="bibliography">
950
1124
  <oneOrMore>
@@ -2456,6 +2456,7 @@
2456
2456
 
2457
2457
 
2458
2458
 
2459
+
2459
2460
  <xsl:attribute name="display-align">before</xsl:attribute>
2460
2461
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
2461
2462
  <xsl:attribute name="padding-top">2mm</xsl:attribute>
@@ -5053,6 +5054,70 @@
5053
5054
  <xsl:value-of select="substring(.,1,1)"/>
5054
5055
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
5055
5056
  <fo:inline><xsl:apply-templates/></fo:inline>
5057
+ </xsl:template><xsl:template match="*[local-name() = 'form']">
5058
+ <fo:block>
5059
+ <xsl:apply-templates/>
5060
+ </fo:block>
5061
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
5062
+ <fo:inline><xsl:apply-templates/></fo:inline>
5063
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
5064
+ <fo:inline>
5065
+ <xsl:call-template name="text_input"/>
5066
+ </fo:inline>
5067
+ </xsl:template><xsl:template name="text_input">
5068
+ <xsl:variable name="count">
5069
+ <xsl:choose>
5070
+ <xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
5071
+ <xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
5072
+ <xsl:otherwise>10</xsl:otherwise>
5073
+ </xsl:choose>
5074
+ </xsl:variable>
5075
+ <xsl:call-template name="repeat">
5076
+ <xsl:with-param name="char" select="'_'"/>
5077
+ <xsl:with-param name="count" select="$count"/>
5078
+ </xsl:call-template>
5079
+ <xsl:text> </xsl:text>
5080
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
5081
+ <xsl:variable name="caption">
5082
+ <xsl:choose>
5083
+ <xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
5084
+ <xsl:otherwise>BUTTON</xsl:otherwise>
5085
+ </xsl:choose>
5086
+ </xsl:variable>
5087
+ <fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
5088
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
5089
+ <fo:inline padding-right="1mm">
5090
+ <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
5091
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
5092
+ <xsl:attribute name="content-width">100%</xsl:attribute>
5093
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
5094
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
5095
+ <svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
5096
+ <polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
5097
+ </svg>
5098
+ </fo:instream-foreign-object>
5099
+ </fo:inline>
5100
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
5101
+ <fo:inline padding-right="1mm">
5102
+ <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
5103
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
5104
+ <xsl:attribute name="content-width">100%</xsl:attribute>
5105
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
5106
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
5107
+ <svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
5108
+ <circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
5109
+ <circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
5110
+ </svg>
5111
+ </fo:instream-foreign-object>
5112
+ </fo:inline>
5113
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
5114
+ <fo:inline>
5115
+ <xsl:call-template name="text_input"/>
5116
+ </fo:inline>
5117
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
5118
+ <fo:block-container border="1pt solid black" width="50%">
5119
+ <fo:block> </fo:block>
5120
+ </fo:block-container>
5056
5121
  </xsl:template><xsl:template name="convertDate">
5057
5122
  <xsl:param name="date"/>
5058
5123
  <xsl:param name="format" select="'short'"/>
@@ -2456,6 +2456,7 @@
2456
2456
 
2457
2457
 
2458
2458
 
2459
+
2459
2460
  <xsl:attribute name="display-align">before</xsl:attribute>
2460
2461
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
2461
2462
  <xsl:attribute name="padding-top">2mm</xsl:attribute>
@@ -5053,6 +5054,70 @@
5053
5054
  <xsl:value-of select="substring(.,1,1)"/>
5054
5055
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
5055
5056
  <fo:inline><xsl:apply-templates/></fo:inline>
5057
+ </xsl:template><xsl:template match="*[local-name() = 'form']">
5058
+ <fo:block>
5059
+ <xsl:apply-templates/>
5060
+ </fo:block>
5061
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
5062
+ <fo:inline><xsl:apply-templates/></fo:inline>
5063
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
5064
+ <fo:inline>
5065
+ <xsl:call-template name="text_input"/>
5066
+ </fo:inline>
5067
+ </xsl:template><xsl:template name="text_input">
5068
+ <xsl:variable name="count">
5069
+ <xsl:choose>
5070
+ <xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
5071
+ <xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
5072
+ <xsl:otherwise>10</xsl:otherwise>
5073
+ </xsl:choose>
5074
+ </xsl:variable>
5075
+ <xsl:call-template name="repeat">
5076
+ <xsl:with-param name="char" select="'_'"/>
5077
+ <xsl:with-param name="count" select="$count"/>
5078
+ </xsl:call-template>
5079
+ <xsl:text> </xsl:text>
5080
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
5081
+ <xsl:variable name="caption">
5082
+ <xsl:choose>
5083
+ <xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
5084
+ <xsl:otherwise>BUTTON</xsl:otherwise>
5085
+ </xsl:choose>
5086
+ </xsl:variable>
5087
+ <fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
5088
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
5089
+ <fo:inline padding-right="1mm">
5090
+ <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
5091
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
5092
+ <xsl:attribute name="content-width">100%</xsl:attribute>
5093
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
5094
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
5095
+ <svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
5096
+ <polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
5097
+ </svg>
5098
+ </fo:instream-foreign-object>
5099
+ </fo:inline>
5100
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
5101
+ <fo:inline padding-right="1mm">
5102
+ <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
5103
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
5104
+ <xsl:attribute name="content-width">100%</xsl:attribute>
5105
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
5106
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
5107
+ <svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
5108
+ <circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
5109
+ <circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
5110
+ </svg>
5111
+ </fo:instream-foreign-object>
5112
+ </fo:inline>
5113
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
5114
+ <fo:inline>
5115
+ <xsl:call-template name="text_input"/>
5116
+ </fo:inline>
5117
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
5118
+ <fo:block-container border="1pt solid black" width="50%">
5119
+ <fo:block> </fo:block>
5120
+ </fo:block-container>
5056
5121
  </xsl:template><xsl:template name="convertDate">
5057
5122
  <xsl:param name="date"/>
5058
5123
  <xsl:param name="format" select="'short'"/>
@@ -2322,6 +2322,7 @@
2322
2322
 
2323
2323
 
2324
2324
 
2325
+
2325
2326
  <xsl:if test="ancestor::*[local-name()='sections']">
2326
2327
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2327
2328
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
@@ -4927,6 +4928,70 @@
4927
4928
  <xsl:value-of select="substring(.,1,1)"/>
4928
4929
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
4929
4930
  <fo:inline><xsl:apply-templates/></fo:inline>
4931
+ </xsl:template><xsl:template match="*[local-name() = 'form']">
4932
+ <fo:block>
4933
+ <xsl:apply-templates/>
4934
+ </fo:block>
4935
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
4936
+ <fo:inline><xsl:apply-templates/></fo:inline>
4937
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
4938
+ <fo:inline>
4939
+ <xsl:call-template name="text_input"/>
4940
+ </fo:inline>
4941
+ </xsl:template><xsl:template name="text_input">
4942
+ <xsl:variable name="count">
4943
+ <xsl:choose>
4944
+ <xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
4945
+ <xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
4946
+ <xsl:otherwise>10</xsl:otherwise>
4947
+ </xsl:choose>
4948
+ </xsl:variable>
4949
+ <xsl:call-template name="repeat">
4950
+ <xsl:with-param name="char" select="'_'"/>
4951
+ <xsl:with-param name="count" select="$count"/>
4952
+ </xsl:call-template>
4953
+ <xsl:text> </xsl:text>
4954
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
4955
+ <xsl:variable name="caption">
4956
+ <xsl:choose>
4957
+ <xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
4958
+ <xsl:otherwise>BUTTON</xsl:otherwise>
4959
+ </xsl:choose>
4960
+ </xsl:variable>
4961
+ <fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
4962
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
4963
+ <fo:inline padding-right="1mm">
4964
+ <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
4965
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
4966
+ <xsl:attribute name="content-width">100%</xsl:attribute>
4967
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
4968
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
4969
+ <svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
4970
+ <polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
4971
+ </svg>
4972
+ </fo:instream-foreign-object>
4973
+ </fo:inline>
4974
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
4975
+ <fo:inline padding-right="1mm">
4976
+ <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
4977
+ <xsl:attribute name="height">3.5mm</xsl:attribute>
4978
+ <xsl:attribute name="content-width">100%</xsl:attribute>
4979
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
4980
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
4981
+ <svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
4982
+ <circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
4983
+ <circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
4984
+ </svg>
4985
+ </fo:instream-foreign-object>
4986
+ </fo:inline>
4987
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
4988
+ <fo:inline>
4989
+ <xsl:call-template name="text_input"/>
4990
+ </fo:inline>
4991
+ </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
4992
+ <fo:block-container border="1pt solid black" width="50%">
4993
+ <fo:block> </fo:block>
4994
+ </fo:block-container>
4930
4995
  </xsl:template><xsl:template name="convertDate">
4931
4996
  <xsl:param name="date"/>
4932
4997
  <xsl:param name="format" select="'short'"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.6.1".freeze
3
+ VERSION = "0.6.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.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: 2021-04-26 00:00:00.000000000 Z
11
+ date: 2021-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639