OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: DOCBOOK-APPS: XSL support for callout graphics

I notice in the DocBook XSL stylesheets 1.24
distribution, the images/callouts/ directory contains
images for callouts, but in html/callout.xsl,
<xsl:template match="co" mode="callout-bug"> specifies
a text-only callout, so the images are never used.

Here is some sample code that I have in my custom
stylesheet that overrides this template to provide
support for callout images.  Feel free to copy it
verbatim or use it as a starting point.  Norm, can
something like this be integrated into the official

<!-- new parameter (like those in param.xsl) to define
where callout images are stored -->

<!-- add support for callout graphics -->
<xsl:template name="co.graphic">
  <xsl:param name="node" select="."/>
  <xsl:param name="conum"/>
  <xsl:value-of select="$co.graphics.path"/>
  <xsl:value-of select="$conum"/>

<xsl:template match="co" mode="callout-bug">
  <xsl:variable name="conum">
    <xsl:number count="co" format="1"/>
  <img border="0" height="12" width="12">
    <xsl:attribute name="src">
      <xsl:call-template name="co.graphic">
      	<xsl:with-param name="conum" select="$conum"/>
    <xsl:attribute name="alt"><xsl:number
value="$conum" format="(1)"/></xsl:attribute>

Share and enjoy.


Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC