[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Breaking up is hard to do.
> 2. Recursion using call-template. > Because call-template does not change the current node list > I am unable to move or traverse the node list. > Each call to 'colCounter' generates three input fields, but only > one has data output as there is only one element in the node > list inside the called template. There is a bug in your recursion code, I suppose. Try something like the following: <?xml version='1.0'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <xsl:call-template name="triples"> <xsl:with-param name="nodes" select="/*/f"/> </xsl:call-template> </xsl:template> <xsl:template name="triples"> <xsl:param name="nodes"/> <tr><td><xsl:value-of select="$nodes[1]"/></td> <td><xsl:value-of select="$nodes[2]"/></td> <td><xsl:value-of select="$nodes[3]"/></td></tr> <xsl:if test="count($nodes) > 3"> <xsl:call-template name="triples"> <xsl:with-param name="nodes" select="$nodes[position() > 3]"/> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet> Steve XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|