> > I have a further question: how can I also show the legend of the photo,
> > while just hovering over it?
> I believe that what you want is a script with an ONMOUSEOVER event.
> Maybe someone else can clarify the script format. I have limited
experience
> with these but I think that it would look something like this.
Actually I don't think you need go as far as mouseover. I think capturing
the legend or title of the dao and outputting that as the TITLE attribute in
the IMG element should do it (not the ALT attribute -- the ALT attribute is
what shows up if the picture can't/doesn't load). Assuming that the legend
is in the TITLE attribute of your <dao> element, I think it would work like
this:
Input:
<dao show="embed" href="picture.jpg" title="my dog spot"/>)
XSL:
<xsl:template match="dao[@show='embed']">
<img src="{@href}" title="{@title}">
<xsl:apply-templates/>
</img>
</xsl:template>
Output:
<img src="picture.jpg" title="my dog spot">
Note that the "<xsl:template match..." line checks to make sure that the
<dao> element has the SHOW attribute set to EMBED. You'd also want to check
that it has the TITLE attribute present, or provide error handling for
graphics that don't. I'm not sure how to do either of those things! Maybe
someone else can clarify that piece.
Michele
|