<?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: Simple Transformation serialization - XML has sorted attributes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-serialization-xml-has-sorted-attributes/m-p/6656610#M1445673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I entered an OSS message and they responded that I should not be worried that the attributes &lt;/P&gt;&lt;P&gt;are sorted and not in the order that the vendor requested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=========OSS Response below========================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are right, that in your example the attributes are sorted. In the&lt;/P&gt;&lt;P&gt;W3C XML specification it is defined, that XML attributes or not ordered. &lt;/P&gt;&lt;P&gt;This means, that an XML parser can not expect ordered XML attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sorted order of the attributes in your example is because of the&lt;/P&gt;&lt;P&gt;implementation details of the iXML library. In addition to that the&lt;/P&gt;&lt;P&gt;order of attributes is not guaranteed and can differ depending on the&lt;/P&gt;&lt;P&gt;XML technology and release version you are currently using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this information helps you to understand that you have to&lt;/P&gt;&lt;P&gt;implement you XML applications in the way to be prepared for attributes&lt;/P&gt;&lt;P&gt;in random order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Mar 2010 21:07:52 GMT</pubDate>
    <dc:creator>michelle_fish2</dc:creator>
    <dc:date>2010-03-23T21:07:52Z</dc:date>
    <item>
      <title>Simple Transformation serialization - XML has sorted attributes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-serialization-xml-has-sorted-attributes/m-p/6656607#M1445670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.  I am trying to call a Simple transformation (serialization (internal table to XML)) process from an ABAP program and the resulting XML has the attributes sorted.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is:  If I need the XML output to have a certain order to the attributes - how do I remove the sorting ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ABAP program has this table defined:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of wa_final_xml,&lt;/P&gt;&lt;P&gt;act type string,&lt;/P&gt;&lt;P&gt;col1 type string,&lt;/P&gt;&lt;P&gt;col2 type string,&lt;/P&gt;&lt;P&gt;col10 type string,&lt;/P&gt;&lt;P&gt;end of wa_final_xml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Simple transformation mapping is like this:&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?sap.transform simple?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;tt:transform xmlns:tt="http://www.sap.com/transformation-templates"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;tt:root name="T_FINAL_XML"/&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;tt:template&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;tt:loop ref="T_FINAL_XML"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;z:row&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;tt:attribute name="action" value-ref="ACT"/&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;tt:attribute name="column1" value-ref="COL1"/&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;tt:attribute name="column2" value-ref="COL2"/&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;tt:attribute name="column10" value-ref="COL10"/&amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;/z:row&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;/tt:loop&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/tt:template&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/tt:transform&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The XML output is below  (as you can see the attribute column10 is before column2.  I need column2 to be before column10).&lt;/STRONG&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;z:row action="1" column1="Dept1" column10="changed on 03-09-2010" column2="UC01"/&amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;z:row action="1" column1="Dept2" column10="changed on 03-09-2010" column2="UC02"/&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Michelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 20:57:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-serialization-xml-has-sorted-attributes/m-p/6656607#M1445670</guid>
      <dc:creator>michelle_fish2</dc:creator>
      <dc:date>2010-03-10T20:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation serialization - XML has sorted attributes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-serialization-xml-has-sorted-attributes/m-p/6656608#M1445671</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 created new transformation (copied from yours) and simple program which uses this transformation,&lt;/P&gt;&lt;P&gt;it gives correct result - and I can get columns in any order I set in XSL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still have the problem, please send whole program and XSL file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Przemysław&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 00:10:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-serialization-xml-has-sorted-attributes/m-p/6656608#M1445671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T00:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation serialization - XML has sorted attributes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-serialization-xml-has-sorted-attributes/m-p/6656609#M1445672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still getting the problem.&lt;/P&gt;&lt;P&gt;I've sent you the whole program, the input file and the output file that is being generated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 16:11:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-serialization-xml-has-sorted-attributes/m-p/6656609#M1445672</guid>
      <dc:creator>michelle_fish2</dc:creator>
      <dc:date>2010-03-11T16:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Transformation serialization - XML has sorted attributes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-serialization-xml-has-sorted-attributes/m-p/6656610#M1445673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I entered an OSS message and they responded that I should not be worried that the attributes &lt;/P&gt;&lt;P&gt;are sorted and not in the order that the vendor requested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=========OSS Response below========================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are right, that in your example the attributes are sorted. In the&lt;/P&gt;&lt;P&gt;W3C XML specification it is defined, that XML attributes or not ordered. &lt;/P&gt;&lt;P&gt;This means, that an XML parser can not expect ordered XML attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sorted order of the attributes in your example is because of the&lt;/P&gt;&lt;P&gt;implementation details of the iXML library. In addition to that the&lt;/P&gt;&lt;P&gt;order of attributes is not guaranteed and can differ depending on the&lt;/P&gt;&lt;P&gt;XML technology and release version you are currently using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this information helps you to understand that you have to&lt;/P&gt;&lt;P&gt;implement you XML applications in the way to be prepared for attributes&lt;/P&gt;&lt;P&gt;in random order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Mar 2010 21:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-transformation-serialization-xml-has-sorted-attributes/m-p/6656610#M1445673</guid>
      <dc:creator>michelle_fish2</dc:creator>
      <dc:date>2010-03-23T21:07:52Z</dc:date>
    </item>
  </channel>
</rss>

