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