XML Stage 8.5

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
saidvs
Participant
Posts: 12
Joined: Thu Jul 28, 2005 10:41 am

XML Stage 8.5

Post by saidvs »

Hello,

Pls give me some ideas to handle this scenario:

I'm trying to validate an XML file against XSD using 8.5 xml stage,
but XSD location is not showing up in the xml file which fails the validation.
If i include that XSD path in the XML file manually - its getting validated.

Is there anywhere in particular i need to include this XSD path in the XML stage or define it somewhere in the XSD itself - so that it gets included in the created XML file?

Thank you all in advance.
Sai
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

It "sounds" like you are using the xmlInput Stage. This stage finds the xsd according to the value in the header. I recall issues in the past when the value of SchemaLocation had to be the Project directory, but in either case, the value always has to be "in the header" in order for it to find the xsd.

If you don't have xsd's indicated in the header, one solution is to "zap" them in upstream, inside a transformer...but success of that will largely depend on the size of the document and how much can fit into a regular longvarchar column to be transformed as a normal string.

Another option is to not use xmlInput and to start using the xml stage. The xml stage relies on xsd's for all of its functionality. You import the xsd initially and then develop your Assembly. Then the "imported" xsd becomes the one that dictates validation processing.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
saidvs
Participant
Posts: 12
Joined: Thu Jul 28, 2005 10:41 am

XSM STage

Post by saidvs »

I am using the new 8.5 XML stage and not the XMLInput stage. In XMLInput stage we can hard code the header information but in new XML stage I dont see any such option.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

As noted earlier, you can opt to use the new XML Staqe. If you do so, forget about the header in your xml document. You import "the" xsd as part of the design process. That xsd, which is imported via the Library Manager, will guide your entire design of the Assembly, and control your validation at runtime. You won't be using the header details at all.

If you need "dynamic" validation options, that change with every document instance that comes in, then use xmlInput and the old pack. If you need the performance that you gain from the new pack, as well as increase size capabilities, more granular control on validation, and other goodies (in addition to a lot more capability in the "writing" of xml), use the new xml Stage.

Ernie
Ernie Ostic

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