W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > February 2002

Re: Datatypes and xml:lang

From: Sergey Melnik <melnik@db.stanford.edu>
Date: Fri, 01 Feb 2002 12:18:31 -0800
Message-ID: <3C5AF817.72184CA7@db.stanford.edu>
To: Dave Beckett <dave.beckett@bristol.ac.uk>
CC: RDF core WG <w3c-rdfcore-wg@w3.org>
Dave Beckett wrote:
> Can the TDL / S authors say something about where they see how the
> xml:lang attribute will appear in the data type models.
> Use this pseudo N-triples to talk about language-enabled literals:
>    "foo"(en)
>    "foo"        - no language


language tagging seems indeed quite similar to datatyping. In effect, we
have a typed string which we possibly have to compare with other typed
strings using a different set of rules than just plain textual equality.
More specifically, language tagging can be viewed as some kind of local
typing, where xml:lang property is used for typing instead of rdf:type.

It is not easy to add xml:lang to graphs unintrusively. Below I'm
sketching one possibility (without exploring the implications in
sufficient depth...)

As I pointed out in the "Flower Power" posting [1], under "untidy"
parsing of

  <rdf:Description parseType="untidy">

you'd get the triples

  _:1 prop _:2
  _:2 rdf:value "foo"


  _:1 prop <_:2, "foo">

if you like)

Assume that the RDF/XML content

    <prop xml:lang="en">foo</prop>

results in the graph

  _:1 prop _:2
  _:2 rdf:value "foo"
  _:2 xml:lang "en"

Now, if you ask for all properties with value "foo" e.g. using the query

  (X prop L) & (L rdf:value "foo")

[ or just  (X prop <L, "foo">)   ]

you'd get an equivalent answer in both cases, no matter whether language
tagging is present or not. If you care about language tagging, you could
ask explicitly for

  (X prop L) & (L rdf:value "foo") & (L xml:lang "en")

Then, of course, the query would succeed only in the first case. Similar
considerations apply with respect to comparing literals, although a more
careful analysis is needed, since bNodes may have different
interpretations. Well, just some preliminary thoughts...


[1] http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2002Feb/0007.html
Received on Friday, 1 February 2002 14:48:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:24:09 UTC