Subject: RE: [xsl] Can you apply a template match on a copy node? From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 23 Sep 2002 16:33:10 -0400 |
Cheers, Wendell
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.
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Can you apply a template , Michael Carlisle | Thread | [xsl] merging with document(), Jeff Shevlen |
Re: [xsl] Match values? (sorry so b, Joerg Heinicke | Date | [xsl] problem displaying (value-of , Candy, Paul (Forest |
Month |