This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: exluding some templetes in <xsl:apply-templates/>
- From: Peter Davis <pdavis152 at attbi dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 25 Mar 2002 22:11:29 -0800
- Subject: [xsl] Re: exluding some templetes in <xsl:apply-templates/>
- References: <20020325163449.14672.qmail@web10108.mail.yahoo.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
If you can't do this:
<xsl:apply-templates select="tag1"/>
(for example if you don't know what tags are going to be inside of <root> and
the only thing you know is that you don't want to select <hidden>), then you
can do this:
<xsl:template match="root">
<xsl:apply-templates/>
</xsl:template>
<!-- do nothing for <hidden> -->
<xsl:template match="hidden"/>
<xsl:template match="tag1">
<!-- do what you normally do here -->
</xsl:template>
On Monday 25 March 2002 08:34, Evgeniy Strokin wrote:
> Hi,
>
> I have XML like this:
>
> <root>
>
> <tag1>....</tag1>
>
> <hidden>
>
> <hidTag1>....</hidTag1>
>
> <hidTag2>....</hidTag2>
>
> <tag2>....</tag2>
>
> </hidden>
>
> <root>
>
> I do <xsl:apply-templates/> but I don't want apply templates for all
> <hidden> nodes and subnodes. What I should put in parameter
> <xsl:apply-templates/>?
>
> Thanks,
>
> Jenya
>
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards®
--
Peter Davis
6 oz. orange juice
1 oz. vodka
1/2 oz. Galliano
Harvey Wallbangers
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list