Subject: Re: [xsl] alternative for modes From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 12 Feb 2004 11:14:02 GMT |
I did not meant it that way: imagine you have to parse a certain node 'x' (+ his children) more than 1 time in a stylesheet: each time the parsing of 'x' is exactly the same, but the parsing of 'x''s children is different. So for each time I should call the same template for 'x', but that template should call a different template for his children. Ah what you want then is that the different processing of the children are in different modes, but that your generic template acts like the default templates and is "node neutral" in that it works in any mode and calls apply-templates on the mode that it was called from rather tahn a mode hard-wired into the code of the template. Unfortunately this is not available in XSLT1 but (as you have found) it is seen as a requirement and XSLT2 draft has a more flexible mode arrangement that addresses this need (but XSLT2 specification is still just a draft, although saxon7 implements much of it) So in XSLT1 then something like you have is reasonable I think. David -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] alternative for modes, Peter Billen | Thread | RE: [xsl] alternative for modes, Peter Billen |
RE: [xsl] alternative for modes, Peter Billen | Date | RE: [xsl] alternative for modes, Peter Billen |
Month |