Showing:

Documentation
Parameters
Used by
References
Included from
Source
Stylesheet html.xsl
Documentation

Description

This file was created automatically by html2xhtml
from the HTML stylesheets.
Included from
Template generate.html.title
Documentation

Description

 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 
 file. But it's called by all the inline.* templates (e.g., 
 inline.boldseq), which in turn are called by other (element) 
 templates, so it results, currently, in supporting generation of the 
 HTML "title" attribute for a total of about 92 elements. 
 You can use mode="html.title.attribute" to get a title for 
 an element specified by a param, including targets of cross references. 
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="generate.html.title">
  <xsl:apply-templates select="." mode="html.title.attribute"/>
</xsl:template>
Template *html.title.attribute
Documentation

Description

 Generate a title attribute for the context node 
Namespace No namespace
Match *
Mode html.title.attribute
References
Import precedence 0
Source
<xsl:template match="*" mode="html.title.attribute">
  <xsl:variable name="is.title">
    <xsl:call-template name="gentext.template.exists">
      <xsl:with-param name="context" select="'title'"/>
      <xsl:with-param name="name" select="local-name(.)"/>
      <xsl:with-param name="lang">
        <xsl:call-template name="l10n.language"/>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:variable>
  <xsl:variable name="is.title-numbered">
    <xsl:call-template name="gentext.template.exists">
      <xsl:with-param name="context" select="'title-numbered'"/>
      <xsl:with-param name="name" select="local-name(.)"/>
      <xsl:with-param name="lang">
        <xsl:call-template name="l10n.language"/>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:variable>
  <xsl:variable name="is.title-unnumbered">
    <xsl:call-template name="gentext.template.exists">
      <xsl:with-param name="context" select="'title-unnumbered'"/>
      <xsl:with-param name="name" select="local-name(.)"/>
      <xsl:with-param name="lang">
        <xsl:call-template name="l10n.language"/>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:variable>
  <xsl:variable name="has.title.markup">
    <xsl:apply-templates select="." mode="title.markup">
      <xsl:with-param name="verbose" select="0"/>
    </xsl:apply-templates>
  </xsl:variable>
  <xsl:variable name="gentext.title">
    <xsl:if test="$has.title.markup != '???TITLE???' and                   ($is.title != 0 or                   $is.title-numbered != 0 or                   $is.title-unnumbered != 0)">
      <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
    </xsl:if>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="string-length($gentext.title) != 0">
      <xsl:attribute name="title">
        <xsl:value-of select="$gentext.title"/>
      </xsl:attribute>
    </xsl:when>
    <!-- Fall back to alt if available -->
    <xsl:when test="d:alt">
      <xsl:attribute name="title">
        <xsl:value-of select="normalize-space(d:alt)"/>
      </xsl:attribute>
    </xsl:when>
  </xsl:choose>
</xsl:template>
Template d:qandaentryhtml.title.attribute
Namespace No namespace
Match d:qandaentry
Mode html.title.attribute
Import precedence 0
Source
<xsl:template match="d:qandaentry" mode="html.title.attribute">
  <xsl:apply-templates select="d:question" mode="html.title.attribute"/>
</xsl:template>
Template d:questionhtml.title.attribute
Namespace No namespace
Match d:question
Mode html.title.attribute
Import precedence 0
Source
<xsl:template match="d:question" mode="html.title.attribute">
  <xsl:variable name="label.text">
    <xsl:apply-templates select="." mode="qanda.label"/>
  </xsl:variable>
  <xsl:choose>
    <xsl:when test="string-length($label.text) != 0">
      <xsl:attribute name="title">
        <xsl:value-of select="$label.text"/>
      </xsl:attribute>
    </xsl:when>
    <!-- Fall back to alt if available -->
    <xsl:when test="d:alt">
      <xsl:attribute name="title">
        <xsl:value-of select="normalize-space(d:alt)"/>
      </xsl:attribute>
    </xsl:when>
  </xsl:choose>
</xsl:template>
Template dir
Namespace No namespace
Used by
Parameters
QName Namespace Select
inherit No namespace 0
Import precedence 0
Source
<xsl:template name="dir">
  <xsl:param name="inherit" select="0"/>
  <xsl:variable name="dir">
    <xsl:choose>
      <xsl:when test="@dir">
        <xsl:value-of select="@dir"/>
      </xsl:when>
      <xsl:when test="$inherit != 0">
        <xsl:value-of select="ancestor::*/@dir[1]"/>
      </xsl:when>
    </xsl:choose>
  </xsl:variable>
  <xsl:if test="$dir != ''">
    <xsl:attribute name="dir">
      <xsl:value-of select="$dir"/>
    </xsl:attribute>
  </xsl:if>
</xsl:template>
Template anchor
Namespace No namespace
Used by
Templates block.object; co; component.title; division.title; entry; formal.object; graphical.admonition; informal.object; inline.boldmonoseq; inline.boldseq; inline.charseq; inline.italicmonoseq; inline.italicseq; inline.monoseq; inline.subscriptseq; inline.superscriptseq; link; nongraphical.admonition; olink; section.heading; xref; d:abstract|d:sidebar; d:affiliation; d:anchor; d:answer; d:author; d:bibliodiv/d:title; d:biblioentry; d:bibliolist; d:bibliomixed; d:biblioref; d:blockquote; d:bridgehead; d:callout; d:callout/d:simpara; d:calloutlist; d:cmdsynopsis; d:constraintdef; d:editor; d:emphasis; d:formalpara; d:funcsynopsis; d:glossentry; d:glosslist; d:graphic; d:imageobjectco; d:indexdiv; d:inlinegraphic; d:inlinemediaobject; d:itemizedlist; d:itemizedlist/d:listitem; d:listitem/d:simpara; d:mediaobject|d:mediaobjectco; d:member; d:orderedlist; d:orderedlist/d:listitem; d:org; d:orgdiv; d:orgname; d:othercredit; d:para; d:person; d:personname; d:phrase; d:procedure; d:production; d:programlisting|d:screen|d:synopsis; d:qandadiv/d:blockinfo/d:title| d:qandadiv/d:info/d:title| d:qandadiv/d:title; d:qandaset; d:qandaset/d:blockinfo/d:title| d:qandaset/d:info/d:title| d:qandaset/d:title; d:question; d:quote; d:refentry; d:refnamediv; d:refsection|d:refsect1|d:refsect2|d:refsect3; d:refsynopsisdiv; d:seglistitem; d:segmentedlist; d:simpara; d:simplelist; d:simplelist[@type='horiz']; d:simplelist[@type='vert']; d:step; d:stepalternatives; d:substeps; d:task; d:variablelist; d:varlistentry; d:varlistentry/d:listitem; d:varlistentry/d:term; d:orderedlist/d:listitemorderedlist-table; d:seg[1]seglist-table; d:abstracttitlepage.mode; d:authorgrouptitlepage.mode; d:varlistentryvarlist-table
References
Template object.id
Parameters
QName Namespace Select
conditional No namespace 1
node No namespace .
Import precedence 0
Source
<xsl:template name="anchor">
  <xsl:param name="node" select="."/>
  <xsl:param name="conditional" select="1"/>
  <xsl:variable name="id">
    <xsl:call-template name="object.id">
      <xsl:with-param name="object" select="$node"/>
    </xsl:call-template>
  </xsl:variable>
  <xslo:if xmlns:xslo="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" test="not($node[parent::d:blockquote])">
    <xsl:if test="$conditional = 0 or $node/@id or $node/@xml:id">
      <a id="{$id}"/>
    </xsl:if>
  </xslo:if>
</xsl:template>
Template href.target.uri
Namespace No namespace
Used by
Template longdesc.link
References
Template object.id
Parameters
QName Namespace Select
context No namespace .
object No namespace .
Import precedence 0
Source
<xsl:template name="href.target.uri">
  <xsl:param name="context" select="."/>
  <xsl:param name="object" select="."/>
  <xsl:text>#</xsl:text>
  <xsl:call-template name="object.id">
    <xsl:with-param name="object" select="$object"/>
  </xsl:call-template>
</xsl:template>
Template href.target
Namespace No namespace
Used by
References
Template object.id
Parameters
QName Namespace Select
context No namespace .
object No namespace .
Import precedence 0
Source
<xsl:template name="href.target">
  <xsl:param name="context" select="."/>
  <xsl:param name="object" select="."/>
  <xsl:text>#</xsl:text>
  <xsl:call-template name="object.id">
    <xsl:with-param name="object" select="$object"/>
  </xsl:call-template>
</xsl:template>
Template href.target.with.base.dir
Namespace No namespace
References
Parameters
QName Namespace Select
context No namespace .
object No namespace .
Import precedence 0
Source
<xsl:template name="href.target.with.base.dir">
  <xsl:param name="context" select="."/>
  <xsl:param name="object" select="."/>
  <xsl:if test="$manifest.in.base.dir = 0">
    <xsl:value-of select="$base.dir"/>
  </xsl:if>
  <xsl:call-template name="href.target">
    <xsl:with-param name="context" select="$context"/>
    <xsl:with-param name="object" select="$object"/>
  </xsl:call-template>
</xsl:template>
Template dingbat
Namespace No namespace
Used by
References
Parameters
QName Namespace
dingbat No namespace
Import precedence 0
Source
<xsl:template name="dingbat">
  <xsl:param name="dingbat">bullet</xsl:param>
  <xsl:call-template name="dingbat.characters">
    <xsl:with-param name="dingbat" select="$dingbat"/>
  </xsl:call-template>
</xsl:template>
Template dingbat.characters
Namespace No namespace
Used by
Template dingbat
Parameters
QName Namespace
dingbat No namespace
Import precedence 0
Source
<xsl:template name="dingbat.characters">
  <!-- now that I'm using the real serializer, all that dingbat malarky -->
  <!-- isn't necessary anymore... -->
  <xsl:param name="dingbat">bullet</xsl:param>
  <xsl:choose>
    <xsl:when test="$dingbat='bullet'"></xsl:when>
    <xsl:when test="$dingbat='copyright'">©</xsl:when>
    <xsl:when test="$dingbat='trademark'"></xsl:when>
    <xsl:when test="$dingbat='trade'"></xsl:when>
    <xsl:when test="$dingbat='registered'">®</xsl:when>
    <xsl:when test="$dingbat='service'">(SM)</xsl:when>
    <xsl:when test="$dingbat='nbsp'"> </xsl:when>
    <xsl:when test="$dingbat='ldquo'"></xsl:when>
    <xsl:when test="$dingbat='rdquo'"></xsl:when>
    <xsl:when test="$dingbat='lsquo'"></xsl:when>
    <xsl:when test="$dingbat='rsquo'"></xsl:when>
    <xsl:when test="$dingbat='em-dash'"></xsl:when>
    <xsl:when test="$dingbat='mdash'"></xsl:when>
    <xsl:when test="$dingbat='en-dash'"></xsl:when>
    <xsl:when test="$dingbat='ndash'"></xsl:when>
    <xsl:otherwise>
      <xsl:text></xsl:text>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
Template id.warning
Namespace No namespace
Used by
References
Parameter id.warnings
Import precedence 0
Source
<xsl:template name="id.warning">
  <xsl:if test="$id.warnings != 0 and not(@id) and not(@xml:id) and parent::*">
    <xsl:variable name="title">
      <xsl:choose>
        <xsl:when test="d:title">
          <xsl:value-of select="d:title[1]"/>
        </xsl:when>
        <xsl:when test="substring(local-name(*[1]),                                   string-length(local-name(*[1])-3) = 'info')                         and *[1]/d:title">
          <xsl:value-of select="*[1]/d:title[1]"/>
        </xsl:when>
        <xsl:when test="d:refmeta/d:refentrytitle">
          <xsl:value-of select="d:refmeta/d:refentrytitle"/>
        </xsl:when>
        <xsl:when test="d:refnamediv/d:refname">
          <xsl:value-of select="d:refnamediv/d:refname[1]"/>
        </xsl:when>
      </xsl:choose>
    </xsl:variable>
    <xsl:message>
      <xsl:text>ID recommended on </xsl:text>
      <xsl:value-of select="local-name(.)"/>
      <xsl:if test="$title != ''">
        <xsl:text>: </xsl:text>
        <xsl:choose>
          <xsl:when test="string-length($title) > 40">
            <xsl:value-of select="substring($title,1,40)"/>
            <xsl:text>...</xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="$title"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:if>
    </xsl:message>
  </xsl:if>
</xsl:template>
Template generate.class.attribute
Namespace No namespace
Used by
Parameters
QName Namespace Select
class No namespace local-name(.)
Import precedence 0
Source
<xsl:template name="generate.class.attribute">
  <xsl:param name="class" select="local-name(.)"/>
  <xsl:apply-templates select="." mode="class.attribute">
    <xsl:with-param name="class" select="$class"/>
  </xsl:apply-templates>
</xsl:template>
Template *class.attribute
Namespace No namespace
Match *
Mode class.attribute
Parameters
QName Namespace Select
class No namespace local-name(.)
Import precedence 0
Source
<xsl:template match="*" mode="class.attribute">
  <xsl:param name="class" select="local-name(.)"/>
  <!-- permit customization of class attributes -->
  <!-- Use element name by default -->
  <xsl:attribute name="class">
    <xsl:apply-templates select="." mode="class.value">
      <xsl:with-param name="class" select="$class"/>
    </xsl:apply-templates>
  </xsl:attribute>
</xsl:template>
Template *class.value
Namespace No namespace
Match *
Mode class.value
Parameters
QName Namespace Select
class No namespace local-name(.)
Import precedence 0
Source
<xsl:template match="*" mode="class.value">
  <xsl:param name="class" select="local-name(.)"/>
  <!-- permit customization of class value only -->
  <!-- Use element name by default -->
  <xsl:value-of select="$class"/>
</xsl:template>
Template common.html.attributes
Documentation

Description

 Apply common attributes such as class, lang, dir 
Namespace No namespace
Used by
Templates block.object; graphical.admonition; inline.boldmonoseq; inline.italicmonoseq; inline.italicseq; nongraphical.admonition; paragraph; process.footnote; d:abstract|d:sidebar; d:ackno|d:acknowledgements[parent::d:article]; d:appendix; d:article; d:attribution; d:author; d:bibliodiv; d:bibliodiv/d:title; d:biblioentry; d:bibliography; d:bibliolist; d:bibliomixed; d:blockquote; d:callout/d:simpara; d:calloutlist; d:chapter; d:colophon; d:editor; d:epigraph; d:itemizedlist; d:itemizedlist/d:listitem; d:listitem/d:simpara; d:orderedlist; d:orderedlist/d:listitem; d:othercredit; d:partintro; d:preface; d:procedure; d:programlistingco|d:screenco; d:refentry; d:reference; d:refnamediv; d:refsection|d:refsect1|d:refsect2|d:refsect3; d:refsynopsisdiv; d:revhistory; d:sect1; d:sect2; d:sect3; d:sect4; d:sect5; d:section; d:seg; d:seglistitem; d:segmentedlist; d:segmentedlist/d:title; d:simplelist; d:simplelist[@type='horiz']; d:simplelist[@type='inline']; d:simplelist[@type='vert']; d:simplesect; d:step; d:step/d:title; d:stepalternatives; d:substeps; d:variablelist; d:varlistentry/d:term; d:acknowledgementsacknowledgements; d:addressbibliography.mode; d:affiliationbibliography.mode; d:artheader|d:articleinfo|d:infobibliography.mode; d:artpagenumsbibliography.mode; d:authorbibliography.mode; d:authorgroupbibliography.mode; d:authorinitialsbibliography.mode; d:bibliocoverage|d:biblioid|d:bibliorelation|d:bibliosourcebibliography.mode; d:biblioid[@class='doi']bibliography.mode; d:bibliomiscbibliography.mode; d:bibliomsetbibliography.mode; d:bibliosetbibliography.mode; d:bookbibliobibliography.mode; d:citetitlebibliography.mode; d:collabbibliography.mode; d:collabnamebibliography.mode; d:confdatesbibliography.mode; d:confgroupbibliography.mode; d:confnumbibliography.mode; d:confsponsorbibliography.mode; d:conftitlebibliography.mode; d:contractnumbibliography.mode; d:contractsponsorbibliography.mode; d:contribbibliography.mode; d:copyrightbibliography.mode; d:corpauthorbibliography.mode; d:corpcreditbibliography.mode; d:corpnamebibliography.mode; d:datebibliography.mode; d:editionbibliography.mode; d:editorbibliography.mode; d:firstnamebibliography.mode; d:honorificbibliography.mode; d:indextermbibliography.mode; d:invpartnumberbibliography.mode; d:isbnbibliography.mode; d:issnbibliography.mode; d:issuenumbibliography.mode; d:jobtitlebibliography.mode; d:lineagebibliography.mode; d:orgdivbibliography.mode; d:orgnamebibliography.mode; d:othercreditbibliography.mode; d:othernamebibliography.mode; d:pagenumsbibliography.mode; d:productnamebibliography.mode; d:productnumberbibliography.mode; d:pubdatebibliography.mode; d:publisherbibliography.mode; d:publishernamebibliography.mode; d:pubsnumberbibliography.mode; d:releaseinfobibliography.mode; d:seriesinfobibliography.mode; d:seriesvolnumsbibliography.mode; d:shortaffilbibliography.mode; d:subtitlebibliography.mode; d:surnamebibliography.mode; d:titlebibliography.mode; d:titleabbrevbibliography.mode; d:volumenumbibliography.mode; d:abstractbibliomixed.mode; d:addressbibliomixed.mode; d:affiliationbibliomixed.mode; d:artpagenumsbibliomixed.mode; d:authorbibliomixed.mode; d:authorblurb|d:personblurbbibliomixed.mode; d:authorgroupbibliomixed.mode; d:authorinitialsbibliomixed.mode; d:bibliocoverage|d:biblioid|d:bibliorelation|d:bibliosourcebibliomixed.mode; d:biblioid[@class='doi']bibliomixed.mode; d:bibliomiscbibliomixed.mode; d:bibliomsetbibliomixed.mode; d:bibliosetbibliomixed.mode; d:citetitlebibliomixed.mode; d:collabbibliomixed.mode; d:confgroupbibliomixed.mode; d:contractnumbibliomixed.mode; d:contractsponsorbibliomixed.mode; d:contribbibliomixed.mode; d:copyrightbibliomixed.mode; d:corpauthorbibliomixed.mode; d:corpcreditbibliomixed.mode; d:corpnamebibliomixed.mode; d:datebibliomixed.mode; d:editionbibliomixed.mode; d:editorbibliomixed.mode; d:firstnamebibliomixed.mode; d:honorificbibliomixed.mode; d:indextermbibliomixed.mode; d:invpartnumberbibliomixed.mode; d:isbnbibliomixed.mode; d:issnbibliomixed.mode; d:issuenumbibliomixed.mode; d:jobtitlebibliomixed.mode; d:lineagebibliomixed.mode; d:orgnamebibliomixed.mode; d:othercreditbibliomixed.mode; d:othernamebibliomixed.mode; d:pagenumsbibliomixed.mode; d:printhistorybibliomixed.mode; d:productnamebibliomixed.mode; d:productnumberbibliomixed.mode; d:pubdatebibliomixed.mode; d:publisherbibliomixed.mode; d:publishernamebibliomixed.mode; d:pubsnumberbibliomixed.mode; d:releaseinfobibliomixed.mode; d:seriesvolnumsbibliomixed.mode; d:shortaffilbibliomixed.mode; d:subtitlebibliomixed.mode; d:surnamebibliomixed.mode; d:titlebibliomixed.mode; d:titleabbrevbibliomixed.mode; d:volumenumbibliomixed.mode; d:dedicationdedication; d:segseglist-table; d:seg[1]seglist-table; d:seglistitemseglist-table
Parameters
QName Namespace Select
class No namespace local-name(.)
inherit No namespace 0
Import precedence 0
Source
<xsl:template name="common.html.attributes">
  <xsl:param name="inherit" select="0"/>
  <xsl:param name="class" select="local-name(.)"/>
  <xsl:apply-templates select="." mode="common.html.attributes">
    <xsl:with-param name="class" select="$class"/>
    <xsl:with-param name="inherit" select="$inherit"/>
  </xsl:apply-templates>
</xsl:template>
Template *common.html.attributes
Namespace No namespace
Match *
Mode common.html.attributes
References
Parameters
QName Namespace Select
class No namespace local-name(.)
inherit No namespace 0
Import precedence 0
Source
<xsl:template match="*" mode="common.html.attributes">
  <xsl:param name="class" select="local-name(.)"/>
  <xsl:param name="inherit" select="0"/>
  <xsl:call-template name="generate.html.lang"/>
  <xsl:call-template name="dir">
    <xsl:with-param name="inherit" select="$inherit"/>
  </xsl:call-template>
  <xsl:apply-templates select="." mode="class.attribute">
    <xsl:with-param name="class" select="$class"/>
  </xsl:apply-templates>
  <xsl:call-template name="generate.html.title"/>
</xsl:template>
Template locale.html.attributes
Documentation

Description

 Apply common attributes not including class 
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="locale.html.attributes">
  <xsl:apply-templates select="." mode="locale.html.attributes"/>
</xsl:template>
Template *locale.html.attributes
Namespace No namespace
Match *
Mode locale.html.attributes
References
Import precedence 0
Source
<xsl:template match="*" mode="locale.html.attributes">
  <xsl:call-template name="generate.html.lang"/>
  <xsl:call-template name="dir"/>
  <xsl:call-template name="generate.html.title"/>
</xsl:template>
Template generate.html.lang
Documentation

Description

 Pass through any lang attributes 
Namespace No namespace
Used by
Import precedence 0
Source
<xsl:template name="generate.html.lang">
  <xsl:apply-templates select="." mode="html.lang.attribute"/>
</xsl:template>
Template *html.lang.attribute
Namespace No namespace
Match *
Mode html.lang.attribute
References
Import precedence 0
Source
<xsl:template match="*" mode="html.lang.attribute">
  <!-- match the attribute name to the output type -->
  <xsl:choose>
    <xsl:when test="@lang and $stylesheet.result.type = 'html'">
      <xsl:attribute name="lang">
        <xsl:value-of select="@lang"/>
      </xsl:attribute>
    </xsl:when>
    <xsl:when test="@lang and $stylesheet.result.type = 'xhtml'">
      <xsl:attribute name="xml:lang">
        <xsl:value-of select="@lang"/>
      </xsl:attribute>
    </xsl:when>
    <xsl:when test="@xml:lang and $stylesheet.result.type = 'html'">
      <xsl:attribute name="lang">
        <xsl:value-of select="@xml:lang"/>
      </xsl:attribute>
    </xsl:when>
    <xsl:when test="@xml:lang and $stylesheet.result.type = 'xhtml'">
      <xsl:attribute name="xml:lang">
        <xsl:value-of select="@xml:lang"/>
      </xsl:attribute>
    </xsl:when>
  </xsl:choose>
</xsl:template>
Variable direction.align.start
Documentation

Description

 ********************************************************************
     $Id$
     ********************************************************************

     This file is part of the XSL DocBook Stylesheet distribution.
     See ../README or http://docbook.sf.net/release/xsl/current/ for
     copyright and other information.

     ******************************************************************** 
 These variables set the align attribute value for HTML output based on
     the writing-mode specified in the gentext file for the document's lang. 
Namespace No namespace
Used by
References
Parameter writing.mode
Source
<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>
Variable direction.align.end
Namespace No namespace
Used by
References
Parameter writing.mode
Source
<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>
Variable direction.mode
Namespace No namespace
References
Parameter writing.mode
Source
<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>