xsl-list
[Top] [All Lists]

Re: [xsl] XPath - excluding specified childNodes from result nodeList

2007-12-15 01:55:26
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(_at_)gmail(_dot_)com> 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--