W3C home > Mailing lists > Public > semantic-web@w3.org > June 2006

Re: iana mime types as rdfs:Datatype ?

From: Henry Story <henry.story@bblfish.net>
Date: Fri, 23 Jun 2006 14:27:57 +0200
Message-Id: <66732639-0563-4342-BF07-D1A74A57EF3E@bblfish.net>
Cc: Semantic Web <semantic-web@w3.org>, atom-owl@googlegroups.com
To: Ivan Herman <ivan@w3.org>

On 23 Jun 2006, at 14:04, Ivan Herman wrote:

>> [] :content [ a :Content;
>>               :value "<b>hello</b>"^^ianatxt:html ] .
> I see a practical issue with this example. If one uses an RDF/XML
> encoding and turtle, then the parser will have a problem with your
> example, unless 'value' is declared to be rdf:XMLLiteral, which is a
> datatype itself.... The second option could probably work as:
> [] :content [ a :Content;
>               :type ianatxt:html;
>               :value "<b>hello</b>"^^rdf:XMLLiteral ] .

Mhh I tried converting the following

@prefix : <https://sommer.dev.java.net/atom/2006-06-06/AtomOwl.n3#> .
@prefix ianatxt: <http://www.iana.org/assignments/relation/text/>.

[] :title "<div>hello<p>well formed html but <b>bad</b> xhtml</ 
div>"^^ianatxt:html .

using rapper and I got this

hjs@bblfish:0$ rapper -i turtle test.n3 -o rdfxml
rapper: Parsing file test.n3
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:ianatxt="http://www.iana.org/assignments/relation/ 
text/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  
   <rdf:Description rdf:nodeID="genid1">
     <title rdf:datatype="http://www.iana.org/assignments/relation/ 
text/html">&lt;div&gt;hello&lt;p&gt;well formed html but  
&lt;b&gt;bad&lt;/b&gt; xhtml&lt;/div&gt;</title>

which is what I would expect: not knowing that the content of that  
datatype is correct xml it escaped it. On the other hand the cwm from  
cvs seems to barf on "cwm.py test.n3 --rdf".

Of course this cuts both ways, as clearly it will react the same way  
to xhtml content (ianatxt:xhtml).
It would be nice to be able to specify that ianatxt:xhtml is a  
subclass of rdf:XMLLiteral so that such tools could use this  
knowledge to avoid escaping their content.

Received on Friday, 23 June 2006 12:28:03 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:44:57 UTC