recordx-xslt 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: 7c98f1985544f6404511ad3bf75b2db83a4cfd9c
4
- data.tar.gz: c55ddcb0d1c38eb8900d3f9172efe23efa607f7c
3
+ metadata.gz: 1f52e45d570b5bc4dfc9f384e3d5ed3c1109061e
4
+ data.tar.gz: 355edcfd13c121602edc3a6fe11532c8f88f8cda
5
5
  SHA512:
6
- metadata.gz: a11f3fba9added4ad4057d796315f4f46bd328b2f540cb3fc1b10ef2bb1d1c07e91f88086e6a29b20496936a25110fa2bf56a309d873b86164c31ae471e3a707
7
- data.tar.gz: 0aaeb04fece5e16ed1277965916e8a295d38abfbe5c0419bb83eef10a1fce59a19ad7ef55b1736ede3d352be1d08d379ef4be395459b5d4685bc75120d7f1c2e
6
+ metadata.gz: 73df7d677a1be500b3afb2c9c3d062e44f62a40a7b20ffca0c7f8f878f1914bc16b5b50405fea803a7a753af74b776b8b82cda80f9c38bc2b9840068397ac299
7
+ data.tar.gz: 7fbfa2f08b89fd5f2a9077bf520afc9593ba003c3ec939cf83a6cafaaa83f8c312d325ed1bdcaa3dfebda7dfc5d132c4e5be4ab1fa0087b2f1fcc62e835f1c8f
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/recordx-xslt.rb CHANGED
@@ -21,17 +21,17 @@ header =<<HEADER
21
21
  HEADER
22
22
 
23
23
  a_element = @schema.split('/').map{|x| x[/\w+/]}
24
+
25
+ @xslt_schema = build_xslt_schema(@schema) if @xslt_schema.empty?
24
26
 
25
27
  a_html = @xslt_schema.split('/').map do |x|
26
28
 
27
29
  result = x.match(/(\w+)(?:[\(\[]([^\]\)]+)[\]\)])?(.*)/)
28
30
  name, children, remaining = result.captures if result
29
31
 
30
- #children = ($')[/^[\(\[]([^\)\]]+)[\)\]]$/,1]
31
32
 
32
- list = children.split(',').map {|y| y.split(':',2)} if children
33
+ list = children.split(/ *, */).map {|y| y.split(':',2)} if children
33
34
 
34
- #[name, list, remaining]
35
35
  [name, list]
36
36
  end
37
37
 
@@ -63,6 +63,18 @@ HEADER
63
63
  end
64
64
 
65
65
  private
66
+
67
+ def build_xslt_schema(schema)
68
+
69
+ schema.split('/').map do |row|
70
+
71
+ head, body = row.split('[',2)
72
+ fields = body[/.*(?=\])/].split(/ *, */)
73
+ "%s[%s]" % [head + '2', fields.map{|x| x + '2'}.join(', ')]
74
+
75
+ end.join('/')
76
+
77
+ end
66
78
 
67
79
  def scan_e(a, prev_tag='', indent=' ')
68
80
 
@@ -112,4 +124,4 @@ HEADER
112
124
  out
113
125
  end
114
126
 
115
- end
127
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recordx-xslt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -12,29 +12,29 @@ cert_chain:
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
14
  YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTE0MDkwNjA5NTg0MFoXDTE1MDkwNjA5NTg0MFowSDESMBAG
15
+ 8ixkARkWAmV1MB4XDTE3MDkxMDE3NTk1NloXDTE4MDkxMDE3NTk1NlowSDESMBAG
16
16
  A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
17
  EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
- ggEBAJf6Fs8/B3TdHfk/8VA40P4qTGjBjGGAiatWEE6AwV69e32EvzIq5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fttN5nL5YTy52nqPNDC3pKCNdgzt9I1nFClli7jFFWwgSm
28
- jOh99w8NopWEIej3mktGQqHGXDa1JN+aKaiX8sO7Y7WJ70Y5hByklFy3XOkdWE3Q
29
- pkDttehe4z8k29E75Dmz/M73QLYR296bXSQ+BblXsfmzBwS+OKoOBvdKRHwZUYNg
30
- zCJGl4kuaLfrZe2SVlKvdp+gMQP0dTjwYJLRntwhC9jI2w8tnEK4aUALVoXQHdQE
31
- KoGXC4+vSmOB6gj1SBzG9iZn1bxVygLkiOO5uar/JjhbDTRNDqDy/B3D8SIIAGAO
32
- uoX7MOe9OncggQ==
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAgQw/hAKj
27
+ d993Dkza6jqDNxvbw9KwuVItOo6TvWRjnATvPT84DaUdzncA9j0sPtbUmoyH2bsM
28
+ a0D8bmeKH13VvJGe8aAWrVGEvjERgChNx2D/++IzjhiFLjDKF1Mp3KFKzhQLSTmr
29
+ j9B0lG37KpOJ2jS7GHr4AsFIwpY8ls0Dw/GklTo/1O7rfQt6KBzFUyVlp2Z94dbp
30
+ hOSVfwS/moCduW8eW0sU+zlpmVFx/IKx5focXO/E2UpCpQl4MgO+sQeHQWibDwwf
31
+ zw1Gv5DCYdjGyh9v/HXKg7RNURhnhXjwr1BidcGWEUioC2xz2+05Lr4iT8lRVp/R
32
+ mN0oexZpcUlrCg==
33
33
  -----END CERTIFICATE-----
34
- date: 2014-09-06 00:00:00.000000000 Z
34
+ date: 2017-09-10 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
- email: james@r0bertson.co.uk
37
+ email: james@jamesrobertson.eu
38
38
  executables: []
39
39
  extensions: []
40
40
  extra_rdoc_files: []
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
60
  version: '0'
61
61
  requirements: []
62
62
  rubyforge_project:
63
- rubygems_version: 2.2.2
63
+ rubygems_version: 2.6.8
64
64
  signing_key:
65
65
  specification_version: 4
66
66
  summary: recordx-xslt
metadata.gz.sig CHANGED
@@ -1 +1,2 @@
1
- ?�%��3�m���ٛ��j��������R)��g�o.�[�Z�s:��*��_^�* 1Z�}$�[�����/L�}rl����Z�Ut�G�֎���uR�Q���5a%daY�`ڥ?M�2�Do�W~�˫iDr��Do�q��Xp�06��,���#v��č�N�|� ��S�xH���6?��'���G�`�r0v�N�R��zĐO�B<�V|��K"�H��ވ/+���A
1
+ g]�*���ZO�='�O�Ӏ�3
2
+ �2ω'TmIHꃸ�vO��bZ�V��N\*vxr�Ƚ�()�@��)IO2�����t�F]vI�7����������#�Ls���-�6�I�U�B��y}�7mI�2�.g6�,