XML Literals in RDFa
Kjetil Kjernsmo
kjetil at kjernsmo.net
Sun Jan 18 14:26:37 CET 2009
Hi Toby and all,
I've been thinking about my RDFa templating language, and the need for
XMLLiterals in there. I've been working on top on Toby's great
RDF::RDFa::Parser.
When working on data, I find it most useful to have a the right objects
to work on, so I would much prefer to have a XML::LibXML::Node returned
from the parser, but since the RDFa spec is very clear about how such
things should be serialised [1], Toby is doing the right thing.
So, I figured this would be a good first discussion subject for this
list, since the solution may also involve Greg's RDF::Trine :-)
The easiest way to go about, I suppose is to keep the parser as it is,
and in any higher levels parse the serialised string again.
But then, this is feels somewhat suboptimal, since RDF::RDFa::Parser
uses XML::LibXML, and so the wanted node is likely (?) of the right
type allready before serialising.
Thus, I was wondering whether another callback function for XMLLiterals
would be the best way to do it? What do you think, Toby?
So, now that I've committed to RDF::Trine, RDF::Trine::Node::Literal
doesn't use XML::LibXML::Node for the internal representation of an
XMLLiteral, right? Should it?
If these things are reasonable, I could use the callback to add the
XML::LibXML::Node to the model returned by RDF::RDFa::Parser::Trine,
which would also be a good thing, spec-wise, I think.
[1] http://www.w3.org/TR/rdfa-syntax/#sec_5.5.
Cheers,
Kjetil
--
Kjetil Kjernsmo
Programmer / Astrophysicist / Ski-orienteer / Orienteer / Mountaineer
kjetil at kjernsmo.net
Homepage: http://www.kjetil.kjernsmo.net/ OpenPGP KeyID: 6A6A0BBC
More information about the Dev
mailing list