[oslc-core] OSLC Compact representation, titles with markup

Arthur Ryman ryman at ca.ibm.com
Wed Aug 31 11:03:06 EDT 2011


Dave/Randy,

I was wrong in saying that rdf:parseType="Literal" was required. I 
verified your statement that rdf:parseType="Literal" is syntactic sugar 
for a corresponding rdf:datatype attribute by using the jena.rdfcopy 
utility which converts RDF/XML to N-TRIPLE. The W3C RDF Validation service 
was erroneously escaping markup on output. The escaping is just an 
artifact of XML and is not part of the lexical space of RDF literal 
values. I am including an RDF/XML document and its N-TRIPLE equivalent.

Note that subjects 3 and 4 have identical objects.

RDF/XML

<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dcterms="http://purl.org/dc/terms/">

<rdf:Description rdf:about="http://example.com/subject/1">
   <dcterms:title>1 < 2</dcterms:title>
</rdf:Description>

<rdf:Description rdf:about="http://example.com/subject/2">
   <dcterms:title rdf:parseType="Literal" xmlns="
http://www.w3.org/1999/xhtml">This is 
<s>strikethrough</s>.</dcterms:title>
</rdf:Description>

<rdf:Description rdf:about="http://example.com/subject/3">
   <dcterms:title rdf:parseType="Literal">This is 
<s>strikethrough</s>.</dcterms:title>
</rdf:Description>

<rdf:Description rdf:about="http://example.com/subject/4">
   <dcterms:title rdf:datatype="
http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral">This is 
<s>strikethrough</s>.</dcterms:title>
</rdf:Description>

</rdf:RDF>

N-TRIPLE

<http://example.com/subject/1> <http://purl.org/dc/terms/title> "1 < 2" .
<http://example.com/subject/2> <http://purl.org/dc/terms/title> "This is 
<s xmlns=\"http://www.w3.org/1999/xhtml\">strikethrough</s>."^^<
http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
<http://example.com/subject/3> <http://purl.org/dc/terms/title> "This is 
<s>strikethrough</s>."^^<
http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
<http://example.com/subject/4> <http://purl.org/dc/terms/title> "This is 
<s>strikethrough</s>."^^<
http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .

Regards, 
___________________________________________________________________________ 

Arthur Ryman 

DE, PPM & Reporting Chief Architect
IBM Software, Rational 
Toronto Lab | +1-905-413-3077 (office) | +1-416-939-5063 (mobile) 



Arthur Ryman/Toronto/IBM wrote on 08/31/2011 09:02:56 AM:

> [image removed] 
> 
> Re: [oslc-core] OSLC Compact representation, titles with markup 
> 
> Arthur Ryman 
> 
> to:
> 
> Dave Steinberg
> 
> 08/31/2011 09:02 AM
> 
> Cc:
> 
> oslc-core, oslc-core-bounces
> 
> Dave/Randy,
> 
> Thx for persisting on this point. It turns out that the W3C RDF 
> Validator is in fact displaying markup characters in strings wrong. 
> It is escaping them. You can see the correct, unescaped, results by 
> turning on the Advanced option of N-Triples output.
> 





More information about the Oslc-Core mailing list