Hi,
I am trying to select a node from the following xml that have prefix from namespace:
<gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01">
<Cube>
<Cube time="2009-10-12">
<Cube currency="USD" rate="1.4765"/>
.............................
the xsl I am using is (Updated): The original xml is at: http://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xdoc>
<ccurency>
<xsl:for-each select="gesmes:Envelope/Cube/Cube">
<xsl:variable name="atime" select="@time"/>
<xsl:for-each select="Cube">
<row>
<xsl:element name="Date">
<xsl:value-of select="$atime"/>
</xsl:element>
<xsl:element name="Currency">
<xsl:value-of select="@currency"/>
</xsl:element>
<xsl:element name="Rate">
<xsl:value-of select="@rate"/>
</xsl:element>
</row>
</xsl:for-each>
</xsl:for-each>
</ccurency>
</xdoc>
</xsl:template>
</xsl:stylesheet>
This is not working, the select is empty. If I change the gesmes:Envelope to simple Envelope both at xml and xsl everything works fine?
How can I select it with prefix ?