- From: Frank Manola <fmanola@mitre.org>
- Date: Tue, 12 Aug 2003 09:24:18 -0400
- To: Patrick.Stickler@nokia.com
- CC: w3c-rdfcore-wg@w3.org
Patrick.Stickler@nokia.com wrote: > > >>-----Original Message----- >>From: ext Frank Manola [mailto:fmanola@mitre.org] >>Sent: 11 August, 2003 16:13 >>To: Stickler Patrick (NMP/Tampere) >>Cc: w3c-rdfcore-wg@w3.org >>Subject: Re: Text for FAQ re rdf:datatype="&rdfs;#XMLLiteral" >> >> >>>Perhaps it remains an open question whether we require RDF >>>parsers to check the validity of lexical forms explicitly >>>specified with rdf:datatype="&rdf;XMLLiteral". I (perhaps >>>mistakenly) thought we didn't want to impose such a requirement >>>on RDF parsers. Perhaps we do. >>> >>>Patrick >>> >>> >> >>I'm not necessarily suggesting that we *ought* to impose such a >>requirement, just pointing out that it seems to break the >>model that we >>describe for other datatypes. >> > > I don't think it breaks any model. RDF is completely ignorant > about any datatype other than rdf:XMLLiteral. Thus, it simply > is unnable to say anything about lexical forms other than > those for rdf:XMLLiteral. > > rdf:XMLLiteral is RDF's own datatype, so it seems reasonable > that RDF parsers would pay it special attention -- but that > doesn't mean that the datatype itself is in any way different > from any other datatype or is getting treatment that is > contrary to the MT. > Just to clarify: the "model" I'm referring to is that software that purports to support a given datatype is responsible for being able to determine the validity of lexical forms for the datatype and, given a lexical form, determine the proper value according to that datatype (at least, that's what I understand the "model" to be). What I'm suggesting breaks the model in the case of rdf:XMLLiteral isn't that RDF parsers would "pay it special attention" (the "model" *requires* that it be paid special attention), it's that it would be *optional*. In other words, if RDF software works for "its" datatype (rdf:XMLLiteral) the way I understand other software is supposed to work for "their" datatypes, RDF software ought to check the validity of lexical forms for rdf:XMLLiteral. Conversely, would we consider it legitimate according to our model for RDF datatypes if software that purported to support xsd:integer got the typed literal "pumpkin"^^xsd:integer for John Smith's age (to quote an example from the Primer) and failed to complain (or even check)? > >>And I think it'll be natural >>for people >>to wonder exactly how (or when) the validity of an instance of >>rdf:XMLLiteral gets determined, if RDF software doesn't do it. >> > > I agree with you there, and upon considering it, I think we > *should* in fact require (or at least very strongly encourage) > RDF parsers to check explicitly specified lexical forms > for rdf:XMLLiteral for validity. > > >>If we >>continue our litergy that says we're not defining a >>processing model, I >>don't see how this can be dependent on whether we imagine an RDF/XML >>parser on top of an XML parser (for example). Even though we define >>RDF/XML as the standard language for serializing RDF graphs, that >>language is defined in terms of how the RDF/XML generates >>triples. >> > > Well, I'd view validity checking of rdf:XMLLiteral lexical forms > to be a syntax check, though I could conceive of many valid > arguments that such checking would not be completely generic > (but so what, what does it hurt?) It *is* a syntax check, but it seems to me there are (at least potentially) two syntaxes involved. One is the lexical form defined for rdf:XMLLiteral. This is the lexical form defined at the graph level (whether the original source syntax that produced the graph was RDF/XML or not). The second is what you have to write in RDF/XML (since it's an XML markup language) to carry that lexical form through the XML to the graph. > > >>It's >>at the level of triples that this validity checking would have to be >>done. Presumably it's at this level that whether subjects and >>predicates are valid URIrefs is determined, and whether any literals >>specified are valid literals. >> > > Fine, so an RDF parser SHOULD (not necessarily MUST) check the > validity of all lexical forms for rdf:XMLLiteral, however they > were defined, and SHOULD issue a warning for any illformed > lexical forms. > > We can treat it as an optional, but recommended, step following > the purely generic, datatype agnostic parsing phase. > > >>I'd note that an alternative would be to treat rdf:XMLLiteral sort of >>like we treat other datatypes, except that we (RDF) have defined a >>built-in name for it. That is, we don't define XML (any more than we >>define xsd:integer) but we know people are presumably going >>to want to >>use XML literals, so we provide this datatype, which is likely to be >>widely available (but if it is made available in a particular RDF >>implementation, the implementation has to provide the appropriate >>software to support the RDF-defined datatype model, and the datatype >>semantics). I don't really care, except if we're going to break the >>model, I think we need to say so. >> > > I don't think any special attention given to rdf:XMLLiteral by > RDF parsers breaks any model, but I agree that we should be clear > about the what's and why's. > I repeat, it's not special attention given to rdf:XMLLiteral by RDF parsers that seems to break the model, it's that this attention would be optional. --Frank -- Frank Manola The MITRE Corporation 202 Burlington Road, MS A345 Bedford, MA 01730-1420 mailto:fmanola@mitre.org voice: 781-271-8147 FAX: 781-271-875
Received on Tuesday, 12 August 2003 08:59:40 UTC