Hello, I have done a considerable amount of research and perhaps have hit
a wall I cannot cross.
I am using a client running xalan-c version 1 upgrading is not an option.
This process is the result of a generic data miner which creates an xml
file following some very simple internal data structure. The generic xml
file generated contains no attribute nor namespace other then the most
rudimentary necessary for the xml to pass syntax. This file can now be
transformed into whatever structure our vendors require to publish our
records.
To set the stage I am transforming generic (well formed) xml into specific
xml or other file formats for vendor services we use. A new specification
on one vendor requires me to have knowledge of current data on their
system so that I can send records flagged for deletion/update/add.
(Previously they simply scrapped the old records and replaced the entire
inventory with the file I send)
I have an xml structure via url which indicates to me what items I have
currently active on their site, I am having difficulty figuring out how to
walk the active content file and determine what exists on their site but
not in my new file of records.
Artifacts:
DAILY FILE : My daily file being transformed into dtd compliant xml -
<listing>
<items>
<item>
<ItemID>1a2b</ItemID>
<description>Something Green</description>
<cost>1.00</cost>
</item>
<item>
<ItemID>1b2c</ItemID>
<description>Something Blue</description>
<cost>1.00</cost>
</item>
<item>
<ItemID>1b2b</ItemID>
<description>Something Yellow</description>
<cost>1.00</cost>
</item>
<item>
<ItemID>1c2b</ItemID>
<description>Something Black</description>
<cost>1.00</cost>
</item>
</items>
</listing>
ACTIVE CONTENT FILE : The inventory file I can get via url from my vendor
lists only the uniqueIDs i have active in their system:
<doc>
<uniqueItemID>1b2c</uniqueItemID>
<uniqueItemID>1b2b</uniqueItemID>
<uniqueItemID>1c2b</uniqueItemID>
<uniqueItemID>1b2e</uniqueItemID>
</doc>
MY OUTPUT TO THE VENDOR : The final result should be something like:
<inventory>
<header>
<headerCode>XXXXX</headerCode>
<companyName>My Company</companyName>
<otherStuff>and on and on</otherStuff>
<products>
<unit>
<transactionType>Add</transactionType>
<uniqueItemID>1a2b</uniqueItemID>
<title>Something Green</title>
<lowestPrice>1.00</lowestPrice>
</unit>
<unit>
<transactionType>Update</transactionType>
<uniqueItemID>1b2c</uniqueItemID>
<title>Something Blue</title>
<lowestPrice>1.00</lowestPrice>
</unit>
<unit>
<transactionType>Update</transactionType>
<uniqueItemID>1b2b</uniqueItemID>
<title>SomethingYellow</title>
<lowestPrice>1.00</lowestPrice>
</unit>
<unit>
<transactionType>Update</transactionType>
<uniqueItemID>1c2b</uniqueItemID>
<title>Something Black</title>
<lowestPrice>1.00</lowestPrice>
</unit>
<unit>
<transactionType>Delete</transactionType>
<uniqueItemID>1b2e</uniqueItemID>
<title>Something Red and Purple</title>
<lowestPrice>1.00</lowestPrice>
</unit>
</products>
</inventory>
in my example above I could default all records in the daily feed to
update which would handle new and changed files fine, but I need to
additionally create new nodes in the file for those in the active content
file but not in the daily file.
thanks in advance for any insights you might have.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--