- From: Dave Beckett <dave.beckett@bristol.ac.uk>
- Date: Thu, 29 Aug 2002 13:41:04 +0100
- To: w3c-rdfcore-wg@w3.org
- CC: Patrick.Stickler@nokia.com
I've already mentioned a few times that using the rdf:type attribute to indicated datatyped literals is a bad idea *for the RDF/XML syntax*. It is ambiguous and difficult to parse. We should not be adding more ambiguity to the syntax, and I will oppose it. Here is what I consider a fatal case. Consider a datatyped literal that has a lexical form which is the null string. The datatype URI is, for example, http://example.org/datatype1 So the RDF/XML proposed would be: <ex:prop rdf:type="http://example.org/datatype1"></ex:prop> This is, by XML rules, equivalent to <ex:prop rdf:type="http://example.org/datatype1" /> but that's not the issue. The problem is that this form already has a different meaning in the RDF/XML defined in M&S and the current draft. An empty property element with property attributes is equivalent to the expansion below, which adds a blank node to hang the property off: <ex:prop> <rdf:Description> <rdf:type rdf:resource="http://example.org/datatype1" /> </rdf:Description> </ex:prop> which isn't what you wanted. If the lexical form is not the null string, say <ex:prop rdf:type="http://example.org/datatype1">a</ex:prop> then that is bad syntax and will very likely break all existing parsers. This is better done using any new rdf: term such as rdf:ltype. <ex:prop rdf:ltype="http://example.org/datatype1">a</ex:prop> which may either give a warning or error with a current parser as an unknown rdf: term, but should not be interpreted as a property. It can be defined to work something like xml:lang, i.e. sets a property (sic) of the contained literal. The latter is easy to add to a parser. An interesting question is whether to really make it like xml:lang - i.e. be the in-scope datatype on a particular XML element, unless you say otherwise or undefine it with rdf:ltype="". Dave
Received on Thursday, 29 August 2002 08:44:00 UTC