Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 2nd, 2006, 11:25 AM
jonny@drugphish.ch
Guest
 
Posts: n/a
Default removing a node from a node-set

Hi,

I have a template "delete-node" with two arguments containing document
fragments when called.
I want to return a new document fragment which contains all nodes from
argument 2 except the one which is
contained in argument 1.

The code currently looks like this:

<xsl:template name="delete-node">
<xsl:param name="todelete" />
<xsl:param name="notprocessed" />

<xsl:copy-of select="$notprocessed[not(@id =
$todelete/node/@id)]"/>
</xsl:template>

And an example for $todelete is:
<node id='x'... </node>

and $notprocessed contains a few of those nodes including the one with
id 'x'.

Is there a solution to this problem without using exsl:node-set()?

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles