Subject: Re: [xsl] [xsl-list] Storing an XPath fragment in a variable From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 13 Jul 2005 17:10:48 -0400 |
I'm using the following partial XPath expression...:
[name()='RED' or name() = 'GREEN' or name() = 'BLUE']
... in several locations in my stylesheet:
<xsl:for-each select="/*/*[1]/*[name()='RED' or name() = 'GREEN' or name() = 'BLUE']">
<xsl:for-each select="*[name()='RED' or name() = 'GREEN' or name() = 'BLUE']">
Is it possible to store a fragment of an XPath expression in a variable or is there another method of eliminating redundancy that I'm not aware of?
<xsl:variable name="brights" select="RED | GREEN | BLUE"/> ... <xsl:apply-templates select="$brights"/>
Cheers, Wendell
====================================================================== 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 -> |
---|---|---|
[xsl] FOP Transformation on the ser, craig webber | Thread | Re: [xsl] [xsl-list] Storing an XPa, Wendell Piez |
Re: [xsl] [xsl-list] Storing an XPa, Jason Kohls | Date | Re: [xsl] [xsl-list] Storing an XPa, David Carlisle |
Month |