xsl-list
[Top] [All Lists]

Re: seriously trivial question about processing the root el ement

2003-03-20 05:35:45
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



<Prev in Thread] Current Thread [Next in Thread>