rdf-n3 0.2.3.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. data/.gitignore +1 -0
  2. data/.yardopts +4 -3
  3. data/{History.txt → History.md} +30 -6
  4. data/{README.rdoc → README.md} +56 -19
  5. data/Rakefile +15 -29
  6. data/VERSION +1 -1
  7. data/example-files/sp2b.n3 +50177 -0
  8. data/lib/rdf/n3.rb +2 -2
  9. data/lib/rdf/n3/reader.rb +560 -367
  10. data/lib/rdf/n3/reader/meta.rb +640 -0
  11. data/lib/rdf/n3/reader/n3-selectors.n3 +0 -0
  12. data/lib/rdf/n3/reader/parser.rb +229 -0
  13. data/lib/rdf/n3/vocab.rb +1 -0
  14. data/lib/rdf/n3/writer.rb +324 -265
  15. data/rdf-n3.gemspec +24 -26
  16. data/script/build_meta +242 -0
  17. data/script/parse +62 -13
  18. data/script/tc +4 -4
  19. data/spec/cwm_spec.rb +11 -3
  20. data/spec/n3reader_spec.rb +233 -63
  21. data/spec/rdf_helper.rb +15 -15
  22. data/spec/spec_helper.rb +10 -4
  23. data/spec/swap_spec.rb +11 -35
  24. data/spec/swap_test/n3parser.tests +14 -14
  25. data/spec/swap_test/n3parser.yml +0 -19
  26. data/spec/swap_test/nodeID/classes.ref.rdf +1 -1
  27. data/spec/swap_test/ref/contexts-1.n3 +12 -0
  28. data/spec/swap_test/ref/prefix2.rdf +33 -0
  29. data/spec/swap_test/ref/strquot.n3 +0 -1
  30. data/spec/swap_test/ref/xml-syntax-basic-serialization.rdf +1 -1
  31. data/spec/swap_test/regression.n3 +5 -5
  32. data/spec/swap_test/regression.yml +53 -23
  33. data/spec/turtle/manifest-bad.yml +91 -0
  34. data/spec/turtle/manifest.yml +187 -0
  35. data/spec/turtle_spec.rb +12 -20
  36. data/spec/writer_spec.rb +39 -37
  37. metadata +43 -48
  38. data/lib/rdf/n3/patches/qname_hacks.rb +0 -57
  39. data/lib/rdf/n3/patches/seq.rb +0 -34
  40. data/lib/rdf/n3/reader/n3_grammar.rb +0 -3764
  41. data/lib/rdf/n3/reader/n3_grammar.treetop +0 -227
  42. data/lib/rdf/n3/reader/n3_grammar_18.rb +0 -3764
  43. data/lib/rdf/n3/reader/n3_grammar_18.treetop +0 -227
  44. data/spec/literal_spec.rb +0 -245
@@ -52,25 +52,22 @@ module RdfHelper
52
52
  pred = statement.predicate.to_s.split(/[\#\/]/).last
53
53
  obj = statement.object.is_a?(RDF::Literal) ? statement.object.value : statement.object.to_s
54
54
 
55
- puts "#{pred}: #{obj}" if ::RDF::N3::debug?
55
+ puts "#{pred.inspect}: #{obj}" if ::RDF::N3::debug?
56
+ pred = "outputDocument" if pred == "referenceOutput"
56
57
  if statement.predicate == RDF.type
57
58
  self.rdf_type = obj.to_s.split(/[\#\/]/).last
58
59
  #puts statement.subject.to_s
59
60
  elsif pred =~ /Document\Z/i
60
61
  puts "sub #{uri_prefix} in #{obj} for #{test_dir}" if ::RDF::N3::debug?
61
- about = obj.dup
62
- obj.sub!(uri_prefix, test_dir)
62
+ about = obj
63
+ obj = obj.sub(uri_prefix, test_dir)
63
64
  puts " => #{obj}" if ::RDF::N3::debug?
64
65
  self.send("#{pred}=", obj)
65
66
  if pred == "inputDocument"
66
67
  self.about ||= about
67
68
  self.name ||= statement.subject.to_s.split(/[\#\/]/).last
68
69
  end
69
- elsif pred == "referenceOutput"
70
- puts "referenceOutput: #{obj}" if ::RDF::N3::debug?
71
- outputDocument = obj.sub(uri_prefix, test_dir)
72
- puts "referenceOutput: " + self.send(pred) if ::RDF::N3::debug?
73
- elsif self.respond_to?("#{pred}=")
70
+ elsif self.respond_to?("#{pred}=")
74
71
  self.send("#{pred}=", obj)
75
72
  end
76
73
  end
@@ -78,13 +75,14 @@ module RdfHelper
78
75
 
79
76
  def parse_mf(subject, uri_prefix, test_dir, graph)
80
77
  props = graph.properties(subject)
81
- @name = (props[MF['name'].to_s] || []).first.to_s
78
+ puts "MF #{subject}: #{props.inspect}" if ::RDF::N3::debug?
79
+ @name = (props[MF["name"].to_s] || []).first.to_s
82
80
  @description = (props[RDF::RDFS.comment.to_s] || []).first.to_s
83
81
  @outputDocument = (props[MF.result.to_s] || []).first
84
82
  @outputDocument = @outputDocument.to_s.sub(uri_prefix, test_dir) if @outputDocument
85
83
  action = (props[MF.action.to_s] || []).first
86
84
  a_props = graph.properties(action)
87
- @about = (a_props[QT.data.to_s] || []).first
85
+ @about = (a_props[QT.data.to_s] || []).first.to_s
88
86
  @inputDocument = @about.to_s.sub(uri_prefix, test_dir)
89
87
  end
90
88
 
@@ -97,6 +95,7 @@ module RdfHelper
97
95
  issue
98
96
  status
99
97
  approval
98
+ rdf_type
100
99
  description
101
100
  discussion
102
101
  issue
@@ -129,7 +128,9 @@ module RdfHelper
129
128
  when :array
130
129
  @parser.graph.should be_equivalent_graph(self.output, self)
131
130
  else
132
- output_graph = RDF::Graph.load(self.outputDocument, :format => detect_format(self.outputDocument))
131
+ #puts "parse #{self.outputDocument} as #{RDF::Reader.for(self.outputDocument)}"
132
+ format = detect_format(File.open(self.outputDocument))
133
+ output_graph = RDF::Graph.load(self.outputDocument, :format => format, :base_uri => self.about)
133
134
  puts "result: #{CGI.escapeHTML(graph.to_ntriples)}" if ::RDF::N3::debug?
134
135
  graph.should Matchers::be_equivalent_graph(output_graph, self)
135
136
  end
@@ -155,7 +156,7 @@ module RdfHelper
155
156
  @negative_entailment_tests = []
156
157
 
157
158
  unless File.file?(File.join(test_dir, test.sub(ext, "yml")))
158
- load_opts = {:base_uri => test_uri}
159
+ load_opts = {:base_uri => test_uri, :intern => false}
159
160
  load_opts[:format] = :n3 if ext == "tests" # For swap tests
160
161
  graph = RDF::Graph.load(File.join(test_dir, test), load_opts)
161
162
  uri_base = Addressable::URI.join(test_uri, ".").to_s
@@ -166,11 +167,10 @@ module RdfHelper
166
167
  case graph.type_of(t_uri).first
167
168
  when MF.Manifest
168
169
  # Get test entries
169
- entries = graph.query(:subject => t_uri, :predicate => MF["entries"]).to_a
170
- entries = entries.first
170
+ entries = graph.first(:subject => t_uri, :predicate => MF["entries"])
171
171
  raise "No entires found for MF Manifest" unless entries.is_a?(RDF::Statement)
172
172
 
173
- @test_cases = graph.seq(entries.object).map do |subject|
173
+ @test_cases = RDF::List.new(entries.object, graph).to_a.map do |subject|
174
174
  TestCase.new(subject, uri_base, test_dir, :test_type => :mf, :graph => graph)
175
175
  end
176
176
  else
@@ -3,12 +3,13 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', '..', 'rdf-rdfxml', 'lib'))
3
3
  $:.unshift File.dirname(__FILE__)
4
4
 
5
5
  require 'rubygems'
6
- require 'spec'
6
+ require 'rspec'
7
7
  require 'matchers'
8
8
  require 'bigdecimal' # XXX Remove Me
9
9
  require 'rdf/n3'
10
10
  require 'rdf/ntriples'
11
11
  require 'rdf/spec'
12
+ require 'rdf/spec/matchers'
12
13
  require 'rdf/isomorphic'
13
14
 
14
15
  include Matchers
@@ -35,11 +36,16 @@ module RDF
35
36
  end
36
37
  end
37
38
 
38
- Spec::Runner.configure do |config|
39
- config.include(RDF::Spec::Matchers)
39
+ ::RSpec.configure do |c|
40
+ c.filter_run :focus => true
41
+ c.run_all_when_everything_filtered = true
42
+ c.exclusion_filter = {
43
+ :ruby => lambda { |version| !(RUBY_VERSION.to_s =~ /^#{version.to_s}/) },
44
+ }
45
+ c.include(Matchers)
46
+ c.include(RDF::Spec::Matchers)
40
47
  end
41
48
 
42
-
43
49
  # Serialize graph and replace bnodes with predictable versions, return as sorted array
44
50
  def normalize_bnodes(graph, anon = "a")
45
51
  anon_ctx = {}
@@ -34,19 +34,13 @@ describe RDF::N3::Reader do
34
34
  end
35
35
  g
36
36
  end
37
- rescue #Spec::Expectations::ExpectationNotMetError => e
38
- if %w(n3_10003 n3_10004).include?(t.name)
39
- pending("@forAll/@forEach not yet implemented")
40
- elsif %w(n3_10007 n3_10014 n3_10015 n3_10017).include?(t.name)
41
- pending("formulae not yet implemented")
42
- elsif %w(n3_10012).include?(t.name)
37
+ rescue #RSpec::Expectations::ExpectationNotMetError => e
38
+ if %w(n3_10012).include?(t.name)
43
39
  pending("check visually, graph compare times too long")
44
40
  elsif %w(n3_10010).include?(t.name)
45
41
  pending("Not supported in Ruby 1.8")
46
42
  elsif %w(n3_10008 n3_10013).include?(t.name)
47
43
  pending("Isomorphic compare issue")
48
- elsif %w(n3_10016).include?(t.name)
49
- pending("RDF.rb allows literal as predicate")
50
44
  else
51
45
  raise
52
46
  end
@@ -62,34 +56,16 @@ describe RDF::N3::Reader do
62
56
  #puts t.inspect
63
57
  specify "#{t.name}: #{t.about}" do
64
58
  t.run_test do |rdf_string, parser|
65
- if !defined?(::Encoding) && %w(n3_10019 n3_10020).include?(t.name)
66
- pending("Not supported in Ruby 1.8")
67
- return
68
- end
69
- begin
70
- lambda do
71
- t.debug = []
72
- g = RDF::Graph.new
73
- RDF::N3::Reader.new(rdf_string,
74
- :base_uri => t.about,
75
- :strict => true,
76
- :debug => t.debug).each do |statement|
77
- g << statement
78
- end
79
- end.should raise_error(RDF::ReaderError)
80
- rescue Spec::Expectations::ExpectationNotMetError => e
81
- if %w().include?(t.name)
82
- pending("@forAll/@forEach not yet implemented")
83
- elsif %w(n3_10019 n3_10020 n3_20005).include?(t.name.to_s)
84
- pending("formulae not yet implemented")
85
- elsif %w(n3_20000).include?(t.name)
86
- pending("figure out how to tell that these are errors")
87
- elsif %w(n3_20004).include?(t.name)
88
- pending("RDF.rb allows literal as predicate")
89
- else
90
- raise
59
+ lambda do
60
+ t.debug = []
61
+ g = RDF::Graph.new
62
+ RDF::N3::Reader.new(rdf_string,
63
+ :base_uri => t.about,
64
+ :strict => true,
65
+ :debug => t.debug).each do |statement|
66
+ g << statement
91
67
  end
92
- end
68
+ end.should raise_error(RDF::ReaderError)
93
69
  end
94
70
  end
95
71
  end
@@ -22,7 +22,7 @@
22
22
 
23
23
  :n3_10004 a n3test:PositiveParserTest;
24
24
  n3test:description "using no keywords in n3";
25
- n3test:outputDocument <n3/n3parser.tests_n3_10004.nt> ;
25
+ # n3test:outputDocument <n3/n3parser.tests_n3_10004.nt> ;
26
26
  n3test:inputDocument <syntax/keywords2.n3>.
27
27
 
28
28
  :n3_10005 a n3test:PositiveParserTest;
@@ -37,7 +37,7 @@
37
37
 
38
38
  :n3_10007 a n3test:PositiveParserTest;
39
39
  n3test:description "Parse and generate simple contexts";
40
- n3test:outputDocument <n3/n3parser.tests_n3_10007.nt> ;
40
+ # n3test:outputDocument <n3/n3parser.tests_n3_10007.nt> ;
41
41
  n3test:inputDocument <contexts.n3>.
42
42
 
43
43
  :n3_10008 a n3test:PositiveParserTest;
@@ -72,12 +72,12 @@
72
72
 
73
73
  :n3_10014 a n3test:PositiveParserTest;
74
74
  n3test:description "Quick variable syntax, simple";
75
- n3test:outputDocument <n3/n3parser.tests_n3_10014.nt> ;
75
+ # n3test:outputDocument <n3/n3parser.tests_n3_10014.nt> ;
76
76
  n3test:inputDocument <syntax/qvars1.n3> .
77
77
 
78
78
  :n3_10015 a n3test:PositiveParserTest;
79
79
  n3test:description "Quick variable syntax, more";
80
- n3test:outputDocument <n3/n3parser.tests_n3_10015.nt> ;
80
+ # n3test:outputDocument <n3/n3parser.tests_n3_10015.nt> ;
81
81
  n3test:inputDocument <syntax/qvars2.n3> .
82
82
 
83
83
  :n3_10016 a n3test:PositiveParserTest;
@@ -87,7 +87,7 @@
87
87
 
88
88
  :n3_10017 a n3test:PositiveParserTest;
89
89
  n3test:description "parsing and generation of N3 list syntax";
90
- n3test:outputDocument <n3/n3parser.tests_n3_10017.nt> ;
90
+ # n3test:outputDocument <n3/n3parser.tests_n3_10017.nt> ;
91
91
  n3test:inputDocument <lists.n3> .
92
92
 
93
93
  :n3_10018 a n3test:PositiveParserTest;
@@ -147,14 +147,14 @@
147
147
  n3test:description "A predicate cannot be a formula, I hope";
148
148
  n3test:inputDocument <syntax/neg-formula-predicate.n3> .
149
149
 
150
- :n3_10019 a n3test:NegativeParserTest;
151
- n3test:description "Can still read the old 'this log:forSome' syntax?";
152
- n3test:outputDocument <n3/n3parser.tests_n3_10019.nt> ;
153
- n3test:inputDocument <syntax/this-quantifiers.n3> .
154
-
155
- :n3_10020 a n3test:NegativeParserTest;
156
- n3test:description "Can still read the old 'this log:forAll' syntax";
157
- n3test:outputDocument <n3/n3parser.tests_n3_10020.nt> ;
158
- n3test:inputDocument <syntax/this-rules.n3> .
150
+ #:n3_10019 a n3test:NegativeParserTest;
151
+ # n3test:description "Can still read the old 'this log:forSome' syntax?";
152
+ # n3test:outputDocument <n3/n3parser.tests_n3_10019.nt> ;
153
+ # n3test:inputDocument <syntax/this-quantifiers.n3> .
154
+ #
155
+ #:n3_10020 a n3test:NegativeParserTest;
156
+ # n3test:description "Can still read the old 'this log:forAll' syntax";
157
+ # n3test:outputDocument <n3/n3parser.tests_n3_10020.nt> ;
158
+ # n3test:inputDocument <syntax/this-rules.n3> .
159
159
 
160
160
 
@@ -25,7 +25,6 @@
25
25
  description: using no keywords in n3
26
26
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/keywords2.n3
27
27
  name: n3_10004
28
- outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/n3/n3parser.tests_n3_10004.nt
29
28
  rdf_type: PositiveParserTest
30
29
  - !ruby/object:RdfHelper::TestCase
31
30
  about: http://www.w3.org/2000/10/swap/test/syntax/djb1a.n3
@@ -39,7 +38,6 @@
39
38
  description: Parse and generate simple contexts
40
39
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/contexts.n3
41
40
  name: n3_10007
42
- outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/n3/n3parser.tests_n3_10007.nt
43
41
  rdf_type: PositiveParserTest
44
42
  - !ruby/object:RdfHelper::TestCase
45
43
  about: http://www.w3.org/2000/10/swap/test/anon-prop.n3
@@ -87,14 +85,12 @@
87
85
  description: Quick variable syntax, simple
88
86
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/qvars1.n3
89
87
  name: n3_10014
90
- outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/n3/n3parser.tests_n3_10014.nt
91
88
  rdf_type: PositiveParserTest
92
89
  - !ruby/object:RdfHelper::TestCase
93
90
  about: http://www.w3.org/2000/10/swap/test/syntax/qvars2.n3
94
91
  description: Quick variable syntax, more
95
92
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/qvars2.n3
96
93
  name: n3_10015
97
- outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/n3/n3parser.tests_n3_10015.nt
98
94
  rdf_type: PositiveParserTest
99
95
  - !ruby/object:RdfHelper::TestCase
100
96
  about: http://www.w3.org/2000/10/swap/test/syntax/lstring.n3
@@ -108,7 +104,6 @@
108
104
  description: parsing and generation of N3 list syntax
109
105
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/lists.n3
110
106
  name: n3_10017
111
- outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/n3/n3parser.tests_n3_10017.nt
112
107
  rdf_type: PositiveParserTest
113
108
  - !ruby/object:RdfHelper::TestCase
114
109
  about: http://www.w3.org/2000/10/swap/test/syntax/trailing-semicolon.n3
@@ -117,20 +112,6 @@
117
112
  name: n3_10018
118
113
  outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/n3/n3parser.tests_n3_10018.nt
119
114
  rdf_type: PositiveParserTest
120
- - !ruby/object:RdfHelper::TestCase
121
- about: http://www.w3.org/2000/10/swap/test/syntax/this-quantifiers.n3
122
- description: Can still read the old 'this log:forSome' syntax?
123
- inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/this-quantifiers.n3
124
- name: n3_10019
125
- outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/n3/n3parser.tests_n3_10019.nt
126
- rdf_type: NegativeParserTest
127
- - !ruby/object:RdfHelper::TestCase
128
- about: http://www.w3.org/2000/10/swap/test/syntax/this-rules.n3
129
- description: Can still read the old 'this log:forAll' syntax
130
- inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/this-rules.n3
131
- name: n3_10020
132
- outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/n3/n3parser.tests_n3_10020.nt
133
- rdf_type: NegativeParserTest
134
115
  - !ruby/object:RdfHelper::TestCase
135
116
  about: http://www.w3.org/2000/10/swap/test/syntax/equals1.n3
136
117
  description: The = keyword
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
3
 
4
- <rdf:RDF xmlns="http://example.com/swap/test/nodeID/classes.n3#"
4
+ <rdf:RDF xmlns="http://www.w3.org/2000/10/swap/test/nodeID/classes.n3#"
5
5
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
6
6
 
7
7
  <Thing rdf:nodeID="b1">
@@ -0,0 +1,12 @@
1
+ @prefix : <#> .
2
+ @prefix u: <http://www.example.org/utilities#> .
3
+
4
+ :assumption = {:fred u:knows :john .
5
+ :john u:knows :mary .
6
+ } .
7
+
8
+ :conclusion = {:fred u:knows :mary .
9
+ } .
10
+
11
+ :trivialTruth = {} .
12
+
@@ -0,0 +1,33 @@
1
+
2
+
3
+
4
+ <rdf:RDF xmlns:cal="http://nwalsh.com/pim/Palm/Calendar#"
5
+ xmlns:da="file:/home79536262/ndw/.xmlDate.rdf#"
6
+ xmlns:log="http://www.w3.org/2000/10/swap/log#"
7
+ xmlns:palm="http://nwalsh.com/pim/Palm/DateBook#"
8
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
10
+
11
+ <rdf:Description rdf:about="http://nwalsh.com/pim/Palm/Calendar#_2002_2">
12
+ <da:appointments rdf:parseType="Resource">
13
+ <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"/>
14
+ <rdf:_1 rdf:resource="file:/home79536262/ndw/.xmlDate.rdf#id166"/>
15
+ <rdf:_2 rdf:resource="file:/home79536262/ndw/.xmlDate.rdf#id172"/>
16
+ <rdf:_3 rdf:resource="file:/home79536262/ndw/.xmlDate.rdf#id93"/>
17
+ <rdf:_4 rdf:resource="file:/home79536262/ndw/.xmlDate.rdf#id193"/>
18
+ <rdf:_5 rdf:resource="file:/home79536262/ndw/.xmlDate.rdf#id192"/>
19
+ <rdf:_6 rdf:resource="file:/home79536262/ndw/.xmlDate.rdf#id104"/>
20
+ <rdf:_7 rdf:resource="file:/home79536262/ndw/.xmlDate.rdf#id157"/>
21
+ <rdf:_8 rdf:resource="file:/home79536262/ndw/.xmlDate.rdf#id32"/>
22
+ </da:appointments>
23
+ <cal:month>2</cal:month>
24
+ <cal:year>2002</cal:year>
25
+ <rdf:Seq rdf:parseType="Resource">
26
+ <rdf:_1 rdf:resource="http://nwalsh.com/pim/Palm/Calendar#_week_2002_2_1"/>
27
+ <rdf:_2 rdf:resource="http://nwalsh.com/pim/Palm/Calendar#_week_2002_2_2"/>
28
+ <rdf:_3 rdf:resource="http://nwalsh.com/pim/Palm/Calendar#_week_2002_2_3"/>
29
+ <rdf:_4 rdf:resource="http://nwalsh.com/pim/Palm/Calendar#_week_2002_2_4"/>
30
+ <rdf:_5 rdf:resource="http://nwalsh.com/pim/Palm/Calendar#_week_2002_2_5"/>
31
+ </rdf:Seq>
32
+ </rdf:Description>
33
+ </rdf:RDF>
@@ -7,7 +7,6 @@ How much should be there?
7
7
  in python is sufficiently deployed
8
8
  (e.g. python on tux doesn't grok,
9
9
  nor does pythonwin on TimBL's laptop).
10
-
11
10
  """ .
12
11
 
13
12
  :martin :surname "D\u00FCrst" .
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
3
 
4
- <rdf:RDF xmlns="http://example.com/swap/test/xml-syntax/basic-serialization.n3#"
4
+ <rdf:RDF xmlns="http://www.w3.org/2000/10/swap/test/xml-syntax/basic-serialization.n3#"
5
5
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
6
6
 
7
7
  <rdf:Description rdf:about="#s">
@@ -120,11 +120,11 @@
120
120
  test:description "A loop of anonymous nodes wasn't being printed at all";
121
121
  test:arguments """anonymous_loop.n3""".
122
122
 
123
- :t1008 a test:CwmTest, test:CwmProofTest;
124
- test:referenceOutput <ref/daml-ont.n3>;
125
- n3test:inputDocument <daml-pref.n3> ;
126
- test:description "Convert some RDF/XML into RDF/N3";
127
- test:arguments """daml-pref.n3 -rdf daml-ont.rdf -n3""".
123
+ #:t1008 a test:CwmTest, test:CwmProofTest;
124
+ # test:referenceOutput <ref/daml-ont.n3>;
125
+ # n3test:inputDocument <daml-pref.n3> ;
126
+ # test:description "Convert some RDF/XML into RDF/N3";
127
+ # test:arguments """daml-pref.n3 -rdf daml-ont.rdf -n3""".
128
128
 
129
129
  :t1008a a test:CwmTest, test:CwmProofTest;
130
130
  test:referenceOutput <ref/colon-in-uri.n3>;
@@ -4,90 +4,105 @@
4
4
  description: Parse a small RDF file, generate N3
5
5
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/animal.rdf
6
6
  name: t1001
7
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/animal.n3
7
8
  rdf_type: CwmProofTest
8
9
  - !ruby/object:RdfHelper::TestCase
9
10
  about: http://www.w3.org/2000/10/swap/test/xml-syntax/xml_prefix.n3
10
11
  description: "Do not redefine the xml: prefix"
11
12
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/xml-syntax/xml_prefix.n3
12
13
  name: t1002a
14
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/xml-redefine.rdf
13
15
  rdf_type: CwmTest
14
16
  - !ruby/object:RdfHelper::TestCase
15
17
  about: http://www.w3.org/2000/10/swap/test/xml-syntax/xmlbase3.rdf
16
18
  description: Allow for relative xml:base
17
19
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/xml-syntax/xmlbase3.rdf
18
20
  name: t1002b
21
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/xml-base3.n3
19
22
  rdf_type: CwmProofTest
20
23
  - !ruby/object:RdfHelper::TestCase
21
24
  about: http://www.w3.org/2000/10/swap/test/xml-syntax/xml_prefix2.n3
22
25
  description: "do not redefine xml: and xmlns: even if told told"
23
26
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/xml-syntax/xml_prefix2.n3
24
27
  name: t1002c
28
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/xml-redefine2.rdf
25
29
  rdf_type: CwmProofTest
26
30
  - !ruby/object:RdfHelper::TestCase
27
31
  about: http://www.w3.org/2000/10/swap/test/xml-syntax/rdf_prefix.n3
28
32
  description: "Allow for redefinition of rdf:"
29
33
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/xml-syntax/rdf_prefix.n3
30
34
  name: t1002d
35
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/rdf-redefine.rdf
31
36
  rdf_type: CwmTest
32
37
  - !ruby/object:RdfHelper::TestCase
33
38
  about: http://www.w3.org/2000/10/swap/test/xml-syntax/xmllit.rdf
34
39
  description: rdf:parseType="Literal"
35
40
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/xml-syntax/xmllit.rdf
36
41
  name: t1002e
42
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/xmllit.nt
37
43
  rdf_type: CwmTest
38
44
  - !ruby/object:RdfHelper::TestCase
39
45
  about: http://www.w3.org/2000/10/swap/test/xml-syntax/in-xml.xml
40
46
  description: Parse RDF embedded in foreign XML
41
47
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/xml-syntax/in-xml.xml
42
48
  name: t1003
49
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/in-xml-t.n3
43
50
  rdf_type: CwmTest
44
51
  - !ruby/object:RdfHelper::TestCase
45
52
  about: http://www.w3.org/2000/10/swap/test/reluri-1.n3
46
53
  description: test generation of relative URIs
47
54
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/reluri-1.n3
48
55
  name: t1005
56
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/reluri-1.rdf
49
57
  rdf_type: CwmTest
50
58
  - !ruby/object:RdfHelper::TestCase
51
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/no-last-nl.n3
59
+ about: http://www.w3.org/2000/10/swap/test/syntax/no-last-nl.n3
52
60
  description: An N3 file with no final newline character
53
61
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/no-last-nl.n3
54
62
  name: t1005a
63
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/no-last-nl.n3
55
64
  rdf_type: CwmProofTest
56
65
  - !ruby/object:RdfHelper::TestCase
57
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/dot-dash.n3
66
+ about: http://www.w3.org/2000/10/swap/test/syntax/dot-dash.n3
58
67
  description: combinations of - and _ in identifiers
59
68
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/dot-dash.n3
60
69
  name: t1005b
70
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/dot-dash.n3
61
71
  rdf_type: CwmProofTest
62
72
  - !ruby/object:RdfHelper::TestCase
63
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/keywords1.n3
73
+ about: http://www.w3.org/2000/10/swap/test/syntax/keywords1.n3
64
74
  description: "@keywords in n3"
65
75
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/keywords1.n3
66
76
  name: t1005c
77
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/keywords1.n3
67
78
  rdf_type: CwmProofTest
68
79
  - !ruby/object:RdfHelper::TestCase
69
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/keywords2.n3
80
+ about: http://www.w3.org/2000/10/swap/test/syntax/keywords2.n3
70
81
  description: using no keywords in n3
71
82
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/keywords2.n3
72
83
  name: t1005d
84
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/keywords2.n3
73
85
  rdf_type: CwmProofTest
74
86
  - !ruby/object:RdfHelper::TestCase
75
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/djb1a.n3
87
+ about: http://www.w3.org/2000/10/swap/test/syntax/djb1a.n3
76
88
  description: djb noticed a:b was parsed as rdf:type token
77
89
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/djb1a.n3
78
90
  name: t1005e
91
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/djb1a-out.n3
79
92
  rdf_type: CwmProofTest
80
93
  - !ruby/object:RdfHelper::TestCase
81
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/contexts.n3
94
+ about: http://www.w3.org/2000/10/swap/test/contexts.n3
82
95
  description: Parse and generate simple contexts
83
96
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/contexts.n3
84
97
  name: t1006
98
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/contexts-1.n3
85
99
  rdf_type: CwmProofTest
86
100
  - !ruby/object:RdfHelper::TestCase
87
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/anon-prop.n3
101
+ about: http://www.w3.org/2000/10/swap/test/anon-prop.n3
88
102
  description: Parse and regen anonymous property
89
103
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/anon-prop.n3
90
104
  name: t1007
105
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/anon-prop-1.n3
91
106
  rdf_type: CwmProofTest
92
107
  status: pending
93
108
  - !ruby/object:RdfHelper::TestCase
@@ -95,54 +110,56 @@
95
110
  description: Parse RDF/XML nodeID to N3
96
111
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/nodeID/ex1.rdf
97
112
  name: t1007a
113
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/bnode.n3
98
114
  rdf_type: CwmProofTest
99
115
  - !ruby/object:RdfHelper::TestCase
100
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/nodeID/ex1.rdf
116
+ about: http://www.w3.org/2000/10/swap/test/nodeID/ex1.rdf
101
117
  description: Parse RDF/XML nodeID and regen RDF/XML
102
118
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/nodeID/ex1.rdf
103
119
  name: t1007b
120
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/bnode.rdf
104
121
  rdf_type: CwmTest
105
122
  - !ruby/object:RdfHelper::TestCase
106
123
  about: http://www.w3.org/2000/10/swap/test/nodeID/classes.n3
107
124
  description: use nodeID's with classes
108
125
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/nodeID/classes.n3
109
126
  name: t1007c
127
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/nodeID/classes.ref.rdf
110
128
  rdf_type: CwmTest
111
129
  - !ruby/object:RdfHelper::TestCase
112
130
  about: http://www.w3.org/2000/10/swap/test/anonymous_loop.n3
113
131
  description: A loop of anonymous nodes wasn't being printed at all
114
132
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/anonymous_loop.n3
115
133
  name: t1007d
116
- rdf_type: CwmProofTest
117
- - !ruby/object:RdfHelper::TestCase
118
- about: http://www.w3.org/2000/10/swap/test/daml-pref.n3
119
- description: Convert some RDF/XML into RDF/N3
120
- inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/daml-pref.n3
121
- name: t1008
134
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/anonymous_loop.ref
122
135
  rdf_type: CwmProofTest
123
136
  - !ruby/object:RdfHelper::TestCase
124
137
  about: http://www.w3.org/2000/10/swap/test/syntax/colon-in-uri.rdf
125
138
  description: When rdf/xml localnames are not valid qNames
126
139
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/colon-in-uri.rdf
127
140
  name: t1008a
141
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/colon-in-uri.n3
128
142
  rdf_type: CwmProofTest
129
143
  - !ruby/object:RdfHelper::TestCase
130
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/strquot.n3
144
+ about: http://www.w3.org/2000/10/swap/test/strquot.n3
131
145
  description: N3 string quoting with escaping
132
146
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/strquot.n3
133
147
  name: t1009
148
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/strquot.n3
134
149
  rdf_type: CwmTest
135
150
  - !ruby/object:RdfHelper::TestCase
136
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/strquot.n3
151
+ about: http://www.w3.org/2000/10/swap/test/strquot.n3
137
152
  description: N3 string quoting with utf-8 literals
138
153
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/strquot.n3
139
154
  name: t1009aa
155
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/strquot_a.n3
140
156
  rdf_type: CwmProofTest
141
157
  - !ruby/object:RdfHelper::TestCase
142
158
  about: http://www.w3.org/2000/10/swap/test/i18n/n3string.n3
143
159
  description: log:n3string genertating utf-8 literals was double encoding
144
160
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/i18n/n3string.n3
145
161
  name: t1009ab
162
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/n3string.n3
146
163
  rdf_type: CwmProofTest
147
164
  status: pending
148
165
  - !ruby/object:RdfHelper::TestCase
@@ -150,77 +167,90 @@
150
167
  description: XML to XML with utf-8 non-ascii characters
151
168
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/xml-syntax/non-ascii-pred.rdf
152
169
  name: t1009b
170
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/xml-syntax/non-ascii-pred.rdf
153
171
  rdf_type: CwmProofTest
154
172
  - !ruby/object:RdfHelper::TestCase
155
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/path1.n3
173
+ about: http://www.w3.org/2000/10/swap/test/syntax/path1.n3
156
174
  description: Path syntax, simple
157
175
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/path1.n3
158
176
  name: t1010
177
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/path1.n3
159
178
  rdf_type: CwmProofTest
160
179
  - !ruby/object:RdfHelper::TestCase
161
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/path2.n3
180
+ about: http://www.w3.org/2000/10/swap/test/syntax/path2.n3
162
181
  description: Path syntax, more
163
182
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/path2.n3
164
183
  name: t1011
184
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/path2.n3
165
185
  rdf_type: CwmProofTest
166
186
  status: pending
167
187
  - !ruby/object:RdfHelper::TestCase
168
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/numbers.n3
188
+ about: http://www.w3.org/2000/10/swap/test/syntax/numbers.n3
169
189
  description: Number syntax
170
190
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/numbers.n3
171
191
  name: t10115
192
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/numbers.n3
172
193
  rdf_type: CwmProofTest
173
194
  - !ruby/object:RdfHelper::TestCase
174
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/lstring.n3
195
+ about: http://www.w3.org/2000/10/swap/test/syntax/lstring.n3
175
196
  description: N3 string nested triple quoting
176
197
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/syntax/lstring.n3
177
198
  name: t1014
199
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/lstring-out.n3
178
200
  rdf_type: CwmProofTest
179
201
  - !ruby/object:RdfHelper::TestCase
180
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/lists.n3
202
+ about: http://www.w3.org/2000/10/swap/test/lists.n3
181
203
  description: parsing and generation of N3 list syntax
182
204
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/lists.n3
183
205
  name: t1017
206
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/lists.n3
184
207
  rdf_type: CwmProofTest
185
208
  - !ruby/object:RdfHelper::TestCase
186
209
  about: http://www.w3.org/2000/10/swap/test/lists-simple.n3
187
210
  description: conversion of subset of N3 list syntax to RDF
188
211
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/lists-simple.n3
189
212
  name: t1018
213
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/lists-simple-1.rdf
190
214
  rdf_type: CwmTest
191
215
  - !ruby/object:RdfHelper::TestCase
192
216
  about: http://www.w3.org/2000/10/swap/test/list/itemType.rdf
193
217
  description: make sure typeNodes in RDF/XML Collections are parsed
194
218
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/list/itemType.rdf
195
219
  name: t1018a1
220
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/itemType.n3
196
221
  rdf_type: CwmProofTest
197
222
  - !ruby/object:RdfHelper::TestCase
198
223
  about: http://www.w3.org/2000/10/swap/test/norm/fix.rdf
199
224
  description: Avoiding default namespace on attrs
200
225
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/norm/fix.rdf
201
226
  name: t1019
227
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/prefix1.rdf
202
228
  rdf_type: CwmProofTest
203
229
  - !ruby/object:RdfHelper::TestCase
204
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/norm/fix.rdf
230
+ about: http://www.w3.org/2000/10/swap/test/norm/fix.rdf
205
231
  description: Avoiding default namespace on attrs
206
232
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/norm/fix.rdf
207
233
  name: t1020
234
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/prefix2.rdf
208
235
  rdf_type: CwmTest
209
236
  - !ruby/object:RdfHelper::TestCase
210
- about: /Users/gregg/Projects/rdf-n3/spec/swap_test/norm/fix.rdf
237
+ about: http://www.w3.org/2000/10/swap/test/norm/fix.rdf
211
238
  description: Avoiding default namespace on attrs
212
239
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/norm/fix.rdf
213
240
  name: t1021
241
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/prefix3.rdf
214
242
  rdf_type: CwmTest
215
243
  - !ruby/object:RdfHelper::TestCase
216
244
  about: http://www.w3.org/2000/10/swap/test/owl-ex.rdf
217
245
  description: Early DAML (now OWL) example in XML/RDF
218
246
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/owl-ex.rdf
219
247
  name: t1022
248
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/daml-ex.n3
220
249
  rdf_type: CwmProofTest
221
250
  - !ruby/object:RdfHelper::TestCase
222
251
  about: http://www.w3.org/2000/10/swap/test/xml-syntax/basic-serialization.n3
223
252
  description: extremely basic RDF serialization test
224
253
  inputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/xml-syntax/basic-serialization.n3
225
254
  name: t1063
255
+ outputDocument: /Users/gregg/Projects/rdf-n3/spec/swap_test/ref/xml-syntax-basic-serialization.rdf
226
256
  rdf_type: CwmTest