I'm quite a novice with Xpath.
Suppose I have an xml catalog to import goods into an e-shop:
<categories>
    <category id="26">Jackets</category>
    <category id="27">Jeans</category>
    <category id="28">Sweaters</category>
    <category id="29">Shirts</category>
    ...
</categories>
<goods>
    <good id="123">
        <categoryId>26</categoryId>
        <label>D&G</label>
        <color>Black</color>
        <size>M, XL</size>
    </good>
    ...
<goods>
The first part of the catalog is a list of goods' categories, the second part is a list of the goods.
Each good has a <categoryId> which value equals the "id" attribute of some <category> from the <categories> list.
From the code above I need to get a good's description like this: Category: Jackets; Label: D&G; Color: Black; Size: M, XL.
Label, Color and Size can be picked directly from the <good> context, and it's not the problem. But for the Category I have only an id which is 26 and which matches the id of the Jackets category from the <categories> context.
So my goal is to select the value of the <category id="26">Jackets</category> node using the value of the <categoryId>26</categoryId> node.
Thank you much.
 
     
    