|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Passing xml nodes to a function
<xsl:apply-templates select=".//response/*/response/*" mode="table"/>
> What I am getting at the moment is the following:-
your posted xml didn't have response as a grandchild of response so I'll
have to guess that's OK, * selects client and then
<xsl:template match="*" mode="table">
<tr>
<td><xsl:value-of select="name()"/></td>
<xsl:if test="not(*)"><td><xsl:value-of select="."/></td></xsl:if>
</tr>
<xsl:apply-templates mode="table" select="*"/>
</xsl:template>
should put all the data in a table, but i expect that the output you are
seeing is from the default template (ie, it's the same as as the output
from a stylesheet that has no templates). Without seeing what your
input looks like I can't suggest whet match pattern should be on your
initial template.
If the xml posted is the complete xml document, then you want something
like
<xsl:template match="/response"
<table>
<xsl:apply-templates select="*" mode="table"/>
</table>
</xsl:template>
David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








