XMLT Attribute Types are attributes of XMLT Element Types. These attributes specify how their parent Element Type process data from the input file.
Attribute Type |
|
|
When True, allows multiple lines of the input file to be processed as a single record. All lines after the record start marker are considered as belonging to the same record until XMLT encounters : The record end marker, The another record start marker, or The last line of the input file. When False, each line after the file header is processed as a complete record. In this case no record start marker is required and the default Line value (0) for ItemType Chunks can be omitted. |
||
|
dt:type |
Enumeration |
|
dtvalues |
True, False |
|
Default |
False |
|
Attribute of |
|
|
Example <Record CollectLines="True"> <StartRecord>IT_NO_06796C <Chunk Offset="10" Length="6"></Chunk> </StartRecord> This example states that the input text file has data for a particular item data on multiple lines. Note: The first line of any item data record always starts with the record start marker, i.e. the characters "IT_NO_" at character offset 10. |
|
(Optional) Specifies the value to add to the value, extracted by CountField before XMLT verifies the number of records in the input file. |
||
|
dt:type |
ui2 |
|
Range |
0 to 65,535 |
|
Default |
|
|
Attribute of |
|
|
Example <Trailer Pattern="TRAILR"> <CountField CountExtra="2"> <Chunk Offset="34" Length="7"></Chunk> </CountField> </Trailer> This example above states that the number of lines XMLT processed should be incremented by a value of 2 before validating the CountField line count. |
|
(Optional) Specifies a date format for an Attribute Element Type. Use DateFormat to specify the date format that the characters in your input file represent. |
||
|
dt:type |
Enumeration |
|
dtvalues |
YYYYMMDD, YYMMDD, YYYYDDMM, YYDDMM, YYYYDDD, YYDDD, MMDDYY, MMDDYYYY, DDMMYY, DDMMYYYY |
|
Default |
No formatting applied |
|
Attribute of |
|
|
Example <Header Pattern="HEADER"> <Attribute DateFormat="YYMMDD">Date <Chunk Line="0" Offset="6" Length="6" Pad="False" /> </Attribute> </Header> This example specifies that the input characters extracted for the header are a date represented in a 2-digit Year/Month/Day format. The extracted date will appear in a standardized date format in the output file. |
|
Specifies whether each line of input represents a complete group record from which data can be extracted for the various TADB group attributes. True, processes each input line as an individual group. Note: The Line attribute can be omitted from Chunk elements within the respective ItemData element. Data is obtained from the default line (line 0) specified by the previous RecordStart. False, allows multiple input lines to be processed as a group. Tip: Usually you will set EachLine to True if the attributes extracted from the input file are represented as a TADB List group in POMS. If the attributes are represented in POMS as a Normal TADB group, set EachLine to False. |
||
|
dt:type |
Enumeration |
|
dtvalues |
True, False |
|
Default |
False |
|
Attribute of |
|
|
Example <GroupName>Parts</GroupName> <ItemData EachLine="False"> <Attribute>Prefix <Chunk Offset="21" Length="7"></Chunk> </Attribute> <Attribute>Suffix <Chunk Offset="28" Length="8"></Chunk> </Attribute> </ItemData> This example states that group item data records (attributes of a particular group) occur on multiple lines. Note that each Chunk has a Line attribute specifying the line number relative to the record start marker. |
|
The number of characters in a Chunk, beginning with the indicated starting point (Offset). Note: A Length of 0 defines an empty string. |
||
|
dt:type |
ui2 |
|
Range |
0 to 65,535 |
|
Default |
|
|
Attribute of |
|
|
Example <ItemType>ORDER <Chunk Line="4" Offset="28" Length="4"></Chunk> <Chunk Line="0" Offset="26" Length="3"></Chunk> <Chunk Line="4" Offset="32" Length="2"></Chunk> </ItemType> Note: The first Chunk in this example says: Go to line 4 in the current record; start at character 28 (the 29th character); pull four characters. |
|
Specifies the line in the input file where data for a Chunk can be found. The line count starts at first line of the respective header, footer, or record. Note: The first line is line 0. |
||
|
dt:type |
ui2 |
|
Range |
0 to 65,535 |
|
Default |
0 |
|
Attribute of |
|
|
Example <Record CollectLines="True"> <StartRecord>1 <Chunk Line="0" Offset="0" Length="1" Pad="False" /> </StartRecord> <ItemType>ORDER <Chunk Line="4" Offset="28" Length="4" Pad="False" /> Note: The last Chunk in the example above says: Go to line 4 (the fifth line) in the current record in the input text file; start at character 28th; pull four characters. |
|
The number of characters from the left (on the specified Line of the input file) that identifies a starting point for a Chunk. Note: The first character on a line is character 0. |
||
|
dt:type |
ui2 |
|
Range |
0 to 65,535 |
|
Default |
|
|
Attribute of |
|
|
Example <ItemType>ORDER <Chunk Line="4" Offset="28" Length="4"></Chunk> <Chunk Line="0" Offset="26" Length="3"></Chunk> <Chunk Line="4" Offset="32" Length="2"></Chunk> </ItemType> Note: The first Chunk in this example says: Go to line 4 in the current record; start at character 28 (the 29th character); pull four characters. |
|
Determines if a Chunk should be padded with extra spaces (if the number of characters found at the specified Offset is less than the specified Length. |
||
|
dt:type |
Enumeration |
|
dtvalues |
True, False |
|
Default |
False |
|
Attribute of |
|
|
Example <Attribute>Description <Chunk Offset="15" Length="36" Pad="True"></Chunk> </Attribute> Note: This example says: Go to the default line (0) in the current header or record; start at character 15; pull 36 characters; and if less than 36 characters are found there, pad the result with leading zeros to obtain 36 characters. |
|
(Required) Specifies a string of characters appearing in the input file that XMLT uses to identify the start of a Header or Trailer. Note: the pattern string must start in the first column (0th character) of the input file. |
||
|
dt:type |
String |
|
Length |
|
|
Default |
|
|
Attribute of |
|
|
Example An input text file has a file header line: HEADER030930 The translation XML defines: <Header Pattern="HEADR"> <Attribute>Date <Chunk Offset="7" Length="6"></Chunk> </Attribute> </Header> This example above states that any line starting with the characters "HEADR" is the first line in a header. |
|
(Optional) Specifies a length (number of characters) for a Record when the records are not separated by a CR/NL character. Note: Do not use this attribute when CollectLines="True" |
||
|
dt:type |
ui2 |
|
Range |
0 to 65,535 |
|
Default |
See CollectLines. |
|
Attribute of |
|
|
Example <Record RecordLength="80"> . This example states that a new record occurs every eighty characters, starting with the first record start marker. |
|
Specifies whether input files should be split up into separate output files when translated. |
||
|
dt:type |
Enumeration |
|
dtvalues |
True, False |
|
Default |
True |
|
Attribute of |
|
|
Example This example creates a single output file containing all orders items (or group records) parsed from the input file: <File xmlns="x-schema:..\xmlt.xsd" SplitFile="False"> |
|
If files are split (SplitFile="True") this attribute determines how output files are split up: Item - creates a separate output file for each ordered item. Size - creates a separate item when the output file will exceed the SplitSize after processing of the current record is complete. Note: The size of the output file may exceed SplitSize slightly |
||
|
dt:type |
Enumeration |
|
dtvalues |
Item, Size |
|
Default |
Size |
|
Attribute of |
|
|
Example This example creates separate output files for each orders parsed from the input file: <File xmlns="x-schema:..\xmlt.xsd" SplitFile="True" SplitType="Item"> |
|
If files are split (SplitFile="True") this attribute determines how output files are split up. |
||
|
dt:type |
ui2 |
|
Range |
0 to 65,535 |
|
Default |
|
|
Attribute of |
|
|
Example This example starts writing to another output file when the last record processed causes the current output file to exceed the 20 MB: <File xmlns="x-schema:..\xmlt.xsd" SplitFile="True" SplitType="Size" SplitSize="20000"> |
XMLT translation utility. |