Text translator positional receiver XSD file
The positional receiver XSD file defines how the data in flat, positional files should be transformed to XML data. The following table lists the essential XSD elements and attributes.
“Newline” is the only supported record delimiter used by the Positional Receiver XSD file.
Property | Description |
---|---|
ParserDefaults Element | |
RecordIdStartPosition | Required. Integer. This field indicates the start position of the RecordId for each record. |
RecordIdEndPosition | Required. Integer. This field indicates the end position of the RecordId for each record. |
DefaultRecordDelimiter | Optional. The default record delimiter is Newline . |
DefaultEscapeCharacter | Optional. CharacterType. The default escape character is \. |
DefaultPadCharacter | Required. String. Minimum length=1. Maximum length=1. Fills
the non-data portion of a field with any single character. Valid values
include a space or zero as well as any other character. The default
value is # . For example if you specify trailing ###'s in a field, they are ignored. This character is used for visual convenience when you want to space out the fields correctly and do not want to rely on the blank space. |
SkipCarriageReturn | Optional. Boolean. Defaults to true. |
FileHeader Element The header that is written to a file before writing anything else. This can be used as control information. Each transaction set starts with a header record. If it contain internationalized text, its length must be byte accounted. For example, a Sales Order record set has an OrderHeader record that specifies the beginning of the transaction set. This element is optional. However, if FileHeader element is provided the FileTrailer element must also be present. These two elements are used to include text at the beginning and end of each file respectively. |
|
FileHeaderName | Optional. String. The descriptive name of the FileHeader. However, this is not used for processing. |
FileHeaderId | Required. String. This attribute provides the text to match, at the start of each file. |
FileHeaderStartPos | Required. Integer. The starting position of the header. |
FileHeaderLength | Required. Integer. The length of the header. |
FileTrailer Element The trailer that is written to the end of a file. This can be used as control information to verify if a file is indeed complete. If it contain internationalized text, its length must be byte accounted. |
|
FileTrailerName | Optional. String. The descriptive name of the FileTrailer. However, this is not used for processing. |
FileTrailerId | Required. String. This attribute provides the text to match, at the end of each file. |
FileTrailerStartPos | Required. Integer. The starting position of the trailer. |
FileTrailerLength | Required. Integer. The length of the trailer. |
CharacterType Element This element specifies the character type of all the elements and attributes used in the XSD file. Required. String. Minimum length=1. Maximum length=1. |
|
Root Element The
elements and attributes defined under |
|
Name | Required. NMTOKEN. The name of the root element. This is the same root-element name of the XML you are building. |
Description | Optional. String. The description of the root element. This attribute is not used for processing. |
XMLName | Optional. Name of the root entity in the translated XML. |
Header Element Required. This is the first record that is read under Root element. |
|
Name | Required. NMTOKEN. The name of the header element. This is the tag name in your XML file. |
RecordName | Required. NMTOKEN. The name of the record. This field must
match the Name attribute of the Record element.
This name is the identifier for the RecordName used
in the flat file. |
MinOccurence | Optional. Integer. Minimum number of times this sequence can occur. By default, this sequence should occur at least once. A value of 0 means that the occurrence of this sequence is optional. Defaults to 1. |
MaxOccurence | Required. Integer. The maximum number of times this sequence can occur. A value of 0 means that this sequence can occur an unlimited number of times. Defaults to 1. |
Terminal Element Defines a record that is not a part of a sequence or a choice entity. A terminal entity is a leaf node in the hierarchy. |
|
MinOccurence | Optional. Integer. Minimum number of times this sequence can occur. By default, this sequence should occur at least once. A value of 0 means that the occurrence of this sequence is optional. Defaults to 1. |
MaxOccurrence | Optional. Integer. The maximum number of times this sequence can occur. A value of 0 means that this sequence can occur an unlimited number of times. Defaults to 1. |
Name | Required. NMTOKEN. Name of the terminal node. |
RecordName | Required. NMTOKEN. Name of the record that corresponds with this terminal node. |
Sequence Element This element is required and is of type SequenceType. The record corresponding to a sequence entity which indicates the beginning of a sequence. This record may have sub-record of multiple types like, Terminal, Sequence or Choice elements. For example, an order transaction could contain an order line, and an order line could contain a sequence of one or more line items. In this case, the order line record corresponds to a sequence entity, and this sequence entity contains another sequence entity corresponding to a line item as a child. |
|
MinOccurence | Optional. Integer. Minimum number of times this sequence can occur. By default, this sequence should occur at least once. A value of 0 means that the occurrence of this sequence is optional. Defaults to 1. |
MaxOccurence | Optional. Integer. The maximum number of times this sequence can occur. A value of 0 means that this sequence can occur an unlimited number of times. Defaults to 1. |
Name | Required. NMTOKEN. The name of the sequence element. |
RecordName | Required. NMTOKEN. The record name of the sequence element identified in the flat file. |
Choice Element This element is required and is of ChoiceType. The choice entity declaration defines one entity in a group of child elements that displays in the data. The choice entity does not correspond to a record. It is simply a grouping of a record's child elements, specifying that exactly one of its child elements can occur. However, each child element can correspond to a sequence element or a terminal element. |
|
MinOccurence | Optional. Integer. Minimum number of times this sequence can occur. By default, this sequence should occur at least once. A value of 0 means that the occurrence of this sequence is optional. Defaults to 1. |
MaxOccurence | Optional. Integer. The maximum number of times this sequence can occur. A value of 0 means that this sequence can occur an unlimited number of times. Defaults to 1. |
Name | Required. NMTOKEN. The name of the choice element. |
RecordDefinitions\Record Element A record describes a line in the flat file. This record definition is translated into an XML element. |
|
RecordId | Required. NMTOKEN. This is the RecordId in
the source XML file. |
Name | The name of the record. This is used to associate with a Header,
Terminal, Sequence or Choice Name attribute. |
Description | String. The description of the name. This is not used while processing the file. |
XMLName | Required. NMTOKEN. The tag name of the output element. |
Field Element Each record consists of fields, which are translated into attributes or child elements depending on the ContainmentType. |
|
Name | Required. NMTOKEN. The name of the field. This name must be unique within a record. |
XMLName | Required. NMTOKEN. The output attribute or element name of the XML. |
Description | Optional. String. The description on the field. |
ContainmentType | This is either an Attribute or Element in the XML. If it is
an Attribute, a new attribute is set to this field's value. If
it is an Element, a new child element is created with the tag name
set to XMLName and the value set to value of this field. Defaults to Attribute. |
StartPosition | Required. Integer. The StartPosition should be one number greater than the EndPosition of the previous record or field, so that these two fields or records are contiguous. |
EndPosition | Required. Integer. The ending position of the field. |
fileLayoutType Element | Required. String. Values are Positional - flat file with fixed-length fields Delimited - flat file with varying-length fields XML - flat file with fields denoted by XML tags |
recordLayoutType Element | Required. String. Values are: Positional Delimited |
Justification | Optional. Specifies the alignment of data. Right - Aligns data to the right. Left - Aligns data to the left when the data is less than the maximum field length. This also aligns data to the left when the amount of data is less than the minimum length requirement. Default. |
DefaultValue | Optional. NMTOKEN. |
PadCharacter | Required. String. Minimum length=1. Maximum length=1. Fills the non-data portion of a field with any single character. Valid values include a space or zero. |
PadCharacterType Element | |
Required. String. Minimum length=1. Maximum length=1. Fills the non-data portion of a field with any single character. Valid values include a space or zero. | |
JustificationType Element | |
Optional. Specifies the alignment of data. Right - Aligns data to the right. Left - Aligns data to the left when the data is less than the maximum field length. This also aligns data to the left when the amount of data is less than the minimum length requirement. Default. |