Page 1 of 1

Xml Validation in XML Input Stage against a given schema

Posted: Thu Aug 23, 2007 3:07 am
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