Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
welshsteve
Creator
Creator

Does Talend support Pattern Restriction Rules in XML Schema?

Hi.

I have an XML schema file (.xsd) which for one field is using a "pattern" restriction type.

e.g.

      

<xsd:element name="account_number" minOccurs="0">

  <xsd:annotation>

   <xsd:documentation>Account Number</xsd:documentation>

  </xsd:annotation>

  <xsd:simpleType>

   <xsd:restriction base="xsd:string">

     <xsd:pattern value="[0-9]{8,9}"/>

     <xsd:maxLength value="9"/>

   </xsd:restriction>

  </xsd:simpleType>

</xsd:element>

 

This restriction should restrict the account number field to 8 or 9 numbers.

However, when I import this as an output xml schema into Talend, the "maxlength" restriction works in that it rejects anything over 9 characters, but it does not reject anything less than 8 characters, and it also does not reject anything with letters in either.

Does Talend Studio not support this sort of restirction on XML outpt schema?

Many thanks

Steve

Labels (2)
1 Reply
Anonymous
Not applicable

Hi Steve

Which component are you using this XML schema file? tXSDValidator?

 

Regards

Shong