Hannes: XPATH Ausdruck gesucht

Beitrag lesen

Hi Folks!

Mein XML sieht so aus:

<Inhalt>
 <Text id="0" field="cover" width="100"></Text>
 <Text id="1" field="xxx" width="100"></Text>
 <Text id="2" field="yyyy" width="100"></Text>
</Inhalt>

Meine XSL soll nun die 'width' auslesen, bei welcher 'field' = cover ist.

Ich komme nicht darauf und sitze grad wohl im Loch ;-)

Jemand eine Idee?

Meine Ansatz ging in die Hose

Inhalt/Text[@field='cover' and @width]
Inhalt/Text[@field='cover']/[descendant::@width]