David is right. Role is usually a better attribute for this. I believe
Bob's most excellent book (
http://www.sagehill.net/docbookxsl/)
discusses this.
Here is a snippet from a customization layer I'm using. It customizes
the fo translation. The xsl:import should point to the location of your
docbook xsl fo stylesheet.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
xmlns:fo="
http://www.w3.org/1999/XSL/Format"
xmlns:d="
http://docbook.org/ns/docbook"
version="1.0">
<xsl:import
href="/opt/local/share/oxygen/frameworks/docbook/xsl/fo/docbook.xsl"/>
<xsl:template match="para[@role = 'scope']">
<fo:block xsl:use-attribute-sets="normal.para.spacing">
<xsl:call-template name="anchor"/>
<fo:inline color="#0099FF">
<xsl:apply-templates/>
</fo:inline>
</fo:block>
</xsl:template>
</xsl:stylesheet>
Note the best approach for html is to use a css stylesheet to tag off
the role. The docbook stylesheets will cause the value of "role" to be a
"class". Here is a snip from the stylesheet I'm using.
.scope {
font-style: italic;
color: #B40000;
}
Anything with a role="scope" will be red on the html page. You can
specify the name of your stylesheet with the "html.stylesheet" parameter
when you do the xslt transform.
This is from
http://www.sagehill.net/docbookxsl/Parameters.html#ParameterSyntaxxsltproc --output myfile.html \
*--stringparam html.stylesheet "corpstyle.css"* \
docbook.xsl myfile.xml
Lou
David Cramer wrote: