Using the Built-In EDI Adapter

The Electronic Data Interchange (EDI) adapter allows you to convert EDI to XML, and vice versa. It handles most versions of EDIFACT standard vocabularies automatically, and it optionally performs validation of content, structure, and code list values. The following table summarizes the adapter settings that affect how EDI is converted to XML. Note that these settings are used for EDI-to-XML conversions only.

Property
Description
Line separator
The line separator character in the EDI file. Valid values are displayed in a drop-down list.
Enable validation
Whether or not you want to enable validation. Setting this property to No turns off all validation. Only errors that keep the parser from determining the element type that are necessary for decoding are reported in this case. By default, validation is on.
Comment code list table data
Whether or not you want Stylus Studio to emit XML comments showing the decoded value for each item that has a value in a code list. This property is set to Yes by default.
Comment element types
Whether or not you want Stylus Studio to emit XML comments detailing the type of each element in the output. This property is set to Yes by default.
Strict validation on value lengths
Whether or not you want Stylus Studio to validate the exact or maximum length of elements as declared in the specification. This property is set to No by default.
Strict segment-ordering checking
Whether or not you want Stylus Studio to slightly relax the enforcement of segments to be in the proper sequence. If this property is set to Yes, conversion still proceeds, but this can cause cascade errors if too many segments are omitted - that is, it is possible for the decoder to lose its place since it has no reference points to resynchronize its decoding with the specification. This property is set to No by default.
Force error if value not in code list
Whether or not you want Stylus Studio to abort the conversion if a value is supposed to be from a code list but it is not found in the code list. Though this property is set to Yes by default, you might want to consider setting it to No to support extensions to the code list tables provided by the producer.
Strict datatype content checking
Whether or not you want Stylus Studio to validate the contents of each value, to make sure there are no digits in alpha-only elements, or no non-digits in number-only elements. This property is set to Yes by default.
Treat all segments as optional
Some segments are mandatory, others are optional. For producers that only generate a subset of the required segments, this property (if set to Yes) turns off error checking if an expected segment is omitted. This is similar behavior to the segment order checking, but heuristics are used in an effort to determine what the producer has generated. This property is set to No by default.
Table 22. Built-In EDI Adapter Properties

Where to Find It

As with other adapters, you can access the Electronic Data Interchange (EDI) adapter in the

  • Built-in Adapters folder of the XML Converters file system displayed in the Stylus Studio File Explorer window
  • Select XML Converter dialog box, which appears when you open a file using the Convert to XML using adapter check box on the Open dialog box

If you want to modify the default property settings, you must open the adapter from the Select XML Converter dialog box. When accessed through the File Explorer window, the adatpter uses whatever property settings have been set through the Select XML Converter dialog box.

 
Free Stylus Studio XML Training: