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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--