Re: [xsl] Grouping "span" with same @class within mixed content element

Subject: Re: [xsl] Grouping "span" with same @class within mixed content element
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 21 Dec 2010 15:09:29 +0000
On 21/12/2010 14:56, Matthieu Ricaud-Dussarget wrote:
I just did not understand what the mode="g" means as there is no other
template in this mode ?

You mean that you don't like my taste in long self-descriptive variable and mode names:-)

when applying templates in an inner special construct like that, it's often a good idea to put it in a mode as often you need to do something a bit different. In this case (but maybe not in your full case) the only thing that needed doing was handing the content of element nodes, and copying text nodes, which is the default template so I didn't need to do anything.

But if for example your span elemnts may contain inline markuo you'd want to add an "identity template" definition in mode "g". or some other further transformation, or whatever you need....


Current Thread