Understanding XSD in Outbound E-Document Templates

The XSD file or XML Schema is a text file. It defines and validates what XML elements and attributes must be present in the generated XML, before it is saved as a generated e-document. A detailed audit trail message is logged if the validation fails.

The following is a sample XSD that you can use as a reference in creating your own XSD file:

          <xs:element name="edoc" type="edocType"/>

   <xs:complexType name="edocType">
      <xs:sequence>
         <xs:element name="tranid" type="xs:string"/>
         <xs:element name="po" type="xs:integer"/>
         <xs:element name="memo" type="xs:string"/>
         <xs:any processContents="skip" minOccurs="0"/>
      </xs:sequence>
   <xs:attribute name="version" type="xs:string" use="required" fixed="1.1"/>
</xs:complexType>

</xs:schema> 

        

This sample XSD validates an XML document for the following:

If this sample XSD is used, the generated XML file must contain all the elements and attributes defined in the XSD. If it does, the e-document is successfully generated. Other elements and attributes can be present in the generated XML file in addition to the required ones defined in the XSD. You can define your own required elements and attributes in the XSD file you will create.

The Outbound XSD File field is used for validating the generated e-document, only if you select the XML format from the Content Type dropdown list.

Related Topics

General Notices