xsl-list
[Top] [All Lists]

RE: SELECT ALL CHILD NODES AND EXCEPT ONE

2004-05-23 07:15:44
XPath 2.0 makes this easy, with an "except" operator: A except B selects
nodes in node-set A that are not in node-set B.

Some XSLT 1.0 processors offer the EXSLT set:difference() extension function
which does the same thing.

In standard XPath 1.0 you can write "A except B" as

A[count(.|B) != count(B)]

but it is likely to be quite inefficient.

Michael Kay 

-----Original Message-----
From: Arul Kumar [mailto:arulxml(_at_)netscape(_dot_)net] 
Sent: 23 May 2004 11:58
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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



--+------------------------------------------------------------------
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>
--+--





<Prev in Thread] Current Thread [Next in Thread>