Subject: Re: [xsl] Thought i knew this but i guess not From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 22 Feb 2011 14:35:35 -0500 |
I am trying to extract only elements having a filter attribute value of 'filter10', 'filter1' or has no filter attributes at all. I would have thought this would do it:
But other filter values are making it into the result file.
Cheers, Wendell
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="*[@filter]"> <xsl:if test="contains(@filter, 'filter10') or contains(@filter, 'filter1')">
<xsl:copy-of select="." /> </xsl:if> </xsl:template> <xsl:template match="*[not(@filter)]"> <xsl:copy-of select="." /> </xsl:template> </xsl:stylesheet>
Can someone provide some help on this!
Thanks so much!
-- ====================================================================== 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] Thought i knew this but i, Abel Braaksma | Thread | Re: Re: [xsl] Thought i knew this b, russurquhart1 |
Re: [xsl] Thought i knew this but i, Abel Braaksma | Date | Re: [xsl] Cheaper to prepend or app, Abel Braaksma |
Month |