Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

xmlns in root element

When converting exchange rates xml from http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml

I'm getting problem with xmlns in root element.

CALL TRANSFORMATION triggers CX_XSLT_ABAP_CALL_ERROR, but only if there is xmlns attribute in first line in input xml:

<gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref">

Without this xmlns=..... (or when modifying e.g. abcxmlns= ) works following xslt fine:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">

<xsl:strip-space elements="*"/>

<xsl:template match="/">

<xsl:copy>

<xsl:apply-templates/>

</xsl:copy>

</xsl:template>

<xsl:template match="Cube/Cube">

<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">

<asx:values>

<ROOT2>

<xsl:value-of select="@time"/>

</ROOT2>

<ROOT1>

<xsl:apply-templates select="Cube"/>

</ROOT1>

</asx:values>

</asx:abap>

</xsl:template>

<xsl:template match="Cube/Cube/Cube">

<loop>

<AMOUNT>

<xsl:value-of select="1"/>

</AMOUNT>

<CCYCODE>

<xsl:value-of select="@currency"/>

</CCYCODE>

<VALUE>

<xsl:value-of select="@rate"/>

</VALUE>

</loop>

</xsl:template>

</xsl:transform>

I'd appreciate if someone migh advise me how to alternate the xslt or tell me what the xmlns in input does.

Cheers

Edited by: Viktor Kunc on Sep 29, 2008 3:25 PM

Tags:
Not what you were looking for? View more on this topic or Ask a question