I've recently been assigned the task of converting some of our standard XML output to custom formats and I would love some assistance if anyone can provide it!
I have two differen output options I can work from:
<?xml version="1.0" encoding="UTF-8"?>
-<batch BatchName="20120118.132647">
-<document Doc_path="" Date_created="" Date_converted="" Batch_id="" Exception_reason="" Exception="" Remittance_adv="" Invoice_date="" Invoice_amount="" Invoice_num="" Property_code="" Vendor_code="" Doc_ID="">
-<files><file path="D:\Migration\00000001.tif"/></files></document></batch>
OR
<?xml version="1.0" encoding="UTF-8"?>
-<Batch BatchName="20120118.132405" BatchID="107">
-<Document DocumentType="XSLT Sample Migration">
-<Fields>
<Field FieldName="Doc_ID"/>
<Field FieldName="Vendor_code"/>
<Field FieldName="Property_code"/>
<Field FieldName="Invoice_num"/>
<Field FieldName="Invoice_amount"/>
<Field FieldName="Invoice_date"/>
<Field FieldName="Remittance_adv"/>
<Field FieldName="Exception"/>
<Field FieldName="Exception_reason"/>
<Field FieldName="Batch_id"/>
<Field FieldName="Date_converted"/>
<Field FieldName="Date_created"/><Field FieldName="Doc_path"/>
</Fields>
-<Files>
<File>D:\Migration\00000001.tif</File></Files></Document>
</Batch>
The first output I'm attempting to replicate is:
<?xml version="1.0" standalone="yes"?>
<KofaxRelease>
<kofax>
<doc_id>13345</doc_id>
<vendor_code>VNF</vendor_code>
<property_code>PNFProperty Not Found</property_code>
<invoice_num />
<invoice_amount>91.3500</invoice_amount>
<invoice_date>04/12/2011</invoice_date>
<remittance_adv>No</remittance_adv>
<exception>Yes</exception>
<exception_reason>NO NSX#</exception_reason>
<batch_id>68315</batch_id>
<date_converted>2011-04-20T17:30:04.333-04:00</date_converted>
<date_created>2011-04-20T00:00:00-04:00</date_created>
<doc_path>\\qaweb\Kofax Data\CLIENT\Images\00146B85.pdf</doc_path>
</kofax>
I've managed to generate an XSLT that produces the same exact output as the input, however as soon as I try to start modifying the output things break in a bad way.