about literals from Stefan Kokkelink on 2001-03-05 (www-rdf-interest@w3.org from March 2001) (original) (raw)

Art Barstow wrote:

If you disagree with me, then I suggest you raise it on rdf-interest and get it on the RDF issue list:

http://www.w3.org/2000/03/rdf-tracking/

ok, here it goes: how is the following XML expected to be parsed by an RDF processor:

<rdf:RDF xmlns="http://www.w3.org/HTML" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:html="http://NoHTML" xmlns:my="http://my"> <rdf:Description about="John_Smith"> <my:Name rdf:parseType="Literal"> html:h1 John

CARA creates the following literal respecting the given namespace information:

l('<html:h1 xmlns:html="http://NoHTML"> John ')

Art said:

My take on the following part of the spec:

The value 'Literal' specifies that the element content is to be treated as an RDF/XML literal; that is, the content must not be interpreted by an RDF processor.

is that the RDF processor should do nothing with the content of a propertyElt with parseType="Literal". That is, I would expect the object to be the string to be unmodified:

   <html:h1>
     <b>John</b>
   </html:h1>

My interpretation of the spec is different: The serialization format of RDF is XML and therefore must be processed as XML, that is, a processor has to respect the given namespace information. Otherwise we get incorrect information as in the example above. My interpretation of "that is, the content must not be interpreted by an RDF processor" is that a processor is not allowed to produce triples, but is allowed to choose a (equivalent) serialization of the XML subtree specified by the literal.

However, it would be nice if this could be clarified by RDFCore ...

Greetings, Stefan

Received on Monday, 5 March 2001 11:15:42 UTC