Generate XQuery from EDI Standards

You use the Generate XQuery from EDI Standards dialog box to specify the settings you want Stylus Studio to use to generate an XQuery file from an EDI message.

Fields

Message

You use the fields in the Message group box to specify information about the EDI standard for which you want to generate XQuery.
l Dialect - Drop-down list that lets you specify the EDI dialect for which you want to generate XQuery.
l Version - Drop-down list that lets you specify the version for the EDI dialect you selected.
l Mode - Whether the EDI is processed in batch or interactive mode. Valid for EANCOM, EDIFACT, and IATA only.
l Message/Description - The specific EDI message for which you want to generate the XQuery.

XML Structure

You use the fields of the XML Structure group box to specify the structure of the XML
l Use long names for - Whether or not you want to use the long element and/or segment names as part of the XML tag - UNB01-SyntaxIdentifier versus UNB01, for example.
l Wrap "GROUP" element around message groups - Whether you want to wrap a <GROUP> element around transaction messages. This can make message groupings easier to handle with XPath for EDI document with multiple message groups.
l Prefix GROUP_N tags with the message name - Adds the message name to the GROUP_n prefix in the XML element tag. For example, <TS_831_GROUP_1>.
l Put the data value in value= attributes - Places code list data values in an value= string in the element tag. For example, <BGN01 value="00"><!--353: Transaction Set Purpose Code--></BGN01>. By default, the data value is output to XML as text (<BGN01><!--353: Transaction Set Purpose Code-->00</BGN01>).
l Put decoded data values in decode= attributes - Places decoded code list data values in a decode= string in the element tag. For example, <ISA15 decode="Production Data">. By default, the decoded value is not output to XML.

XQuery Generate Options

You use the XQuery Generation Options group box to specify what EDI structures you want represented in the generated XQuery. XQuery resulting from the document wizard is output as an Untitledn.xquery file, where n is a unique number, directly to the Stylus Studio desktop.
l Mandatory segments and elements only - Generates only those segments whose Requirement property is "mandatory" and, for them, only the mandatory element and composite references.
l All segments but only mandatory elements - Generates all segments, but, for each of them, only the mandatory element and composite references.
l All segments and elements - Generates all segments, and all element and composite references specified for them.

Create XML Schema for this EDI Message

In addition to generating XQuery for an EDI message, you can choose to generate an XML Schema for the same message at the same time. The fields in this group box allow you to specify the settings that are used to generate the XML Schema for the selected EDI message.
l XSD File - The URI for the XML Schema (.xsd) file that is output by the document wizard.
l Write annotations describing each element - Whether or not you want the generated XML Schema to include annotations that are part of the EDI message.
l Enumerations for elements that have codelists - Whether or not you want the generated XML Schema to include enumerations for fields that have lists of values.
l Use "unbounded" for maxOccurs when loop value is 99 or higher) - Replaces maxOccurs values of 100 or greater with "unbounded". This option ensures that the generated XML Schema can be successfully validated by most processors.

SEF File - The URI of the Standard Exchange Format (SEF) file, if any, you want to use when generating XML in XQuery and XML Schema files. The SEF file can augment information that Stylus Studio uses to generate XQuery and XML Schema - customized EDI definitions are stored in the SEF file, for example. If the same setting is specified by both the document wizard and the SEF file, the SEF file value is used.

For More Information

Generating XQuery and XML Schema from EDI

The SEF File

Customizing an EDI Standard

 
Free Stylus Studio XML Training: