Re: Proposal

Patrick,

Thank you for this suggestion.

A couple of questions:

 - is it necessary to drop the definition of the xml:literal datatype?

 - What triple does

<rdf:Description>
  <ex:foo rdf:parseType="Literal"><em>&lt;foo&gt;</em></ex:foo>
</rdf:Description>

generate?

 - What triple does

<rdf:Description>
  <ex:foo rdf:parseType="Literal"><ex:foo ex:b='b' ex:a='a' /></ex:foo>
</rdf:Description>

generate?

Some incomplete noodlings that might be relevant can be found at:

  http://esw.w3.org/topic/RdfCoreXmlLiteral

Brian

  

On Thu, 2003-07-10 at 16:02, Patrick.Stickler@nokia.com wrote:
> OK folks,
> 
> In the interests of satisfying all interested parties,
> I offer the following proposal for an alternative
> solution to the present one, based on nothing new,
> just a partial roll back to a more traditional M&S
> treatment of XML literals.
> 
> Changes:
> 
> 1. The datatype rdf:XMLLiteral is discarded.
> 
> 2. The attribute+value rdf:parseType="Literal" is
> strictly syntactic, indicating a plain literal
> which is serialized in the RDF/XML instance as XML.
> I.e. a literal constituting text with markup.
> 
> 3. The attribute rdf:datatype can co-occur with
> rdf:parseType="Literal". The combination of these two
> together is similar to the present interpretation of
> rdf:parseType="Literal" alone, but now requires the
> explicit specification of a datatype rather than
> being implicitly taken to be of type rdf:XMLLiteral.
> 
> --
> 
> Thus, given a context of
> 
>    <rdf:RDF ... xml:lang="fi">
>       ...
>    </rdf:RDF>
> 
> all of the following:
> 
> 1. <rdf:Description rdf:about="#x">
>       <ex:foo>bar</ex:foo>
>    </rdf:Description>
> 
> 2. <rdf:Description rdf:about="#x">
>       <ex:foo rdf:parseType="Literal">bar</ex:foo>
>    </rdf:Description>
> 
> 3. <rdf:Description rdf:about="#x" ex:foo="bar"/>
> 
> generate the same triple:
> 
>   <#x> ex:foo "bar"@fi .
> 
> --
> 
> All of the following:
> 
> 4. <rdf:Description rdf:about="#x">
>       <ex:foo rdf:parseType="Literal"><xhtml:b>bar</xhtml:b></ex:foo>
>    </rdf:Description>
> 
> 5. <rdf:Description rdf:about="#x">
>       <ex:foo>&lt;xhtml:b&gt;bar&lt;/xhtml:b&gt;</ex:foo>
>    </rdf:Description>
> 
> 6. <rdf:Description rdf:about="#x" ex:foo="&lt;xhtml:b&gt;bar&lt;/xhtml:b&gt;"/>
> 
> generate the same triple:
> 
>    <#x> ex:foo "<xhtml:b>bar</xhtml:b>"@fi .
> 
> --
> 
> Both of the following:
> 
> 7. <rdf:Description rdf:about="#x">
>       <ex:foo rdf:datatype="&ex;blargh">bar</ex:foo>
>    </rdf:Description>
> 
> 8. <rdf:Description rdf:about="#x">
>       <ex:foo rdf:datatype="&ex;blargh" rdf:parseType="Literal">bar</ex:foo>
>    </rdf:Description>
> 
> generate the same triple:
> 
>    <#x> ex:foo "bar"^^ex:blargh .
> 
> --
> 
> And both of the following:
> 
> 9. <rdf:Description rdf:about="#x">
>       <ex:foo rdf:datatype="&ex;blargh" rdf:parseType="Literal"><xhtml:b>bar</xhtml:b></ex:foo>
>    </rdf:Description>
> 
> 10.<rdf:Description rdf:about="#x">
>       <ex:foo rdf:datatype="&ex;blargh">&lt;xhtml:b&gt;bar&lt;/xhtml:b&gt;</ex:foo>
>    </rdf:Description>
> 
> generate the same triple:
> 
>    <#x> ex:foo "<xhtml:b>bar</xhtml:b>"^^ex:blargh .
> 
> --
> 
> Users are then free to choose between legacy M&S literals, with lang
> tag, with no special distinction made in the graph regarding the
> presence or absence of markup; or alternatively, typed literals
> with no lang tags and likewise no distinction made in the graph regarding
> the presence or absence of markup in the lexical forms.
> 
> There remains no semantic distinction between a plain literal and
> an XML literal. An "XML literal" is simply a plain literal with
> XML markup that is serialized as unescaped XML. Nothing more.
> 
> RDF continues to have two kinds of literals, plain and typed, and 
> comparison of plain literals, regardless of the presence of markup, 
> is by simple string comparison. All reference to canonicalization 
> is removed from the specs -- hopefully moved to a Note addressing the 
> use of RDF with datatyped literals having XML encoded lexical forms,
> and including the definition of a datatype equivalent to rdf:XMLLiteral
> or a similar interpretation of xsd:complexType.
> 
> Let the market and user community decide which alternative,
> plain or typed literal, is best for which application.
> 
> Equivalences between plain literals and typed literals is
> left to each individual specification of each datatype.
> 
> Note again, that this alternative proposal introduces nothing
> substantively new to the mix. And in fact, the minor changes
> to the RDF/XML syntax represent how most earlier RDF parsers
> treated rdf:parseType="Literal" to begin with.
> 
> It also will allow folks to say useful things like
> 
>    <rdf:Description rdf:about="#x">
>       <ex:foo rdf:datatype="&xhtml;b" rdf:parseType="Literal">
>          <xhtml:b>bar</xhtml:b>
>       </ex:foo>
>    </rdf:Description>
> 
> i.e.
> 
>    <#foo> ex:foo "<xhtml:b>bar</xhtml:b>"^^xhtml:b .
> 
> and thus take advantage of being able to serialize those typed
> XML encoded lexical forms without escaping.
> 
> --
> 
> Martin, does that meet your expectations and wishes
> better than the present solution? 
> 
> If so, is the WG favorable to such a proposed change?
> 
> Regards,
> 
> Patrick
> 
> --
> Patrick Stickler
> Nokia, Finland
> patrick.stickler@nokia.com
>  

Received on Thursday, 10 July 2003 14:21:02 UTC