|
Subject: Recursive Template Application From: "Philip Koester" <kozmik@xxxxxxxx> Date: Mon, 19 Jun 2000 00:15:07 +0200 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: Is it possible to merge attribu, andy | Thread | RE: Recursive Template Application, Ronald Walraven |
| Re: xml entities, Mike Brown | Date | Variables in select attributes, WCB |
| Month |