|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Can you apply a template match on a copy node?
Yep looks like css is the best solution. I'm just experimenting really, but
there are plenty of scenarios where I have wanted to apply a template to a
node written out in another match, so that I can reuse a single style
definition.
Example(ish): I have a forum which replaces smilies in message threads. If all text nodes always go through the text() match I have a single place I can pass smilies into gifs by inserting an image tag. If my generic image match can then be applied to this new image node, then I have one central place where my images can be processed generically, such as appending image directory to the src attribute of any image. It also means one central place where smilie replacement may be turned on/off. I know there are plenty of other ways of handling these scenarios but the central matches solution is much neater and cleaner, and takes the emphasis away from the template creator having to consider the bigger picture. ie. think about appending variables to attributes etc. Node-set does the job, but still not sure about whether there are heavy processing penalties for using it, and also the implementation is a bit messy. From: "Robert Koberg" <rob@xxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: Can you apply a template match on a copy node? Date: Sun, 22 Sep 2002 16:13:24 -0700 _________________________________________________________________ Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








