middleman-xmlvalidator 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/middleman/xmlvalidator/BingSiteAuth.xsd +9 -0
- data/lib/middleman/xmlvalidator/RSSSchema.xsd +500 -0
- data/lib/middleman/xmlvalidator/Sitemap2.xsd +116 -0
- data/lib/middleman/xmlvalidator/Sitemap3.xsd +76 -0
- data/lib/middleman/xmlvalidator/XMLSchema.xsd +1778 -0
- data/lib/middleman/xmlvalidator/crossdomain.xsd +18 -0
- data/lib/middleman/xmlvalidator/extension.rb +32 -34
- data/lib/middleman/xmlvalidator/version.rb +1 -1
- data/middleman-xmlvalidator.gemspec +1 -1
- metadata +7 -1
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
3
|
+
<xs:element name="cross-domain-policy">
|
4
|
+
<xs:complexType>
|
5
|
+
<xs:sequence>
|
6
|
+
<xs:element name="site-control">
|
7
|
+
<xs:complexType>
|
8
|
+
<xs:simpleContent>
|
9
|
+
<xs:extension base="xs:string">
|
10
|
+
<xs:attribute type="xs:string" name="permitted-cross-domain-policies"/>
|
11
|
+
</xs:extension>
|
12
|
+
</xs:simpleContent>
|
13
|
+
</xs:complexType>
|
14
|
+
</xs:element>
|
15
|
+
</xs:sequence>
|
16
|
+
</xs:complexType>
|
17
|
+
</xs:element>
|
18
|
+
</xs:schema>
|
@@ -6,44 +6,42 @@ module Middleman
|
|
6
6
|
app.after_build do |builder|
|
7
7
|
puts "", "Validating with NokoGiri", ""
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
Dir.glob("build/**/*BingSiteAuth.xml").each do |full_path|
|
10
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'BingSiteAuth.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
11
|
+
Xmlvalidator.validate(full_path, 'BingSiteAuth.xsd').each do |error|
|
12
|
+
puts " " + error.message
|
13
|
+
end
|
14
|
+
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
Dir.glob("build/**/*crossdomain.xml").each do |full_path|
|
17
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'crossdomain.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
18
|
+
Xmlvalidator.validate(full_path, 'crossdomain.xsd').each do |error|
|
19
|
+
puts " " + error.message
|
20
|
+
end
|
21
|
+
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
Dir.glob("build/**/*Sitemap.xml").each do |full_path|
|
24
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'Sitemap3.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
25
|
+
Xmlvalidator.validate(full_path, 'Sitemap3.xsd').each do |error|
|
26
|
+
puts " " + error.message
|
27
|
+
end
|
28
|
+
end
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
Dir.glob("build/**/*.rss").each do |full_path|
|
31
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'RSSSchema.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
32
|
+
Xmlvalidator.validate(full_path, 'RSSSchema.xsd').each do |error|
|
33
|
+
puts " " + error.message
|
34
|
+
end
|
35
|
+
end
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
puts Dir.pwd
|
37
|
+
Dir.glob("build/**/*.xml").each do |full_path|
|
38
|
+
if not (full_path.match(/^.*BingSiteAuth.xml$/) || full_path.match(/^.*crossdomain.xml$/) || full_path.match(/^.*Sitemap.xml$/))
|
39
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'XMLSchema.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
40
|
+
Xmlvalidator.validate(full_path, 'XMLSchema.xsd').each do |error|
|
41
|
+
puts " " + error.message
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
47
45
|
|
48
46
|
puts "", "Validation with NokoGiri " + "Complete".green, ""
|
49
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-xmlvalidator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.23
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -122,6 +122,12 @@ files:
|
|
122
122
|
- Rakefile
|
123
123
|
- lib/.DS_Store
|
124
124
|
- lib/middleman-xmlvalidator.rb
|
125
|
+
- lib/middleman/xmlvalidator/BingSiteAuth.xsd
|
126
|
+
- lib/middleman/xmlvalidator/RSSSchema.xsd
|
127
|
+
- lib/middleman/xmlvalidator/Sitemap2.xsd
|
128
|
+
- lib/middleman/xmlvalidator/Sitemap3.xsd
|
129
|
+
- lib/middleman/xmlvalidator/XMLSchema.xsd
|
130
|
+
- lib/middleman/xmlvalidator/crossdomain.xsd
|
125
131
|
- lib/middleman/xmlvalidator/extension.rb
|
126
132
|
- lib/middleman/xmlvalidator/version.rb
|
127
133
|
- lib/middleman_extension.rb
|