[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Grouping "span" with same @class within mixed cont

Subject: Re: Grouping "span" with same @class within mixed content element
From: Matthieu Ricaud-Dussarget <matthieu.ricaud@xxxxxxxxx>
Date: Tue, 21 Dec 2010 16:39:51 +0100
Re:  Grouping "span" with same @class within mixed cont
:-) I could have guess this, but there are such new things that i discover everyday with XSLT2, that I thought it was one of them !
I change the mode to mine, which has a default identity template, my spans could effectively contains other elements (like <br/> or <a> etc)


In think this subject is over, thank for your patience and help David. This template is quite generic and can be use or adpated by anybody who wants to clean XHTML redondant markup !

Le 21/12/2010 16:09, David Carlisle a icrit :
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....

David




--
Matthieu Ricaud
IGS-CP
Service Livre numirique

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.