specifying path for xml output column

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

specifying path for xml output column

Post by sravanthi »

Hi

I'm facing problems when mentioning path in xml output.I have to generate o/p as :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gsa-template>
<import-items>

<add-item item-descriptor="ensemble-product" id="140150">
<set-property name="publishFlag"><![CDATA[true]]></set-property>
<set-property name="displayName"><![CDATA[Champion Red Sac Jacket ]]></set-property>
</add-item>
I'm getting i/p from a dataset ->transformer->pivot stage->xml output.

In transformefer stage i'm hardcoding the column for publish flag as

'name="PublishFlag"><![CDATA[':DSLink100.PublishFlag:']]>'

Pivot stage i'm converting single row into multiple rows.

In the path i have mentioned for
id as /gsa-template/import-items/add-item/@id
and for name as /gsa-template/import-items/add-item/set-property

But the o/p i'm getting is

<gsa-template>
- <import-items>
- <add-item item-descriptor="ensemble-product" id="9500100">
<set-property name="publishFlag><![CDATA[1]]>" />
</add-item>
- <add-item item-descriptor="ensemble-product" id="9500100">
<set-property name="DisplayName><![CDATA[Multizone Mattress Pad]]>" />
</add-item>

Is there any other way to mention the path.
Can anyone help me to resolve my problem

Thanks!
sravanthi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You mean XPath not simply path... it was a little confusing at first. And your output while wrong is technically correct - 1 = true, 0 = false.

You need to correct your 'DSLink100.PublishFlag' derivation to translate it into words, it would seem.

Oh, and nice link name. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

Post by sravanthi »

chulett wrote:You mean XPath not simply path... it was a little confusing at first. And your output while wrong is technically correct - 1 = true, 0 = false.

You need to correct your 'DSLink100.PublishFlag' derivation to translate it into words, it would seem.

Oh, and nice link name. :wink:
hi chulett,

I mean to say xpath.can you please cleary tell how can i modify my derivation.I didn't get exactly what you mean to say.

Thanks!
sravanthi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ok... what the heck *is* your derivation for that field? How are you determining if it should be 'True' or 'False'? At its most basic, I'm suggesting something like:

Code: Select all

If (something is true) Then 'True' Else 'False'
As the proper derivation.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply