This part of the stylesheet makes changes to the appearance of certain specific DocBook elements.
Some later parts of the stylesheet need the ability to
select new font types. For example, we want
application names (the application element) to be presented in
an italic, sans-serif font, so that they really stand
out from other elements such as userinput.
Accordingly, we need templates that set their arguments
using such font variants. These templates are modeled
on the ones from the stock stylesheets, such as the
inline.italicseq template for
italics, which is located in html/inline.xsl.
The first one is inline.italicsansseq. This template is
used to format content using italic sans-serif font.
<xsl:template name="inline.italicsansseq">
This template takes one argument, content, which by default is the context
node's content.
The anchor template, from
html/html.xsl, defines an
HTML anchor (<a name=") if its
context node has an I"/>id=" attribute.
I"
The simple.xlink template implements
a basic XLink (see the XLink standard) if the context node has
an xlink:href attribute.
This xsl:param element, then,
sets the content parameter to
the context node's content, optionally preceded by an
anchor, and optionally wrapped in an XLink.
<xsl:param name="content">
<xsl:call-template name="anchor"/>
<xsl:call-template name="simple.xlink">
<xsl:with-param name="content">
<xsl:apply-templates/>
</xsl:with-param>
</xsl:call-template>
</xsl:param>
The content is then wrapped in
an HTML span element whose
style attribute specifies the
sans-serif font family and the
italic font style. It also
attaches a class=" attribute where
N"
is the element's local name. For example, if this template is
used to wrap a DocBook Napplication element, it will generate a
span with class="application". This makes it
possible to write CSS rules that apply to that element
type.
<span style="font-family: sans-serif; font-style: italic"
class="{local-name(.)}"
><xsl:copy-of select="$content"/></span>
</xsl:template>