Re: Fwd: Publishing Wordpress contents as linked data

2013-04-26 Thread Angelo Veltens
Am 26.04.2013 11:09, schrieb Angelo Veltens:
> Content negotiation is always done between the client and the server.
> The question is, what's in your accept header? If you prefer html you
> will get html. If you want other types, like 'application/rdf+xml' ask
> for it, and you might get it.
> 
> I don't know, if there is a way to ask the server "hey, before I request
> something, what content types do you support for the ressource
> http://...?"; Perhaps anyone else here can answer this? May it also be
> possible that I add some meta tag to the HTML to inform about other
> representations?

Sorry, completely overlooked the "Content negotiation negotiation"
discussion, cause I had filtered for subject...

Best regards,
Angelo



Re: Fwd: Publishing Wordpress contents as linked data

2013-04-26 Thread Angelo Veltens
Am 22.04.2013 13:18, schrieb Phillip Lord:
> 
> 
> Interesting. I've been meaning to get Wordpress content negotiating for
> a long time, so I shall take a look at this to see how you have done it.

I hook into the 'wp' action to do stuff, before anything is rendered:
https://github.com/angelo-v/wp-linked-data/blob/master/src/wp-linked-data.php#L36

The RequestInterceptor then does the CN and responses with RDF if
negotiated, otherwise it lets wordpress do it's normal work:
https://github.com/angelo-v/wp-linked-data/blob/master/src/request/RequestInterceptor.php#L35

> 
> You might also be interested in a couple of tools that we have written. 
> Kblog-metadata also adds metadata in a variety of formats to wordpress,
> with support for per post authors, container titles (and dates although
> this is not released yet). 
> 
> http://wordpress.org/extend/plugins/kblog-metadata/

Thanks, will take a look at it

[...]
> 
> We weren't able to scrap that much from your page, incidentally. 
> 
> http://greycite.knowledgeblog.org/?uri=http://datenwissen.de/2013/04/wordpress-bloginhalte-als-linked-data/
> 
> We need to check for content negotiation; I'm not clear, though, how we
> are supposed to know what forms of content are available. Is there
> anyway we can tell from your website that content negotiation is
> possible?

Content negotiation is always done between the client and the server.
The question is, what's in your accept header? If you prefer html you
will get html. If you want other types, like 'application/rdf+xml' ask
for it, and you might get it.

I don't know, if there is a way to ask the server "hey, before I request
something, what content types do you support for the ressource
http://...?"; Perhaps anyone else here can answer this? May it also be
possible that I add some meta tag to the HTML to inform about other
representations?

Best regards,
Angelo



Re: Fwd: Publishing Wordpress contents as linked data

2013-04-22 Thread Phillip Lord


Interesting. I've been meaning to get Wordpress content negotiating for
a long time, so I shall take a look at this to see how you have done it.

You might also be interested in a couple of tools that we have written. 
Kblog-metadata also adds metadata in a variety of formats to wordpress,
with support for per post authors, container titles (and dates although
this is not released yet). 

http://wordpress.org/extend/plugins/kblog-metadata/

It has a couple of nice widgets, which can display citation information
also visibly for the author (and others), which helps to make sure it's
correct. 

We also have http://greycite.knowledgeblog.org. This will return
metadata for any URL in a variety of forms, including RDF if you wish.
So, the metadata for your page is...

http://greycite.knowledgeblog.org/rdf?uri=http%3A%2F%2Fdatenwissen.de%2F2013%2F04%2Fwordpress-bloginhalte-als-linked-data%2F

It's not as extensive as the metadata you provide; we don't return
content or foaf authorship. But we estimate that it can return metadata
of this form for around 100 million URLs; it works but provides less
metadata for considerably more URLs. I think it content-negotiates as
well. Need to check.

We weren't able to scrap that much from your page, incidentally. 

http://greycite.knowledgeblog.org/?uri=http://datenwissen.de/2013/04/wordpress-bloginhalte-als-linked-data/

We need to check for content negotiation; I'm not clear, though, how we
are supposed to know what forms of content are available. Is there
anyway we can tell from your website that content negotiation is
possible?

Phil

Angelo Veltens  writes:
> I coded a small wordpress plugin, that enables linked data publishing of
> blog post & author data.
>
> The plugin is installed on my blog http://datenwissen.de. Feel free to
> request Linked Data via "application/rdf+xml" or "text/turtle"
> Accept-Header.
>
> The data of my latest blog post in the Q&D RDF Browser:
>
> http://graphite.ecs.soton.ac.uk/browser/?uri=http%3A%2F%2Fdatenwissen.de%2F2013%2F04%2Fwordpress-bloginhalte-als-linked-data%23it
>
> Blog authors get a FOAF-Profile that I plan to extend to a fully
> functional WebID:
>
> http://graphite.ecs.soton.ac.uk/browser/?uri=http%3A%2F%2Fdatenwissen.de%2Fauthor%2Fangelo%23me#http://datenwissen.de/author/angelo#me
>
> The plugin is not yet available in the wordpress plugin repo, but on
> github: https://github.com/angelo-v/wp-linked-data
>
> Contributions and feedback are welcome.
>
> Kind regards,
> Angelo Veltens
>
>
>

-- 
Phillip Lord,   Phone: +44 (0) 191 222 7827
Lecturer in Bioinformatics, Email: phillip.l...@newcastle.ac.uk
School of Computing Science,
http://homepages.cs.ncl.ac.uk/phillip.lord
Room 914 Claremont Tower,   skype: russet_apples
Newcastle University,   twitter: phillord
NE1 7RU