Re: create HTML based on RDF?

Everyone has their complaints about RDF/XML, and having done a lot of 
XSLT work, here's number 1 on my list: RDF/XML gives you so many ways to 
represent the same triple that an XSLT stylesheet that's going to find 
them all must be very complex. If you can be sure that the RDF/XML being 
processed by the stylesheet is always coming from the same serialization 
tool, you can work around that tool's conventions and save yourself a 
lot of work (I see that this is the case with 
http://rdf.openmolecules.net/html.xsl, which assumes that predicates are 
always stored as element names and literal values are always element 
PCDATA<http://rdf.openmolecules.net/>), but an XSLT stylesheet that can 
convert arbitrary RDF/XML to HTML would be way too much effort.

If I'm going to use XSLT to operate on RDF, I do a SELECT * WHERE {?s ?p 
?o} and ask for the results in SPARQL Query Results XML format. It's 
simple, straightforward, has all the information I need, and can be 
handled with a very simple stylesheet. Just this morning I was sketching 
out some ideas for writing a stylesheet like this to create HTML, but I 
haven't gotten past the initial sketches. (The Grand Prix of Turkey was 
too distracting.)

Bob


On 5/6/2011 7:53 AM, Egon Willighagen wrote:
> Dear Frans,
>
> On Fri, May 6, 2011 at 1:02 PM, Frans Knibbe<frans.knibbe@geodan.nl>  wrote:
>> 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.
> A very simple approach is to use standard web software, which everyone
> has installed already: a normal webbrowser, a normal webserver,
> RDF/XML, and XSLT.
>
> E.g. checkout this Resource:
>
> http://rdf.openmolecules.net/?InChI=1/CH4/h1H4
>
> The web server will always return RDF/XML, and this XML document has
> an associated XSLT stylesheet which is used by your web browser to
> create human-targeted HTML, by using this line in the document:
>
> <?xml-stylesheet type="text/xsl" href="http://rdf.openmolecules.net/html.xsl"?>
>
> Egon
>

Received on Sunday, 8 May 2011 19:43:36 UTC