|
next
|
Subject: Recursive XML transformation Author: Everett T Date: 30 Jan 2006 11:50 AM
|
Thank you Tony. That is what I was looking for.
At the moment, my stylesheet is generating a new table everytime is comes across a title attribute or a line, subtitle, subtotal or total tag. For instance, when it runs across a subtitle tag followed by a line tag the output would look something like the following:
<table>
<tr>
<td>
description tag inner text
</td>
<td>
daterange tag inner text
</td>
</tr>
</table>
<table>
<tr>
<td>
description tag inner text
</td>
<td>
amount tag inner text
</td>
</tr>
</table>
My ultimate goal is to be able to use the section tag to start a new table and each title attribute and subtitle, line, subtotal, and total tags would be a row within the table. Thus, having an entire section fall within a single table.
>We're not quite sure what you
>want, since you didn't give a
>sample of
>the output, but you can use an
>'or' in the apply-templates
>using the
>vertical-bar '|' character.
>So if you were to combine some
>of your
>calls together, they'd get
>processed in the order they
>appear in the
>source file:
>
><xsl:apply-templates
>select="section|subtitle|line|
>subtotal">
><xsl:with-param
>name="rowformat"
>select="$rowformat"/>
></xsl:apply-templates>
>
>Since rowformat isn't used by
>some of the templates but is
>by others,
>we can pass it without harm.
|
|
|