Test cases for parseType="Literal"

To help ground the discussions about Literals, I created the 
attached test cases and ran the tests against the following 
parsers that support N-Triples output via a shell:

1. SiRPAC - last jar file created from the W3C's [now obsolete]
 SiRPAC service:

 http://www.w3.org/RDF/Implementations/SiRPAC/SiRPAC.W3C.latest.jar

2. ARP - 1.0.5:

 http://www-uk.hpl.hp.com/people/jjc/arp/

3. Raptor - 0.9.3:

Results:
 
o test001, test002, test003 - each parser generated the same triple for
 these test cases:

 <http://www.example.org> <http://example.org/property> "well-formed XML" .

o test004 - the gist of this test case is:

   <rdf:Description rdf:about="http://www.example.org">
    <eg:property rdf:parseType="Literal"><em>emphasis</em></eg:property>
   </rdf:Description>

 and each parser outputs something different:

 ARP:    <http://www.example.org> <http://example.org/property> "<em xmlns=\"\">emphasis</em>" .
 Raptor: <http://www.example.org> <http://example.org/property> <(null)> .
 SiRPAC: <http://www.example.org> <http://example.org/property> "<em>emphasis</em>" .

WRT test002:

 <rdf:Description rdf:about="http://www.example.org">
   <eg:property xml:lang="en-US" rdf:parseType="Literal">well-formed XML</eg:property>
 </rdf:Description>

some approaches that have been suggested (that provide additional
information e.g. xml:lang, and the parseType) are:

1. Make the object a pair (lang plus the property value).  One 
 disadvantage of this approach is how to handle additional attributes
 such as xml:space or xml:base.

2. Literals are resources (same as #1?), e.g.:

 <http://www.example.org> <http://example.org/property> <data:text/xml;lang=en-US;well-formed XML> .

3. Literals are bNodes, e.g.:

 <http://www.example.org> <http://example.org/property> _:a .
 _:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#value> "well-formed XML" .
 _:a <@@@xml:lang> "en-US" .

4. Literals can be the subject of an triple (what would the N-Triples 
 for test002 be?)


Surely I've missed some of the other proposals/options or botched
the ones above so new ideas and corrections are welcome - but please 
include the N-Triples (based on test002).

Also, is there a requirement that the transformation from RDF/XML to
N-Triples back to RDF/XML be lossless/round-tripable?

Art
---

P.S. error00{1,2,3} test incorrect spellings of parseType (a farily
     common error) but these test cases aren't directly related to the 
     open Literal issues.

Received on Monday, 8 October 2001 16:29:10 UTC