List Info

Thread: Re: XFN is getting smoked by FOAF




Re: XFN is getting smoked by FOAF
country flaguser name
United Kingdom
2008-03-11 15:26:42
Tom Morris wrote:

> It's not a choice - you can use both, and you can
extend your FOAF
> with other predicate


Indeed. One could even use XFN with FOAF:

	<rdf:RDF
	    xmlns:rdf="htt
p://www.w3.org/1999/02/22-rdf-syntax-ns#"
	    xmlnsfn=&q
uot;http://gmpg.org/xfn/11#
"
	    xmlns:foaf="http://xmlns.com
/foaf/0.1/">
		<foaf:Person rdf:nodeID="p1">
		    <foaf:name>Alice</foaf:name>
		    <foaf:knows rdf:nodeID="p2"/>
		    <xfn:friend rdf:nodeID="p2"/>
		</foaf:Person>
		<foaf:Person rdf:nodeID="p2">
		    <foaf:name>Bob</foaf:name>
		    <foaf:knows rdf:nodeID="p1"/>
		    <xfn:friend rdf:nodeID="p1"/>
		</foaf:Person>
	</rdf:RDF>

Going the other way around:

	<p about="#alice">Alice <a
rel="foaf:knows friend"
href="#bob">Bob</ 
a>.</p>
	<p about="#bob">Bob <a
rel="foaf:knows friend"
href="#alice">Alice</ 
a>.</p>

-- 
Toby A Inkster
<mailto:mailtobyinkster.co.uk>
<http://tobyinkster.co.uk
>
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

Re: Re: XFN is getting smoked by FOAF
country flaguser name
United Kingdom
2008-03-11 17:53:01
Toby A Inkster wrote:
> Going the other way around:
>
>     <p about="#alice">Alice <a
rel="foaf:knows friend" 
> href="#bob">Bob</a>.</p>
>     <p about="#bob">Bob <a
rel="foaf:knows friend" 
> href="#alice">Alice</a>.</p>

Now that's something I'd never thought of...

Prem.

-- 
http://premasagar.com |
http://dharmafly.com



_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

Re: Re: XFN is getting smoked by FOAF
user name
2008-03-11 18:22:21
On Tue, Mar 11, 2008 at 10:53 PM, Premasagar Rose <ppremasagar.com> wrote:
> Toby A Inkster wrote:
>  > Going the other way around:
>  >
>  >     <p about="#alice">Alice <a
rel="foaf:knows friend"
>  >
href="#bob">Bob</a>.</p>
>  >     <p about="#bob">Bob <a
rel="foaf:knows friend"
>  >
href="#alice">Alice</a>.</p>
>
>  Now that's something I'd never thought of...
>

This is using the RDFa syntax. Some people like RDFa syntax,
but I
think that it can often lead to repetition. In this
scenario, you are
using XFN rel values to map to foaf:knows. It's probably a
better idea
to simply use the XFN syntax, and then use a GRDDL profile
to map that
to the underlying RDF semantics.

<p class="person" id="alice">Alice
knows <a href="#bob"
rel="friend">Bob</a></p>
<p class="person" id="bob">Bob
knows <a href="#alice"
rel="friend">Alice</a></p>

is a more natural HTML syntax* (you could go further and
replace the
'person' class with an hCard (although you would then have
to add
extra child elements to these elements to make them into
valid
hCards). You then put together a GRDDL document which
translates the
HTML above into the relevant RDF/XML syntax.

* It is also representable in HTML 4 and XHTML 1.0. Only a
limited
subset of RDFa can be represented in HTML 4 or XHTML 1.0 -
while the
more expressive parts require you use the W3C's RDFa+XHTML
1.1 DTD if
you want it to validate.

Anyway, that's just my opinion and not strictly on-topic
for
microformats-discuss. Read the GRDDL Primer at:
http://www.w3.org/
TR/grddl-primer/
Ask in #swig on irc.freenode.net or e-mail me off-list if
you want to know more.

-- 
Tom Morris
http://tommorris.org/
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

Re: Re: XFN is getting smoked by FOAF
user name
2008-03-11 19:13:57
Two funny things:

- Typepad uses FOAF, but I can't find a single example of
non-trivial FOAF files
- When I'm searching for foaf & xfn stuff right now on
Google, this
discussion is already first page...

Regards, etc...
David
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )