RTL in XML

J

Joe Green

Hi,

I am trying to do some documentation in DocBook XML format. The
document is in UTF-8 and is in a right-to-left language. How do I tell
a paragraph that the text's direction is rtl or ltr?

I compile the xml file using 'xmlto', using the default settings on a
Debian system (in case that is of any significance).

Thanks
 
A

Andreas Prilop

I am trying to do some documentation in DocBook XML format. The
document is in UTF-8 and is in a right-to-left language. How do I tell
a paragraph that the text's direction is rtl or ltr?

I suppose much of the information you can find on
<http://ppewww.ph.gla.ac.uk/~flavell/charset/text-direction.html>
applies to XML as well.

Some examples in HTML:
<http://www.unics.uni-hannover.de/nhtcapri/multilingual1.html#hebrew>
<http://www.unics.uni-hannover.de/nhtcapri/arabic.html6>
<http://www.unics.uni-hannover.de/nhtcapri/arabic-alphabet.html>
<http://www.unics.uni-hannover.de/nhtcapri/temp/parentheses.html>
 
J

Joe Green

Andreas Prilop said:

Thanks. I am afraid none of the above examples shed enough light to
what I am attempting to do.

It seems that wherever I put <par dir="rtl"> or even <dir = "rtl">
tags, it says these attributes do not exist.

So, anyone have an example of an XML Docbook file that has directional
tags I can look at?

Thanks
 
A

Alan J. Flavell

But only if the attributes have been defined to have meaning in the
particular "application of XML" that you are using.
Thanks. I am afraid none of the above examples shed enough light to
what I am attempting to do.

It seems that wherever I put <par dir="rtl">

Does the "par" element claim to support a "dir" attribute in XML
DocBook? I really don't know, but it should be easier to look in the
authoritative place than to get trustworthy answers on Usenet.

Google search for the obvious terms suggests you could also be looking
at the thread which contains this message
http://lists.oasis-open.org/archives/docbook/200206/msg00079.html

My gut feeling is that I agree with the sentiment that putting Unicode
text-direction control characters into a data stream is not the way to
go - it needs some kind of higher-level markup. But at the time of
that discussion, it seems the higher-level markup hadn't been defined
yet.
or even <dir = "rtl"> tags,

To quote a colleague, "you can't just make shit up and expect it to
work".

Apropos "tags": you'll need Joe English's not-the-FAQ
http://www.flightlab.com/~joe/sgml/faq-not.txt
section 5 for a handy glossary of this term. (Note the posting date).
;-}

It appears from the above discussions that a requirement for dir
and/or bdo in DocBook had been recognised in 2002. But - not being
any kind of student of docbook - I've no idea what happened since,
sorry.

However, the idea that I saw floated in some discussions, of tying the
writing direction to the "lang" attribute, has to be bogus. Language
is orthogonal to writing system - all kinds of nonsense can result
from failure to establish that distinction.

best regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top