Re: rdfms-literal-is-xml-structure: Yes, it is

>>>Aaron Swartz said:
> On this issue I agree with Dan Connolly that an RDF literal with 
> XML content parses to the RDF representation of the XML infoset 
> for that literal.
> 
> For more details, see:
> 	http://lists.w3.org/Archives/Public/www-rdf-interest/2000Aug/0061.html
> 
> I'd settle for it parsing to the canonical XML for the literal, 
> but I think this is easier and more useful.


So teasing this out a bit, I've attached some RDF/XML examples that
generate one statement with a literal value - but are they the same
literal?

[This mostly orthogonal to the xml:lang thing, or at least, lets
consider it so for this experiment.]

Try thinking about these questions for the attached examples:

   What is the first item in the literal - a '<' character or an XML
   element called el? [Question after #rdfig IRC chat from Dan Connolly]

   Can all the information in the literal be preserved in the RDF
   formal model, such that it can be reserialised to RDF/XML without
   information loss?

Note for #3 and #4, from RDF M&S, any parseType not literal or
resource is treated as literal.  For blah-blah, think
"daml:Collection" or "log:Quote" if you prefer examples of how this
has been used.

I've tried the examples with the online SiRPAC.
Examples #1 and #2 give
  [http://example.org/]--http://example.org/property/bar-->"<el/>"
#3 and #4 get turned into 
  [http://example.org/]--http://example.org/property/bar-->"<el></el>"

so looses the element-ness of the parseType literal.  However, it
might be rendering the XML to a string for display purposes.


My answers?
  #1 is a sequence of Unicode characters OR
        a sequence of XML characters (elements are forbidden)
    I need to check XML / XML infoset for some appropriate term - CDATA?

  #3, #4 are pieces of well formed XML (elements are allowed)
  and cannot be distinguished - parseType has been lost.
    It is not an XML document, or an XML Fragment[1]; and there are
    more issues that could be pulled out with namespaces, entitiy
    declarations etc.

  #2 could be either, but more likely well formed XML and not an element

Answering off-the-cuff!  Needs more detailed analysis, hopefully the
examples will help.


Dave

[1] XML Fragment Interchange, W3C Candidate Recommendation,
12 February 2001, http://www.w3.org/TR/xml-fragment

Received on Wednesday, 11 July 2001 14:56:48 UTC