Unable to proces XML file in XML Stage from Multiple XSDs

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
partha.natta
Premium Member
Premium Member
Posts: 32
Joined: Tue Mar 09, 2010 5:56 am
Location: Bangalore

Unable to proces XML file in XML Stage from Multiple XSDs

Post by partha.natta »

Hi All,
I need to process some XML files having the same metadata definitions. There are three XSDs were used to define the metadata of these XML files. The Reconciliation.xsd is the main XSD from where I am able to read most of the fields coming in XML file. But the main XSD is having include statement for other two reference XSDs which are AcctDemoRec.xsd and Fstype.xsd
From AcctDemoRec.xsd I need to take three fields in my target and these fields are optional and in case of some specific type of transaction these three fields will get populate in the XML files under the parent root called <Demo>.

I have imported all these three XSDs by Schema Library Manager and checked for the validation which
Showing no issues.

Most of my source fields are coming under one parent root called <Transrec> and I have selected that root in XML Document root and was able to process the XML files which are not having Demo section.

But when the Demo section is present in the file my job is getting aborted as it not able to identify that particular section.

Could you help me how can I resolve this issue?
Thanks & Regards,
Partha
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I've found the easiest way to deal with include files in XML and DataStage is to actually include them in the base xsd. Copy the main xsd to a new name and then in an editor replace each "include" statement with the contents of that xsd, then import the metadata from the combo xsd and use that in your job.

Perhaps the new XML assembly has a way to handle that but I found this works rather painlessly.
-craig

"You can never have too many knives" -- Logan Nine Fingers
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Is element <demo> truly in your tree? Can you design steps in the assembly for it?

How is it aborting? Maybe it has nothing to do with <demo> element itself, but perhaps something in the contents of <demo>.

Be sure also to set your validation in the xml parser step to minimal.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply