How about:
<xsl:for-each select="document('factories.xml')//factory">
<xsl:choose>
<xsl:when test="count(preceding-sibling::factory/@widget) > $limit">
<!-- output gadgets -->
<tr>
<td><xsl:value-of select="@name" /></td>
<td>nbsp</td>
<td><xsl:value-of select="$gadgets" /></td>
</tr>
</xsl:when>
<xsl:otherwise>
<!-- output widgets -->
<tr>
<td><xsl:value-of select="@name" /></td>
<td><xsl:value-of select="@widgets" /></td>
<td>nbsp</td>
</tr>
</xsl:otherwise>
</xsl:choose>
Failing that, come up with a concise input XML and give an example of
the required output XML. Your original question was a bit wordy...
On 7/11/06, Steve <subsume(_at_)gmail(_dot_)com> wrote:
Any other takers?
I'd have to have to resort to some hack if I can do this with XSL.
-S
On 7/10/06, Steve <subsume(_at_)gmail(_dot_)com> wrote:
> Problem: I need to make a table of the output required of 4 factories
> next month.
>
> Widgets Gadgets
> Factory A 2
> Factory B 3
> Factory C 4
> Factory D 1
>
> Widget quota = 5
> Gadget quota = 5
>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--