I'm not sure I'm using the correct term - they might be called subscripted elements.
It's where you have any number of repeated child elements under a parent. You can
access the element by element\child[n].
I'm using a technique similar to what you suggested as I couldn't find any context -
as you noted it's not maintained. There doesn't appear to be any method to find the
position of the retreived element. I just wanted to make sure I wasn't missing
anything.
charlie

[EMAIL PROTECTED] wrote:

> Can you explain more what you mean by index?  Do you mean the order of the
> element in the parent's children?
>
> In general, there is no "context" maintained after an XPath is executed.
> You could write some DOM code to get the parent from the node, then walk
> the parent's child list to find the position.  You might also consider
> doing a series of selects, using the results of one select as the context
> for another.
>
> Perhaps if you can explain more of what you're doing, and trying to
> accomplish, we can help.
>
> Dave
>
>
>                     Charlie Hart
>                     <[EMAIL PROTECTED]        To:     [EMAIL PROTECTED]
>                     com>                 cc:     (bcc: David N Bertoni/CAM/Lotus)
>                                          Subject:     indexed elements
>                     07/02/2001
>                     09:59 AM
>                     Please
>                     respond to
>                     xalan-dev
>
>
>
> I have an indexed element like:
> <element>
>    <child  changed= "no"/>
>    <child  changed= 'yes'/>
>    <child  changed = "no"/>
> </element>
>
> When I get a nodeRefList of all changed child elements using xpath, I
> will get element 2. I want to update the same element in another
> document. How can I find the index of the elements I retrieve?
>
> thanks...charlie

Reply via email to