The plain text importer populates the module with objects
that are created from the contents of a plain text file. The structure
of the object hierarchy and the values of the object attributes are
determined by the structure and content of the file. You can use the
importer to populate an empty module, or to extend a populated module.
If you extend a populated module, the imported file is placed after
the current object.
Decomposition level
The decomposition level
determines how the text file is imported. The text file can be imported
into a single object, or an object can be created for each sentence
in a paragraph or in a heading.
Table 1. Decomposition levelDecomposition level |
Description |
None |
Creates one object and imports all the text
into that object. The layout of the text in the file is maintained
in the object. |
Paragraph |
Creates an object for each paragraph of text
in the file. Text that is preceded by a blank line is interpreted
as a paragraph. A second blank line is interpreted as the end of the
paragraph. An object is created below the previous heading object
and the text is inserted in the Object Text attribute. |
Sentence |
Creates an object for each sentence in the file.
A block of text up to and including a period is interpreted as a sentence. |
Sentence w/keyword(s) |
Creates an object after each sentence that contains
a keyword. - When no keywords are parsed, a new object is created for each
paragraph of text in the file.
- When a keyword is parsed, the sentence containing the keyword
becomes the last sentence in the object. A new object is created for
the next sentence.
You can specify the keywords that you want the importer to use. |
Headings
If you select a decomposition level
of
Paragraph,
Sentence,
or
Sentence w/keyword(s), headings are imported
into the Object Heading attribute of objects. Text that is preceded
by a blank line, and that begins with a heading number is interpreted
as a heading. A heading number is any combination of digits and periods
that starts and ends with a digit. When the importer finds a heading,
it creates a heading object at the level in the object hierarchy that
corresponds to the heading number. The following characters act as
delimiters:
- period space [.]
- semicolon space [;]
- colon space[:]
- space hyphen space [-]
- carriage return
Text up to and including the first delimiter after the heading
number is imported into the
Object Heading attribute
of the object. Any text that follows the first delimiter is inserted
in the
Object Text attribute. The
Object
Short Text attribute of heading objects is assigned the
value of the
Object Heading attribute, excluding
the heading delimiter and security classification.
Controlling how list items are imported
Use
the advanced options to control how enumerated lists and documents
lists are imported.
Enumerated lists that use either uppercase
or lowercase letters from the Roman alphabet, Arabic digits, or Roman
digits are recognized by the importer. These characters must appear
in one of the following formats:
- character.
- character)
- (character)
Note: For the list to be recognized, the trailing period or parentheses
must be followed by a white space character.
If you extract
enumerated list items, an object is created for each item in the list.
The object hierarchy reflects the structure of the list.
A document
list item is a line of text that contains a user-specified delimiter.
The text before the delimiter is imported into the object heading;
the text that follows the delimiter is imported into the object text
attribute. The new object is created as a child of the previous heading
object.
Capturing embedded data
Use the advanced
options to select an attribute to import embedded data to. If the
attribute you enter does not exist in the module, it is created. The
embedded data that the importer recognizes is:
- Heading number
The number of the paragraph in the text file
that generated an object is captured. Capturing the paragraph number
creates traceability from the object in Rational® DOORS® to
the paragraph in the text file. The heading number is the paragraph
number of the preceding heading followed by a section number.
- Security classification
Characters in parentheses (
) that are preceded by white space and a heading number
are imported as Security classifications. Plain
text paragraphs are assigned the same classification as the heading
that precedes them. If headings do not have a security classification,
you can set a default value for the security classification attribute.
- Reference
Text in square brackets [ ] is
treated as reference information. Multiple references in the same
object are stored in the attribute you specify as a comma-separated
list.
Controlling line breaks and numbering
Use
the advanced options to control how line breaks and numbering in the
text file are interpreted when the file is imported.