- From: James Clark <jjc@jclark.com>
- Date: Tue, 27 Jul 1999 17:56:04 +0700
- To: Kay Michael <Michael.Kay@icl.com>
- CC: "'xsl-editors@w3.org'" <xsl-editors@w3.org>
Why not just write the template for the document element? The main point of having a template rule for the root is so that it can work regardless of the document element. Kay Michael wrote: > > 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, 27 July 1999 07:51:10 UTC