Re: Text vs Markup Datatype

On Tue, Aug 27, 2013 at 9:45 AM, Uche Ogbuji <uche@ogbuji.net> wrote:

>
>>>
>>> Agreed. As all of us who have straddled XML and RDF know very well, this
> is something RDF has never handled in a sensible manner, to RDF's great
> detriment.  That said, it's hard to see how RDFa could do anything to paper
> over such a deep scar in the underlying RDF model.
>

Well, first of all, you don't have to use the RDF/XML serialization and
that's a huge win!  As the example suggests, you just need to type things
as "XML" or "HTML".

Second, just because the type name is rdf:XMLLiteral does not mean you have
to pass around serialized XML (or HTML).  You can just as easily have a
reference to a DOM node (or whatever) that *can* be serialized on demand.
 This is what Green Turtle does as it keeps around the reference to the
child nodes from the DOM and then serializes them whenever necessary.  If
you get the object value via the API, you get a NodeList instead.

It isn't really an RDF problem in as much as it is a quality of
implementation problem.  The rdf:XMLLiteral and rdf:HTML datatypes have a
lexical space of serialized markup but their values can be represented
however is appropriate for the using environment much the same way "1234"
could be an actual "int" in Java versus a "Number" instance in Javascript.

-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Tuesday, 27 August 2013 17:36:52 UTC