Description of problem: some languages like Arabic are written from right to left this mean that alignment should be mirrored for those languages I made a patch to fix this first apply the attached patch with -p1 then run this script for i in html xhtml do perl -i -wpe 's/align="left"/align="{\$directions.align.start}"/g' ${i}/* perl -i -wpe 's/align="right"/align="{\$directions.align.end}"/g' ${i}/* done Additional info: up stream report https://sourceforge.net/tracker/index.php?func=detail&aid=2402595&group_id=21935&atid=373749
Thanks for info and patch, I would like to have it accepted by upstream before adding to Fedora. Additionally there was some perl script cleanup in docbook-* packages to reduce perl build requires, so I would use sed for that if you don't mind - once the proposed patch will be accepted by upstream.
Not only html/xhtml, fo branch has to be fixed as well ... anyway - fix was accepted by upstream and included to latest svn snapshot(although in a bit different way). I tried to backport it to 1.74.0, result built in rawhide as docbook-style-xsl-1.74.0-5.fc11 , please give it a try and let me know if it does work for you. Closing RAWHIDE.
sure, I'll try it but the upstream did not set the default encoding to UTF-8 and setting it to UTF-8 with params works only for chunks (not single or main file)
it did not work I tried xsltproc /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl ghelp/ar/RELEASE-NOTES.xml > RELEASE-NOTES-ar.html after installing the packages then grep dir= RELEASE-NOTES-ar.html if you want to try it yourself just have a document that starts like this <article id="article" lang="ar_JO"> <articleinfo> note: the upstream snapshot works
This seems to work for me: xsltproc --stringparam writing.mode "rl" /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl arabic.xml >arabic.html It seems that most of the patch is working, but the language setting from common/ar.xml is ignored (just l10n.xml is called according to xsltproc verbose log)... Will try to check more, please use that stringparam workaround meanwhile.
you should not pass --stringparam writing.mode "rl" it should be autodetected with gettext and while looking into the patch you missed the following lines in html/param.xsl ... <xsl:param name="writing.mode"> <xsl:call-template name="gentext"> <xsl:with-param name="key">writing-mode</xsl:with-param> <xsl:with-param name="lang"> <xsl:call-template name="l10n.language"> <xsl:with-param name="target" select="/*[1]"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:param> ...
Yep, I knew it should be autodetected, I just said it could be used as temporary workaround. Thanks for the fix for my patch, I simply missed that when backporting upstream fix to 1.74.0. It seems to work now correctly for my test arabic xml file, built as docbook-style-xsl-1.74.0-6.fc11 . Closing RAWHIDE again.
thank you very much it works for me