[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Image callouts and roles
Indeed. Here is the update to the template
for the imageobjectco element I was going to check in. It should work
equally well in an html or fo customization layer. It uses the same
mechanism to select a role attribute. The difference from mediaobject
is that it only does the selection if the right conditions are met, on the
assumption that you may intend to have multiple imageobjects in your
output. Let me know if it works for you.
<xsl:template
match="imageobjectco">
<xsl:choose>
<!-- select one imageobject? --> <xsl:when test="$use.role.for.mediaobject != 0 and count(imageobject) > 1 and imageobject[@role]"> <xsl:variable name="olist" select="imageobject"/> <xsl:variable
name="object.index">
<xsl:call-template name="select.mediaobject.index"> <xsl:with-param name="olist" select="$olist"/> <xsl:with-param name="count" select="1"/> </xsl:call-template> </xsl:variable> <xsl:variable
name="object" select="$olist[position() = $object.index]"/>
<xsl:apply-templates select="$object"/>
</xsl:when> <xsl:otherwise> <!-- otherwise process them all --> <xsl:apply-templates select="imageobject"/> </xsl:otherwise> </xsl:choose> <xsl:apply-templates
select="calloutlist"/>
</xsl:template>
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]