<?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 Re: Formatting XML-Content in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407406#M1241823</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay :o(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you may walk through the links above (they are really helpful) and determione with functions, that are supported by SAP, are usable. Good Luck!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Mar 2009 13:26:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-25T13:26:13Z</dc:date>
    <item>
      <title>Formatting XML-Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407397#M1241814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with formatting dynamic generated XML. I pass a dynamic DDIC-structure to an XSLT transformation and there I need to reformat some content:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to format decimal content of xml elements, example:&lt;/P&gt;&lt;P&gt;&amp;lt;element&amp;gt;9.2&amp;lt;/element&amp;gt; needs to be &amp;lt;element&amp;gt;9,20&amp;lt;element&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I need to clear out initial values, example:&lt;/P&gt;&lt;P&gt;&amp;lt;element&amp;gt;0.0&amp;lt;/element&amp;gt; needs to be &amp;lt;element /&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I tried to use the xsl:decimal-format in the xslt-transformation but SAP did not support this function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here my plain and simple XSLT:&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;xsl:output method="xml" encoding="UTF-8" indent="yes"/&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-of select="."/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/xsl:template&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone an idea how to reformat the content within the XML oder wihtin the iXML-framework?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you &amp;amp; best regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 10:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407397#M1241814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T10:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting XML-Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407398#M1241815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use a replace function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fn:replace(string,pattern,replace)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Returns a string that is created by replacing the given pattern with the replace argument&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: replace("Bella Italia", "l", "*")&lt;/P&gt;&lt;P&gt;Result: 'Be*&lt;STRONG&gt;a Ita&lt;/STRONG&gt;ia'&lt;/P&gt;&lt;P&gt;Example: replace("Bella Italia", "l", "")&lt;/P&gt;&lt;P&gt;Result: 'Bea Itaia'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See &lt;A href="http://www.w3schools.com/XPath/xpath_functions.asp" target="test_blank"&gt;http://www.w3schools.com/XPath/xpath_functions.asp&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 10:21:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407398#M1241815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T10:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting XML-Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407399#M1241816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can I use this function within the xsl:copy-of or do I need to loop through all elements? And how can I prevent date formatted strings to be changed, too?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 10:40:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407399#M1241816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T10:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting XML-Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407400#M1241817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you should leave the "copy-of" out and place the "replace" functions there (you will need 2, one for the comma and one for the "0.00).&lt;/P&gt;&lt;P&gt;In "template-match" you need to select the path that needs to be changed. Then use the the replace functions with propper input values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 10:45:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407400#M1241817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T10:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting XML-Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407401#M1241818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm... &lt;/P&gt;&lt;P&gt;If I let the copy-of outside, i did not get the DDIC-data in.&lt;/P&gt;&lt;P&gt;Using the fn:replace()-function leads to unclosed element tag error...&lt;/P&gt;&lt;P&gt;And last not least I think that the template-match needs to be "/" because I can have a lot of elemets somewhere in the structure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current XSLT which does not work:&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;xsl:output method="xml" encoding="UTF-8" indent="yes"/&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-of select="."/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;fn:replace(".","bla","blub")/&amp;gt;. &lt;/P&gt;&lt;P&gt;&amp;lt;/xsl:template&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another solution might be converting all DDIC decimal fields to char and reformat them in ABAP, but this is ugly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 12:33:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407401#M1241818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T12:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting XML-Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407402#M1241819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.w3schools.com/XSL/el_decimal-format.asp" target="test_blank"&gt;http://www.w3schools.com/XSL/el_decimal-format.asp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XSLT can do it definetely!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kai&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.xml.com/pub/a/2002/06/05/transforming.html" target="test_blank"&gt;http://www.xml.com/pub/a/2002/06/05/transforming.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.xsltfunctions.com/xsl/functx_replace-element-values.html" target="test_blank"&gt;http://www.xsltfunctions.com/xsl/functx_replace-element-values.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;might help also ;o)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kai Lerch-Baier on Mar 25, 2009 1:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 12:42:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407402#M1241819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T12:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting XML-Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407403#M1241820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, XSLT can. But SAP does not support xsl:decimal-format, yippieh &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 13:13:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407403#M1241820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T13:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting XML-Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407404#M1241821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh - did I get you wrong? I thought you'll do a XSLT transformation to format the data correctly.... - Not?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 13:19:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407404#M1241821</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T13:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting XML-Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407405#M1241822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I want to format the content with XSLT... but within the SAP system. And SAP did not support everything... see here:&lt;/P&gt;&lt;P&gt;[http://help.sap.com/saphelp_nw04/Helpdata/de/e8/e7463c6796e61ce10000000a114084/content.htm|http://help.sap.com/saphelp_nw04/Helpdata/de/e8/e7463c6796e61ce10000000a114084/content.htm]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 13:24:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407405#M1241822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T13:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting XML-Content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407406#M1241823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay :o(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you may walk through the links above (they are really helpful) and determione with functions, that are supported by SAP, are usable. Good Luck!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 13:26:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formatting-xml-content/m-p/5407406#M1241823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T13:26:13Z</dc:date>
    </item>
  </channel>
</rss>

