sflynn1812 / xslt-diff-turbo

Faster implementation of Tree Comparison Algorithm using XSLT 1.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

# xslt-diff-turbo

Faster implementation of Tree Comparison Algorithm using XSLT 1.0
A practical example is below. For instance if file a.xml is compared against file b.xml:
a.xml
-------------------------------
<a>
  <b>
    <b>b</b>
    <d>c</d>
  </b>
  <d>d</d>
  <e>e</e>
  </a>

b.xml
-------------------------------
<a>
  <b>
    <b>b</b>
    <d>c</d>
  </b>
  <d>d</d>
  <g>g</g>
</a>
Results in:
<?xml version="1.0" encoding="utf-8"?>
<root>
  <root>
    <left-not-in-right>
      <match>
        <a>
         <b>
         <b>b</b>
         </b>
        </a>
      </match>
      <match>
      <a>
      <b>
        <d>c</d>
      </b>
    </a>
  </match>
  <match>
     <a>
       <d>d</d>
     </a>
  </match>
  <mismatch>
    <a>
      <g>g</g>
    </a>
  </mismatch>
</left-not-in-right>
<right-not-in-left>
  <match>
    <a>
       <b>
         <b>b</b>
       </b>
    </a>
  </match>
  <match>
     <a>
       <b>
         <d>c</d>
       </b>
    </a>
  </match>
  <match>
    <a>
       <d>d</d>
    </a>
  </match>
  <mismatch>
      <a>
       <e>e</e>
      </a>
  </mismatch>
</right-not-in-left>
</root>
</root>

About

Faster implementation of Tree Comparison Algorithm using XSLT 1.0

License:MIT License


Languages

Language:XSLT 80.6%Language:C# 19.4%