[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Passing xml nodes to a function

Subject: Re: Passing xml nodes to a function
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 10 Aug 2006 15:47:34 +0100
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">
		       <td><xsl:value-of select="name()"/></td>
		       <xsl:if test="not(*)"><td><xsl:value-of select="."/></td></xsl:if>
<xsl:apply-templates mode="table" select="*"/>

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
<xsl:template match="/response"
    		    <xsl:apply-templates select="*" mode="table"/>


Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.