I think I may have a misunderstanding of <xsl:variable\> and <xsl:value-of\> , so maybe someone can fix me!
I'm trying to set up some hard-coded banners to be a little cleaner, so I thought it would be nice to create <xsl:variable> containing a link to the banner and image code, and then use <xml:value-of> in different places, where is the banner needed. For example:
<xsl:variable name="banner1"> <a href="http://www.link.com/" title="Title" target="_blank"> <img width="120" height="506" src="/images/banners/image.gif" alt="alt" /> </a> </xsl:variable> <xsl:when test="blah'"> <xsl:value-of select="$banner1"/> </xsl:when>
But this does not give the expected result. The image of the path, etc. Valid, but it just doesn't spit anything. Any text added before or after the <a> tag displays correctly, but nothing happens between the <a> tags.
What I misunderstood about <xsl:variable> and how I could do it better (except to "correctly" and pull advertisements from the database, etc., which I would prefer ...).
variables xslt
xan
source share