Subject: Re: [xsl] Catch ALL | Failed template rule From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 21 Mar 2005 16:27:14 GMT |
> It's much cleaner > to right a single apply-templates rule. Uggg. Actually I can't guess how such a "null template" would work, the model is that when applying templates the system is just working along a node set of selected nodes, it never takes any actions that depend on the particular select attribute that is used, just on the nodes that are selected. So given an empty node set there's not really much else it could do but do nothing. apply-templates are used when the structure of the result is determined by the structure of the input. (the so called push model of processing) In your case, it sounds like you want the structure of the result to be more controlled by the structure of the stylesheet (the so called pull model) in which case you'd typically use <xsl:if test=something> <xsl:value-of select=somethingelse> </xsl:if> rather more than you use <xsl:apply-templates/> David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. 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 ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Catch ALL | Failed templa, Karl Stubsjoen | Thread | RE: [xsl] Catch ALL | Failed templa, Michael Kay |
[xsl] Docbook index problem, Hiral Parikh | Date | RE: [xsl] Catch ALL | Failed templa, Michael Kay |
Month |