[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: recursions?
At 06:27 PM 6/20/01, Jeni wrote:
Hi Dennis.... If you're producing text, on the other hand, then the easiest way to achieve the indentation is to pass down a 'indent' parameter from template to template.... Another easiest way is to use our good friend, the much-maligned but faithful xsl:for-each, as in <xsl:template match="group"> <xsl:for-each select="ancestor::group"> <xsl:text> </xsl:text> </xsl:for-each> <xsl:text>GROUP-LEVEL
<xsl:text> <xsl:apply-templates/> </xsl:template> and do the same in the template matching "field" to get them indented too. (Put the for-each in a named template if you have to use it alot.) This would work, wouldn't it Jeni? It's kind of a refinement of the count(ancestor::*) technique. Cheers, Wendell
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
|