View Single Post
  #3 (permalink)  
Old February 11th, 2019, 12:15 PM
pedromcerveirapinto pedromcerveirapinto is offline
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2019
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sort portion of XML File

Thank you so much for the awesome quick reply.
Unfortunately, it did not work.
I still have this bit as outcome:
Code:
<Lines>
               <CreditLine>
                  <RecordID>001</RecordID>
                  <AccountID>2312101</AccountID>
                  <SystemEntryDate>2018-09-21T18:36:31</SystemEntryDate>
                  <Description>Vencimento201808</Description>
                  <CreditAmount>4904.26</CreditAmount>
               </CreditLine>
               <DebitLine>
                  <RecordID>002</RecordID>
                  <AccountID>2312101</AccountID>
                  <SystemEntryDate>2018-09-21T18:36:31</SystemEntryDate>
                  <Description>Vencimento201808</Description>
                  <DebitAmount>1894.68</DebitAmount>
               </DebitLine>
               <CreditLine>
                  <RecordID>003</RecordID>
                  <AccountID>2420101</AccountID>
                  <SystemEntryDate>2018-09-21T18:36:31</SystemEntryDate>
                  <Description>Vencimento201808</Description>
                  <CreditAmount>1249.0</CreditAmount>
               </CreditLine>
           </Lines>
Resulting XSLT file is now:
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output indent="yes"/>
  <xsl:strip-space elements="*"/>

    <xsl:strip-space elements="*"/>
    <xsl:output indent="yes"/>
      
  <xsl:template match="node()|@*">
    <xsl:copy>
      <xsl:apply-templates select="node()|@*"/>
    </xsl:copy>
  </xsl:template>

  <!-- Sort Lines -->
<xsl:template match="Lines">
  <Lines>
    <xsl:apply-templates select="CreditLine"/>
    <xsl:apply-templates select="DebitLine"/>
  </Lines>
</xsl:template>
      
</xsl:stylesheet>
Reply With Quote