Subject: Re: [xsl] xsl:next-match for named templates ? From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 14 Jun 2015 20:56:26 -0000 |
On Thu, Jul 25, 2013 at 3:49 PM, Max Toro <maxtoroq@xxxxxxxxx> wrote: > But templates are not always used to map a tree to another > tree. Sometimes you want to create trees from nothing, or using > parameters or global variables. In XSLT 3.0 templates can match not only nodes, but also any item() and also a function() I have been using a technique where one can have templates in different stylesheet modules that match the same function. Within a matching template one can then use <xsl:next-match/> One can even write an <xsl:function> that applies templates to a function -- and in particular -- to itself. Using this technique allows us to write functions that are highly extensible and exhibit polymorphic behavior. For more information, see the 4th module "Pattetns and Matching Them in Templates" (the clip immediately preceding the last, summary clip of the module), of my training course "What's New in XSLT 3.0, Part 1": http://www.pluralsight.com/courses/xslt-3-0-whats-new-part1 -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- Never fight an inanimate object ------------------------------------- To avoid situations in which you might make mistakes may be the biggest mistake of all ------------------------------------ Quality means doing it right when no one is looking. ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play ------------------------------------- To achieve the impossible dream, try going to sleep. ------------------------------------- Facts do not cease to exist because they are ignored. ------------------------------------- Typing monkeys will write all Shakespeare's works in 200yrs.Will they write all patents, too? :) ------------------------------------- Sanity is madness put to good use. ------------------------------------- I finally figured out the only reason to be alive is to enjoy it.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl:next-match for named , Max Toro maxtoroq@xx | Thread | Re: [xsl] xsl:next-match for named , Dimitre Novatchev dn |
Re: [xsl] xsl:next-match for named , Max Toro maxtoroq@xx | Date | Re: [xsl] xsl:next-match for named , Dimitre Novatchev dn |
Month |