RE: Specifing language direction in RDF

On Tuesday the RDF Core decided to
use XML Canonicalization in some way to specify that the namespace is part
of the
XML literal in an example such as this.

Sounds a bit scary - we have RDF in an XML Database so how parseType=Literal
is specified is of vital interest to us.
Anybody care to share some details?


Nigel Hutchison

Nigel W.O Hutchison
Chief Scientist 
Software AG
Uhlandstr 12,D-64297 Darmstadt, Germany
+49 6151 92 1207

-----Original Message-----
From: Jeremy Carroll []
Sent: Friday, March 01, 2002 6:27 PM
To: Lars Marius Garshol (by way of "Ralph R. Swick" <>);
Subject: RE: Specifing language direction in RDF

I am currently worrying about bidi in RDF too.

RDF simply does not support xhtml:dir and trying to get it to do so is

One way to use it successfully though, is with rdf:parseType="Literal".


 <dc:title xml:lang="en-gb" rdf:parseType="Literal">
    <xhtml:span xhtml:dir="ltr">Chris Croome's home page</xhtml:span>

(I don't know xhtml well, and may have made mistakes there).
Running in Jena should get you the necessary namespace in the XML literal.
M&S is currently somewhat underspecified. On Tuesday the RDF Core decided to
use XML Canonicalization in some way to specify that the namespace is part
of the
XML literal in an example such as this. I am working on the details.

Another way of putting bidi in RDF is to put unicode bidi markers into the
literal. Anyone know how that works? Does it interact with unicode normal
form c?

Jeremy Carroll (Jena developer, RDF Core member).

> -----Original Message-----
> From:
> []On Behalf Of Lars Marius Garshol
> (by way of "Ralph R. Swick" <>)
> Sent: 01 March 2002 13:06
> To:
> Subject: Re: Specifing language direction in RDF
> [caught in spam trap -rrs]
> Date: Fri, 1 Mar 2002 07:10:54 -0500 (EST)
> Message-ID: <>
> To:
> References: <>
> From: Lars Marius Garshol <>
> * Chris Croome
> |
> | I'm attempting to follow the advice on text directionality in XML [3]
> | and was wondering if I have done this right:
> |
> |
> When I run this through Jena I get the following output:
>   {_4,, "en-gb"}
>   {_4,, "ltr"}
>   {_4,, "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."}
>   {,, _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 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: >
> ISO SC34/WG3, OASIS GeoLang TC        <URL: >

Received on Friday, 1 March 2002 13:40:22 UTC