Subject: Re: [xsl] something I'd really like in XSLT From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 23 Jan 2007 13:33:49 GMT |
> now this is of course not a useful example but we can see how the > first example template matches normal priority operation (but the > running of the template is not affected by the priority rules of the > template, basically the execution of the template is now affected by > the priority of how one matches the same element in the ismatched > mode) with the exception that I can switch execution dependent on if > there is an import that matches. I can of course do this by running > xsl:apply-imports and testing if there is any content of my variable > but it seems somewhat fragile to say the least. I didn't follow all the logic here but it seems to be very complicated, and attempting to duplicate much of the matching semantics within xslt. If the requirement is "if foo.xsl and bar.xsl have templates that match this node do what they specify else do ...) Then you can do that without any explict xsl:if testing, just have a top level stylesheet that says <xsl:import href="default.xsl"/> <xsl:import href="foo.xsl"/> <xsl:import href="bar.xsl"/> where default.xsl has a template that matches the node and does ... it will have lowest import precedence so only be invoked if no other template matches. David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] something I'd really like, bryan rasmussen | Thread | Re: [xsl] something I'd really like, bryan rasmussen |
Re: [xsl] something I'd really like, Abel Braaksma | Date | Re: [xsl] something I'd really like, David Carlisle |
Month |