Here is an alternate <dao> template that can either embed an image
(@show="embed" actuate="onload") or produce an icon that you can click on
to open the image (@show="new" or "replace" @actuate="onrequest"). Be
sure to replace the text "[Put URL to icon here]" in the code below with
the real URL to your icon image file.
<xsl:template match="dao">
<xsl:choose>
<!-- Be sure to set both behavior attributes "show" and "actuate" -->
<!-- The following attributes produce an embedded image -->
<xsl:when test="@show='embed' and @actuate='onload'">
<img src="{@href}" alt="{@title}" title="{@title}"/>
</xsl:when>
<!-- These attributes produce a clickable icon -->
<!-- You need to put in a URL to your clickable icon replacing the text
[Put URL to icon here] for this to work -->
<xsl:when test="(@show='new' or @show='replace') and
@actuate='onrequest'">
<a href="{@href}">
<xsl:if test="@show='new'">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
<img src="[Put URL to icon here]" alt="{@title}" title="{@title}"
border="0"/>
</a>
</xsl:when>
</xsl:choose>
</xsl:template>
Mark
|