I'm using Java and import javax.xml.xpath.* package.
I'm a beginner with XPATH and I can not recover a value based on another value.
Here my .xml file
<lom:lom xmlns:lom="http://ltsc.ieee.org/xsd/LOM" xmlns:lomfr="http://www.lom-fr.fr/xsd/LOMFR" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<lom:general>
...
<lom:title>
<lom:string language="fre">Analyse financière bilan : Un exemple d'approche financière par la méthode des ratios - la centrale de bilans de la Banque de France</lom:string>
</lom:title>
...
</lom:general>
<lom:lifeCycle>
...
<lom:contribute>
<lom:role>
<lom:source>LOMv1.0</lom:source>
<lom:value>author</lom:value>
</lom:role>
<lom:entity>BEGIN:VCARD VERSION:3.0 N:GARROT;Thierry;;; FN:Thierry GARROT EMAIL;TYPE=INTERNET:[email protected] ORG:Université de Nice END:VCARD</lom:entity>
<lom:date>
<lom:dateTime>2009-10-07</lom:dateTime>
</lom:date>
</lom:contribute>
<lom:contribute>
<lom:role>
<lom:source>LOMv1.0</lom:source>
<lom:value>instructional designer</lom:value>
</lom:role>
<lom:entity>BEGIN:VCARD VERSION:3.0 N:CASANOVA;Gérard;;; FN:Gérard CASANOVA EMAIL;TYPE=INTERNET:[email protected] ORG:Université de Lorraine END:VCARD</lom:entity>
<lom:date>
<lom:dateTime>2009-10-07</lom:dateTime>
</lom:date>
</lom:contribute>
<lom:contribute>
...
</lom:contribute>
...
</lom:lifeStyle>
</lom>
How can I get lom:entity value only if lom:value value is author?
lom:entity is a VCARD but I think that it's a problem because I have an algorithm to get author fullname.
Example:
To get lom:title I use : //*[local-name()='title']/*[local-name()='string']/text().
Thank's for help!