[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: How to apply templates to all child elements excep

Subject: RE: How to apply templates to all child elements except a few
From: "Brian Martinez" <Brian.Martinez@xxxxxxxxxxxx>
Date: Tue, 17 Oct 2006 13:59:34 -0500
all minisites templates
I think that should be

<xsl:apply-templates select="*[not(local-name() = 'CHILD4']" />

Alternatively you can do:

<xsl:apply-templates />

with no select attribute and then create an empty template for the
element you want to exclude:

<xsl:template match="CHILD4"></xsl:template>

hth,
b.

> -----Original Message-----
> From: cknell@xxxxxxxxxx [mailto:cknell@xxxxxxxxxx]
> Sent: Tuesday, October 17, 2006 12:45 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  How to apply templates to all child elements except
a
> few
>
> <xsl:template match="el1">
>   <xsl:apply-templates match="*[not(local-name() = 'CHILD4'] />
> </xsl:template>
> --
> Charles Knell
> cknell@xxxxxxxxxx - email
>
>
>
> -----Original Message-----
> From:     rfd ewrew <xmlquestions101@xxxxxxxxxxx>
> Sent:     Tue, 17 Oct 2006 13:38:15 -0500
> To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:   How to apply templates to all child elements except a
few
>
> Hi:
>
> I was wondering if there was any way in xslt to APPLY TEMPLATES a few
> elements and exclude a few
>
> Suppose i have an xml with a root element as el1
> <el1>
> <CHILD1></CHILD1>
> <CHILD2></CHILD2>
> <CHILD3></CHILD3>
> <CHILD4></CHILD4>
>
> </el1>
> I want to write something like apply templates to all elements except
> CHILD4. How do I do this?
>
> Can someone please guide me here.
>
> Thank you.
>
> _________________________________________________________________
> Try the next generation of search with Windows Live Search today!
> http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-
> us&source=hmtagline

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.