Xml Validation in XML Input Stage against a given schema

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
harshada
Premium Member
Premium Member
Posts: 92
Joined: Tue May 29, 2007 8:40 am

Xml Validation in XML Input Stage against a given schema

Post by harshada »

I have an XML input file to be parsed into a flat file/DBMS.
I need to validate the input XML file against a XSD schema file.

XML Input Stage Details
---------------
Include namespace declarations - Checked
Validate Schema - Strict
Namespace declaration:
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:defns="http://tempuri.org/sdnList.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"


It does basic schema validations like if the closing tag is missing then an error is thrown.
My question is does it validate against a schema file provided? ie check for the data types , 'maxoccurs' , 'minoccurs' etc
Example :
Schema file : <xs:element name="uid" type="xs:int" />
XML File : <uid>737</uid>

If I change the value of uid to <uid>abc </uid> it does not validate or throw an error.

can anyone please let me know if such a case can be handled in DataStage parallel or server job ? and if yes then how.

Thanks
harshada
Post Reply