Subject: Re: seriously trivial question about processing the root element
From: "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2003 07:35:45 -0500 (EST)
|
On Thu, 20 Mar 2003, Jeni Tennison wrote:
> I'd have a different *stylesheet* to get XSL-FO. The mode names that I
> usually use are based on what the templates in that mode are supposed
> to produce. In this stylesheet, 'html' mode would produce HTML, and I
> might have other modes such as 'block', 'inline'.
>
> In another stylesheet I might have a 'filter' mode that would filter
> the source XML.
>
> When I wanted to filter-and-create-HTML, I'd create a third stylesheet
> that imported both the *2html and filter stylesheet, and had a
> template matching the root node that would look like:
>
> <xsl:template match="/">
> <xsl:variable name="filtered">
> <xsl:apply-templates select="doc" mode="filter" />
> </xsl:variable>
> <xsl:apply-templates select="exsl:node-set($filtered)/*"
> mode="html" />
> </xsl:template>
ah, that's clever. to be filed away in my "clever tricks"
folder. thanks.
rday
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|