I am trying to use the code below to select all values of notableWork, so for each notableWork get its value and get the next one etc. It is sort of working as two “Notable Work:” are appearing just not the values of notable work.
<xsl:for-each select="notableWork">
<p>
Notable Work: <xsl:value-of select="notableWork" />
</p>
</xsl:for-each>
The other issue I am having is with images. I have been messing around with the img tag trying variations of it, below is just what I have ended up with. I have an element called imaged which contains a value of image2.jpg, image4.jpg etc. I cannot seem to get it to work 😛 Just wondering what the correct syntax is, using google I found variations of so really not sure.
<img src="<xsl:value-of select="image" />" />
Thanks 🙂
can never work unless you have a nesting like notableWork/notableWork. You already selected
notableWorkso you cant select it again. So you should work with the node, the current node. Which is XSLT:.,current()or XPath:self::node(). All 3 can be used for the same effect.or
To set the attribute of a image tag you can use
or