This is the mail archive of the
mailing list .
How best to use recursion/call-templates?
- From: "David T." <kujhawk at shell dot cais dot net>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Wed, 27 Feb 2002 17:37:16 -0500 (EST)
- Subject: [xsl] How best to use recursion/call-templates?
- Reply-to: xsl-list at lists dot mulberrytech dot com
If I have this XML fragment:
....then I'd like this output
<a> White </a>
In other words: each account number is in its own <span> tag, and each
name that has that account # is a link (<a>) inside that span tag. Since
Jones and Smith both have the same account #, they are inside the same
span tags. Since White has a different account number, there is a
separate <span> tag.
1. How can I achieve this output?
2. Should I use recursion to achieve this?
3. Is this a procedural problem and should I rethink my approach?
What I have tried: I have tried a number of call-template functions but I
never seem to get the right result, primarily because I never quite nail
down the right params to send. I've also tried using preceding-sibling to
work through this, but I got deeper into trouble. I'd post my XSL but
it's terribly convoluted now. I am admittedly lost. Any suggestions?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list