Re: RDF should allow XML datatypes

>>>Jonathan Borden said:
Dave Beckett said:
> http://www.w3.org/2001/sw/WebOnt/webont-issues.html#I4.3-Structured-Datatype
> s
> >
> > which I note, says: "Status Postponed"
> 
> The issue was originally prompted by Dan Brickley
> http://lists.w3.org/Archives/Public/public-webont-comments/2002Apr/0004.html
> and the OWL requirements document.
> 
> The issue which is "Postponed" dealt with a "deep" understanding of XML
> Schema by OWL, essentially an OWL representation of an XML Schema particle.
> A robust solution to this issue would require a fair amount of work, and
> indeed would depend on URIrefs for XML Schema particles -- still in
> development. Hence postponing the ultimate solution is appropriate.
> 
> What I have asked for is far far simpler and perhaps an acceptable interim
> solution to OWL's requirements.

The WebONT requirement doc is http://www.w3.org/TR/webont-req/
but I don't think all of them are being provided in OWL, right?


> > > http://example.org#foo http://example.org#prop "<this>is some structured
> XML</this>"^^http://example.org/SomeSchema#myType
> > >
> > > where http://example.org/SomeSchema#myType identifies the XML datatype:
> > > element this{text}
> > >
> > > Similarly RDF/XML should provide for:
> > >
> > > <rdf:Description rdf:about="http://example.org#foo">
> > >     <ex:prop rdf:datatype="http://example.org/SomeSchema#myType">
> > >             <this>is some structured XML</this>
> > >     </ex:prop>
> > > </rdf:Description>
> > >
<snip/>
> since RDF datatyping doesn't seem to be finalized, I don't seem the great
> resistance to relatively small changes.

I'll say again, I'm the expert on measuring RDF/XML syntax changes
and this isn't minor.  It introduces yet more new syntax, more
ambiguity in the grammar (for working out the next state to process)
when you get to that point and makes literal content processing
more complex again.

     <ex:prop rdf:datatype="http://example.org/SomeSchema#myType">
             <this>is some structured XML</this>
     </ex:prop>

is a property with infoitem sequence (whitespace, tag this, cdata, end tag)

     <ex:prop rdf:datatype="http://example.org/SomeSchema#myType">
             blah <tag>some structured XML</this>
     </ex:prop>

is a property with infoitem sequence (whitespace, cdata, tag this,
cdata, end tag) and you have to read an arbitrary number of
whitespace and cdata infoitems before you find it was really XML.
This is a bad idea, and why rdf:parseType="Literal" exists - so you
know this before you get to the property content.

It also means changing the RDF abstract syntax which is not likely.
RDF datatyping is pretty much decided now since we are drafting the
last techncial changes to the working drafts.

> > "Postponed"?  Plus you can still do it with the rdf:datatype, since
> > it allows any lexical form to be given as a string, that includes XML
> > infosets serialised to a string.
> 
> This is essentially what I am suggesting but to be clear:
> 
> "&lt;foo&gt; content &lt;/foo&gt;" is _not_ XML serialized, rather a string.
> A serialization of an XML infoset is plainly XML i.e.

In N-Triples,
"&lt;" is a string with 4 characters, starting with the character '&'

> <foo> content </foo>

In N-Triples,
"<foo> content </foo>" is a longer string starting with the character '<'

> So what is the problem with:
> 
> http://example.org#foo http://example.org#bar "<foo> content> </foo>"^^http://example.org#baz

That is fine, but the string is not XML.

If you want an XML string in N-Triples, use:
  http://example.org#foo http://example.org#bar xml"<foo> content> </foo>"

or possibly:
  http://example.org#foo http://example.org#bar "<foo> content> </foo>"^^http://www.w3.org/2000/01/rdf-schema#XMLLiteral

I'm still not sure if we are keeping both of the latter two forms.

(This would be wrong:
  http://example.org#foo http://example.org#bar xml"&lt;foo&gt; content&gt; &lt;/foo&gt;"

the first infoitem of that XML infoset would be '<' character data.
)


What you seem to be proposing is that all simple RDF literals are not
just strings+languages, but can be (strings+languages OR raw XML)
ie changing
  "String Literals" http://www.w3.org/TR/rdf-concepts/#xtocid103642
to a union of that with 
  "XML Literals" http://www.w3.org/TR/rdf-concepts/#xtocid103643

with consequent N-Triples and RDF/XML syntax changes.

Or maybe you are asking for just RDF/XML convienence changes; it isn't clear.

Dave

Received on Wednesday, 30 October 2002 05:52:13 UTC