xsl-list
[Top] [All Lists]

Re: apply-templates and predicates

2005-04-28 02:37:59

If you have templates that match all the elemnts that appear in your
source the default template will not be used, otherwise it will be.
That happens in either style.


But if you filter on the template match you may need to add a new template when the schema changes or *a* default template will be invoked. If you filter on the invoking template no default template will be invoked.



Or by default do you mean any template with a * wildcard whether
explictly in the stylesheet, as above, or the built in one?

I mean the inbuilt one or one explicitly in the stylesheet, it doesn't matter.




I find that handling different match patterns to handle the various
special cases is a lot more manageable than using filters on the
select. I mainly use the filter on select idiom if the filter involves a
global parameter to the stylesheet, as XSLT1 restrictions disallowing
variables in match patterns means that is often the best way. In XSLT2
this restriction will be dropped so I'd expect to use the match pattern
version even more often.

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
________________________________________________________________________

--~------------------------------------------------------------------
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>
--~--


_________________________________________________________________
Winks & nudges are here - download MSN Messenger 7.0 today! http://messenger.msn.co.uk


--~------------------------------------------------------------------
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>
--~--