|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:for-each and xsl:apply-templates
It seems that calls to xsl:apply-templates from within an xsl:for-each loop are ignored. As a result, I end up copying my template handling logic inside of the xsl:for-each loop. Is this the only approach? Are there other techniques? If the question sounds vague, here is a sample of my problem: Say I have a child node called "child" that appears in 2 different contexts: as a child of "parent1" and a child of "parent2". My xml source may look like: <parent1> <child/> <child/> </parent1> <parent2> <child/> <child/> <child/> </parent2> "child" should always be processed in the same way, but "parent1" and "parent2" need to wrap it differently. (more concretely, "parent1" may be a table, and "parent2" may be an unordered list). I use "xsl:for-each" to get the wrapping that I need, but I need to have my "child" template handling in 2 places. Hope this makes sense, Thanks, Gerry 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
|

Cart








