Subject: Re: [xsl] How to create a node set that excludes some descendant elements? From: Rush Manbert <rush@xxxxxxxxxxx> Date: Mon, 11 Apr 2005 17:34:10 -0700 |
I want to create a global variable that contains the result tree fragment contained within element <c>, with the following restrictions:Some things I have tried:
I only want to include the first <y> element that is contained within <c>, no matter where it occurs. There may be no <y> elements present.
I want to exclude all <z> elements that are contained within <c>, no matter where they occur. Again, there may be none present.
I have tried many variations on the select portion of the variable definition. I can filter the immediate children of <c>, OR the second level children, etc., but I can't seem to come up with anything that handles <y> and <z> appearing at any depth in the descendant tree.
Then I tried to just exclude <z> at any level: <xsl:variable name="set" select="/a/b/c/descendant::*[not(self::z)]" /> but that only excludes <z> elements that are children of <c>.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] How to create a node set that, Rush Manbert | Thread | RE: [xsl] How to create a node set , Aron Bock |
[xsl] How to create a node set that, Rush Manbert | Date | RE: [xsl] How to create a node set , Aron Bock |
Month |