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

Re: XPath - excluding specified childNodes from result

Subject: Re: XPath - excluding specified childNodes from result nodeList
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Sat, 15 Dec 2007 14:24:54 +0530
Re:  XPath - excluding specified childNodes from result
Probably something like:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                        version="1.0">

<xsl:output indent="yes" />

<xsl:template match="document">
  <a>
    <xsl:copy-of select="a/*[not(self::c)]" />
  </a>
</xsl:template>

</xsl:stylesheet>

On 12/15/07, Steven <gatecrasher1981@xxxxxxxxx> wrote:
> Hi there,
>
> Hope this isn't an inappropriate post - I'm new to XSL and XPath, and
> am currently using the PHP implementation of XPath 1.0. I've searched
> around the net but can't seem to find an appropriate way to solve the
> following XPath problem.
>
> I'm simply trying to exclude a specified child node from being within
> the nodeList created by my expression e.g.
>
>
>
> <document>
> <a>
>     <b>
>     </b>
>     <c>
>     </c>
> </a>
> </document>
>
> Select node 'a' but remove child 'c' from the result set.
>
> Any tips appreciated.
>
> Cheers,
>
> Steve


-- 
Regards,
Mukul Gandhi

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-2013 All Rights Reserved.