Note that there are some explanatory texts on larger screens.

plurals
  1. POXSL Transform, select on prefix namespace?
    primarykey
    data
    text
    <p>I am trying to select a node from the following xml that have prefix from namespace:</p> <pre><code>&lt;gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01"&gt; &lt;Cube&gt; &lt;Cube time="2009-10-12"&gt; &lt;Cube currency="USD" rate="1.4765"/&gt; ............................. </code></pre> <p>the xsl I am using is (Updated): The original xml is at: <a href="http://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml" rel="nofollow noreferrer">http://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml</a></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;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"&gt; &lt;xsl:template match="/"&gt; &lt;xdoc&gt; &lt;ccurency&gt; &lt;xsl:for-each select="gesmes:Envelope/Cube/Cube"&gt; &lt;xsl:variable name="atime" select="@time"/&gt; &lt;xsl:for-each select="Cube"&gt; &lt;row&gt; &lt;xsl:element name="Date"&gt; &lt;xsl:value-of select="$atime"/&gt; &lt;/xsl:element&gt; &lt;xsl:element name="Currency"&gt; &lt;xsl:value-of select="@currency"/&gt; &lt;/xsl:element&gt; &lt;xsl:element name="Rate"&gt; &lt;xsl:value-of select="@rate"/&gt; &lt;/xsl:element&gt; &lt;/row&gt; &lt;/xsl:for-each&gt; &lt;/xsl:for-each&gt; &lt;/ccurency&gt; &lt;/xdoc&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>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? </p> <p>How can I select it with prefix ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload