XML Validation Against the XSD

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
shankararunn
Premium Member
Premium Member
Posts: 10
Joined: Thu Mar 20, 2014 3:30 pm

XML Validation Against the XSD

Post by shankararunn »

Hi - I just want to restart the discussion started here.

I want to use XML transformer stage in 9.1 to validate the XML column using XSD. But even though the XML tag has string value instead of Decimal , the record is writting successfully in the output file even though i selected reject in Warning, fatal and error.

I tried this in both parallel & server job , but the XML validation is not happening and the record is successfully writing in to the output.

XSD is defined as Text in transformer:

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="source">
<xs:complexType>
<xs:all>
<xs:element name="Column1" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation>Description1</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:decimal">
<xs:totalDigits value="15" />
<xs:fractionDigits value="2" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Column2" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:annotation>
<xs:documentation> Description2</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
~Arun
Post Reply