|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Recursive Template Application
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
|
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








