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

Recursive Template Application

Subject: Recursive Template Application
From: "Philip Koester" <kozmik@xxxxxxxx>
Date: Mon, 19 Jun 2000 00:15:07 +0200
phil koester
Hello, my Name is Philip Koester and I am new to this list (and to XSL). To
dive into the matter, I am trying to transform a structured document into
HTML. I ran into troubles with templates that I want to be applied
recursively. Some snippets:

<!-- Template T1: transform <toc> to <section> -->

<xsl:template match="toc">
 <section numbered="false" title="Contents"/>
 ...
</xsl:template>

<!-- Template T2: transform <section> to <h2> -->

<xsl:template match="section">
 <h2><xsl:value-of select="@title"/></h2>
</xsl:template>

This stylesheet works only half-way in that it correctly transforms "<toc/>"
to "<section .../>" but leaves it at that. The output of T1 is not matched
by T2. But how can I enforce this, so that "<toc/>" is finally transformed
to "<h2>..."? Should I run the XSL processor twice? Or is there a more
efficient way to accomplish this?

Regards,

    Philip



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.