W3C home > Mailing lists > Public > xsl-editors@w3.org > July to September 1999

Predicates on root node

From: Kay Michael <Michael.Kay@icl.com>
Date: Tue, 20 Jul 1999 11:29:57 +0100
Message-ID: <93CB64052F94D211BC5D0010A800133170EFCF@wwmess3.bra01.icl.co.uk>
To: "'xsl-editors@w3.org'" <xsl-editors@w3.org>
When processing secondary documents using document(), it would be useful to
be able to apply predicates to determine which template to execute, for
example, if "intray" is a set of references to invoices and purchase-orders,
one might write:

<xsl:apply-templates select="document(intray/@href)"/>

<xsl:template match="/[invoice]">
...
</xsl:template>

<xsl:template match="/[purchase-order]">
...
</xsl:template>

But there seems to be no way of applying a predicate to a pattern that
matches the root node of a document.

I can't see any intrinsic reason for this restriction.

Mike Kay
Received on Tuesday, 20 July 1999 07:49:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:49 GMT