|
Home >Online Product Documentation >Table of Contents >Understanding Separator Characters Understanding Separator CharactersAn EDI file consists of tokens terminated by separators. Special characters are used to define separators and other symbols, like the decimal character. You can specify the characters used for the following EDI file items: Values for some of these items are set explicitly in the EDI data stream. For example, in X12, the component separator is the value of the ISA16 field (the "I15: Component Element Separator"). In EDIFACT, separator values can be set using the contents of the UNA segment. How Stylus Studio Sets Separator CharactersWhen writing XML to EDI, Stylus Studio overwrites separator values using a set of processing instructions (PIs) in the XML. As long as the character specified in the PI has not been emitted to the output stream, it can be changed. For example, the segment terminator can be changed using the PI only before the first segment is written to EDI.
Setting Processing InstructionStylus Studio uses the following naming convention and default values for XML processing instructions used to set values for separator characters:
If a PI is used to set the value for one separator (say, edi_A) to a default value being used by another separator (edi_B), a new value will be chosen for the edi_B separator unless one has already been specified. URI switches are available for each of these processing instructions. See the DataDirect XML Converters documentation at http://www.xmlconverters.com/doc/. for more information. SyntaxThe syntax of the PI is just "<?" followed by the name, followed by a space, and then the new special character before a closing "?>" tag. Consider a few examples:
Here is another example, showing PIs used in context. In this example, an X12 document needed to be written to meet the following requirements: The two PIs and the Component Element Separator are shown in bold for clarity:
If the segment terminator (edi_segment) is set to Ways to Specify Control CharactersIn addition to literal characters, you can also specify control characters using the values in the following table. The values you set for these properties apply only when converting XML to EDI. Not all EDI dialects use all special characters. Finally, you must use unique values for each property you choose to set. Invalid Separator CharactersYou cannot use any of the following characters as EDI separators: |