Jump to content

Images


Guest Kiwi

Recommended Posts

Hi,iv'e got a problem with Xml/Xsl. I'am working on a weblog, based on Xml. But only if I add an image with this code:

<img uri='img/html/bg.gif' />

And parse it with Xsl

<!-- Plaatjes -->	<xsl:template match='img'>	  <img> 	 <xsl:attribute name='src'><xsl:value-of select='@uri'/></xsl:attribute>  </img>  	</xsl:template>

It just won't work, I tried allot but nothing is working yet. So, does anyone knows the solution?Thanks already,Stefan :)

Link to comment
Share on other sites

How about using a variable instead of attribute?

<!-- Plaatjes --><xsl:template match="img"> <xsl:variable name="uri" select="@uri" /> <img src="{$uri}" /></xsl:template>

Would this work?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...