132591 Posted October 12, 2006 Share Posted October 12, 2006 I was wondering if I could do something like this: <img src=<xsl:value-of select='foo/foo2' /> />with an output of an image that has the src located in the tag "foo/foo2". Link to comment Share on other sites More sharing options...
aalbetski Posted October 12, 2006 Share Posted October 12, 2006 <img src="{foo/foo2}"/>you could also do:<xsl:variable name="src" select="//foo/foo2"/><img src="{$src}"/> Link to comment Share on other sites More sharing options...
132591 Posted October 12, 2006 Author Share Posted October 12, 2006 Thanks that is really helpful! Link to comment Share on other sites More sharing options...
kvnmck18 Posted October 13, 2006 Share Posted October 13, 2006 If from an attribute it's :<img src="{@attribute}" />example xml: <images> <image src="image.jpg" sub="this is a picture of me" /><image src="image2.jpg" sub="this is a picture of you" /></images> example xsl: <xsl:for-each select="//image"><img src="{@src}" title="{@sub}" /><br/></xsl:for-each> Output:<img src="image2.jpg" title="this is a picture of you" /><br/><img src="image.jpg" title="this is a picture of me" /><br/> 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