Text translator delimited receiver XSD file

The Text Translator delimited receiver XSD file defines how the data in delimited flat files should be transformed to XML data. The following table defines the essential elements and attributes.

The Root, FileHeader and FileTrailer element definitions remain the same as explained in Text translator positional receiver XSD file.

Table 1. Elements in the delimited flat file receiver XSD file
Property Description
ParserDefaults Element
RecordIdStartPosition Required. Integer. Indicates the start position of a record.
DefaultRecordDelimiter Required. RecordDelimiterType. The default delimiter between records is Newline.
DefaultFieldDelimiter Optional. CharacterType. The default field delimiter between the fields is comma [,].
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.

DefaultWrapCharacter The Wrapping/Quote character is parameterized. One can define the default wrapping character in the Flat file-Delimited-Schema (Service component specific).

A sample entry is given below:


<?xml version="1.0" encoding="UTF-8"?>
<FlatfileDelimitedSchema xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
'delimitedreceiver.xsd'> <ParserDefaults
 DefaultRecordDelimiter="Newline" 
DefaultFieldDelimiter="|"     
DefaultPadCharacter="#" 
RecordIdStartPosition="1"    
DefaultWrapCharacter="@">
  ...
 </ParserDefaults>
</FlatfileDelimitedSchema>

In the above example, the Wrap/Quote character is set to _@_.

Note: The default wrap character attribute is optional, and by default has a value of "". If DefaultWrapCharacter="NONE", then no wrap character is used.
SkipCarriageReturn Optional. Boolean. Defaults to true.
TranslationProperties Attributes
SchemaXMLFile Required. String. the relative path to the XSD description file of the translation from XML input to a flat file. The location is relative to the CLASSPATH of the FileSendAgent.

For example, if the flat file XSD XML file is located in the <INSTALL_DIR>/bin/test.xml file, and <INSTALL_DIR> is in the CLASSPATH, then the value of the attribute is /bin/test.xml file.

RecordDefinitions\Record Element

A record describes a line in the flat file. This record definition is translated into an XML element.

Recorded 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.
Smiling 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.
Smiling Required. NMTOKEN. The output attribute or element name of the XML.
Field Position Required. Integer The position of this field within the record. If the Recorded is at position 1, then the numbering of fields should begin at position 2.
Containment Type 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 Smiling and the value set to value of this field.

The default value is Attribute.