tags:

views:

395

answers:

1

I am trying to build an XPath select just the 'Phone' number from the following:

<element identifier="ContactPoint" version="Local">
    <qualifier name="Phone" type="refining"/>
    01234 567890
</element>
<element identifier="ContactPoint" version="Local">
    <qualifier name="Email" type="refining"/>
    [email protected]
</element>

In my XSLT, I have the following:

<TelNumber>
    <xsl:value-of select="./element[@identifier='ContactPoint']"/>
</TelNumber>

But obviously this will just select the first instance. How would I combine conditions into one select to ensure I am only selecting the value of "element" with a "Phone" qualifier child?

Thanks!

+3  A: 

.\element[@identifier='ContactPoint' and qualifier/@name='Phone']

AakashM
Knew it would be something simple, thanks!
Nat Ryall