Re: relationship of rdfs:Literal to rdfs:Resource

Oops! Sorry totally forgot about this little detail in my last post.

> If I wanted to http://www.ninebynine.org/2003/09/number#_10 to refer 
> to the resource represented by "10"^^xsd:integer


Small change...

<rdf:Description rdf:about="http://www.ninebynine.org/2003/09/number#_10">
   <eg:IsDivisibleBy>2</eg:IsDivisibleBy>
   <rdf:value 
rdf:datatype="http://www.w3.org/2001/XMLSchema/#integer">10</rdf:value>
</rdf:Description>

Rahul

http://www.kingtiny.net

Rahul Singh wrote:

>
> Very interesting discussion. Sorry, but I feel compelled to jump in.
>
>> The things they represent are all resources---the things literals 
>> represent (rdfs:Literal) are a subset of the things URI references 
>> represent (rdfs:Resource). Right? 
>
>
> Correct. Literals in RDF and Resources in RDF are both nodes in the 
> RDF graphs. They are just slightly different kinds of nodes. Both can 
> have edges coming into them (i.e. they can both be objects in a 
> statement) but only resources can have edges going out from them (i.e. 
> only resources can be subjects in a statement).
>
> If you see the W3C RDF validator it makes the Literals in the graph as 
> rectangles and resources as ovals. In Drive (www.driverdf.org) the 
> literals (RdfLiteral class) are sub classes of resources (RdfNode class).
>
>> 2. Does each instance of the plain literal "10" always refer to the 
>> same identical resource? 
>
>
> Every time a predicate in the graph refers to the literal "10", it 
> points to the same node in the graph. In the graph there will only be 
> one instance of the literal "10" and all statemenst that want ot refer 
> to "10" will point to the same node in the graph. In other words if 
> the literal 10 occurs in the graph then anything else that refers to 
> the literal 10 (in the same datatype and language) will point to the 
> same node.
>
>> 3. Does each instance of the typed literal "10"^^xsd:integer always 
>> refer to the same identical resource? 
>
>
> Same answer as above. However the literal "10" will not be the same as 
> the literal "10"^^xsd:integer because in the former the datatype is 
> unspecified and defaults to er... the default for that locale or state 
> or any application specific value. In the latter case it is specified 
> to be an XML literal. It just so happens that an application will 
> usually default to using xsd:literal as the datatype when the datatype 
> is not specified. But in the RDF graph they will be distinct nodes and 
> it is upto the application to figure out/assume that they are the same 
> or to treat them differently.
>
>> 4. How can I assert properties of the resources indicated by the 
>> plain literal "10"? (If "10" really represents a resource, why can't 
>> that thing have properties, too?)
>>
>> 5. If I wanted to http://www.ninebynine.org/2003/09/number#_10 to 
>> refer to the resource represented by "10"^^xsd:integer, how would I 
>> do that in a graph (via RDF+XML)? Why must I force the RDF processor 
>> to have some sort of outside predefined knowledge to associate URIs 
>> with resources designated by literals? If I can associate URIs with 
>> resources in a graph, and literals stand for resources, why can't I 
>> associate a URI with the resource designated by a literal? 
>
>
> Suppose you wanted to say that "10 is divisible by 2". i.e. "10" has 
> the property that it is divisible by "2". You can do the f ollowing...
>
> <eg:MyNumber>
>    <eg:IsDivisibleBy>2</eg:IsDivisibleBy>
>    <rdf:value>10</rdf:value>
> </MyNumber>
>
> The above bit of RDF represents a graph that has a node (a blank node) 
> that has a type (eg:MyNumber) that has two properties. rdf:value which 
> points to the literal "10" and "eg:IsDivisibleBy" which points to the 
> literal "2". You can make it more interesting by wrapping "2" up into 
> a resource as follows
>
> <eg:MyNumber>
>    <eg:IsDivisibleBy rdf:resource="two">
>    <rdf:value>10</rdf:value>
> </MyNumber>
>
> <eg:MyNumber rdf:nodeID="two">
>    <rdf:value>2</rdf:value>
> </eg:MyNumber>
>
> The above graph has two resources of type eg:MyNumber (I am assuming 
> that an ontology exists that gives meaning to eg:MyNumber) exist. One 
> number (the one that have a value of 10) has a property of being 
> divisible by another number (the one that has the value of 2).
>
> I usually try to think of RDF purely in the graph sense and visualise 
> the nodes and edges. It makes things easier for me. I also think of it 
> in OO terms. That makes it easier for me.
>
> And finally please forgive any typos and case issues in the RDF above. 
> I think it is correct but I might have made a few boo-boos.
>
> I hope this helps,
>
> Rahul Singh,
> kingtiny@kingtiny.net
>
> http://www.kingtiny.net
>
>
>
>
>
>
>
> Garret Wilson wrote:
>
>>
>> Hmm, this is giving me even more food for thought. Your responses 
>> lead me to more questions:
>>
>> Graham Klyne wrote:
>>
>>> Syntactically, literals and URI references are distinct entities in 
>>> an RDF graph, but they both denote things drawn from a set of 
>>> resources.
>>
>>
>>
>> 1. Let me see if I understand this correctly: literals and URI 
>> references are syntactically distinct. The things they represent are 
>> all resources---the things literals represent (rdfs:Literal) are a 
>> subset of the things URI references represent (rdfs:Resource). Right?
>>
>>> So, any value (e.g., the number 10) which might be denoted by a 
>>> literal (e.g. "10"^^xsd:integer) could also be denoted by a URI 
>>> (e.g. I might define the URI ref 
>>> http://www.ninebynine.org/2003/09/number#_10 to have the number 10 
>>> as its intended denotation), and while they remain syntactically 
>>> distinct entities, in the interpretation intended by my hypothetical 
>>> definition, (and the presumed definition of xsd:integer) they would 
>>> denote the same number 10.
>>
>>
>>
>> 2. Does each instance of the plain literal "10" always refer to the 
>> same identical resource?
>>
>> 3. Does each instance of the typed literal "10"^^xsd:integer always 
>> refer to the same identical resource?
>>
>> 4. How can I assert properties of the resources indicated by the 
>> plain literal "10"? (If "10" really represents a resource, why can't 
>> that thing have properties, too?)
>>
>> 5. If I wanted to http://www.ninebynine.org/2003/09/number#_10 to 
>> refer to the resource represented by "10"^^xsd:integer, how would I 
>> do that in a graph (via RDF+XML)? Why must I force the RDF processor 
>> to have some sort of outside predefined knowledge to associate URIs 
>> with resources designated by literals? If I can associate URIs with 
>> resources in a graph, and literals stand for resources, why can't I 
>> associate a URI with the resource designated by a literal?
>>
>> Garret
>>
>>
>
>

Received on Sunday, 14 September 2003 23:05:47 UTC