W3C home > Mailing lists > Public > www-rdf-interest@w3.org > March 2002

Re: Specifing language direction in RDF

From: by way of <larsga@ontopia.net>
Date: Fri, 01 Mar 2002 08:05:53 -0500
Message-Id: <200203011307.IAA01792@tux.w3.org>
To: www-rdf-interest@w3.org
[caught in spam trap -rrs]

Date: Fri, 1 Mar 2002 07:10:54 -0500 (EST)
Message-ID: <m3vgcgv69d.fsf@pc36.avidiaasen.online.no>
To: www-rdf-interest@w3.org
References: <20020225163115.GW23098@webarchitects.co.uk>
From: Lars Marius Garshol <larsga@ontopia.net>

* Chris Croome
| 
| I'm attempting to follow the advice on text directionality in XML [3]
| and was wondering if I have done this right:
| 
|   http://chris.croome.net/dc.ltr2.rdf

When I run this through Jena I get the following output:

  {_4, http://purl.org/dc/elements/1.1/language, "en-gb"}
  {_4, http://www.w3.org/1999/xhtmldir, "ltr"}
  {_4, http://www.w3.org/1999/02/22-rdf-syntax-ns#value, "Chris
  Croome's home page - some links to other stuff, some photos of
  friends and Sunday walks in the Peak District, and some style sheets
  you can play with."}
  {http://chris.croome.net/, http://purl.org/dc/terms/abstract, _4}

So it seems that you have a property derived from the XHTML 'dir'
attribute which associates the string "ltr" with your abstract.
Formally that looks like perfectly OK RDF to me. The property you use
also seems reasonable, though http://www.w3.org/1999/xhtml#dir might
be better.

An obvious question is whether there's any point in doing this at
all. English written in the latin script is *always* LTR, so you are
adding no useful information.

In fact, the only time when you really do neeed to specify text
direction is when you are mixing LTR and RTL text in the same string,
which is most likely going to be an extremely rare occurrence. As long
as all of the text is in the same direction the default text
directions specified by the Unicode standard should cause display
engines to do things correctly.

In fact, the only reason you will ever need to specify a direction is
so that the bidi algorithm will know what the base direction for the
string/paragraph is. That can't be determined from the text
automatically (when the text is in more than one direction), and so
needs to be provided by a human. This is the only thing you actually
need to specify direction explicitly (in this way) for.
 
| Is this the right way to specify the direction of text in RDF?

It seems reasonable to me.

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
ISO SC34/WG3, OASIS GeoLang TC        <URL: http://www.garshol.priv.no >
Received on Friday, 1 March 2002 08:07:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:53 GMT