In an XML data file I have a collection of images <image_list>; within this collection, I have images with different names (given in the <image_result> name attribute).
How can I escape the quotes so that this will work? I’ve tried using " or \" for both sets of quotes, but emacs lights up red, indicating a formatting error.
XSL snippet:
<table>
<tr>
<xsl:for-each select="image_list/image_result">
<td>
<img src ="<xsl:value-of select="name"/>" style="width:450px"/>
</td>
</xsl:for-each>
</tr>
</table>
Your XSLT needs to be a well-formed XML document, so the type of construct you’re attempting is simply not possible. Use an Attribute Value Template instead: