Subject:Cross Referencing Country Names Author:chris misztur Date:10 Jun 2013 02:17 PM
Hello.
I am trying to normalize an XML file from our legacy system. In the legacy system the country names are not constrained, so anything from USA, US, United States to U.S.A. is valid. In the target system, the country field is limited to 3 characters and must match the country codes in a control table. I was thinking of using a cross-reference XML document to find a country match.
The DRKY attribute is actually a key to the JDEdwards country lookup table (F0005). As a second step I'd like to be able to lookup other data columns in the JDE table based on the key.
Subject:Cross Referencing Country Names Author:chris misztur Date:10 Jun 2013 02:58 PM
I tried the below but it returns all countries' DRKY values. How can find a single match?
for $Country in $CountryLookups/Countries/Country
return
if(upper-case($Country/@LegacyName) = upper-case($AddressEntry/a:SYS_CO/text())) then (upper-case($Country/@DRKY))
else ($AddressEntry/a:SYS_CO/text())