RE: [xdi] Bill's suggestions

From
Barnhill, William <>
Date
2007-02-15T15:31:42+00:00
ID
Thread
RE: [xdi] Bill's suggestions
Title: RE: [xdi] Bill's suggestions

I've been doing some more thinking about the $data as datatype specifier concept, particularly in light of some comments by Dan Connolly and others with the gist that the RDF WG maybe should have used xsi:type instead of rdf:datatype (http://www.mnot.net/blog/2005/04/01/rdf_complexity).

It seems to me there are already two comprehensive methods for typing literal data, and the contents of <data> are essentially literals (Even XDI in there is still treated as an XML literal I think). Those two methods are xsi:type and mime type. It seems to me also that xsi:type and mime type are actually types of Strings themselves.

Based on that, I propose changing to the following:

        +sometype+foo/$type.xsi/string

    and @example/+sometype+foo//

Instead of

        +sometype+foo/$is$a/$data+string

    and @example/+sometype+foo//

Both state that the datatype of +sometype+foo is a string.

In addition, if I want to say that +sometype+foo is HTML we have a problem. We have limited ourselves to 3 segments, which I have no problem with, and an XREF has to have a root so we can't do (please correct me if I'm wrong on this):

        +sometype+foo/$type.mime/(text/html)

If we use convention again and say that we are adopting the mime type identifiers, except that our mime type major/minor delimiter is . instead of / then we can write:

        +sometype+foo/$type.mime/text.html

But what about the case where there are multiple alternate types? An example:

   _:x rdf:type rdf:alt .

   _:x _:1 "hello, world"^^xsd:string .

   _:x _:2 "<p>hello, world</p>"^^rdf:XMLLiteral .

(above cribbed from Jimmy Cerra's comment at the page linked above, assume base of http://example.com)

This would be stated by the following XRIs ('data:' usage spur of the moment, and may need rethink):

@example*x/$type.mime/text.plain

@example*x/$type.mime/text.xml

@example*x/$type.mime/text.plain//data:text/plain,hello, world

@example*x/$type.mime/text.xml//data:text/xml,<p>hello, world</p>

Looking at this if we had any kind of inference mechanism we could streamline down to:

@example*x/$type.mime/text.plain//data:text/plain,hello, world

@example*x/$type.mime/text.xml//data:text/xml,<p>hello, world</p>

and have the valid existence of the other two XRIs inferred.

I don't like the combo of text.plain and text/plain in there, but not sure what to do about it right now.

Ok so we can state multiple data types, but can we retrieve them by type? Sure:

@example*x/($type.mime/text.plain)//

@example*x/($type.mime/text.xml)//

<uncertainty>

If we are still supporting both the s/p/o and the auth/type/inst (a/t/i) models, then we could even say that an XRI like

        +sometype+foo/+name/+last

is by definition shorthand for

        +sometype*foo/($type.xdi/+name)/+last

</uncertainty>

Which means that the XDI dictionary typing system possibly goes from the only way to do typing to just the recommended way to type non-literal XDI resources.

The above seems cleaner to me than the N3 RDF version, and way cleaner than the XML RDF version. Note that I have changed the meaning from the RDF version somewhat since it seems the multiple XRIs express an rdf:bag (agent may choose one or more of), rather than rdf:alt (agent may choose one of). Not sure how to resolve that yet.

Bill

-----Original Message-----

From: Drummond Reed [mailto:]

Sent: Thu 2/15/2007 2:01 AM

To: 

Cc: Barnhill, William; ; 

Subject: RE: [xdi] Bill's suggestions

Laurie, thanks for the reminder. To extract Bill's question, it was:

> But..is $data meant to represent actual data, or the datatype? Put

> another way, what is the relationship of

>       @example+foo$data

> to

>       @example+foo//

First I need to clarify that that $data is used to define datatypes as an

XDI RDF object XRI value, not as an XDI RDF subject, so I think the

appropriate question is, what is the relationship of:

        +sometype+foo/$is$a/$data+string

to

        @example/+sometype+foo//

What the first XDI RDF statement says is that the datatype of +sometype+foo

is a string. From that you know that any XDI RDF statement that uses

+sometype+foo as a predicate and has a literal as an object will have a

string as datatype of the literal.

More in the next version of the proposal coming shortly (either tonight or

tomorrow morning).

=Drummond

-----Original Message-----

From:  [mailto:]

Sent: Tuesday, February 13, 2007 9:11 PM

To: Drummond Reed

Cc: 'Barnhill, William'; ; 

Subject: Re: [xdi] Bill's suggestions

Drummond,

I apologize if you've already addressed this in the newest version of the

RDFX documentation, but I just wanted to follow up wrt Bill's question

about $data, given that I asked you a similar question last week. That is,

is $data meant to represent data or the data type?

And, if it is meant to represent data, how is the data type represented?

Cheers,

Laurie

> Bill,

>

> Thanks for the very helpful analysis of the RDF predicate mapping of the 5

> RDFX verbs. Paul Trevithick sent me a note with a similar analysis and I

> believe identical conclusions (we need time to study them closely).

>

> I also think that "as" is a brilliant suggestion as the English equivalent

> of the $data predicate. I kept wondering about that one and you nailed it

> on

> the head.

>

> See my next message about the recurring question of naming of the five

> predicates.

>

> =Drummond

>

> -----Original Message-----

> From: Barnhill, William [mailto:]

> Sent: Thursday, February 08, 2007 2:11 PM

> To: ; 

> Subject: [xri] RE: [xdi] Re: [xri] Agenda: Joint XRI & XDI TC Telecon 4pm

> PT

> Thursday 2007-02-08

>

>

> I won't be able to attend the telecon, but wanted to post some thoughts

> on the RDFX doc:

>

> It would make seeing the RDF fidelity easier if the five root RDFX

> predicates table contains a column that maps to the equivalent RDF

> predicate, specifically:

>

> Predicate             English Relationship    RDF style Predicate

> $ref                  "is"            equivalence

> owl:equivalentClass

> $ref$object           "is a"  inheritance             rdf:type (if

> subj is an object, owl:class otherwise)

> $link                 "has"           aggregation

> exns:hasXXX, where XXX is the property name specified within the link

> XRI

> $link$object  "has a" composition             exns:xxx, where xxx is

> the property type specified within the link XRI

> $data                 ""              datatype

> rdf:parseType

>

> I'd also suggest an English phrase for data: "as", ex: "as String"

> But..is $data meant to represent actual data, or the datatype? Put

> another way, what is the relationship of

>       @example+foo$data

> to

>       @example+foo//

>

>

> Exns is the prefix for a domain-specific namespace.

>

> On the 3 col graph, I like it, though I'd like to see it bigger to

> labelling is clearer.

>

> On tightening the XRI syntax within the schema there's a fairly easy way

> that makes it clear, and doesn't impose a further burden on

> implementers, but does allow them to do automated checking if they want:

> use schematron extensions within the schema.

>

> Bill

>

>