I have the follwing data as an input:
<?xml version="1.0" encoding="UTF-8"?>
<orderbackup>
<edprefinst paymentsystem="FirstData" amount="227.00000" refundmethod="VISA" backendriid="674256" />
<edprefinst paymentsystem="FirstData" amount="227.00000" refundmethod="VISA" backendriid="663754" />
<edprefinst paymentsystem="FirstData" amount="251.50000" refundmethod="VISA" backendriid="663304" />
<ppcextdata attributename="account" searchvalue="XXXX" ppcpayinst_id="674256" />
<ppcextdata attributename="account" searchvalue="YYYY" ppcpayinst_id="663754" />
<ppcextdata attributename="account" searchvalue="ZZZZ" ppcpayinst_id="663304" />
</orderbackup>
I want to end up with:
<edprefinst paymentsystem="FirstData" amount="227.00000" refundmethod="VISA" account="XXXX"/>
<edprefinst paymentsystem="FirstData" amount="227.00000" refundmethod="VISA" account="YYYY"/>
<edprefinst paymentsystem="FirstData" amount="251.50000" refundmethod="VISA" account="ZZZZ"/>
backendriid and ppcpayinst_id are the same. I want to take the searchvalue from ppcextdata and add it as account to the edprefinst by matching the backendriid to the ppcpayinst_id
I can't think of a way in xslt to make this happen. Any ideas? I'm pretty new to this, so go easy on me (for now...)