atom link analysis - was: link confusion?

I was trying to interpret the atom:link element [1]

If I try to look at the spec in a simple relational way (what is being 
related to what?)
then, given the following example atom xml extract,

   <entry>
     ...
	<link href="http://bblfish.net/blog/page5.html#42"
           type="text/html"
           hreflang="en"
           length="450"
           title="The html entry"
           rel="related/>
    </entry>

One may think of representing this with the following N3

[ a :Entry;
   :link [ :href <http://bblfish.net/blog/page5.html#42>;
           :type "text/html";
           :lang  "en";
           :length "450";
           :l_title  "The html entry"; # see note [2]
           :rel    :alternative
         ]
].


The problem to my mind is that the above interpretation of the xml is 
confusing
relations that apply to the link (:rel, :l_title) and relations that 
apply
to the object of the link (:type, :lang, :length).

Hence I prefer the following

@prefix arch: <http://sw.nokia.com/WebArch-1/>
@prefix owl: <http://www.w3.org/2002/07/owl#>

[ a :Entry;
   :link [ :href [ owl:sameAs <http://bblfish.net/blog/page5.html#42>;
                   arch:representation [
                   				   :type "text/html";  # note [3]
                                    :lang  "en";
                                    :length "450"
                                   ]
                 ]
           :l_title  "The html entry"; # see note [2]
           :rel    :alternative
         ]
].


That seems quite good.

Now the interesting thing is that from the above it would seem that one
should be able to deduce the following:

[ a :Entry;
   :alternative [ owl:sameAs <http://bblfish.net/blog/page5.html#42>;
                  arch:representation [
                   				   :type "text/html";  # note [3]
                                    :lang  "en";
                                    :length "450"
                                   ]
                 ]
].

Ie. the link object is not really an object, but as its name suggests
is really a relation. This would not be such a problem except for the 
fact
that we have now lost the title information that was placed on the link
object.

So perhaps what we have is that the link object is an anonymous 
rdfs:SubPropertyOf
the object of its :rel relation (in our example :alternative) which has 
a special
title attribute. That would allow us to make the above deduction I 
think.

So if variable relations were allowed  (they may be in N3, I am not 
sure),
one could write

[ a :Entry;
    _:link [ owl:sameAs <http://bblfish.net/blog/page5.html#42>;
             arch:representation [
                   				   :type "text/html";  # note [3]
                                    :lang  "en";
                                    :length "450"
                                  ]
          ]
].
_:link :rel :alternative;
        :l_title  "The html entry".

where :rel is itself a rdfs:SubPropertyOf rdfs:SubProperty.


This may make the atom link relation clearer to some :-)


Henry Story


[1] http://www.atompub.org/2005/03/12/draft-ietf-atompub-format-06.html
[2] the title attribute of the link is called l_title to avoid 
confusing it with the
  title element of the entry
[3] I am surprised the web arch ontology does not have the vocabulary 
for
    :type, :lang and :length that atom has.



On 25 Mar 2005, at 21:32, Henry Story wrote:
> On 25 Mar 2005, at 17:36, Henry Story wrote:
>> given the following example xml,
>>
>>   <entry>
>>     ...
>> 	<link href="http://bblfish.net/blog/page5.html#42"
>>           type="text/html"
>>           hreflang="en"
>>           length="450"
>>           title="The html entry"
>>           rel="related/>
>>    </entry>
>> [snip]
>> So a better interpretation of the initial xml would be the following
>>
>> _e1--is-a-> <Entry>
>>  |--link-> _link
>>           |--to---->_r--is-a-> <Representation>
>>           |         |--href--> <http://bblfish.net/blog/page5.html#42>
>>           |         |--type--> "text/html"
>>           |         |--lang--> "en"
>>           |         |-length-> 450
>>           |-title--> "The html entry"
>>           |--rel---> "related"
>
> Another interpretation of the original xml which would take into 
> account the fact that
> a link MUST have an href element would be:
>
> _e1--is-a-> <Entry>
>  |--link-> _link
>           |--href--><http://bblfish.net/blog/page5.html#42>
>           |         |--representation-->_r
>           |                             |--type--> "text/html"
>           |                             |--lang--> "en"
>           |                             |-length-> 450
>           |-title--> "The html entry"
>           |--rel---> "related"
>
>
> which is saying that a link relates an entry and a resource, and that 
> sometimes
> it is appropriate to give extra information about representations of 
> that resource.
>
> And so more it would perhaps be clearer for the xml to be stated like
> this
>
> <entry>
>     ...
> 	<link title="The html Entry"
>           rel="related"
>           href="http://bblfish.net/blog/page5.html#42">
> 		<representation        	
>          	type="text/html"
>             lang="en"
>             length="450"/>
>     </link>
>  </entry>
>
> I am not saying that that is the answer, just that the it may help to 
> make the
> distinction clearer somehow between properties of the link and 
> properties on the
> object of the link.
>
> Henry
>

Received on Tuesday, 29 March 2005 13:23:00 UTC