RE: [xsl] SELECT ALL CHILD NODES AND EXCEPT ONE

Subject: RE: [xsl] SELECT ALL CHILD NODES AND EXCEPT ONE
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Sun, 23 May 2004 07:35:54 -0600
Hello Arul,

Without seeing your exact source XML it is tough to tell you the exact
XPath expression to use.  Add to this the fact that based on what I can
tell from the information you have supplied what you are actually trying
to do is select all descendants of <chapter> that are not
'//ce:section/ce:section-title' and not just the children.  If
'ce:section' is a child of 'chapter' (again, no way to tell without the
source) and you are just trying to select all the children of 'chapter'
then your selection expression wouldn't go any deeper than the siblings
of 'ce:section'.  As such not selecting '//ce:section/ce:section-title'
wouldn't matter because it wasn't a child of chapter in the first place.

If you can supply a snippet of your source as well as whether you are
looking for all children or all descendants then we can help you
understand what XPath expression will get you where you want to go.

Best regards,

<M:D/>

> -----Original Message-----
> From: Arul Kumar [mailto:arulxml@xxxxxxxxxxxx]
> Sent: Sunday, May 23, 2004 5:58 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] SELECT ALL CHILD NODES AND EXCEPT ONE
> 
> Hello all,
> 
> I have an XML, with the root element <chapter> under this there are
many
> child nodes. My question is, how to select the all the child nodes of
> <chapter> and except the node '//ce:section/ce:section-title'.
> 
> Please advice me the XPath expression, so that I can use it in my XSL.
> Many thanks.
> 
> Best regards
> Arul

Current Thread