[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: RE: DOCBOOK: Attributes for text direction and language
It's been a while since I looked at this, so take it with a grain of salt, but I think that if you use Unicode (or UTF8), the codeset itself provides the information you need to render right to left and left to right text, including some characters that act as cues for cases where there might be ambiguity. There is a technical report from the unicode consortium that discusses this: http://www.unicode.org/unicode/reports/tr9/ While that seems like the cleanest way to handle RTL and LTR text, I don't know whether browsers and/or stylesheets use this information. Dick Hamilton > -----Original Message----- > From: Tsuguya Sasaki [mailto:ts@ts-cyberia.net] > Sent: Sunday, June 16, 2002 1:09 AM > To: DOCBOOK > Subject: Re: DOCBOOK: Attributes for text direction and language > > > > > 1) What is the DocBook equivalent, if any, of the HTML attribute > > > DIR for specifying in which direction, i.e. left-to-right or > > > right-to-left, text should be rendered within the containing > > > element? > > > > I don't know of one. Wouldn't the direction be determined > > by the lang? > > You are right. But according to my experience of writing the mixture > of LTR and RTL (mostly Hebrew) texts in HTML/XHTML, there are > cases where I have to specify the text direction explicitly > by using the > span element and the dir attribute. > > For example, if I write rtl_text + numbers without any mechanism > specifying the text direction, they aren't displayed in this logical > order but in the reverse physical order of numbers + > rtl_text. This also > happens in DocBook documents. > > Since I don't find any element and attribute in DocBook corresponding > to span and class respectively in HTML, I would also like to ask you > mavens if there is some way to have the same effect. Or am I missing > something? > > > > 2) What is the correct way to specify the language used within the > > > content of a certain element in DocBook *XML*: a) with the LANG > > > attribute (as in HTML), b) with the LANG and XML:LANG attributes > > > (as in XHTML 1.0), or c) with the XML:LANG attribute (as in XHTML > > > 1.1)? > > > > Either 'lang' or 'xml:lang' attribute would be correct > > (note they use lowercase letters). The 'lang' attribute is > > declared in the DocBook DTD for just about every element. > > The 'xml:lang' attribute is outside the DocBook DTD, of > > course, but is defined in the xml namespace specifically > > for that purpose. The DocBook XSL stylesheets support both. > > Thank you very much. > > Tsuguya Sasaki > http://www.ts-cyberia.net/ > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC