[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] general approach to image maps
OK, I got it working. In my source, I have now the following imagemap
statement:
<imageobject role="html">
<imagedata format="PNG" fileref="../dot/tc-compact.png"/>
<?dbhtml-imagemap href="../dot/tc-compact.map"?>
</imageobject>
In fact, I just made 3 rather small extensions to existing templates:
1. Reusing code in pi.xsl: I extended the match attribute in template
for dbhtml-include:
<xsl:template match="processing-instruction('dbhtml-include') |
processing-instruction('dbhtml-imagemap')">
no other change made here.
2. In <xsl:template match="imagedata">
1. a variable "image.map" is filled:
<xsl:variable name="image.map">
<xsl:apply-templates
select="../processing-instruction('dbhtml-imagemap')"/>
</xsl:variable>
2. in <xsl:call-template name="process.image"> I pass a new
parameter
<xsl:with-param name="image.map.id"
select="exsl:node-set($image.map)/map/@id"/>
3. and after this call-template the content of the variable is
copied
<xsl:if test="$image.map">
<xsl:copy-of select="$image.map"/>
</xsl:if>
3. in the named template "process.image" I generate a new attribute,
depending on its existence
<!-- externally provided imagemap id -->
<xsl:if test="$image.map.id">
<xsl:attribute name="usemap">
<xsl:value-of select="$image.map.id"/>
</xsl:attribute>
</xsl:if>
With xsltproc it works fine; Xalan and Saxon are causing problems with
URI resolver (as always under Windows), the well known bug that
apparently will never be fixed:
Resolved URI: ../dot/tc-compact.map
file://D:/workspace/empic/resources/businessmodel/dot/tc-compact.map
As I already stated in my former mail, the affected templates are rather
big ones, and I don't want to have them in my customization layer. Is
there a chance to get this extension into the official stylesheet package?
Regards,
Georges
Georges Schmitz wrote:
> I'm searching for a general approach for using image maps with DocBook
> and I'm not referring to the image maps of callout objects.
>
>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]