Reputation: 138
I am trying to create a HTML file from an XML using xslt. I am trying to use a value exported from xml as an ID for one of the elements of the page. but xls fails to compile.
My code is
<td data-open="<xsl:value-of select="@name" />">Fail<xsl:value-of select="failure/@message" /></td>
How can I use the returned value in my template ? is there an escape character for this case?
Upvotes: 0
Views: 63
Reputation: 167436
To compute an attribute value of a literal result element with an XPath expression, you can use an attribute value template <td data-open="{@name}">...</td>
.
Upvotes: 1