This project has moved. For the latest updates, please go here.

Validation is done using Xml schema (Xsd) and caters for:

1. EDI structure and order - ensuring the EDI document adheres to the definition.

2. Repetitions - both on segment and data element level:


<xs:element minOccurs="0" maxOccurs="10" ref="tns:S_CNT">
 <xs:annotation>
  <xs:appinfo>
   <b:recordInfo notes="CONTROL TOTAL" xmlns:b="www.edifabric.com/edifact" />
  </xs:appinfo>
 </xs:annotation>
</xs:element>


3. Data element range length restrictions:


<xs:element minOccurs="0" name="D00683">
 <xs:annotation>
  <xs:appinfo>
   <b:fieldInfo notes="Common Access Reference" xmlns:b="www.edifabric.com/edifact" />
  </xs:appinfo>
 </xs:annotation>
 <xs:simpleType>
  <xs:restriction base="xs:string">
   <xs:minLength value="1" />
   <xs:maxLength value="35" />
  </xs:restriction>
 </xs:simpleType>
</xs:element>


4. Data element fixed length restrictions:


<xs:element minOccurs="0" name="D00732">
 <xs:annotation>
  <xs:appinfo>
   <b:fieldInfo notes="First/Last Sequence Message Transfer Indication" xmlns:b="www.edifabric.com/edifact" />
  </xs:appinfo>
 </xs:annotation>
 <xs:simpleType>
  <xs:restriction base="xs:string">
   <xs:length value="1" />
  </xs:restriction>
 </xs:simpleType>
</xs:element>


5. Data element enumeration restrictions:


<xs:element minOccurs="0" name="D40431" type="tns:EDIFACTID4043">
 <xs:annotation>
  <xs:appinfo>
   <b:fieldInfo notes="Trade class code" xmlns:b="www.edifabric.com/edifact" />
  </xs:appinfo>
 </xs:annotation>
</xs:element>

<xs:simpleType name="EDIFACTID4043">
 <xs:restriction base="xs:string">
  <xs:enumeration value="AA" />
  <xs:enumeration value="AB" />
  <xs:enumeration value="AC" />
  <xs:enumeration value="AD" />
  <xs:enumeration value="AG" />
  <xs:enumeration value="BG" />
  <xs:enumeration value="BR" />
  <xs:enumeration value="CN" />
  <xs:enumeration value="DE" />
  <xs:enumeration value="DI" />
  <xs:enumeration value="JB" />
  <xs:enumeration value="MF" />
  <xs:enumeration value="OE" />
  <xs:enumeration value="RS" />
  <xs:enumeration value="RT" />
  <xs:enumeration value="ST" />
  <xs:enumeration value="WH" />
  <xs:enumeration value="WS" />
  <xs:enumeration value="WT" />
  <xs:enumeration value="WU" />
  <xs:enumeration value="WV" />
 </xs:restriction>
</xs:simpleType>

Last edited May 6, 2014 at 8:23 AM by DonZoeggerle, version 7

Comments

No comments yet.