Foaf Mo Music recommendations extracted from Microformats.

3 views
Skip to first unread message

WebOrganics

unread,
Feb 28, 2008, 8:14:40 AM2/28/08
to Music Ontology Specification Group
Hello All

I have managed to hack together a way of embedding foaf music
recommendations in html using the Microformats hAudio [1] and hCard
[2] run through the W3C Online XSLT 2.0 Service [3] the concept of
which seems like an amazingly useful thing to do.

The hAudio markup represents the concept of a mo:Track
and hCard markup with a single ID represents the concept of a
foaf:person

There are two other important propeties that are needed for the
transformation a link with rel="index" which is the base url and links
with rel="bookmark" which are links to the actual music
recommendations

I am not so good at explaining things so, the demos:

Source Document: http://darkstarserver.co.uk/

Extracted FOAF:
http://xml.mfd-consult.dk/foaf/explorer/?foaf=http%3A//darkstarserver.co.uk/FOAF/%3Fid%3Dhttp%3A//darkstarserver.co.uk/

GRDDL output:
http://sparql.captsolo.net/browser/browser.py?url=http%3A%2F%2Fwww.w3.org%2F2007%2F08%2Fgrddl%2F%3FdocAddr%3Dhttp%3A%2F%2Fdarkstarserver.co.uk%2F%26output%3Drdfxml

As this is basically an extension of hAudioRSS the XSL is available to
download from:
http://esw.w3.org/topic/hAudioRSS

Comments, ideas on how I may be able to improve the semantics, or any
input, criticism is more than welcome

Thanks For your time

Martin McEvoy

[1] http://microformats.org/wiki/haudio
[2] http://microformats.org/wiki/hcard
[3] http://www.w3.org/2005/08/online_xslt/

Frederick Giasson

unread,
Feb 28, 2008, 8:34:06 AM2/28/08
to music-ontology-sp...@googlegroups.com
Hi Martin,


Great job!


This is a really nice implementation. In fact, I personally don't care
about hFormats, but I do really care about the generated RDF :) This is
a good example that shows that nobody should care, and that we can
easily transform one format to another. What is important is the data,
and their identification.

There is another way to see you data (and the linkage of your data):
http://tinyurl.com/2ucv2q


What is really nice if when you extend your interests (in some groups
and albums!) and that by browsing your interests you endup being able to
download free simple for some tracks.

Notice that the Musicontology skinning templates are not yet (all)
developed, so the presentation of the data could be even better.


Also, what you can do is taking any web page of this web site, and put
the URL at http://dataviewer.zitgist.com. Then check what happens:

http://dataviewer.zitgist.com/?uri=http%3A//darkstarserver.co.uk/


This is the dataviewer for the main page of the web site. Now open the
"navigator" (right sidebar) and check what has been extracted:
MusicGroups, Tracks, Profile (you), Intervals (this is something to look
at, seems wrong).

All that thanks to the data you created :)

Take care,


Fred

Yves Raimond

unread,
Feb 28, 2008, 8:38:18 AM2/28/08
to music-ontology-sp...@googlegroups.com
Hello Martin!

(I have to run to the airport, I will answer in a more detailed way later on)

> I have managed to hack together a way of embedding foaf music
> recommendations in html using the Microformats hAudio [1] and hCard
> [2] run through the W3C Online XSLT 2.0 Service [3] the concept of
> which seems like an amazingly useful thing to do.
>
> The hAudio markup represents the concept of a mo:Track
> and hCard markup with a single ID represents the concept of a
> foaf:person
>
> There are two other important propeties that are needed for the
> transformation a link with rel="index" which is the base url and links
> with rel="bookmark" which are links to the actual music
> recommendations
>
> I am not so good at explaining things so, the demos:
>
> Source Document: http://darkstarserver.co.uk/
>
> Extracted FOAF:
> http://xml.mfd-consult.dk/foaf/explorer/?foaf=http%3A//darkstarserver.co.uk/FOAF/%3Fid%3Dhttp%3A//darkstarserver.co.uk/
>
> GRDDL output:
> http://sparql.captsolo.net/browser/browser.py?url=http%3A%2F%2Fwww.w3.org%2F2007%2F08%2Fgrddl%2F%3FdocAddr%3Dhttp%3A%2F%2Fdarkstarserver.co.uk%2F%26output%3Drdfxml
>

This is *great* - I was really wondering how hAudio + hCard could be
grddl-ed to MO, some time ago, and you've done it :-) Really well
done!
Just one small comment - the namespace you use for MO looks weird - you use:
http://pingthesemanticweb.com/ontology/mo#:Record
instead of
http://purl.org/ontology/mo/Record

(which makes me think - we need to write some proper content
negotiation at some point... :) )

Attached is the modified XSL with the proper namespace.

Would you mind if I put that in the MO svn (motools project on sourceforge)?


Cheers!
y

hAudio2RDF.xsl

WebOrganics

unread,
Feb 28, 2008, 9:10:58 AM2/28/08
to Music Ontology Specification Group
Hello Fred thank you for your kind reply

On Feb 28, 1:34 pm, Frederick Giasson <f...@fgiasson.com> wrote:
> Hi Martin,
>
> Great job!
>
> This is a really nice implementation. In fact, I personally don't care
> about hFormats, but I do really care about the generated RDF :) This is
> a good example that shows that nobody should care, and that we can
> easily transform one format to another. What is important is the data,
> and their identification.
>
> There is another way to see you data (and the linkage of your data):http://tinyurl.com/2ucv2q
>
> What is really nice if when you extend your interests (in some groups
> and albums!) and that by browsing your interests you endup being able to
> download free simple for some tracks.
>
> Notice that the Musicontology skinning templates are not yet (all)
> developed, so the presentation of the data could be even better.
>
> Also, what you can do is taking any web page of this web site, and put
> the URL athttp://dataviewer.zitgist.com. Then check what happens:
>
> http://dataviewer.zitgist.com/?uri=http%3A//darkstarserver.co.uk/
>
> This is the dataviewer for the main page of the web site. Now open the
> "navigator" (right sidebar) and check what has been extracted:
> MusicGroups, Tracks, Profile (you), Intervals (this is something to look
> at, seems wrong).

yes the intervals do look wrong there is a blank node being produced ,
duration was added last thing, well last night really maybe I should
add a rdf:about="" on the interval tag? truthfully i am a little
unclear on how to add duration as i am a compete noob to MO.

>
> All that thanks to the data you created :)

Thank You ;)

Martin McEvoy
>
> Take care,
>
> Fred
>
> > I have managed to hack together a way of embedding foaf music
> > recommendations in html using the Microformats hAudio [1] and hCard
> > [2] run through the W3C Online XSLT 2.0 Service [3] the concept of
> > which seems like an amazingly useful thing to do.
>
> > The hAudio markup represents the concept of a mo:Track
> > and hCard markup with a single ID represents the concept of a
> > foaf:person
>
> > There are two other important propeties that are needed for the
> > transformation a link with rel="index" which is the base url and links
> > with rel="bookmark" which are links to the actual music
> > recommendations
>
> > I am not so good at explaining things so, the demos:
>
> > Source Document:http://darkstarserver.co.uk/
>
> > Extracted FOAF:
> >http://xml.mfd-consult.dk/foaf/explorer/?foaf=http%3A//darkstarserver...
>
> > GRDDL output:
> >http://sparql.captsolo.net/browser/browser.py?url=http%3A%2F%2Fwww.w3...

WebOrganics

unread,
Feb 28, 2008, 9:21:34 AM2/28/08
to Music Ontology Specification Group


On Feb 28, 1:38 pm, "Yves Raimond" <yves.raim...@gmail.com> wrote:
> Hello Martin!
>
> (I have to run to the airport, I will answer in a more detailed way later on)
>
>
>
> > I have managed to hack together a way of embedding foaf music
> > recommendations in html using the Microformats hAudio [1] and hCard
> > [2] run through the W3C Online XSLT 2.0 Service [3] the concept of
> > which seems like an amazingly useful thing to do.
>
> > The hAudio markup represents the concept of a mo:Track
> > and hCard markup with a single ID represents the concept of a
> > foaf:person
>
> > There are two other important propeties that are needed for the
> > transformation a link with rel="index" which is the base url and links
> > with rel="bookmark" which are links to the actual music
> > recommendations
>
> > I am not so good at explaining things so, the demos:
>
> > Source Document:http://darkstarserver.co.uk/
>
> > Extracted FOAF:
> This is *great* - I was really wondering how hAudio + hCard could be
> grddl-ed to MO, some time ago, and you've done it :-) Really well
> done!
> Just one small comment - the namespace you use for MO looks weird - you use:
> http://pingthesemanticweb.com/ontology/mo#:Record
> instead ofhttp://purl.org/ontology/mo/Record
>
> (which makes me think - we need to write some proper content
> negotiation at some point... :) )
>
> Attached is the modified XSL with the proper namespace.

Thanks loads for correcting me on that put it down to me only getting
to grips with MO only a week or so ago ;)

>
> Would you mind if I put that in the MO svn (motools project on sourceforge)?

No of course not be my guest :)

Thank you for your kind words I have updated the XSL with your
amendments.

Martin McEvoy

>
> Cheers!
> y
>
> hAudio2RDF.xsl
> 5KDownload

Frederick Giasson

unread,
Feb 28, 2008, 8:35:51 AM2/28/08
to music-ontology-sp...@googlegroups.com
Hi again,


I forgot to say:


You should change you Namespace from the "pingthesemanticweb.com" one
for this one: http://purl.org/ontology/mo/

So you will end-up with: http://purl.org/ontology/mo/MusicGroup, etc.


Take care,


Fred

WebOrganics

unread,
Feb 28, 2008, 10:01:31 AM2/28/08
to Music Ontology Specification Group
Ahh I have just used the dataviewer (I didn't know you could just
point url's at it, thought everything had to be RDF) and I see what
you mean time interval really needs looking at I will work on a fix
during today thanks again for pointing that out for me, I will use the
zitgist dataviewer a bit more in future its really usefull.


Thanks Again

Martin McEvoy

WebOrganics

unread,
Feb 28, 2008, 10:06:42 AM2/28/08
to Music Ontology Specification Group
Hi Again

On Feb 28, 1:35 pm, Frederick Giasson <f...@fgiasson.com> wrote:
> Hi again,
>
> I forgot to say:
>
> You should change you Namespace from the "pingthesemanticweb.com" one
> for this one:http://purl.org/ontology/mo/
>

Already done

http://esw.w3.org/topic/hAudioRSS?action=AttachFile&do=get&target=hAudio2RDF.xsl

> So you will end-up with:http://purl.org/ontology/mo/MusicGroup, etc.
>
> Take care,

Thanks Again

Martin McEvoy
>
> Fred

Frederick Giasson

unread,
Feb 28, 2008, 10:05:10 AM2/28/08
to music-ontology-sp...@googlegroups.com
Hi Martin,

> Ahh I have just used the dataviewer (I didn't know you could just
> point url's at it, thought everything had to be RDF) and I see what
> you mean time interval really needs looking at I will work on a fix
> during today thanks again for pointing that out for me, I will use the
> zitgist dataviewer a bit more in future its really usefull.
>


Good! Tell me if you come across any glitch while using it.


Take care,


Fred

Yves Raimond

unread,
Mar 3, 2008, 6:07:21 AM3/3/08
to music-ontology-sp...@googlegroups.com
Hello!

> >
> > Would you mind if I put that in the MO svn (motools project on sourceforge)?
>
> No of course not be my guest :)

I just committed it there:
http://motools.svn.sourceforge.net/viewvc/motools/mo/grddl/
(Just give me your sourceforge username if you want to be part of the
motools SF project).
I also committed two small changes:
mo:has_track --> mo:track (the two terms are a sameAs away, but the
latter looks better :-) )
and
dc:creator --> foaf:maker (as discussed in
http://groups.google.com/group/music-ontology-specification-group/browse_thread/thread/7a31b5fd76539174)

Cheers, and many thanks again!
y

WebOrganics

unread,
Mar 10, 2008, 7:41:22 PM3/10/08
to Music Ontology Specification Group
Hello Yves

On Mar 3, 11:07 am, "Yves Raimond" <yves.raim...@gmail.com> wrote:
> Hello!
>
>
>
> > > Would you mind if I put that in the MO svn (motools project on sourceforge)?
>
> > No of course not be my guest :)
>
> I just committed it there:http://motools.svn.sourceforge.net/viewvc/motools/mo/grddl/
> (Just give me your sourceforge username if you want to be part of the
> motools SF project).

Thanks its weborganics

> I also committed two small changes:
> mo:has_track --> mo:track (the two terms are a sameAs away, but the
> latter looks better :-) )
> and
> dc:creator --> foaf:maker (as discussed inhttp://groups.google.com/group/music-ontology-specification-group/bro...)

ah overlooked that one thanks ;)

>
> Cheers, and many thanks again!

No problem :) it was fun, the hAudioRDF xsl is actually part of a
bigger project to do with portable Identities and FOAF Lifestreams
(sounds a bit mad) but I am having SOME success. In a nutshell your
"identity" is a single vcard with a single ID and from that using some
XSL you can Extract things Like your recently played tracks on lastfm
(Music ontology), your friends acquaintances and colleagues (XFN and
RELATIONSHIP vocab) and your recent blogposts (hatom) the idea is you
have the same RDF output no matter where your vcard has been marked up
eg:

vcard marked up on my blog
http://darkstarserver.co.uk/foaf-me/?id=http%3A%2F%2Fdarkstarserver.co.uk%2F

vcard marked up on the microformats wiki
http://darkstarserver.co.uk/foaf-me/?id=http%3A%2F%2Fmicroformats.org%2Fwiki%2FUser_talk%3AWebOrganics

vcard marked up on another blog
http://dev.weborganics.co.uk/test/FOAF/lastfm/?id=http%3A%2F%2Fweborganics.co.uk%2Ftest%2F

the output should be the same (or similar) in all three documents.

Its all just test stuff at the moment nothing ready for production but
I am open to suggestions as my RDF isn't up to much.

You can grab a copy of the (messy) development snapshot of the style
sheet used to perform all the above transformations here
http://darkstarserver.co.uk/xsl/foaf-me.xsl

Thanks all again

Martin McEvoy

WebOrganics

unread,
Mar 10, 2008, 7:50:30 PM3/10/08
to Music Ontology Specification Group
hello again

On Mar 10, 11:41 pm, WebOrganics <ad...@weborganics.co.uk> wrote:

>
> vcard marked up on another bloghttp://dev.weborganics.co.uk/test/FOAF/lastfm/?id=http%3A%2F%2Fweborg...
>

OOps! sorry Pleas Dont use the last example It is a test Directory
that is prone to deletion or being turned off use this one instead
http://darkstarserver.co.uk/foaf-me/?id=http%3A%2F%2Fweborganics.co.uk%2Ftest%2F

Thanks

Martin McEvoy
Reply all
Reply to author
Forward
0 new messages