Re: use cases for Literal? RSS? Dublin Core? PRISM? DAML? XAP?

DanC:
> I suppose, in addition to the tests art came up with,
> there's an example in the RDF spec:

  <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>


  -- http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#examples

> Jeremy, as owner of #rdfms-literal-is-xml-structure, I'd like
> you to show what the n-triples form of that document should be.

I would not be opposed to deleting parseType="Literal"

The only use case I have been told about is for cheap and cheerful tools
which involving typing RDF in directly where people want to put some
HTML in a value.

<rdf:Description>
<rdf:value rdf:parseType="Literal">I <EM>did</EM> tell you</rdf:value>
</rdf:Description>


In my previous ramblings on the topic, which I still owe the WG a second
attempt at, I have suggested that: 
1) any reasonable attempt at representing an XML Literal should be
permissable.
2) we should recommend an XML Canonicalisation according to the fragment
section of that spec.
http://www.w3.org/TR/2001/REC-xml-c14n-20010315#DocSubsets

Taking your challenge and following 2, I attach an n-triples file.

The literal, (in pieces that need to be concatenated is)

"\n      Ramifications of\n         <apply xmlns=\"http://www"
".w3.org/TR/REC-mathml\" xmlns:dc=\"http://purl.org/metadata/d"
"ublin_core#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-sy"
"ntax-ns#\">\n        <power></power>\n        <apply>\n      "
"    <plus></plus>\n          <ci>a</ci>\n          <ci>b</ci>"
"\n        </apply>\n        <cn>2</cn>\n      </apply>\n     "
" to World Peace\n    "

Notes:
Alla c14n all namespaces are made explicit on the outermost element(s)
in the fragment. In this case there is one.

The namespaces are listed in lexicographic order of the namespace
prefix.

Empty xml elements such as <power/> are canonicalised to
<power></power>.

The bit I don't like is including the irrelevant namespaces rdf and dc
as well as the relevant default namespace. Unfortunately the XML guys
have made it impossible to distinguish the relevant namespaces from the
irrelevant. Moreover it's not possible to undeclare namespaces (other
than the default one); hence it is always the case that XML Literals
under my proposal will have the rdf namespace being explicit in them
(yuk!).

I am increasingly convinced that infoset is an irrelevance to RDF/XML
and we should only consider the XPath nodeset. 

I would much prefer to drop parseType="Literal" than have a homebrew
solution that did not strike a chord with some XML standard.

Jeremy

Received on Wednesday, 10 October 2001 17:08:57 UTC