1#!../../src/xotclsh
2# $Id: xoRDF.test,v 1.5 2007/08/14 16:38:27 neumann Exp $
3#
4package require XOTcl 1; namespace import -force xotcl::*
5
6lappend auto_path [file dir [info script]]/..
7#package require xotcl::test
8#package require package;package verbose 1
9package require xotcl::rdf::parser
10package require xotcl::rdf::recreatorVisitor
11package require xotcl::rdf::triple
12
13proc errorCheck {expected result msg} {
14  set expected [string trim $expected \n]
15  set result [string trim $result \n]
16  foreach e [split $expected \n] r [split $result \n] {
17    set e [string trim $e]
18    set r [string trim $r]
19    if {$e != $r} {
20      puts stderr "FAILED: $msg\nGot:      '$r'\nExpected: '$e'"
21      puts stderr "Full Result:\n$result"
22      puts stderr "RAW Triples:"
23      foreach t [lsort [tripleVisitor::db getTriples]] {
24	puts -nonewline stderr [$t dump]
25      }
26      exit -1
27      return
28    }
29  }
30}
31
32Class TestVisitor -superclass NodeTreeVisitor
33TestVisitor instproc visit objName {
34  my append result [string trim [$objName print]] \n
35}
36TestVisitor instproc interpretNodeTree {node} {
37  my set result ""
38  $node accept [self]
39  return [my set result]
40}
41
42TestVisitor testVisitor
43RDFRecreatorVisitor reVisitor
44TripleVisitor tripleVisitor
45tripleVisitor proc interpret {parser topNode {asBag 1}} {
46  set result ""
47  my descriptionAsBag $asBag
48  my reset
49  my interpretNodeTree $topNode
50  return [[self]::db prettyTriples]
51  #  foreach t [lsort [[self]::db getTriples]] {
52  #    append result [string trim [$t dump]]\n
53  #  }
54  #  return $result
55}
56
57RDFParser rp
58rp proc time {cmd time} {
59  upvar $time ms
60  regexp {^(-?[0-9]+) } [::time {set r [eval $cmd]}] _ ms
61  return $r
62}
63
64rp proc test {name text nodeResult tripleResult {descriptionAsBagResult ""}} {
65  my reset
66  foreach time {nodeTime recreateTime tripleTime} {
67    if {![my exists $time]} {my set $time 0}
68  }
69  my parse $text
70  set r [rp time [list testVisitor interpretNodeTree [self]::topNode1] ct]
71  regsub -all "[self]::topNode1" $r "" r
72  ::errorCheck $nodeResult $r "RDF Node Creation: $name"
73  
74  #set r [time [list reVisitor interpretNodeTree [self]::topNode1] rt]
75  #::errorCheck $recreateResult $r "RDF Recreation: $name"
76  set r [rp time [list tripleVisitor interpret rp [self]::topNode1 0] tt]
77  ::errorCheck $tripleResult $r "RDF Triples: $name"
78  if {$descriptionAsBagResult != ""} {
79    set r [tripleVisitor interpret rp [self]::topNode1 1]
80    ::errorCheck $descriptionAsBagResult $r "RDF Triples -- Description as Bag: $name"
81  }
82
83  # test recreation by recreating XML text and by parsing 
84  # and testing it again
85  set recreatedText [rp time [list reVisitor interpretNodeTree [self]::topNode1] rt]
86  [self]::topNode1 destroy
87
88  my reset
89  my parse $recreatedText
90
91  #puts "RECREATED: \n$recreatedText"
92
93  # test recreated node tree
94  set r [testVisitor interpretNodeTree [self]::topNode1]
95  regsub -all "[self]::topNode1" $r "" r
96  ::errorCheck $nodeResult $r "RDF Node Recreation: $name"
97  set r [tripleVisitor interpret rp [self]::topNode1 0]
98
99  ::errorCheck $tripleResult $r "RDF Triple Recreation: $name"
100
101  my incr nodeTime $ct
102  my incr recreateTime $rt
103  my incr tripleTime $tt
104  puts "PASSED: $name ($ct + $rt + $tt)"
105}
106
107##############################################################################
108rp test "Namespace" {<?xml version="1.0"?>
109  <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
110    <Description about="http://www.w3.org/Home/Lassila">
111      <s:Creator xmlns:s="http://description.org/schema/">
112        <Description xmlns="http://xyz.com/" ID="nsd">
113          <s:ABC>xyz</s:ABC>
114          <fromXYZ>dfg</fromXYZ>
115        </Description>
116      </s:Creator>
117    </Description>
118  </RDF>
119} {
120::xotcl::rdf::parser::RDFTag- --- RDF
121::xotcl::rdf::parser::RDFDescription-::res1 --- Description
122ATTR: about = http://www.w3.org/Home/Lassila
123::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
124::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- Description
125ATTR: ID = nsd
126::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- s:ABC
127PCDATA:
128xyz
129::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- fromXYZ
130PCDATA:
131dfg
132}  {
133   http://www.w3.org/Home/Lassila      http://description.org/schema/Creator nsd
134   nsd                                 http://description.org/schema/ABC xyz
135   nsd                                 http://xyz.com/fromXYZ    dfg
136}
137
138##############################################################################
139rp test descriptionNestedNS {
140  <rdf:RDF  xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
141    <rdf:Description about="http://www.w3.org/Home/Lassila"
142                     xmlns:s = "http://description.org/schema/">
143      <s:Creator>Ora Lassila</s:Creator>
144    </rdf:Description>
145  </rdf:RDF>
146} {
147::xotcl::rdf::parser::RDFTag- --- rdf:RDF
148::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
149ATTR: about = http://www.w3.org/Home/Lassila
150::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
151PCDATA:
152Ora Lassila
153} {
154   http://www.w3.org/Home/Lassila      http://description.org/schema/Creator Ora Lassila
155} {
156   http://www.w3.org/Home/Lassila      http://description.org/schema/Creator Ora Lassila
157
158=================== unreferenced:
159     rdfdoc#id1                          #type                     #Bag
160   rdfdoc#id1                          #_1                       rdfdoc#id2
161     rdfdoc#id2                          #predicate                http://description.org/schema/Creator
162     rdfdoc#id2                          #subject                  http://www.w3.org/Home/Lassila
163     rdfdoc#id2                          #object                   Ora Lassila
164     rdfdoc#id2                          #type                     #Statement
165}
166
167##############################################################################
168rp test NSDescription {<?xml version="1.0"?>
169  <rdf:RDF
170    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
171    xmlns:s="http://description.org/schema/">
172    <rdf:Description about="http://www.w3.org/Home/Lassila">
173      <s:Creator>Ora Lassila</s:Creator>
174    </rdf:Description>
175  </rdf:RDF>
176} {
177::xotcl::rdf::parser::RDFTag- --- rdf:RDF
178::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
179ATTR: about = http://www.w3.org/Home/Lassila
180::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
181PCDATA:
182Ora Lassila
183} {
184  http://www.w3.org/Home/Lassila      http://description.org/schema/Creator Ora Lassila
185}
186
187##############################################################################
188rp test PropertyAttr {
189  <rdf:RDF>
190    <rdf:Description about="http://www.w3.org/Home/Lassila"
191                     s:Creator="Ora Lassila" />
192  </rdf:RDF>
193} {
194::xotcl::rdf::parser::RDFTag- --- rdf:RDF
195::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
196ATTR: about = http://www.w3.org/Home/Lassila
197::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
198PCDATA:
199Ora Lassila
200} {
201   http://www.w3.org/Home/Lassila      s:Creator                 Ora Lassila
202}
203
204##############################################################################
205rp test properties {
206  <rdf:RDF>
207    <rdf:Description about="http://www.w3.org">
208      <s:Publisher>World Wide Web Consortium</s:Publisher>
209      <s:Title>W3C Home Page</s:Title>
210      <s:Date>1998-10-03T02:27</s:Date>
211    </rdf:Description>
212  </rdf:RDF>
213} {
214::xotcl::rdf::parser::RDFTag- --- rdf:RDF
215::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
216ATTR: about = http://www.w3.org
217::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Publisher
218PCDATA:
219World Wide Web Consortium
220::xotcl::rdf::parser::RDFProperty-::res1::prop2 --- s:Title
221PCDATA:
222W3C Home Page
223::xotcl::rdf::parser::RDFProperty-::res1::prop3 --- s:Date
224PCDATA:
2251998-10-03T02:27
226} {
227   http://www.w3.org                   s:Publisher               World Wide Web Consortium
228   http://www.w3.org                   s:Title                   W3C Home Page
229   http://www.w3.org                   s:Date                    1998-10-03T02:27
230}
231
232##############################################################################
233rp test propertyAttr2 {
234  <rdf:RDF>
235    <rdf:Description about="http://www.w3.org"
236         s:Publisher="World Wide Web Consortium"
237         s:Title="W3C Home Page"
238         s:Date="1998-10-03T02:27"/>
239  </rdf:RDF>
240} {
241::xotcl::rdf::parser::RDFTag- --- rdf:RDF
242::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
243ATTR: about = http://www.w3.org
244::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Publisher
245PCDATA:
246World Wide Web Consortium
247::xotcl::rdf::parser::RDFProperty-::res1::prop2 --- s:Title
248PCDATA:
249W3C Home Page
250::xotcl::rdf::parser::RDFProperty-::res1::prop3 --- s:Date
251PCDATA:
2521998-10-03T02:27
253} {
254   http://www.w3.org                   s:Publisher               World Wide Web Consortium
255   http://www.w3.org                   s:Title                   W3C Home Page
256   http://www.w3.org                   s:Date                    1998-10-03T02:27
257}
258
259##############################################################################
260rp test bag1 {
261<rdf:RDF>
262   <rdf:Description about="http://mycollege.edu/courses/6.001">
263     <s:students>
264       <rdf:Bag>
265         <rdf:li resource="http://mycollege.edu/students/Amy"/>
266         <rdf:li resource="http://mycollege.edu/students/Tim"/>
267         <rdf:li resource="http://mycollege.edu/students/John"/>
268         <rdf:li resource="http://mycollege.edu/students/Mary"/>
269         <rdf:li resource="http://mycollege.edu/students/Sue"/>
270       </rdf:Bag>
271     </s:students>
272   </rdf:Description>
273</rdf:RDF>
274} {
275::xotcl::rdf::parser::RDFTag- --- rdf:RDF
276::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
277ATTR: about = http://mycollege.edu/courses/6.001
278::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:students
279::xotcl::rdf::parser::RDFBag-::res1::prop1::res1 --- rdf:Bag
280TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
281::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop1 --- rdf:li
282ATTR: resource = http://mycollege.edu/students/Amy
283MEMBER-INDEX: rdf:_1
284::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop2 --- rdf:li
285ATTR: resource = http://mycollege.edu/students/Tim
286MEMBER-INDEX: rdf:_2
287::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop3 --- rdf:li
288ATTR: resource = http://mycollege.edu/students/John
289MEMBER-INDEX: rdf:_3
290::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop4 --- rdf:li
291ATTR: resource = http://mycollege.edu/students/Mary
292MEMBER-INDEX: rdf:_4
293::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop5 --- rdf:li
294ATTR: resource = http://mycollege.edu/students/Sue
295MEMBER-INDEX: rdf:_5                             
296} {
297   http://mycollege.edu/courses/6.001  s:students                rdfdoc#id2
298     rdfdoc#id2                          #type                     #Bag
299     rdfdoc#id2                          #_1                       http://mycollege.edu/students/Amy
300     rdfdoc#id2                          #_2                       http://mycollege.edu/students/Tim
301     rdfdoc#id2                          #_3                       http://mycollege.edu/students/John
302     rdfdoc#id2                          #_4                       http://mycollege.edu/students/Mary
303     rdfdoc#id2                          #_5                       http://mycollege.edu/students/Sue
304}
305
306
307##############################################################################
308rp test bagGivenAsType1 {
309<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
310   <rdf:Description about="http://mycollege.edu/courses/6.001">
311     <s:students>
312       <rdf:Description>
313         <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/>
314         <rdf:li resource="http://mycollege.edu/students/Amy"/>
315         <rdf:li resource="http://mycollege.edu/students/Tim"/>
316         <rdf:li resource="http://mycollege.edu/students/John"/>
317         <rdf:li resource="http://mycollege.edu/students/Mary"/>
318         <rdf:li resource="http://mycollege.edu/students/Sue"/>
319       </rdf:Description>
320     </s:students>
321   </rdf:Description>
322</rdf:RDF>
323} {
324::xotcl::rdf::parser::RDFTag- --- rdf:RDF
325::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
326ATTR: about = http://mycollege.edu/courses/6.001
327::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:students
328::xotcl::rdf::parser::RDFBag-::res1::prop1::res1 --- rdf:Bag
329TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
330::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop1 --- rdf:li
331ATTR: resource = http://mycollege.edu/students/Amy
332MEMBER-INDEX: rdf:_1
333::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop2 --- rdf:li
334ATTR: resource = http://mycollege.edu/students/Tim
335MEMBER-INDEX: rdf:_2
336::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop3 --- rdf:li
337ATTR: resource = http://mycollege.edu/students/John
338MEMBER-INDEX: rdf:_3
339::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop4 --- rdf:li
340ATTR: resource = http://mycollege.edu/students/Mary
341MEMBER-INDEX: rdf:_4
342::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop5 --- rdf:li
343ATTR: resource = http://mycollege.edu/students/Sue
344MEMBER-INDEX: rdf:_5
345} {
346   http://mycollege.edu/courses/6.001  s:students                rdfdoc#id2
347     rdfdoc#id2                          #type                     #Bag
348     rdfdoc#id2                          #_1                       http://mycollege.edu/students/Amy
349     rdfdoc#id2                          #_2                       http://mycollege.edu/students/Tim
350     rdfdoc#id2                          #_3                       http://mycollege.edu/students/John
351     rdfdoc#id2                          #_4                       http://mycollege.edu/students/Mary
352     rdfdoc#id2                          #_5                       http://mycollege.edu/students/Sue
353}
354
355##############################################################################
356rp test bagGivenAsType2 {
357<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
358   <rdf:Description about="http://mycollege.edu/courses/6.001">
359     <s:students>
360       <rdf:Description>
361         <rdf:li resource="http://mycollege.edu/students/Amy"/>
362         <rdf:li resource="http://mycollege.edu/students/Tim"/>
363         <rdf:li resource="http://mycollege.edu/students/John"/>
364         <rdf:li resource="http://mycollege.edu/students/Mary"/>
365         <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/>
366         <rdf:li resource="http://mycollege.edu/students/Sue"/>
367       </rdf:Description>
368     </s:students>
369   </rdf:Description>
370</rdf:RDF>
371} {
372::xotcl::rdf::parser::RDFTag- --- rdf:RDF
373::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
374ATTR: about = http://mycollege.edu/courses/6.001
375::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:students
376::xotcl::rdf::parser::RDFBag-::res1::prop1::res1 --- rdf:Bag
377TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
378::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop1 --- rdf:li
379ATTR: resource = http://mycollege.edu/students/Amy
380MEMBER-INDEX: rdf:_1
381::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop2 --- rdf:li
382ATTR: resource = http://mycollege.edu/students/Tim
383MEMBER-INDEX: rdf:_2
384::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop3 --- rdf:li
385ATTR: resource = http://mycollege.edu/students/John
386MEMBER-INDEX: rdf:_3
387::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop4 --- rdf:li
388ATTR: resource = http://mycollege.edu/students/Mary
389MEMBER-INDEX: rdf:_4
390::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop5 --- rdf:li
391ATTR: resource = http://mycollege.edu/students/Sue
392MEMBER-INDEX: rdf:_5
393} {
394   http://mycollege.edu/courses/6.001  s:students                rdfdoc#id2
395     rdfdoc#id2                          #type                     #Bag
396     rdfdoc#id2                          #_1                       http://mycollege.edu/students/Amy
397     rdfdoc#id2                          #_2                       http://mycollege.edu/students/Tim
398     rdfdoc#id2                          #_3                       http://mycollege.edu/students/John
399     rdfdoc#id2                          #_4                       http://mycollege.edu/students/Mary
400     rdfdoc#id2                          #_5                       http://mycollege.edu/students/Sue
401}
402
403
404##############################################################################
405rp test bagAndAltGivenAsType {
406<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
407   <rdf:Description about="http://mycollege.edu/courses/6.001">
408     <s:students>
409       <rdf:Description>
410         <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt"/>
411         <rdf:li resource="http://mycollege.edu/students/Amy"/>
412         <rdf:li resource="http://mycollege.edu/students/Tim"/>
413         <rdf:li resource="http://mycollege.edu/students/John"/>
414         <rdf:li resource="http://mycollege.edu/students/Mary"/>
415         <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/>
416         <rdf:li resource="http://mycollege.edu/students/Sue"/>
417       </rdf:Description>
418     </s:students>
419   </rdf:Description>
420</rdf:RDF>
421} {
422::xotcl::rdf::parser::RDFTag- --- rdf:RDF
423::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
424ATTR: about = http://mycollege.edu/courses/6.001
425::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:students
426::xotcl::rdf::parser::RDFAlt-::res1::prop1::res1 --- rdf:Alt
427TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
428::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop1 --- rdf:li
429ATTR: resource = http://mycollege.edu/students/Amy
430MEMBER-INDEX: rdf:_1
431::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop2 --- rdf:li
432ATTR: resource = http://mycollege.edu/students/Tim
433MEMBER-INDEX: rdf:_2
434::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop3 --- rdf:li
435ATTR: resource = http://mycollege.edu/students/John
436MEMBER-INDEX: rdf:_3
437::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop4 --- rdf:li
438ATTR: resource = http://mycollege.edu/students/Mary
439MEMBER-INDEX: rdf:_4
440::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop5 --- rdf:li
441ATTR: resource = http://mycollege.edu/students/Sue
442MEMBER-INDEX: rdf:_5
443} {
444   http://mycollege.edu/courses/6.001  s:students                rdfdoc#id2
445     rdfdoc#id2                          #type                     #Alt
446     rdfdoc#id2                          #type                     #Bag
447     rdfdoc#id2                          #_1                       http://mycollege.edu/students/Amy
448     rdfdoc#id2                          #_2                       http://mycollege.edu/students/Tim
449     rdfdoc#id2                          #_3                       http://mycollege.edu/students/John
450     rdfdoc#id2                          #_4                       http://mycollege.edu/students/Mary
451     rdfdoc#id2                          #_5                       http://mycollege.edu/students/Sue
452}
453
454##############################################################################
455rp test alt1 {
456  <rdf:RDF>
457    <rdf:Description about="http://x.org/packages/X11">
458      <s:DistributionSite>
459        <rdf:Alt>
460          <rdf:li resource="ftp://ftp.x.org"/>
461          <rdf:li resource="ftp://ftp.cs.purdue.edu"/>
462          <rdf:li resource="ftp://ftp.eu.net"/>
463        </rdf:Alt>
464      </s:DistributionSite>
465    </rdf:Description>
466  </rdf:RDF>
467} {
468::xotcl::rdf::parser::RDFTag- --- rdf:RDF
469::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
470ATTR: about = http://x.org/packages/X11
471::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:DistributionSite
472::xotcl::rdf::parser::RDFAlt-::res1::prop1::res1 --- rdf:Alt
473TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt
474::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop1 --- rdf:li
475ATTR: resource = ftp://ftp.x.org
476MEMBER-INDEX: rdf:_1
477::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop2 --- rdf:li
478ATTR: resource = ftp://ftp.cs.purdue.edu
479MEMBER-INDEX: rdf:_2
480::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop3 --- rdf:li
481ATTR: resource = ftp://ftp.eu.net
482MEMBER-INDEX: rdf:_3
483} {
484   http://x.org/packages/X11           s:DistributionSite        rdfdoc#id2
485     rdfdoc#id2                          #type                     #Alt
486     rdfdoc#id2                          #_1                       ftp://ftp.x.org
487     rdfdoc#id2                          #_2                       ftp://ftp.cs.purdue.edu
488     rdfdoc#id2                          #_3                       ftp://ftp.eu.net
489}
490
491##############################################################################
492rp test bag2 {
493  <rdf:RDF>
494    <rdf:Bag ID="pages">
495      <rdf:li resource="http://foo.org/foo.html" />
496      <rdf:li resource="http://bar.org/bar.html" />
497    </rdf:Bag>
498
499    <rdf:Description about="#pages">
500      <s:Creator>Ora Lassila</s:Creator>
501    </rdf:Description>
502  </rdf:RDF>
503} {
504::xotcl::rdf::parser::RDFTag- --- rdf:RDF
505::xotcl::rdf::parser::RDFBag-::res1 --- rdf:Bag
506ATTR: ID = pages
507TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
508::xotcl::rdf::parser::RDFMember-::res1::prop1 --- rdf:li
509ATTR: resource = http://foo.org/foo.html
510MEMBER-INDEX: rdf:_1
511::xotcl::rdf::parser::RDFMember-::res1::prop2 --- rdf:li
512ATTR: resource = http://bar.org/bar.html
513MEMBER-INDEX: rdf:_2
514::xotcl::rdf::parser::RDFDescription-::res2 --- rdf:Description
515ATTR: about = #pages
516::xotcl::rdf::parser::RDFProperty-::res2::prop1 --- s:Creator
517PCDATA:
518Ora Lassila
519} {
520=================== unreferenced:
521   rdfdoc#pages                        #type                     #Bag
522   rdfdoc#pages                        #_1                       http://foo.org/foo.html
523   rdfdoc#pages                        #_2                       http://bar.org/bar.html
524   rdfdoc#pages                        s:Creator                 Ora Lassila
525}
526
527##############################################################################
528rp test aboutEach  {
529  <rdf:RDF
530    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
531    xmlns:s="http://description.org/schema/">
532  <rdf:Description aboutEachPrefix="http://foo.org/doc">
533    <s:Copyright>(c) 1998, The Foo Organization</s:Copyright>
534  </rdf:Description>
535  <rdf:Description aboutEach="#docpages">
536    <s:Copyright>(c) 1998, The Foo Organization</s:Copyright>
537  </rdf:Description>
538  <rdf:Bag ID="docpages">
539    <rdf:li resource="http://foo.org/doc/page1"/>
540    <rdf:li resource="http://foo.org/doc/page2"/>
541  </rdf:Bag>
542  </rdf:RDF>
543} {
544::xotcl::rdf::parser::RDFTag- --- rdf:RDF
545::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
546ATTR: aboutEachPrefix = http://foo.org/doc
547::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Copyright
548PCDATA:
549(c) 1998, The Foo Organization
550::xotcl::rdf::parser::RDFDescription-::res2 --- rdf:Description
551ATTR: aboutEach = #docpages
552::xotcl::rdf::parser::RDFProperty-::res2::prop1 --- s:Copyright
553PCDATA:
554(c) 1998, The Foo Organization
555::xotcl::rdf::parser::RDFBag-::res3 --- rdf:Bag
556ATTR: ID = docpages
557TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
558::xotcl::rdf::parser::RDFMember-::res3::prop1 --- rdf:li
559ATTR: resource = http://foo.org/doc/page1
560MEMBER-INDEX: rdf:_1
561::xotcl::rdf::parser::RDFMember-::res3::prop2 --- rdf:li
562ATTR: resource = http://foo.org/doc/page2
563MEMBER-INDEX: rdf:_2 
564} {
565   http://foo.org/doc/page1            http://description.org/schema/Copyright (c) 1998, The Foo Organization
566   http://foo.org/doc/page2            http://description.org/schema/Copyright (c) 1998, The Foo Organization
567
568=================== unreferenced:
569   rdfdoc#docpages                     #type                     #Bag
570   rdfdoc#docpages                     #_1                       http://foo.org/doc/page1
571   rdfdoc#docpages                     #_2                       http://foo.org/doc/page2
572}
573
574##############################################################################
575rp test "BagID on List" {<?xml version="1.0"?>
576  <rdf:RDF
577    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
578    xmlns:s="http://description.org/schema/">
579  <rdf:Description aboutEach="#docpages">
580    <s:somebag>
581     <rdf:Bag>
582       <rdf:li resource="http://foo.org/foo.html" />
583       <rdf:li resource="http://bar.org/bar.html" />
584     </rdf:Bag>
585    </s:somebag>
586    <s:Creator>Me</s:Creator>
587  </rdf:Description>
588  <rdf:Bag ID="docpages">
589    <rdf:li resource="http://foo.org/doc/page1"/>
590    <rdf:li resource="http://foo.org/doc/page2"/>
591  </rdf:Bag>
592  </rdf:RDF>
593} {
594::xotcl::rdf::parser::RDFTag- --- rdf:RDF
595::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
596ATTR: aboutEach = #docpages
597::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:somebag
598::xotcl::rdf::parser::RDFBag-::res1::prop1::res1 --- rdf:Bag
599TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
600::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop1 --- rdf:li
601ATTR: resource = http://foo.org/foo.html
602MEMBER-INDEX: rdf:_1
603::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop2 --- rdf:li
604ATTR: resource = http://bar.org/bar.html
605MEMBER-INDEX: rdf:_2
606::xotcl::rdf::parser::RDFProperty-::res1::prop2 --- s:Creator
607PCDATA:
608Me
609::xotcl::rdf::parser::RDFBag-::res2 --- rdf:Bag
610ATTR: ID = docpages
611TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
612::xotcl::rdf::parser::RDFMember-::res2::prop1 --- rdf:li
613ATTR: resource = http://foo.org/doc/page1
614MEMBER-INDEX: rdf:_1
615::xotcl::rdf::parser::RDFMember-::res2::prop2 --- rdf:li
616ATTR: resource = http://foo.org/doc/page2
617MEMBER-INDEX: rdf:_2
618} {
619   http://foo.org/doc/page1            http://description.org/schema/somebag rdfdoc#id2
620     rdfdoc#id2                          #type                     #Bag
621     rdfdoc#id2                          #_1                       http://foo.org/foo.html
622     rdfdoc#id2                          #_2                       http://bar.org/bar.html
623   http://foo.org/doc/page1            http://description.org/schema/Creator Me
624   http://foo.org/doc/page2            http://description.org/schema/somebag rdfdoc#id2
625   http://foo.org/doc/page2            http://description.org/schema/Creator Me
626 
627=================== unreferenced:
628   rdfdoc#docpages                     #type                     #Bag
629   rdfdoc#docpages                     #_1                       http://foo.org/doc/page1
630   rdfdoc#docpages                     #_2                       http://foo.org/doc/page2
631}
632
633##############################################################################
634rp test "Sharing Values" {
635  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
636    <rdf:Seq ID="JSPapersByDate">
637      <rdf:li resource="http://www.dogworld.com/Aug96.doc"/>
638      <rdf:li resource="http://www.webnuts.net/Jan97.html"/>
639      <rdf:li resource="http://www.carchat.com/Sept97.html"/>
640    </rdf:Seq>
641    <rdf:Seq ID="JSPapersBySubj">
642      <rdf:li resource="http://www.carchat.com/Sept97.html"/>
643      <rdf:li resource="http://www.dogworld.com/Aug96.doc"/>
644      <rdf:li resource="http://www.webnuts.net/Jan97.html"/>
645    </rdf:Seq>
646  </rdf:RDF>
647} {
648::xotcl::rdf::parser::RDFTag- --- rdf:RDF
649::xotcl::rdf::parser::RDFSeq-::res1 --- rdf:Seq
650ATTR: ID = JSPapersByDate
651TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq
652::xotcl::rdf::parser::RDFMember-::res1::prop1 --- rdf:li
653ATTR: resource = http://www.dogworld.com/Aug96.doc
654MEMBER-INDEX: rdf:_1
655::xotcl::rdf::parser::RDFMember-::res1::prop2 --- rdf:li
656ATTR: resource = http://www.webnuts.net/Jan97.html
657MEMBER-INDEX: rdf:_2
658::xotcl::rdf::parser::RDFMember-::res1::prop3 --- rdf:li
659ATTR: resource = http://www.carchat.com/Sept97.html
660MEMBER-INDEX: rdf:_3
661::xotcl::rdf::parser::RDFSeq-::res2 --- rdf:Seq
662ATTR: ID = JSPapersBySubj
663TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq
664::xotcl::rdf::parser::RDFMember-::res2::prop1 --- rdf:li
665ATTR: resource = http://www.carchat.com/Sept97.html
666MEMBER-INDEX: rdf:_1
667::xotcl::rdf::parser::RDFMember-::res2::prop2 --- rdf:li
668ATTR: resource = http://www.dogworld.com/Aug96.doc
669MEMBER-INDEX: rdf:_2
670::xotcl::rdf::parser::RDFMember-::res2::prop3 --- rdf:li
671ATTR: resource = http://www.webnuts.net/Jan97.html
672MEMBER-INDEX: rdf:_3
673} {
674=================== unreferenced:
675   rdfdoc#JSPapersByDate               #type                     #Seq
676   rdfdoc#JSPapersByDate               #_1                       http://www.dogworld.com/Aug96.doc
677   rdfdoc#JSPapersByDate               #_2                       http://www.webnuts.net/Jan97.html
678   rdfdoc#JSPapersByDate               #_3                       http://www.carchat.com/Sept97.html
679   rdfdoc#JSPapersBySubj               #type                     #Seq
680   rdfdoc#JSPapersBySubj               #_1                       http://www.carchat.com/Sept97.html
681   rdfdoc#JSPapersBySubj               #_2                       http://www.dogworld.com/Aug96.doc
682   rdfdoc#JSPapersBySubj               #_3                       http://www.webnuts.net/Jan97.html
683}
684
685##############################################################################
686
687rp test "aggregates" {
688  <rdf:RDF
689    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
690    xmlns:dc="http://purl.org/metadata/dublin_core#">
691    <rdf:Description about="http://www.foo.com/cool.html">
692      <dc:Creator>
693        <rdf:Seq ID="CreatorsAlphabeticalBySurname">
694          <rdf:li>Mary Andrew</rdf:li>
695          <rdf:li>Jacky Crystal</rdf:li>
696        </rdf:Seq>
697      </dc:Creator>
698
699      <dc:Identifier>
700        <rdf:Bag ID="MirroredSites">
701          <rdf:li rdf:resource="http://www.foo.com.au/cool.html"/>
702          <rdf:li rdf:resource="http://www.foo.com.it/cool.html"/>
703        </rdf:Bag>
704      </dc:Identifier>
705
706      <dc:Title>
707        <rdf:Alt>
708          <rdf:li xml:lang="en">The Coolest Web Page</rdf:li>
709          <rdf:li xml:lang="it">Il Pagio di Web Fuba</rdf:li>
710        </rdf:Alt>
711      </dc:Title>
712    </rdf:Description>
713  </rdf:RDF>
714} {
715::xotcl::rdf::parser::RDFTag- --- rdf:RDF
716::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
717ATTR: about = http://www.foo.com/cool.html
718::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- dc:Creator
719::xotcl::rdf::parser::RDFSeq-::res1::prop1::res1 --- rdf:Seq
720ATTR: ID = CreatorsAlphabeticalBySurname
721TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq
722::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop1 --- rdf:li
723PCDATA:
724Mary Andrew
725MEMBER-INDEX: rdf:_1
726::xotcl::rdf::parser::RDFMember-::res1::prop1::res1::prop2 --- rdf:li
727PCDATA:
728Jacky Crystal
729MEMBER-INDEX: rdf:_2
730::xotcl::rdf::parser::RDFProperty-::res1::prop2 --- dc:Identifier
731::xotcl::rdf::parser::RDFBag-::res1::prop2::res1 --- rdf:Bag
732ATTR: ID = MirroredSites
733TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
734::xotcl::rdf::parser::RDFMember-::res1::prop2::res1::prop1 --- rdf:li
735ATTR: rdf:resource = http://www.foo.com.au/cool.html
736MEMBER-INDEX: rdf:_1
737::xotcl::rdf::parser::RDFMember-::res1::prop2::res1::prop2 --- rdf:li
738ATTR: rdf:resource = http://www.foo.com.it/cool.html
739MEMBER-INDEX: rdf:_2
740::xotcl::rdf::parser::RDFProperty-::res1::prop3 --- dc:Title
741::xotcl::rdf::parser::RDFAlt-::res1::prop3::res1 --- rdf:Alt
742TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt
743::xotcl::rdf::parser::RDFMember-::res1::prop3::res1::prop1 --- rdf:li
744ATTR: xml:lang = en
745PCDATA:
746The Coolest Web Page
747MEMBER-INDEX: rdf:_1
748::xotcl::rdf::parser::RDFMember-::res1::prop3::res1::prop2 --- rdf:li
749ATTR: xml:lang = it
750PCDATA:
751Il Pagio di Web Fuba
752MEMBER-INDEX: rdf:_2  
753} {
754   http://www.foo.com/cool.html        http://purl.org/metadata/dublin_core#Creator rdfdoc#CreatorsAlphabeticalBySurname
755     rdfdoc#CreatorsAlphabeticalBySurname #type                     #Seq
756     rdfdoc#CreatorsAlphabeticalBySurname #_1                       Mary Andrew
757     rdfdoc#CreatorsAlphabeticalBySurname #_2                       Jacky Crystal
758   http://www.foo.com/cool.html        http://purl.org/metadata/dublin_core#Identifier rdfdoc#MirroredSites
759     rdfdoc#MirroredSites                #type                     #Bag
760     rdfdoc#MirroredSites                #_1                       http://www.foo.com.au/cool.html
761     rdfdoc#MirroredSites                #_2                       http://www.foo.com.it/cool.html
762   http://www.foo.com/cool.html        http://purl.org/metadata/dublin_core#Title rdfdoc#id4
763     rdfdoc#id4                          #type                     #Alt
764     rdfdoc#id4                          #_1                       The Coolest Web Page
765     rdfdoc#id4                          #_2                       Il Pagio di Web Fuba 
766}
767
768##############################################################################
769rp test "bagReification" {
770<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
771  xmlns:s = "http://description.org/schema/">
772  <rdf:Bag>
773     <rdf:li parseType = "Literal">
774       <rdf:Description> literal, well-formed tag </rdf:Description>
775     </rdf:li>
776     <rdf:li parseType = "Resource">
777       <s:x>xyz</s:x>
778     </rdf:li>
779   </rdf:Bag>
780</rdf:RDF>
781} {
782::xotcl::rdf::parser::RDFTag- --- rdf:RDF
783::xotcl::rdf::parser::RDFBag-::res1 --- rdf:Bag
784TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
785::xotcl::rdf::parser::RDFMember-::res1::prop1 --- rdf:li
786ATTR: parseType = Literal
787PCDATA:
788 
789       <rdf:Description> literal, well-formed tag </rdf:Description>
790 
791MEMBER-INDEX: rdf:_1
792::xotcl::rdf::parser::RDFMember-::res1::prop2 --- rdf:li
793MEMBER-INDEX: rdf:_2
794::xotcl::rdf::parser::RDFDescription-::res1::prop2::res1 --- rdf:Description
795::xotcl::rdf::parser::RDFProperty-::res1::prop2::res1::prop1 --- s:x
796PCDATA:
797xyz 
798} {
799=================== unreferenced:
800   rdfdoc#id1                          #type                     #Bag
801   rdfdoc#id1                          #_1
802       <rdf:Description> literal, well-formed tag </rdf:Description>
803 
804   rdfdoc#id1                          #_2                       rdfdoc#id2
805     rdfdoc#id2                          http://description.org/schema/x xyz
806}
807
808# the following reification is done by SirPac, but it does not seem necessary
809# (uncomment reify property in RDFTriple, if needed
810#{
811#=================== unreferenced:
812#   rdfdoc#id1                          #type                     #Bag
813#   rdfdoc#id1                          #_1
814#       <rdf:Description> literal, well-formed tag </rdf:Description>
815# 
816#   rdfdoc#id1                          #_2                       rdfdoc#id2
817#     rdfdoc#id2                          http://description.org/schema/x xyz
818#   rdfdoc#id3                          #predicate                http://description.org/schema/x
819#   rdfdoc#id3                          #subject                  rdfdoc#id2
820#   rdfdoc#id3                          #object                   xyz
821#   rdfdoc#id3                          #type                     #Statement
822#}
823
824##############################################################################
825rp test "parseLiteral" {
826<rdf:RDF xmlns:s = "http://description.org/schema/">
827  <rdf:Description about="http://mycollege.edu/">
828     <s:students parseType = "Literal">
829       <rdf:Description>xyz</rdf:Description>
830     </s:students>
831  </rdf:Description>
832
833  <rdf:Description about="http://mycollege.edu/">
834    <s:students parseType ="Literal">
835      <rdf:Description about="http://mycollege.edu/">
836       xyz
837      </rdf:Description>
838      <rdf:Bag>
839        <rdf:li resource="http://mycollege.edu/students/Amy"/>
840        <rdf:li resource="http://mycollege.edu/students/Tim"/>
841        <rdf:li resource="http://mycollege.edu/students/John"/>
842        <rdf:li resource="http://mycollege.edu/students/Mary"/>
843        <rdf:li resource="http://mycollege.edu/students/Sue"/>
844       </rdf:Bag>
845     </s:students>
846  </rdf:Description>
847
848  <rdf:Bag>
849     <rdf:li parseType = "Literal">
850       <rdf:Description> literal, well-formed tag </rdf:Description>
851     </rdf:li>
852     <rdf:li parseType = "AllOtherMustbeLiteral">
853        <rdf:Description> literal, well-formed tag </rdf:Description>
854     </rdf:li>
855     <rdf:li parseType = "Resource">
856       <s:x>xyz</s:x>
857     </rdf:li>
858   </rdf:Bag>
859</rdf:RDF>
860} {
861::xotcl::rdf::parser::RDFTag- --- rdf:RDF
862::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
863ATTR: about = http://mycollege.edu/
864::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:students
865ATTR: parseType = Literal
866PCDATA:
867 
868       <rdf:Description>xyz</rdf:Description>
869::xotcl::rdf::parser::RDFDescription-::res2 --- rdf:Description
870ATTR: about = http://mycollege.edu/
871::xotcl::rdf::parser::RDFProperty-::res2::prop1 --- s:students
872ATTR: parseType = Literal
873PCDATA:
874 
875      <rdf:Description about="http://mycollege.edu/">
876       xyz
877      </rdf:Description>
878      <rdf:Bag>
879        <rdf:li resource="http://mycollege.edu/students/Amy"/>
880        <rdf:li resource="http://mycollege.edu/students/Tim"/>
881        <rdf:li resource="http://mycollege.edu/students/John"/>
882        <rdf:li resource="http://mycollege.edu/students/Mary"/>
883        <rdf:li resource="http://mycollege.edu/students/Sue"/>
884       </rdf:Bag>
885::xotcl::rdf::parser::RDFBag-::res3 --- rdf:Bag
886TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
887::xotcl::rdf::parser::RDFMember-::res3::prop1 --- rdf:li
888ATTR: parseType = Literal
889PCDATA:
890 
891       <rdf:Description> literal, well-formed tag </rdf:Description>
892 
893MEMBER-INDEX: rdf:_1
894::xotcl::rdf::parser::RDFMember-::res3::prop2 --- rdf:li
895ATTR: parseType = AllOtherMustbeLiteral
896PCDATA:
897 
898        <rdf:Description> literal, well-formed tag </rdf:Description>
899 
900MEMBER-INDEX: rdf:_2
901::xotcl::rdf::parser::RDFMember-::res3::prop3 --- rdf:li
902MEMBER-INDEX: rdf:_3
903::xotcl::rdf::parser::RDFDescription-::res3::prop3::res1 --- rdf:Description
904::xotcl::rdf::parser::RDFProperty-::res3::prop3::res1::prop1 --- s:x
905PCDATA:
906xyz
907} {
908   http://mycollege.edu/               http://description.org/schema/students
909       <rdf:Description>xyz</rdf:Description>
910 
911   http://mycollege.edu/               http://description.org/schema/students
912      <rdf:Description about="http://mycollege.edu/">
913       xyz
914      </rdf:Description>
915      <rdf:Bag>
916        <rdf:li resource="http://mycollege.edu/students/Amy"/>
917        <rdf:li resource="http://mycollege.edu/students/Tim"/>
918        <rdf:li resource="http://mycollege.edu/students/John"/>
919        <rdf:li resource="http://mycollege.edu/students/Mary"/>
920        <rdf:li resource="http://mycollege.edu/students/Sue"/>
921       </rdf:Bag>
922 
923 
924=================== unreferenced:
925   rdfdoc#id3                          #type                     #Bag
926   rdfdoc#id3                          #_1
927       <rdf:Description> literal, well-formed tag </rdf:Description>
928 
929   rdfdoc#id3                          #_2
930        <rdf:Description> literal, well-formed tag </rdf:Description>
931 
932   rdfdoc#id3                          #_3                       rdfdoc#id4
933     rdfdoc#id4                          http://description.org/schema/x xyz   
934}
935
936##############################################################################
937rp test typedNode1 {<?xml version="1.0"?>
938<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
939         xmlns:DC="http://purl.org/dc/elements/1.0/">
940  <DC:typed about="http://www.xyz.com">
941    <DC:Creator rdf:resource="http://www.xyz.com/homepage/" />
942  </DC:typed>
943</rdf:RDF>
944} {
945::xotcl::rdf::parser::RDFTag- --- rdf:RDF
946::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
947ATTR: about = http://www.xyz.com
948TYPES: http://purl.org/dc/elements/1.0/typed
949::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- DC:Creator
950ATTR: rdf:resource = http://www.xyz.com/homepage/
951} {
952   http://www.xyz.com                  http://purl.org/dc/elements/1.0/Creator http://www.xyz.com/homepage/
953   http://www.xyz.com                  #type                     http://purl.org/dc/elements/1.0/typed
954}
955
956###################################################################
957## UWE: im wiedererzeugten XML/RDF fehlt m.M. das parseType="Resosurce"
958
959rp test nestedProperty {<?xml version="1.0"?>
960<RDF
961    xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
962    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
963    xmlns:dc="http://purl.org/metadata/dublin_core#"
964    xmlns:l="http://mycorp.com/schemas/my-schema#">
965    <Description about="http://www.webnuts.net/Jan97.html">
966      <dc:Subject
967        rdf:value="020 - Library Science"
968        l:Classification="Dewey Decimal Code"/>
969    </Description>
970</RDF>
971} {
972::xotcl::rdf::parser::RDFTag- --- RDF
973::xotcl::rdf::parser::RDFDescription-::res1 --- Description
974ATTR: about = http://www.webnuts.net/Jan97.html
975::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- dc:Subject
976::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
977::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- value
978PCDATA:
979020 - Library Science
980::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- l:Classification
981PCDATA:
982Dewey Decimal Code 
983} {
984   http://www.webnuts.net/Jan97.html   http://purl.org/metadata/dublin_core#Subject rdfdoc#id2
985     rdfdoc#id2                          #value                    020 - Library Science
986     rdfdoc#id2                          http://mycorp.com/schemas/my-schema#Classification Dewey Decimal Code
987}
988
989
990rp test nestedProperty2 {<?xml version="1.0"?>
991<RDF
992    xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
993    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
994    xmlns:dc="http://purl.org/metadata/dublin_core#"
995    xmlns:l="http://mycorp.com/schemas/my-schema#">
996    <Description about="http://www.webnuts.net/Jan97.html">
997      <dc:Subject rdf:parseType="Resource">
998        <rdf:value>020 - Library Science</rdf:value>
999        <l:Classification>Dewey Decimal Code</l:Classification>
1000      </dc:Subject>
1001    </Description>
1002</RDF>
1003} {
1004::xotcl::rdf::parser::RDFTag- --- RDF
1005::xotcl::rdf::parser::RDFDescription-::res1 --- Description
1006ATTR: about = http://www.webnuts.net/Jan97.html
1007::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- dc:Subject
1008::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1009::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- value
1010PCDATA:
1011020 - Library Science
1012::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- l:Classification
1013PCDATA:
1014Dewey Decimal Code
1015} {
1016   http://www.webnuts.net/Jan97.html   http://purl.org/metadata/dublin_core#Subject rdfdoc#id2
1017     rdfdoc#id2                          #value                    020 - Library Science
1018     rdfdoc#id2                          http://mycorp.com/schemas/my-schema#Classification Dewey Decimal Code
1019
1020}
1021
1022rp test nestedProperty3 {<?xml version="1.0"?>
1023<RDF
1024    xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1025    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1026    xmlns:dc="http://purl.org/metadata/dublin_core#"
1027    xmlns:l="http://mycorp.com/schemas/my-schema#">
1028    <Description about="http://www.webnuts.net/Jan97.html">
1029      <dc:Subject>
1030        <Description>
1031           <rdf:value>020 - Library Science</rdf:value>
1032           <l:Classification>Dewey Decimal Code</l:Classification>
1033        </Description>
1034      </dc:Subject>
1035    </Description>
1036</RDF>
1037} {
1038::xotcl::rdf::parser::RDFTag- --- RDF
1039::xotcl::rdf::parser::RDFDescription-::res1 --- Description
1040ATTR: about = http://www.webnuts.net/Jan97.html
1041::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- dc:Subject
1042::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- Description
1043::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- value
1044PCDATA:
1045020 - Library Science
1046::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- l:Classification
1047PCDATA:
1048Dewey Decimal Code
1049} {
1050   http://www.webnuts.net/Jan97.html   http://purl.org/metadata/dublin_core#Subject rdfdoc#id2
1051     rdfdoc#id2                          #value                    020 - Library Science
1052     rdfdoc#id2                          http://mycorp.com/schemas/my-schema#Classification Dewey Decimal Code
1053
1054}
1055
1056rp test nestedProperty4 {<?xml version="1.0"?>
1057<RDF
1058    xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1059    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1060    xmlns:dc="http://purl.org/metadata/dublin_core#"
1061    xmlns:l="http://mycorp.com/schemas/my-schema#">
1062    <Description about="http://www.webnuts.net/Jan97.html">
1063      <dc:Subject rdf:parseType="Resource">
1064        <rdf:value>020 - Library Science</rdf:value>
1065        <l:Classification rdf:parseType="Resource">
1066           <l:lang>en</l:lang>
1067           <l:string>Dewey Decimal Code</l:string>
1068        </l:Classification>
1069      </dc:Subject>
1070    </Description>
1071</RDF>
1072} {
1073::xotcl::rdf::parser::RDFTag- --- RDF
1074::xotcl::rdf::parser::RDFDescription-::res1 --- Description
1075ATTR: about = http://www.webnuts.net/Jan97.html
1076::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- dc:Subject
1077::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1078::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- value
1079PCDATA:
1080020 - Library Science
1081::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- l:Classification
1082::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1::prop2::res1 --- rdf:Description
1083::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2::res1::prop1 --- l:lang
1084PCDATA:
1085en
1086::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2::res1::prop2 --- l:string
1087PCDATA:
1088Dewey Decimal Code 
1089} {
1090   http://www.webnuts.net/Jan97.html   http://purl.org/metadata/dublin_core#Subject rdfdoc#id2
1091     rdfdoc#id2                          #value                    020 - Library Science
1092     rdfdoc#id2                          http://mycorp.com/schemas/my-schema#Classification rdfdoc#id3
1093       rdfdoc#id3                          http://mycorp.com/schemas/my-schema#lang en
1094       rdfdoc#id3                          http://mycorp.com/schemas/my-schema#string Dewey Decimal Code
1095}
1096
1097rp test thirdAbbrev1 {<?xml version="1.0"?>
1098<rdf:RDF
1099    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1100    xmlns:s="http://description.org/schema/">
1101    <rdf:Description about="http://www.w3.org/Home/Lassila">
1102      <s:Creator>
1103        <rdf:Description about="http://www.w3.org/staffId/85740">
1104          <rdf:type resource="http://description.org/schema/Person"/>
1105          <s:Name>Ora Lassila</s:Name>
1106          <s:Email>lassila@w3.org</s:Email>
1107        </rdf:Description>
1108      </s:Creator>
1109    </rdf:Description>
1110  </rdf:RDF>
1111} {
1112::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1113::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1114ATTR: about = http://www.w3.org/Home/Lassila
1115::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
1116::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1117ATTR: about = http://www.w3.org/staffId/85740
1118TYPES: http://description.org/schema/Person
1119::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- s:Name
1120PCDATA:
1121Ora Lassila
1122::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- s:Email
1123PCDATA:
1124lassila@w3.org
1125} {
1126   http://www.w3.org/Home/Lassila      http://description.org/schema/Creator http://www.w3.org/staffId/85740
1127   http://www.w3.org/staffId/85740     http://description.org/schema/Name Ora Lassila
1128   http://www.w3.org/staffId/85740     http://description.org/schema/Email lassila@w3.org
1129   http://www.w3.org/staffId/85740     #type                     http://description.org/schema/Person
1130}
1131
1132rp test thirdAbbrev2 {<?xml version="1.0"?>
1133<rdf:RDF
1134    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1135    xmlns:s="http://description.org/schema/">
1136    <rdf:Description about="http://www.w3.org/Home/Lassila">
1137      <s:Creator>
1138        <rdf:Description>
1139          <rdf:type resource="http://description.org/schema/Person"/>
1140          <s:Name>Ora Lassila</s:Name>
1141          <s:Email>lassila@w3.org</s:Email>
1142        </rdf:Description>
1143      </s:Creator>
1144    </rdf:Description>
1145  </rdf:RDF>
1146} {
1147::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1148::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1149ATTR: about = http://www.w3.org/Home/Lassila
1150::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
1151::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1152TYPES: http://description.org/schema/Person
1153::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- s:Name
1154PCDATA:
1155Ora Lassila
1156::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- s:Email
1157PCDATA:
1158lassila@w3.org
1159}  {
1160   http://www.w3.org/Home/Lassila      http://description.org/schema/Creator rdfdoc#id2
1161     rdfdoc#id2                          http://description.org/schema/Name Ora Lassila
1162     rdfdoc#id2                          http://description.org/schema/Email lassila@w3.org
1163     rdfdoc#id2                          #type                     http://description.org/schema/Person
1164}
1165
1166rp test thirdAbbrev3 {<?xml version="1.0"?>
1167<rdf:RDF
1168    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1169    xmlns:s="http://description.org/schema/">
1170    <rdf:Description about="http://www.w3.org/Home/Lassila">
1171      <s:Creator>
1172        <s:Person  about = "http://www.w3.org/staffId/85740">
1173          <s:Name>Ora Lassila</s:Name>
1174          <s:Email>lassila@w3.org</s:Email>
1175        </s:Person>
1176      </s:Creator>
1177    </rdf:Description>
1178  </rdf:RDF>
1179} {
1180::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1181::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1182ATTR: about = http://www.w3.org/Home/Lassila
1183::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
1184::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1185ATTR: about = http://www.w3.org/staffId/85740
1186TYPES: http://description.org/schema/Person
1187::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- s:Name
1188PCDATA:
1189Ora Lassila
1190::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- s:Email
1191PCDATA:
1192lassila@w3.org
1193} {
1194   http://www.w3.org/Home/Lassila      http://description.org/schema/Creator http://www.w3.org/staffId/85740
1195   http://www.w3.org/staffId/85740     http://description.org/schema/Name Ora Lassila
1196   http://www.w3.org/staffId/85740     http://description.org/schema/Email lassila@w3.org
1197   http://www.w3.org/staffId/85740     #type                     http://description.org/schema/Person
1198}
1199
1200rp test thirdAbbrev4 {<?xml version="1.0"?>
1201<rdf:RDF
1202    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1203    xmlns:s="http://description.org/schema/">
1204    <rdf:Description about="http://www.w3.org/Home/Lassila">
1205      <s:Creator>
1206        <s:Person>
1207          <s:Name>Ora Lassila</s:Name>
1208          <s:Email>lassila@w3.org</s:Email>
1209        </s:Person>
1210      </s:Creator>
1211    </rdf:Description>
1212  </rdf:RDF>
1213} {
1214::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1215::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1216ATTR: about = http://www.w3.org/Home/Lassila
1217::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
1218::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1219TYPES: http://description.org/schema/Person
1220::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- s:Name
1221PCDATA:
1222Ora Lassila
1223::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- s:Email
1224PCDATA:
1225lassila@w3.org 
1226} {
1227   http://www.w3.org/Home/Lassila      http://description.org/schema/Creator rdfdoc#id2
1228     rdfdoc#id2                          http://description.org/schema/Name Ora Lassila
1229     rdfdoc#id2                          http://description.org/schema/Email lassila@w3.org
1230     rdfdoc#id2                          #type                     http://description.org/schema/Person
1231}
1232
1233
1234rp test secondAbbrev1 {<?xml version="1.0"?>
1235<rdf:RDF 
1236    xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1237    xmlns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1238    xmlns:s = "http://description.org/schema/">
1239    <rdf:Description about="http://www.w3.org/Home/Lassila">
1240      <s:Creator>
1241        <rdf:Description about="http://www.w3.org/staffId/85740">
1242          <s:Name>Ora Lassila</s:Name>
1243          <s:Email>lassila@w3.org</s:Email>
1244        </rdf:Description>
1245      </s:Creator>
1246    </rdf:Description>
1247  </rdf:RDF>
1248} {
1249::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1250::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1251ATTR: about = http://www.w3.org/Home/Lassila
1252::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
1253::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1254ATTR: about = http://www.w3.org/staffId/85740
1255::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- s:Name
1256PCDATA:
1257Ora Lassila
1258::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- s:Email
1259PCDATA:
1260lassila@w3.org
1261} {
1262   http://www.w3.org/Home/Lassila      http://description.org/schema/Creator http://www.w3.org/staffId/85740
1263   http://www.w3.org/staffId/85740     http://description.org/schema/Name Ora Lassila
1264   http://www.w3.org/staffId/85740     http://description.org/schema/Email lassila@w3.org
1265}
1266
1267rp test secondAbbrev2 {<?xml version="1.0"?>
1268<rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1269    xmlns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1270    xmlns:s = "http://description.org/schema/">
1271    <rdf:Description about="http://www.w3.org/Home/Lassila">
1272      <s:Creator rdf:resource="http://www.w3.org/staffId/85740"
1273          s:Name="Ora Lassila"
1274          s:Email="lassila@w3.org" />
1275    </rdf:Description>
1276  </rdf:RDF>
1277} {
1278::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1279::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1280ATTR: about = http://www.w3.org/Home/Lassila
1281::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
1282::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1283ATTR: about = http://www.w3.org/staffId/85740
1284::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- s:Name
1285PCDATA:
1286Ora Lassila
1287::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- s:Email
1288PCDATA:
1289lassila@w3.org
1290} {
1291   http://www.w3.org/Home/Lassila      http://description.org/schema/Creator http://www.w3.org/staffId/85740
1292   http://www.w3.org/staffId/85740     http://description.org/schema/Name Ora Lassila
1293   http://www.w3.org/staffId/85740     http://description.org/schema/Email lassila@w3.org
1294}
1295
1296rp test secondAbbrev3 {<?xml version="1.0"?>
1297<rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1298    xmlns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1299    xmlns:s = "http://description.org/schema/">
1300    <rdf:Description about="http://www.w3.org/Home/Lassila">
1301      <s:Creator
1302          s:Name="Ora Lassila"
1303          s:Email="lassila@w3.org" />
1304    </rdf:Description>
1305  </rdf:RDF>
1306} {
1307::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1308::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1309ATTR: about = http://www.w3.org/Home/Lassila
1310::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
1311::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1312::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- s:Name
1313PCDATA:
1314Ora Lassila
1315::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- s:Email
1316PCDATA:
1317lassila@w3.org
1318} {
1319   http://www.w3.org/Home/Lassila      http://description.org/schema/Creator rdfdoc#id2
1320     rdfdoc#id2                          http://description.org/schema/Name Ora Lassila
1321     rdfdoc#id2                          http://description.org/schema/Email lassila@w3.org
1322}
1323
1324
1325###################################################################
1326rp test resource1 {<?xml version="1.0"?>
1327<rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1328    xmlns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1329    xmlns:s = "http://schema.org/">
1330    <rdf:Description about="http://www.w3.org/Home/Lassila">
1331      <s:Creator rdf:resource="http://www.w3.org/staffId/85740"/>
1332    </rdf:Description>
1333
1334    <rdf:Description about="http://www.w3.org/staffId/85740">
1335      <v:Name>Ora Lassila</v:Name>
1336      <v:Email>lassila@w3.org</v:Email>
1337    </rdf:Description>
1338  </rdf:RDF>
1339} {
1340::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1341::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1342ATTR: about = http://www.w3.org/Home/Lassila
1343::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
1344ATTR: rdf:resource = http://www.w3.org/staffId/85740
1345::xotcl::rdf::parser::RDFDescription-::res2 --- rdf:Description
1346ATTR: about = http://www.w3.org/staffId/85740
1347::xotcl::rdf::parser::RDFProperty-::res2::prop1 --- v:Name
1348PCDATA:
1349Ora Lassila
1350::xotcl::rdf::parser::RDFProperty-::res2::prop2 --- v:Email
1351PCDATA:
1352lassila@w3.org
1353} {
1354   http://www.w3.org/Home/Lassila      http://schema.org/Creator http://www.w3.org/staffId/85740
1355   http://www.w3.org/staffId/85740     v:Name                    Ora Lassila
1356   http://www.w3.org/staffId/85740     v:Email                   lassila@w3.org
1357}
1358
1359###################################################################
1360rp test resource2 {<?xml version="1.0"?>
1361<rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1362    xmlns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1363    xmlns:s = "http://schema.org/">
1364    <rdf:Description about="http://www.w3.org/Home/Lassila">
1365      <s:Creator>
1366        <rdf:Description about="http://www.w3.org/staffId/85740">
1367          <v:Name>Ora Lassila</v:Name>
1368          <v:Email>lassila@w3.org</v:Email>
1369        </rdf:Description>
1370      </s:Creator>
1371    </rdf:Description>
1372  </rdf:RDF>
1373} {
1374::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1375::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1376ATTR: about = http://www.w3.org/Home/Lassila
1377::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Creator
1378::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1379ATTR: about = http://www.w3.org/staffId/85740
1380::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- v:Name
1381PCDATA:
1382Ora Lassila
1383::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- v:Email
1384PCDATA:
1385lassila@w3.org   
1386} {
1387   http://www.w3.org/Home/Lassila      http://schema.org/Creator http://www.w3.org/staffId/85740
1388   http://www.w3.org/staffId/85740     v:Name                    Ora Lassila
1389   http://www.w3.org/staffId/85740     v:Email                   lassila@w3.org
1390}
1391
1392
1393
1394###################################################################
1395rp test typedNode1 {<?xml version="1.0"?>
1396<rdf:RDF
1397    xmlns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1398    xmlns:s = "http://description.org/schema/">
1399  <s:Person about="http://www.xotcl.org/uwe">
1400    <s:Name>Uwe Zdun</s:Name>
1401    <s:Email>uwe@xotcl.org</s:Email>
1402  </s:Person>
1403</rdf:RDF>
1404} {
1405::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1406::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1407ATTR: about = http://www.xotcl.org/uwe
1408TYPES: http://description.org/schema/Person
1409::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- s:Name
1410PCDATA:
1411Uwe Zdun
1412::xotcl::rdf::parser::RDFProperty-::res1::prop2 --- s:Email
1413PCDATA:
1414uwe@xotcl.org
1415} {
1416   http://www.xotcl.org/uwe            http://description.org/schema/Name Uwe Zdun
1417   http://www.xotcl.org/uwe            http://description.org/schema/Email uwe@xotcl.org
1418   http://www.xotcl.org/uwe            #type                     http://description.org/schema/Person
1419}
1420
1421rp test typedNode2 {<?xml version="1.0"?>
1422<rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1423    xmlns = "http://description.org/schema/">
1424  <Person rdf:about="http://www.xotcl.org/uwe" Name="Uwe Zdun" Email="uwe@xotcl.org" />
1425</rdf:RDF>
1426} {
1427::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1428::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1429ATTR: rdf:about = http://www.xotcl.org/uwe
1430TYPES: http://description.org/schema/Person
1431::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- Name
1432PCDATA:
1433Uwe Zdun
1434::xotcl::rdf::parser::RDFProperty-::res1::prop2 --- Email
1435PCDATA:
1436uwe@xotcl.org
1437} {
1438   http://www.xotcl.org/uwe            http://description.org/schema/Name Uwe Zdun
1439   http://www.xotcl.org/uwe            http://description.org/schema/Email uwe@xotcl.org
1440   http://www.xotcl.org/uwe            #type                     http://description.org/schema/Person
1441}
1442
1443###################################################################
1444rp test complexListItems {<?xml version="1.0"?>
1445<RDF
1446    xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1447    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1448    xmlns:gen="http://universal.org/metadata/ims#">
1449
1450  <rdf:Description about="http://nm.wu-wien.ac.at/Lehre/oo1/">
1451    <gen:Title rdf:parseType="Resource">
1452      <xml:lang>en</xml:lang>
1453      <gen:String>Object Oriented Design and System Development</gen:String>
1454    </gen:Title>
1455    <gen:Description>
1456      <rdf:Bag>
1457  	<rdf:li rdf:parseType="Resource">	
1458  	  <xml:lang>en</xml:lang>
1459          <gen:String>Introduction to the concepts of object-oriented programing</gen:String>
1460	</rdf:li>
1461       	<rdf:li rdf:parseType="Resource">	
1462	  <xml:lang>de</xml:lang>
1463       	  <gen:String>Einfhrung in die Konzepte objekt-orientierter Programmierung</gen:String>
1464        </rdf:li>	
1465      </rdf:Bag>
1466    </gen:Description>
1467  </rdf:Description>
1468</RDF>
1469} {
1470::xotcl::rdf::parser::RDFTag- --- RDF
1471::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1472ATTR: about = http://nm.wu-wien.ac.at/Lehre/oo1/
1473::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- gen:Title
1474::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1475::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- xml:lang
1476PCDATA:
1477en
1478::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- gen:String
1479PCDATA:
1480Object Oriented Design and System Development
1481::xotcl::rdf::parser::RDFProperty-::res1::prop2 --- gen:Description
1482::xotcl::rdf::parser::RDFBag-::res1::prop2::res1 --- rdf:Bag
1483TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
1484::xotcl::rdf::parser::RDFMember-::res1::prop2::res1::prop1 --- rdf:li
1485MEMBER-INDEX: rdf:_1
1486::xotcl::rdf::parser::RDFDescription-::res1::prop2::res1::prop1::res1 --- rdf:Description
1487::xotcl::rdf::parser::RDFProperty-::res1::prop2::res1::prop1::res1::prop1 --- xml:lang
1488PCDATA:
1489en
1490::xotcl::rdf::parser::RDFProperty-::res1::prop2::res1::prop1::res1::prop2 --- gen:String
1491PCDATA:
1492Introduction to the concepts of object-oriented programing
1493::xotcl::rdf::parser::RDFMember-::res1::prop2::res1::prop2 --- rdf:li
1494MEMBER-INDEX: rdf:_2
1495::xotcl::rdf::parser::RDFDescription-::res1::prop2::res1::prop2::res1 --- rdf:Description
1496::xotcl::rdf::parser::RDFProperty-::res1::prop2::res1::prop2::res1::prop1 --- xml:lang
1497PCDATA:
1498de
1499::xotcl::rdf::parser::RDFProperty-::res1::prop2::res1::prop2::res1::prop2 --- gen:String
1500PCDATA:
1501Einfhrung in die Konzepte objekt-orientierter Programmierung
1502} {
1503   http://nm.wu-wien.ac.at/Lehre/oo1/  http://universal.org/metadata/ims#Title rdfdoc#id2
1504     rdfdoc#id2                          xml:lang                  en
1505     rdfdoc#id2                          http://universal.org/metadata/ims#String Object Oriented Design and System Development
1506   http://nm.wu-wien.ac.at/Lehre/oo1/  http://universal.org/metadata/ims#Description rdfdoc#id3
1507     rdfdoc#id3                          #type                     #Bag
1508     rdfdoc#id3                          #_1                       rdfdoc#id4
1509       rdfdoc#id4                          xml:lang                  en
1510       rdfdoc#id4                          http://universal.org/metadata/ims#String Introduction to the concepts of object-oriented programing
1511     rdfdoc#id3                          #_2                       rdfdoc#id5
1512       rdfdoc#id5                          xml:lang                  de
1513       rdfdoc#id5                          http://universal.org/metadata/ims#String Einf�hrung in die Konzepte objekt-orientierter Programmierung
1514}
1515
1516###################################################################
1517rp test complexListItems2 {<?xml version="1.0"?>
1518<RDF
1519    xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1520    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1521    xmlns:gen="http://universal.org/metadata/ims#">
1522
1523  <rdf:Description about="http://nm.wu-wien.ac.at/Lehre/oo1/">
1524    <gen:Title rdf:parseType="Resource">
1525      <xml:lang>en</xml:lang>
1526      <gen:String>Object Oriented Design and System Development</gen:String>
1527    </gen:Title>
1528    <gen:Description>
1529      <rdf:Seq>
1530  	<rdf:li rdf:parseType="Resource">	
1531  	  <cls:entry rdf:parseType="Resource">
1532	    <gen:language>en</gen:language>
1533            <gen:String>Introduction to the concepts of object-oriented programing</gen:String>
1534  	  </cls:entry>
1535	</rdf:li>
1536       	<rdf:li rdf:parseType="Resource">	
1537	  <xml:lang>de</xml:lang>
1538       	  <gen:String>Einfhrung in die Konzepte objekt-orientierter Programmierung</gen:String>
1539        </rdf:li>	
1540      </rdf:Seq>
1541    </gen:Description>
1542  </rdf:Description>
1543</RDF>
1544} {
1545::xotcl::rdf::parser::RDFTag- --- RDF
1546::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1547ATTR: about = http://nm.wu-wien.ac.at/Lehre/oo1/
1548::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- gen:Title
1549::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1550::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- xml:lang
1551PCDATA:
1552en
1553::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- gen:String
1554PCDATA:
1555Object Oriented Design and System Development
1556::xotcl::rdf::parser::RDFProperty-::res1::prop2 --- gen:Description
1557::xotcl::rdf::parser::RDFSeq-::res1::prop2::res1 --- rdf:Seq
1558TYPES: http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq
1559::xotcl::rdf::parser::RDFMember-::res1::prop2::res1::prop1 --- rdf:li
1560MEMBER-INDEX: rdf:_1
1561::xotcl::rdf::parser::RDFDescription-::res1::prop2::res1::prop1::res1 --- rdf:Description
1562::xotcl::rdf::parser::RDFProperty-::res1::prop2::res1::prop1::res1::prop1 --- cls:entry
1563::xotcl::rdf::parser::RDFDescription-::res1::prop2::res1::prop1::res1::prop1::res1 --- rdf:Description
1564::xotcl::rdf::parser::RDFProperty-::res1::prop2::res1::prop1::res1::prop1::res1::prop1 --- gen:language
1565PCDATA:
1566en
1567::xotcl::rdf::parser::RDFProperty-::res1::prop2::res1::prop1::res1::prop1::res1::prop2 --- gen:String
1568PCDATA:
1569Introduction to the concepts of object-oriented programing
1570::xotcl::rdf::parser::RDFMember-::res1::prop2::res1::prop2 --- rdf:li
1571MEMBER-INDEX: rdf:_2
1572::xotcl::rdf::parser::RDFDescription-::res1::prop2::res1::prop2::res1 --- rdf:Description
1573::xotcl::rdf::parser::RDFProperty-::res1::prop2::res1::prop2::res1::prop1 --- xml:lang
1574PCDATA:
1575de
1576::xotcl::rdf::parser::RDFProperty-::res1::prop2::res1::prop2::res1::prop2 --- gen:String
1577PCDATA:
1578Einfhrung in die Konzepte objekt-orientierter Programmierung
1579} {
1580   http://nm.wu-wien.ac.at/Lehre/oo1/  http://universal.org/metadata/ims#Title rdfdoc#id2
1581     rdfdoc#id2                          xml:lang                  en
1582     rdfdoc#id2                          http://universal.org/metadata/ims#String Object Oriented Design and System Development
1583   http://nm.wu-wien.ac.at/Lehre/oo1/  http://universal.org/metadata/ims#Description rdfdoc#id3
1584     rdfdoc#id3                          #type                     #Seq
1585     rdfdoc#id3                          #_1                       rdfdoc#id4
1586       rdfdoc#id4                          cls:entry                 rdfdoc#id5
1587         rdfdoc#id5                          http://universal.org/metadata/ims#language en
1588         rdfdoc#id5                          http://universal.org/metadata/ims#String Introduction to the concepts of object-oriented programing
1589     rdfdoc#id3                          #_2                       rdfdoc#id6
1590       rdfdoc#id6                          xml:lang                  de
1591       rdfdoc#id6                          http://universal.org/metadata/ims#String Einf�hrung in die Konzepte objekt-orientierter Programmierung
1592}
1593
1594###################################################################
1595rp test dmoz {<?xml version="1.0"?>
1596<r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1597     xmlns:d="http://purl.org/dc/elements/1.0/"
1598     xmlns="http://dmoz.org/rdf/">
1599<Topic r:ID="Top/Computers">
1600  <tag catid="4"/>
1601  <d:Title>Computers</d:Title>
1602  <link r:resource="http://www.cs.tcd.ie/FME/"/>
1603  <link r:resource="http://pages.whowhere.com/computers/pnyhlen/Timeline.html"/>
1604</Topic>
1605</r:RDF>
1606} {
1607::xotcl::rdf::parser::RDFTag- --- r:RDF
1608::xotcl::rdf::parser::RDFDescription-::res1 --- r:Description
1609ATTR: r:ID = Top/Computers
1610TYPES: http://dmoz.org/rdf/Topic
1611::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- tag
1612::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- r:Description
1613::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- catid
1614PCDATA:
16154
1616::xotcl::rdf::parser::RDFProperty-::res1::prop2 --- d:Title
1617PCDATA:
1618Computers
1619::xotcl::rdf::parser::RDFProperty-::res1::prop3 --- link
1620ATTR: r:resource = http://www.cs.tcd.ie/FME/
1621::xotcl::rdf::parser::RDFProperty-::res1::prop4 --- link
1622ATTR: r:resource = http://pages.whowhere.com/computers/pnyhlen/Timeline.html
1623} {
1624   Top/Computers                       http://dmoz.org/rdf/tag   rdfdoc#id2
1625     rdfdoc#id2                          http://dmoz.org/rdf/catid 4
1626   Top/Computers                       http://purl.org/dc/elements/1.0/Title Computers
1627   Top/Computers                       http://dmoz.org/rdf/link  http://www.cs.tcd.ie/FME/
1628   Top/Computers                       http://dmoz.org/rdf/link  http://pages.whowhere.com/computers/pnyhlen/Timeline.html
1629   Top/Computers                       #type                     http://dmoz.org/rdf/Topic
1630}
1631
1632##############################################################################
1633rp test "IDforNestedDescription" {<?xml version="1.0"?>
1634<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1635         xmlns:g2k="http://g2k-schema#">
1636<rdf:Description about ="page">
1637        <g2k:area
1638                rdf:ID="b14711"
1639                g2k:term="Hessen"
1640                g2k:type="Land"/>
1641</rdf:Description>
1642</rdf:RDF>
1643} {
1644::xotcl::rdf::parser::RDFTag- --- rdf:RDF
1645::xotcl::rdf::parser::RDFDescription-::res1 --- rdf:Description
1646ATTR: about = page
1647::xotcl::rdf::parser::RDFProperty-::res1::prop1 --- g2k:area
1648ATTR: rdf:ID = b14711
1649::xotcl::rdf::parser::RDFDescription-::res1::prop1::res1 --- rdf:Description
1650::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop1 --- g2k:term
1651PCDATA:
1652Hessen
1653::xotcl::rdf::parser::RDFProperty-::res1::prop1::res1::prop2 --- g2k:type
1654PCDATA:
1655Land
1656}  {
1657   b14711                              http://g2k-schema#term    Hessen
1658   b14711                              http://g2k-schema#type    Land
1659   page                                http://g2k-schema#area    b14711
1660}
1661
1662puts "FINISHED TEST! ([rp set nodeTime] + [rp set recreateTime] + [rp set tripleTime] = [expr {[rp set nodeTime] + [rp set recreateTime] + [rp set tripleTime]}])"
1663
1664