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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/recordx-xslt.rb +16 -4
- data.tar.gz.sig +0 -0
- metadata +19 -19
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f52e45d570b5bc4dfc9f384e3d5ed3c1109061e
|
4
|
+
data.tar.gz: 355edcfd13c121602edc3a6fe11532c8f88f8cda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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
|
+
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
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTE3MDkxMDE3NTk1NloXDTE4MDkxMDE3NTk1NlowSDESMBAG
|
16
16
|
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
17
|
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|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f
|
31
|
+
zw1Gv5DCYdjGyh9v/HXKg7RNURhnhXjwr1BidcGWEUioC2xz2+05Lr4iT8lRVp/R
|
32
|
+
mN0oexZpcUlrCg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2017-09-10 00:00:00.000000000 Z
|
35
35
|
dependencies: []
|
36
36
|
description:
|
37
|
-
email: james@
|
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.
|
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
|
-
|
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�,
|