Re: rdf:parseType="Literal" and XML Fragment interchange

The Fragment Interchange spec is basically a mechanism for specifying
context (in the XML sense) for any well-balanced chunk of XML.  The 
Fragment Interchange spec allows for the application/user to determine
how much (if any) context is specified.  So, basically, it defines
a very simplified way to "package" as a well-formed XML document a 
possibly multi-rooted chunk of XML along with an optional context 
specification.

As far as I can tell, your RDF example is not interested in (and does 
not give me any idea of) its XML context, so to that extent, most of 
the utility of the Fragment Interchange spec is being ignored, and
all you would be using is the (non-normative) packaging described 
mostly in Appendix B of the spec.

So for your <dc:Title>...</dc:Title> example, a minimal fragment
package (with an empty fragment context specification) for that 
XML would look something like the following:

<p:package xmlns:p="http://www.w3.org/2001/02/xml-package"
           xmlns:f="http://www.w3.org/2001/02/xml-fragment"
           xmlns:dc="http://purl.org/metadata/dublin_core#"
           xmlns="http://www.w3.org/TR/REC-mathml">
  <f:fcs>
    <f:fragbody/>
  </f:fcs>
  <p:body>
  <dc:Title>...</dc:Title>
  </p:body>
</p:package>

Note there are really two things the Fragment Interchange spec is
trying to provide:
1.  A way to specify any amount of the XML context of the original
    fragment body in situ using well-formed XML, and
2.  A couple wrapper elements (p:package, p:body) that associate
    the fragment context specification with the fragment body and
    turn the combination into a well-formed XML document.

In the case that you have no fragment context information to interchange
and your fragment body is already single rooted (and therefore already
well-formed XML), it is not clear to me that the Fragment Interchange spec
is giving you much.

paul

At 09:54 2001 08 16 -0500, Dan Connolly wrote:
>RDF syntax has a mechanism[1] for saying "here's a hunk
>of XML to be used as the value of a property"; implementors
>have raised issues with the way it's specified[2,3].
>
>[2]  http://www.w3.org/2000/03/rdf-tracking/#rdfms-xmllang
>[3] 
>http://www.w3.org/2000/03/rdf-tracking/#rdfms-literal-is-xml-structure
>
>At a recent FTF meeting[4], it seemed that the XML Fragments
>spec might provide a solution to these issues, but we weren't
>sure how.
>
>Would you (the fragments editors) please take a look at the
>example in [1] below? I'd like to know what it would
>look like if you took the contents of the dc:Title
>element and wrapped it per the XML Fragment interchage
>spec.
>
>Could the result take the form of a string (character sequence)
>that, when parsed per the fragments spec, gives back
>all the relevant information, like namespaces, xml:lang, etc?
>
>
>[1]
>
>[[[
>7.5. Values Containing Markup
>
>When a property value is a literal that contains XML markup, the
>following
>syntax is used to signal to the RDF interpreter not to interpret the
>markup but
>rather to retain it as part of the value. The precise representation of
>the
>resulting value is not specified here.
>
>In the following example, the value of the Title property is a literal
>containing
>some MATHML markup.
>
><rdf:Description
>  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>  xmlns:dc="http://purl.org/metadata/dublin_core#"
>  xmlns="http://www.w3.org/TR/REC-mathml"
>  rdf:about="http://mycorp.com/papers/NobelPaper1">
>
>  <dc:Title rdf:parseType="Literal">
>    Ramifications of
>       <apply>
>      <power/>
>      <apply>
>        <plus/>
>        <ci>a</ci>
>        <ci>b</ci>
>      </apply>
>      <cn>2</cn>
>    </apply>
>    to World Peace
>  </dc:Title>
>  <dc:Creator>David Hume</dc:Creator>
></rdf:Description>
>]]]
>
>--        Resource Description Framework (RDF) Model and Syntax
>Specification
>http://www.w3.org/TR/REC-rdf-syntax/
>Wed, 24 Feb 1999 14:45:07 GMT
>
>[4]
>========
>excerpt from http://www.w3.org/2001/sw/RDFCore/20010801-f2f/
>
>#rdfms-literal-is-xml-structure
>
>log
>
>It was suggested that there had been basic agreement on the mailing
>list, that
>literals with a parseType of "Literal" would be treated as strings, but
>the model
>would contain further information. There are many details to work out,
>but this
>is the basic principle. A list of components that would have to be in
>the model
>was started:
>
>     the string 
>     parseType (string or QName) 
>     namespaces 
>     language 
>     base URI 
>     entities 
>
>A number of different approaches were identified:
>
>     the XML in the input document must be self sufficient (an
>incomplete
>     solution) 
>     parser adds namespaces (an incomplete solution) 
>     replace the literal with an infoset representation of RDF 
>     serialise the infoset to a string 
>     use XML fragments 
>     deprecate and represent as CDATA 
>
>It was suggested that parseType="Literal" could be dropped but Ron
>Daniel and
>Eric Miller spoke up that there are users who use it. It was suggested
>that the
>parser adding namespace definitions to the literal might break an XML
>signature. Concern was raised over entities in the literal. The
>existence of the
>xml fragments work was noted.
>
>=========
>
>
>-- 
>Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Thursday, 23 August 2001 11:39:03 UTC