<xsl:attribute name="link">#0000FF</xsl:attribute>
<xsl:attribute name="vlink">#840084</xsl:attribute>
<xsl:attribute name="alink">#0000FF</xsl:attribute>
+ <xsl:if test="starts-with($writing.mode, 'rl')">
+ <xsl:attribute name="dir">rtl</xsl:attribute>
+ </xsl:if>
</xsl:template>
<xsl:template name="head.content">
******************************************************************** -->
+<!-- These variables set the alignment value for HTML output based on
+ the writing-mode specified in the gentext file for the document's lang. -->
+
+<xsl:variable name="direction.align.start">
+ <xsl:choose>
+ <xsl:when test="starts-with($writing.mode, 'lr')">left</xsl:when>
+ <xsl:when test="starts-with($writing.mode, 'rl')">right</xsl:when>
+ <xsl:otherwise>left</xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="direction.align.end">
+ <xsl:choose>
+ <xsl:when test="starts-with($writing.mode, 'lr')">right</xsl:when>
+ <xsl:when test="starts-with($writing.mode, 'rl')">left</xsl:when>
+ <xsl:otherwise>right</xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="direction.mode">
+ <xsl:choose>
+ <xsl:when test="starts-with($writing.mode, 'lr')">ltr</xsl:when>
+ <xsl:when test="starts-with($writing.mode, 'rl')">rtl</xsl:when>
+ <xsl:otherwise>ltr</xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
+
<!-- The generate.html.title template is currently used for generating HTML -->
<!-- "title" attributes for some inline elements only, but not for any -->
<!-- block elements. It is called in eleven places in the inline.xsl -->
<!ENTITY reference.autolabel SYSTEM "../params/reference.autolabel.xml">
<!ENTITY glossary.sort SYSTEM "../params/glossary.sort.xml">
<!ENTITY javahelp.encoding SYSTEM "../params/javahelp.encoding.xml">
+<!ENTITY writing.mode SYSTEM "../params/writing.mode.xml">
&draft.watermark.image;
&generate.id.attributes;
&generate.meta.abstract;
+&writing.mode;
</reference>
<reference xml:id="xslt"><title>XSLT Processing</title>
&rootid;
<src:fragref linkend="variablelist.as.table.frag"/>
<src:fragref linkend="variablelist.term.separator.frag"/>
<src:fragref linkend="variablelist.term.break.after.frag"/>
+<src:fragref linkend="writing.mode.frag"/>
<src:fragref linkend="xref.with.number.and.title.frag"/>
<src:fragref linkend="xref.label-title.separator.frag"/>
<src:fragref linkend="xref.label-page.separator.frag"/>