I have a long, human-generated XML file with enough regularity for me to identify its contents using Xpath. I'm trying to reformat it as an HTML table.
The source material is technically formatted as a table just for visual effect (don't get me started). Where I am running into trouble is the descriptive part of each entry can contain arbitrary markup, which I need to pass along for additional processing. I haven't figured out how to get the contents of the description and process them appropriately.
I'm not getting the desired results using value-of or copy-of. I'm probably missing something obvious.
Sample doc:
<?xml version="1.0" encoding="UTF-8"?>
<manual>
<body>
<chapter>
<table>
<thead>
<row>
<entry>
<para>Some parameter name</para>
</entry>
<entry>
<para>1</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<para>Range</para>
</entry>
<entry>
<para>1–10</para>
</entry>
</row>
<row>
<entry>
<para>Description</para>
</entry>
<entry>
<para>Sets the type of process module.</para>
<para>There can be <emphasis>more arbitrary markup</emphasis> in here.</para>
<list>
<item>Even a list</item>
</list>
</entry>
</row>
</tbody>
</table>
<!-- and so on -->
</chapter>
</body>
</manual>
I've been trying variations on the following XSLT snippet
<xsl:for-each select="table">
<tr>
<!-- insert additional code here -->
<td class="desc"> <xsl:value-of select="//tbody/row[2]/entry[2]/*"><xsl:apply-templates select="@*|node()" /></xsl:value-of> </td>
</tr>
</xsl:for-each>