Guest Kiwi Posted March 28, 2006 Share Posted March 28, 2006 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 More sharing options...
boen_robot Posted March 28, 2006 Share Posted March 28, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now