|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Using mode to override templates
..apologies if this has been discussed before I want to merge my print and my 'screen' stylesheets into one to aid maintainability. Ideally I want to do this: <xsl:when test="$print = 'yes'"> <xsl:apply-templates mode="print"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates/> </xsl:otherwise> With all templates firing as usual, except those with the mode overiding their non-mode counterparts. (essentially only a few templates have the mode attribute, such as tables (remove scrolling)) and inline graphics. Obviously, apply-templates with a mode will only use templates with a matching mode (and not fire all the templates that are common to both and therefore would not have a mode) - how do I overcome this? I suppose on each template I could use a big if-else (or choose-when ;) and separate the code that way, but I would prefer to use the neater mode approach if thats possible. cheers andrew --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








