Re: Some questions on properties

Hi Jan,


RDF is capable to make statements about statements.
The ID elements is used to identify the particular statement.
I think the following quote handles this:
<quote>
Within propertyElt (production [6.12]), the URI used in a resource attribute
identifies (after resolution) the resource that is the object of the
statement (i.e., the value of this property). The value of the ID attribute,
if specified, is the identifier for the resource that represents the
reification of the statement.
</quote>

An example:
lets say i want to express that i believe the statement that
the creator of the resource http://www.w3.org/Home/Lassila is Ora Lassila:

The original statement
   <rdf:RDF>
     <rdf:Description about="http://www.w3.org/Home/Lassila">
       <s:Creator ID="statement1" >Ora Lassila</s:Creator>
     </rdf:Description>

<!-- The statement saying that i believe the above statement -->

     <rdf:Description about="#statement1">
       <s:believedBy>Stefan Decker</s:believedBy>
     </rdf:Description>
   </rdf:RDF>



Your second question is a little bit more complex:
at first:
You are using http://w3.org/TR/1999/PR-rdf-syntax-19990105#
as the namespace identifier. This is not recognized by the RDF-Parser:
the RDF-parser uses http://www.w3.org/1999/02/22-rdf-syntax-ns#
as the RDF-namespace identifier.
This is is reason, that rdf:ID="t1" is not recognized as the identifier
of the resource. Instead it is treated as the value of the property rdf:ID
(The reason why you got the following triple:
   resource('genid0') 
predicate('http://w3.org/TR/1999/PR-rdf-syntax-19990105#ID') literal('t1')
)

Then the spec says:
<quote>
Properties and values expressed in XML attribute form within an empty XML 
element E by productions [6.10] and [6.12] are equivalent to the
same properties and values expressed as XML content of a single Description 
element D which would become the content of E. The referent
of D is the value of the property identified by the XML element name of E 
according to productions [6.17], [6.2], and [6.3]
.....
</quote>

That means the situation given in your example

<?xml version='1.0'?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <rdf:Description rdf:ID="t1">
     <a1 a2="hello" a3="world"/>
   </rdf:Description>
</rdf:RDF>

leads to the creation of a new resource, which is the value of the
"a1" property of the subject "t1".
This new resource has itself two properties: "a2" with value "hello" and
"a3" with value "world".

The following triples should be generated (in subject, predicat, 
object)-notation:
't1','a1','newsym'
'newsym','a2','hello'
'newsym','a3',world'

I think the parser at http://www.pro-solutions.com/rdfdemo/rdf.cgi
does not handle this correct (Janne?)
(Footnote:i am curious if *any* available RDF-parser handles this correct...)

Furthermore, i have a question myself:
I'am not sure about the usage of the ID-attribute here:
The spec says:
"r2 (the new created resource in the example) is the resource named by the 
resource attribute if present or a new resource. If the ID attribute is 
given it is the identifier of this new resource."

If i understand this correctly the following RDF-statement
<?xml version='1.0'?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <rdf:Description rdf:ID="t1">
     <a1 resource="myid" a2="hello" a3="world"/>
   </rdf:Description>
</rdf:RDF>

(note the resource attribute!) leads to the following triples:
't1','a1','myid'
'myid','a2','hello'
'myid','a3',world'

However, also

<?xml version='1.0'?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <rdf:Description rdf:ID="t1">
     <a1 ID="myid" a2="hello" a3="world"/>
   </rdf:Description>
</rdf:RDF>

(note the ID attribute)
leads to the same set of triples!
This is at least an inconsistent use of the ID-attribute in property-elements
(compared to the situation, where the ID-attribute is used to identify a 
statement).

Anyone willing to comment on this?


Best,
         Stefan





At 12:20 PM 4/25/00 +0200, Jan Wielemaker wrote:
>Hi,
>
>I'm rather new to RDF.  Trying to interpret RDF in Prolog and
>struggling with the definition I have troubles with two aspects
>of properties.
>
>I refer to the rule 6.12 fromREC-rdf-syntax-19990105:
>
>
>  [6.12] propertyElt    ::= '<' propName idAttr? '>' value '</' propName '>'
>                          | '<' propName idAttr? parseLiteral '>'
>                                literal '</' propName '>'
>                          | '<' propName idAttr? parseResource '>'
>                                propertyElt* '</' propName '>'
>                          | '<' propName idRefAttr? bagIdAttr? propAttr* '/>'
>
>First of all, I cannot find what it means to give a property an ID?
>Does somebody has an example?
>
>Also, I have little clue on the meaning of the various possibilities
>implied by the last rule.  It suggests I can write
>
><?xml version='1.0'?>
>
><rdf:RDF xmlns:rdf="http://w3.org/TR/1999/PR-rdf-syntax-19990105#">
>   <rdf:Description rdf:ID="t1">
>     <a1 a2="hello" a3="world"/>
>   </rdf:Description>
></rdf:RDF>
>
>The online parser at http://www.pro-solutions.com/rdfdemo/rdf.cgi
>suggests:
>
>resource('genid1') predicate('a2') literal('hello')
>resource('genid1') predicate('a3') literal('world')
>resource('genid0') predicate('a1') literal('')
>resource('genid0') 
>predicate('http://w3.org/TR/1999/PR-rdf-syntax-19990105#ID')
>                         literal('t1')
>resource('genid0') 
>predicate('http://www.w3.org/1999/02/22-rdf-syntax-ns#type')
> 
>resource('http://w3.org/TR/1999/PR-rdf-syntax-19990105#Description')
>
>This doesn't really make much sense to me!?
>
>         Please help!
>
>                 --- Jan

Received on Tuesday, 25 April 2000 19:41:07 UTC