Page 1 of 1

Reading XML files:XSLT Error

Posted: Thu Nov 23, 2006 11:16 pm
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

Posted: Sun Nov 26, 2006 10:30 pm
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

Posted: Sun Nov 26, 2006 11:50 pm
by BalageBaju
Senthil,

'Folder' Stage is not available in Parallel Jobs.

Posted: Sun Nov 26, 2006 11:59 pm
by ThilSe
BalageBaju wrote:Senthil,

'Folder' Stage is not available in Parallel Jobs.
I apologisde for overlooking this!

Folder stage not available

Posted: Mon Nov 27, 2006 12:04 am
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

Posted: Mon Nov 27, 2006 1:48 pm
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.

Further Details

Posted: Tue Nov 28, 2006 3:34 am
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

XML source column

Posted: Tue Nov 28, 2006 6:33 am
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

Re: XML source column

Posted: Thu Nov 30, 2006 5:06 am
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

Posted: Thu Nov 30, 2006 1:52 pm
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.

Thanks! problem resolved

Posted: Fri Dec 01, 2006 1:11 am
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