I have an XSLT transform to output a table of key/value pairs:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="keys">
<table border="1">
<xsl:apply-templates select="key" />
</table>
</xsl:template>
<xsl:template match="key">
<tr>
<td>
<xsl:value-of select="@name" />
</td>
<td>
<pre>
<xsl:value-of select="." />
</pre>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
I am currently using it with an <asp:Xml /> server control.
The dynamic nature of the asp.net page cycle makes me think it might be possible to generate actual server side tags and get a sort of on-the-fly code generation functionality. Is this something that is possible/a good idea?
So the XSLT would contain:
...
<asp:Label runat="server"><xsl:value-of select="@name" /></asp:Label>
...
Note: the motivation of my asking is more academic than anything else.