]> granicus.if.org Git - docbook-dsssl/commitdiff
In body.attributes template, add dir attribute if needed.
authorBob Stayton <bobs@sagehill.net>
Mon, 15 Dec 2008 23:16:37 +0000 (23:16 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 15 Dec 2008 23:16:37 +0000 (23:16 +0000)
xsl/xhtml/html2xhtml.xsl

index f9e32b61dbf355d410f9a872307ff8ced5fb4766..105656d4fa5017a026f6ad32d75d66079619fb44 100644 (file)
 <xsl:template match="xsl:template[@name='body.attributes']">
   <xsl:copy>
     <xsl:copy-of select="@*"/>
+    <xsl:if test="starts-with($writing.mode, 'rl')">
+      <xsl:attribute name="dir">rtl</xsl:attribute>
+    </xsl:if>
     <xsl:text>&#10;</xsl:text>
-    <xsl:comment> no apply-templates; make it empty </xsl:comment>
+    <xsl:comment> no apply-templates; make it empty except for dir for rtl</xsl:comment>
     <xsl:text>&#10;</xsl:text>
   </xsl:copy>
 </xsl:template>