Re: create HTML based on RDF?

On 2011-05-09 16:45, Sarven Capadisli wrote:
> On Fri, 2011-05-06 at 13:02 +0200, Frans Knibbe wrote:
>> Hello,
>>
>> I am continuing my efforts with publishing Linked Data. I am trying to
>> that step by step. I have now managed to publish data in static RDF
>> files. Also, I have managed to configure my web server to do 303
>> redirection, returning either a HTML file or the RDF file, depending on
>> the client request. I understand that it is good practice to offer a
>> HTML representation of the data if the client is unable to handle RDF.
>>
>> I notice that it would be really helpful if I could automatically
>> generate HTML files based on the RDF files. That way I can focus on just
>> keeping the RDF file in good shape. After creating or editing an RDF
>> file I could run something that makes a HTML representation.
>>
>> Is anyone aware of software that can be used to automatically export a
>> RDF file to a HTML file that looks nice in an internet browser? Or isn't
>> this a common problem? I have to admit that I might thinking in the
>> wrong way about this.
>>
>> Regards,
>> Frans
>
> Hi Frans,
>
> I think you have a number of possible solutions (which have been
> mentioned in this thread) depending on how and which components you want
> to use.
>
> To help you make a decision, I have a few questions: What's your goal
> for outputting an HTML page? Who is it for (you, developers, average
> consumer..)? How do you want it consumed (single document view,
> navigating through the dataset, part of a larger site..)?
>
> You generally don't need to get into a templating system if the
> consumers of the HTML are there only to get a quick view of the data. It
> doesn't have to be pretty nor be integrated with a larger system.
> General purpose tools like rapper, any23 [1], ARC2 can help you do that
> with minimal work.
>
> If you are interested in a templating framework, I'd like to suggest
> Linked Data Pages [2] (built on top of Paget [3]). It can do content
> negotiation; offer different RDF serializations; work with a SPARQL
> endpoint; create unique SPARQL queries per HTTP URI request; HTML (RDFa)
> templates; themes..
>
> Needless to say a templating framework may be overkill for your needs
> and be more complex to setup than integrating one of the general tools
> into something you already have.
>
> Once again, it all depends on how you want the HTML representation to be
> consumed. If you want to focus on data management and architecting
> information for your consumers, you should consider using an RDF store
> and run SPARQL queries.
>
> [1] http://any23.org/
> [2] https://github.com/csarven/linked-data-pages
> [3] http://code.google.com/p/paget/
>
> -Sarven
Dear Sarven,

It is clear to me now that there are many different ways of handling my 
problem, so asking these questions makes sense. I will try to answer:

My immediate needs are short-term, but are likely to evolve. At first, I 
want to demonstrate to myself and to my colleagues how simple it is to 
publish Linked Data. The easiest thing I can think of is to create RDF 
data files with personal information, primarily using the FOAF 
specification. Users should be able to edit their RDF files (for example 
adding links to descriptions of other people). It would be nice if they 
need not be bothered with maintaining the HTML presentation too. Also I 
like to use as few system components as possible, for demonstrating that 
it is really easy to set up a simple but complete system for publishing 
Linked Data.

Because my goal is to stimulate publishing data as Linked Data, I 
wouldn't mind if the HTML is not very pretty. In fact, I think each HTML 
file should have a note saying something like "This is a HTML 
presentation of the data on <subject>. This page is generated 
automatically based on source data expressed in RDF. You are probably 
seeing this because your browser has no capabilities for handling RDF." 
I think HTML files with a three column layout (subject - predicate - 
object) with hyperlinked content should suffice for now.

If all goes well, the first setup will probably evolve into something 
bigger. Next steps could be using more vocabularies and developing our 
own vocabularies. When we start publishing more and different data we 
will probably need a triple store and SPARQL end point at some moment. 
It seems more possibilities of creating HTML representations will become 
available then. I can imagine that at that time the requirements for 
generating HTML will also have evolved.

Thanks,
Frans

Received on Tuesday, 17 May 2011 12:43:22 UTC