Reading XML files:XSLT Error

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
kanchan
Participant
Posts: 36
Joined: Tue Oct 17, 2006 4:35 am
Location: kolkata

Reading XML files:XSLT Error

Post by kanchan »

Hi All,
I am having the following problem while reading a XML file.The job uses a sequential file stage to read the XML file:
Sequential file stage-->XML Input-->Copy Stage-->Sequential file stage
The final stage writes the data into a csv file.But after running the job ,I get the following error:
--------------------------------------------------------------------------------------------------------
XML_Input_6,0: Warning: XML_Input_6: XSLT Processor: Unknown element on the output. Element Name = "min"
--------------------------------------------------------------------------------------------------------
min is a tag in the xml file ang mentioned in the Xpath expressions of the columns in the XML Input stage.
Am I missing out some expressions?Please Help..I could not find the answer in the existing posts in the forum.

Kanchan
Going ahead
ThilSe
Participant
Posts: 80
Joined: Thu Jun 09, 2005 7:45 am

Post by ThilSe »

Hi Kanchan,

In my understanding the input should not be read from the Sequential file atsge.

you have to use a folder stage where u can specify the input file name. The folder stage will pass the contents of the file to the XML input stage.

In the input tab of the XML input stage, specify XML source column as Filename and the Column content as URL/Filepath.

Regards
Senthil
BalageBaju
Participant
Posts: 34
Joined: Fri Sep 22, 2006 10:59 pm
Location: India

Post by BalageBaju »

Senthil,

'Folder' Stage is not available in Parallel Jobs.
Regards,
Balaji.
ThilSe
Participant
Posts: 80
Joined: Thu Jun 09, 2005 7:45 am

Post by ThilSe »

BalageBaju wrote:Senthil,

'Folder' Stage is not available in Parallel Jobs.
I apologisde for overlooking this!
kanchan
Participant
Posts: 36
Joined: Tue Oct 17, 2006 4:35 am
Location: kolkata

Folder stage not available

Post by kanchan »

Hi Senthil,

Thanks for your reply.Problem is, we are working in parellal jobs & I suppose folder stage is not avalable there... :( I tried fileset stage instead,but could not succeed.I have imported the metadata(Xpaths) through XML metadata importer.The job gets aborted saying 'import validation failed'.

Thanks,
Kanchan
Going ahead
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

But Sequential File stage in parallel jobs can have multiple File properties or a read method of File Pattern. Either of these can read multiple files.

An XSLT error usually indicates some incompatibility with the content of the XML file and the style sheet that you have specified as containing the format of the XML. You need to check this thoroughly - it is not possible for us to do that from our effectively blindfolded standpoint.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kanchan
Participant
Posts: 36
Joined: Tue Oct 17, 2006 4:35 am
Location: kolkata

Further Details

Post by kanchan »

Hi Ray,
Thanks for your reply.I have done some modifications in the job,but still getting errors.Currently I need to access only one XML file.I have given the following parameters(included those are of matter of concern)
Sequential File Stage parameters::

Read Method: Specific Files
File:given the path of the XML file
Field Delimiter:none
Final Delimiter:none

FURTHER INFORMATION:
I have made field "id" as XML source column
I have checked Repetition element required
I havn't used custom stylesheet
I am not validating the XML Schema
I have imported the metadata through XML Metadata Importer
JOB GETS ABORTED SAYING IMPORTED VALIDATION FAILED

ERRORS for field "id" :

Sequential_File_34: Import validation failed:
Sequential_File_34: At field "id": When validating import/export function:
APT_GFIX_Decimal::validateParameters: Decimal "text" format is variable length and no external length is specified. Possibly you should specify an appropriate "width" property?
External format: {text, padchar=32, nofix_zero, precision=10, scale=0, round=trunc_zero, ascii}
Sequential_File_34: At field "id": Error validating import/export function
Why does the validation fail?..Please Help..
Thanks,
Kanchan
Going ahead
kanchan
Participant
Posts: 36
Joined: Tue Oct 17, 2006 4:35 am
Location: kolkata

XML source column

Post by kanchan »

Hi,
In continuation to my previous post,I suppose XML source column in XML input stage is a mandatory field.what should be the entry into that if I am using Sequential file stage instead of folder stage.
Found a post in the following link:viewtopic.php?t=105088
But things are not clear

May anyone help please.Many thanks in advance.

Kanchan
Going ahead
kaushik
Participant
Posts: 8
Joined: Mon Aug 28, 2006 2:31 am

Re: XML source column

Post by kaushik »

kanchan wrote:Hi,
In continuation to my previous post,I suppose XML source column in XML input stage is a mandatory field.what should be the entry into that if I am using Sequential file stage instead of folder stage.
Found a post in the following link:viewtopic.php?t=105088
But things are not clear

May anyone help please.Many thanks in advance.

Kanchan
Hi Kanchan,

Using the sequential file stage you just read the source XML file path and make the XML Source as URL/File path.

Kaushik
Thanks
Kaushik
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Decimal "text" format is variable length and no external length is specified. Possibly you should specify an appropriate "width" property?

This message suggests incomplete metadata.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kanchan
Participant
Posts: 36
Joined: Tue Oct 17, 2006 4:35 am
Location: kolkata

Thanks! problem resolved

Post by kanchan »

Hi All,
Thanks you all for your support, esp kaushik.My problem has got resolved.Let me share the findings with you all, for future users facing same sort of problem.
1.In parallel jobs,we need to send only the xml file path to XML input stage. unlike server jobs where we send the complete xml data into one column recordusing folder stage( Ref.post by kaushik).
2.We need to import the .xsd schema of the resp xml file through xml metadata importer(previously I tried by importing the xml itself:it caused some problem probably).

Thanks again. :)
Kanchan
Going ahead
Post Reply