Subject: RE: [xsl] seriously trivial question about processing the root el ement From: David.Pawson@xxxxxxxxxxx Date: Thu, 20 Mar 2003 11:00:22 -0000 |
Jeni said: > >> In other words, I use the template matching the root node to start > >> processing using a particular mode. This arrangement makes it easy > >> to combine stylesheets. > > > > Would you then have another mode for print output via xsl-fo Jeni? > > I'd have a different *stylesheet* to get XSL-FO. OK. I see below that you are modularising for future use; I couldn't see any benefit initially in putting the processing in modes. This makes it clear. > 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> Minimal re-writing too. If the processing is general purpose this must be quite efficient in the longer term. Thanks Jeni. regards DaveP - NOTICE: The information contained in this email and any attachments is confidential and may be legally privileged. If you are not the intended recipient you are hereby notified that you must not use, disclose, distribute, copy, print or rely on this email's content. If you are not the intended recipient, please notify the sender immediately and then delete the email and any attachments from your system. RNIB has made strenuous efforts to ensure that emails and any attachments generated by its staff are free from viruses. However, it cannot accept any responsibility for any viruses which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] seriously trivial questio, Robert P. J. Day | Thread | [xsl] create a xsl rule, Lionel Crine |
Re: [xsl] seriously trivial questio, Jeni Tennison | Date | Re: [xsl] Re: questions about XSLT , Robert P. J. Day |
Month |