Issues with XML Stage

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
EDWTeam
Premium Member
Premium Member
Posts: 11
Joined: Mon Jan 24, 2011 7:59 am

Issues with XML Stage

Post by EDWTeam »

Hi Everyone,

I am facing couple of issues with new XML Stage. I used the XSD provided by the vendor to generate the XMLs. There are two different name spaces.

1. With the first name space, the tags are not appended with the name space. (ex the tags that should be coming as ns1:Name are coming as just Name)

2. With the second name space, the name space declaration is coming with every tag, instead of just at the beginning. Ex below.

Code: Select all

            <types:PartnerShortName xmlns:types="http://www.payback.net/lmsglobal/xsd/v1/types">abcd</types:PartnerShortName>
        </LoyaltyPartner>
        <Validity>
            <types:ValidFrom xmlns:types="http://www.payback.net/lmsglobal/xsd/v1/types">2016-06-08-T-00:00:00.000-04:00</types:ValidFrom>
            <types:ValidTo xmlns:types="http://www.payback.net/lmsglobal/xsd/v1/types">2016-06-14-T-23:59:59.000-04:00</types:ValidTo>
Every tag in types name space is coming with URL declaration instead of just at the top.

When i generate a sample XML from the XSD using xml spy, it is generating all the tags perfectly.

Appreciate the help.

Thanks.
EDWTeam
Premium Member
Premium Member
Posts: 11
Joined: Mon Jan 24, 2011 7:59 am

Re: Issues with XML Stage

Post by EDWTeam »

I found that the issue 1 is a non issue, the name space does not exist. XML Spy was generating a default one.

Issue 2 is open. I found the root cause though. There are two XSD's refered. One of the XSD is importing another one. Where ever the namespace of the other XSD is used for any tags, it is just giving the URL everytime. This issue will be seen only when you refer multiple XSD's with multiple name spaces.

Appreciate any help with solving this.

Thanks.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

havent seen this issue.......but a question......is it the full and correct url? It wastes space and may look annoying, but it should function correctly...it is legal to define a namespace in every element.....yes, they get inherited, but individual declarations may validate ok, even though they are identical.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
EDWTeam
Premium Member
Premium Member
Posts: 11
Joined: Mon Jan 24, 2011 7:59 am

Post by EDWTeam »

Thank you Ernie. The XML is validating OK. We haven't heard back from the subscriber yet if he sees any issue. But i am expecting some configuration that controls this, but cant see it any where. Do you think i should raise this to IBM? I am just making sure, i am not missing some basic configuration.

Thanks.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

hard to say...I dont know. I havent see this behavior.....so maybe it is something odd about "this" xsd......look at how the namespace is defined.....maybe there is a clue there?

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
EDWTeam
Premium Member
Premium Member
Posts: 11
Joined: Mon Jan 24, 2011 7:59 am

Post by EDWTeam »

Not just this XSD. I tried other sample XSD's. Same issue with them as well. It looks more generic. Raised the issue with IBM. I will share the details after i hear from them.

Thanks.
EDWTeam
Premium Member
Premium Member
Posts: 11
Joined: Mon Jan 24, 2011 7:59 am

Post by EDWTeam »

IBM Acknowledged this issue. Please excuse for my terminology here. This issue is happening when using an XSD (call it a parent), that internally refers another XSD (child) . Both XSD's uses different name spaces in it. All the elements from Child are attached with the name space specific to the child and have repeating URL coming in the output XML.

IBM development team acknowledged it and confirmed that they are able to replicate this issue in their lab. This will go through as an enhancement.

Thanks.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Thanks for letting us know. As noted above, it's not "wrong", but it does take up additional disk space, since the rules for xsd's allow it to be specified at the parent and "inherited."

Ernie
Ernie Ostic

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