tags:

views:

17

answers:

3

Hi guys, I could use a little help with an XPath-Expression. check the code below; how do I select the attribute "idc" at the shown point?

<!-- XML-Code -->
<pictGaleList>
    <item>
    </item>

    <dateItem>
        <ImageDate idc="20">
            20/04/2010
        </ImageDate>
    </dateItem>

</pictGaleList>


<!-- XSLT -->

<xsl:template match="pictGaleList">
    <xsl:value-of select="" /> <!-- here I need the value of the attribute "idc" -->
</xsl:template>
+1  A: 

dateItem/ImageDate/@idc ?

Benjol
A: 

Solved, the false behaviour if the website didn't come from this code. nvrmnd

Frankie-T
+1  A: 
dateItem[position() = 1]/ImageDate/@idc

Will give you the value of 1st ImageDate element's idc attribute inside pictGaleList

naikus