<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic xmlns in root element in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/xmlns-in-root-element/m-p/4586225#M1081802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When converting exchange rates xml from &lt;A href="http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" target="test_blank"&gt;http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm getting problem with xmlns in root element.&lt;/P&gt;&lt;P&gt;CALL TRANSFORMATION triggers CX_XSLT_ABAP_CALL_ERROR, but only if there is xmlns attribute in first line in input xml:&lt;/P&gt;&lt;P&gt;&amp;lt;gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without this xmlns=.....  (or when modifying e.g. abcxmlns= ) works following xslt fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0"&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;xsl:strip-space elements="*"/&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;xsl:template match="/"&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;xsl:copy&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;xsl:apply-templates/&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;/xsl:copy&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/xsl:template&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;xsl:template match="Cube/Cube"&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;asx:values&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;ROOT2&amp;gt;&lt;/P&gt;&lt;P&gt;          &amp;lt;xsl:value-of select="@time"/&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;/ROOT2&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;ROOT1&amp;gt;&lt;/P&gt;&lt;P&gt;          &amp;lt;xsl:apply-templates select="Cube"/&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;/ROOT1&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/asx:values&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;/asx:abap&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/xsl:template&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;xsl:template match="Cube/Cube/Cube"&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;loop&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;AMOUNT&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;xsl:value-of select="1"/&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/AMOUNT&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;CCYCODE&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;xsl:value-of select="@currency"/&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/CCYCODE&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;VALUE&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;xsl:value-of select="@rate"/&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/VALUE&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;/loop&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/xsl:template&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/xsl:transform&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd appreciate if someone migh advise me how to alternate the xslt or tell me what the xmlns in input does.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viktor Kunc on Sep 29, 2008 3:25 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Sep 2008 13:19:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-29T13:19:57Z</dc:date>
    <item>
      <title>xmlns in root element</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xmlns-in-root-element/m-p/4586225#M1081802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When converting exchange rates xml from &lt;A href="http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" target="test_blank"&gt;http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm getting problem with xmlns in root element.&lt;/P&gt;&lt;P&gt;CALL TRANSFORMATION triggers CX_XSLT_ABAP_CALL_ERROR, but only if there is xmlns attribute in first line in input xml:&lt;/P&gt;&lt;P&gt;&amp;lt;gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without this xmlns=.....  (or when modifying e.g. abcxmlns= ) works following xslt fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0"&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;xsl:strip-space elements="*"/&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;xsl:template match="/"&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;xsl:copy&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;xsl:apply-templates/&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;/xsl:copy&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/xsl:template&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;xsl:template match="Cube/Cube"&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;asx:values&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;ROOT2&amp;gt;&lt;/P&gt;&lt;P&gt;          &amp;lt;xsl:value-of select="@time"/&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;/ROOT2&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;ROOT1&amp;gt;&lt;/P&gt;&lt;P&gt;          &amp;lt;xsl:apply-templates select="Cube"/&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;/ROOT1&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/asx:values&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;/asx:abap&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/xsl:template&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;xsl:template match="Cube/Cube/Cube"&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;loop&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;AMOUNT&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;xsl:value-of select="1"/&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/AMOUNT&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;CCYCODE&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;xsl:value-of select="@currency"/&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/CCYCODE&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;VALUE&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;xsl:value-of select="@rate"/&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/VALUE&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;/loop&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/xsl:template&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/xsl:transform&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd appreciate if someone migh advise me how to alternate the xslt or tell me what the xmlns in input does.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viktor Kunc on Sep 29, 2008 3:25 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2008 13:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xmlns-in-root-element/m-p/4586225#M1081802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-29T13:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: xmlns in root element</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xmlns-in-root-element/m-p/4586226#M1081803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Viktor,&lt;/P&gt;&lt;P&gt;&amp;nbsp; I have same problem. do you solve it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp; mauro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2012 11:53:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xmlns-in-root-element/m-p/4586226#M1081803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-24T11:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: xmlns in root element</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xmlns-in-root-element/m-p/4586227#M1081804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If a namespace is specified on root level, it propagates down to all children, see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.w3.org/TR/REC-xml-names/#scoping" title="http://www.w3.org/TR/REC-xml-names/#scoping"&gt;http://www.w3.org/TR/REC-xml-names/&lt;/A&gt;&lt;A __jive_macro_name="tag" class="jive_macro jive_macro_tag" href="https://community.sap.com/" tag="scoping"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The namespace is part of a name. So, if you have an element &amp;lt;Cube&amp;gt; as child of the root element &amp;lt;root xmlns="&lt;A href="http://www.gesmes.org/xml/2002-08-01" title="http://www.gesmes.org/xml/2002-08-01"&gt;http://www.gesmes.org/xml/2002-08-01&lt;/A&gt;"&amp;gt;, then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;xsl:apply-templates select="Cube"/&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;won't be applied, since the qualified name of the element is not &lt;STRONG&gt;Cube &lt;/STRONG&gt;but &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;A href="http://www.gesmes.org/xml/2002-08-01" title="http://www.gesmes.org/xml/2002-08-01"&gt;http://www.gesmes.org/xml/2002-08-01&lt;/A&gt;&lt;STRONG&gt;}Cube&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want the XSLT to work with and without namespace equally well, you have to work with local names in XPath expressions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;xsl:apply-templates select="local-name() = 'Cube'"/&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same holds for all XPath functions working with element names. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually, however, the namespace is part of the contract with the client and is &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;either obligatory to be used &lt;/LI&gt;&lt;LI&gt;or obligatory to be omitted. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;But not both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rüdiger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2012 12:22:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xmlns-in-root-element/m-p/4586227#M1081804</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2012-07-24T12:22:46Z</dc:date>
    </item>
  </channel>
</rss>

