Example xml:
<root>
    <ns1:agent ns2:about="a3">
        <ns2:name xml:lang="en">Helen</ns2:name>
        <ns2:age>26</ns2:age>
    </ns1:agent>
    <ns1:agent ns2:about="a1">
        <ns2:name xml:lang="en">John</ns2:name>
        <ns2:age>26</ns2:age>
    </ns1:agent>
    <ns1:agent ns2:about="a2">
        <ns2:name xml:lang="en">Mike</ns2:name>
        <ns2:age>30</ns2:age>
    </ns1:agent>
    ...
    <!-- More ns1:agent nodes -->
    ...
    <ns3:person ns2:id="a1"/>
    <ns3:person ns2:id="a2"/>
    <ns3:person ns2:id="a3"/>
    ...
    <!-- More ns3:person nodes -->
    ...
</root>
So how to get the text value of the agent/name element based on its about attribute starting from person element, using XPath?
Edit: XPath expression will be used in a loop, for each ns3:person node, so I don't know the specific id attribute value beforehand.
 
     
    