This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Preloading Images
Kay Michael wrote:
>
> Someone gave you a simple solution by redefining the problem, but for the
> record, it's not difficult to get the output you want.
Quite true. I was of course aiming at providing some clear building
blocks rather than the one-off solution.
I would be concerned about defining the <body> tag as appearing
dependant on when the LeftNavList gets found - That's gotta hurt the
logic.
And I also abstracted to problem out /because/ of the sensitivity that
Javascript has to whitespace.
You illustration of the legendary
<xsl:if test="position()!=last()">,</xsl:if>
(... which is a good stumbling block for folks trying this at home)
is added value of course :-)
Me, I'm just glad I found a question that wasn't about bloody Xerces or
FO to chip in on again...
.dan.
> <xsl:template match="LeftNavList">
> <body bgcolor="#ffffff">
> <xsl:attribute name="onLoad">PreloadImages(
> <xsl:for-each select="PreLoadImage">
> '<xsl:value-of select=".">.gif'
> <xsl:if test="position()!=last()">,</xsl:if>
> </xsl:for-each>);</xsl:attribute>
> </body>
> </xsl:template>
>
> You may want to adjust that a bit for whitespace.
>
> Mike Kay
--
:=====================:====================:
: Dan Morrison : The Web Limited :
: http://here.is/dan : http://web.co.nz :
: dman@es.co.nz : danm@web.co.nz :
: 04 384 1472 : 04 495 8250 :
: 025 207 1140 : :
:.....................:....................:
: If ignorance is bliss, why aren't more people happy?
:.........................................:
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list