Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Specify an element in a nodeset directly >Thread Next - Re: Specify an element in a nodeset directly Re: Specify an element in a nodeset directlyTo: NULL Date: 10/5/2006 2:05:00 PM
roy axenov wrote:
> So what does it do?
>
> $rates/rate selects a nodeset of <rate> nodes. The
> predicate [position()=thingcode] filters this nodeset,
> dropping all the nodes that don't have a <thingcode> child
> with content that is equal to the position of the <rate>
> node in the $rates/rate nodeset. Since there are no <rate>
> nodes with <thingcode> children in your document, the
> resulting nodeset is, naturally, empty. I already explained
> the solution in my previous reply.
>
> --
> roy axenov
Roy,
I played around with your example, but it doesn't seem to work when I
have multiple xyzzy elements, for example:
<foo>
<bar>
<xyzzy>
<int>3</int>
</xyzzy>
<xyzzy>
<int>4</int>
</xyzzy>
<xyzzy>
<int>5</int>
</xyzzy>
</bar>
<nodeset>
<node>
<str>wrong (1)</str>
<int>3</int>
</node>
<node>
<str>wrong (2)</str>
<int>2</int>
</node>
<node>
<str>right (3)</str>
<int>1</int>
</node>
</nodeset>
</foo>
I'm wondering if it's not possible to do what I'm trying to do.
-Eric
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
