Forum Moderators: open
Having read Sean Palmer's "A Semantic Web Hypertext System (http://www.mysterylights.com/sbp/adotsw/) document, I am beginning to wonder whether one of my particular issues is the "exception that proves the rule" regarding "explicit reification" as he put it.
Much of the (meta)data my application will return to a client UI has very little benefit of being in xhtml format. Infact, I'm not sure I actually want the implicit content structure that xhtml would enforce.
This is especially true since I have discovered that CSS in RDF presentationally works exactly as expected (I was surprised I confess!), and achieves the presentational requirments of that data, therefore why go to the bother of htmlising it, rather than just leaving it as xml. However, two other requirements, lead me to question whether the above approach is correct.
Firstly, providing a hyperlink within the rdf data ( as in html:a ) to force the user agent to generate a standard hyperlink. I had thought I could just add:
hmlns:html="http://www.w3.org/1999/xhtml";
<rdf:RDF ..... + the various namespaces...
<html:a html:href="standard_uri.rdf" html:type="application/rdf+xml">
< ...more rdf data />
</html:a>
</rdf:RDF>
Secondly, part of my intention was to merge multiple rdf sources into a single one, each source could provide it's own CSS stylesheet for the data it provided. I had intended to prefix each sources data with it's stylesheet
<?xml-stylesheet href="rdf.css" type="text/css"?>
So should rdf be embedded in xhtml, or is there a satifactory way to "link" and "style" rdf datastreams? Does anyone know what the general consensus is?
Cheers,
asp
Did you notice that the Sean Palmer document you referenced is not valid XHTML? In fact, at the very bottom of the page, just above all his W3C validation icons, he says:
Valid XHTML? No! But it does follow an advisory part of that specification {Section 3.1.2}, and it is well formed XML.
If you fancy the challenge this is the concept of what I'm trying to do. Say I decide to create a "Forum RDF" to describe forum information, the snip below validates as RDF correctly:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="rdf.css" type="text/css"?>
<rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:frm = "http://www.forumrdf.org/current#">
<frm:Thread rdf:about="http://URLtoForum#ThreadID">
<rdf:type rdf:resource="http://www.forumrdf.org/current#Thread"/>
<frm:subject>Styling RDF with CSS</frm:subject>
<frm:posted_by>aspr1n</frm:posted_by>
</frm:Thread>
</rdf:RDF>
The CSS works well as it picks up the "Thread" selector, and say display a nice graphic next to it. Only the problem is now I want the browser to display a link against the rdf:about URL to get more info on the Thread, which certainly Mozilla doesn't see as a link.
To solve this I might:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="rdf.css" type="text/css"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:frm="http://www.forumrdf.org/current#">
<html:a html:href="http://URLtoForum/ThreadID" html:type="application/rdf+xml">
<frm:Thread rdf:about="http://URLtoForum#ThreadID">
<rdf:type rdf:resource="http://www.forumrdf.org/current#Thread"/>
<frm:subject>Styling RDF with CSS</frm:subject>
<frm:posted_by>aspr1n</frm:posted_by>
</frm:Thread>
</html:a>
</rdf:RDF>
..Well in actual fact I can't cos I can't get this bit to validate - but you get my point ;-). I've specified the html namepsace, and then referred to it's tags as html:*
The point here is now I have to parse the RDF to create the html tags even though I have a perfectly good URL in the data already, then open and close the tags around the RDF data to link.
I can only hope XSL is not the solution here! Anyway, I can't see anything conceptually wrong with what I want to do ;-(
BTW. It's also worth noting my previous post about the "<?xml-stylesheet.." statement needing to be at the top of the document, if the <frm:Thread..> data was added by multiple sources, I have problems getting the style info into the doc top!
asp