Getting DOORS irregular tables and specific DOORS properties into Word output through RPE
- October 22nd, 2010
- Author:
- Category: DOORS
- Discussion: 2 Comments
Throughout this article you’ll see how you can get some specific DOORS details from a module, like :
– modification status
– cell width
– irregular tables
– cell borders
Here is the test module :
… and the output document :
To obtain this “mirror image” of the DOORS module content, you can follow the indications bellow :
Create a new RPE template, and run the DOORS Schema Discovery Wizard. Select the module, then all the attributes that are listed, then finish the wizard.
Create RPE elements like displayed below, and drag the specific queries and attributes over them :
The parent table has the following properties set (the cell borders are set to light gray, as they are almost invisible in the DOORS module view) :
Moving forward, first row in table represents the equivalent of the header row within the module. The first cell :
..has the properties displayed below :
The cell width is has a small value, as it is in the module also; the cell background is set with a type of gray; only the top and bottom borders are full black, as they also appear in the DOORS module :
The 2nd cell inside the header row has similar properties, only the “cell width” property is not specified.
The container is set to iterate through module objects. First column shall contain the object ID for every iterated object. We do not want to display the ID when the table is found, so we use a variable to solve that. There are two assignments set bellow. At cell level, the variable is initialized with “false”, and over the container that is within the container with the “Module/Object/Table” query, the variable is set to “true”, as this ensures that a table has been found.
Then, before extracting the Absolute Number, the condition displayed below is set :
Moving forward to the second column, note that Object Heading and Object Text is extracted. Conditions are set to handle the paragraphs only when Object Heading, respectively Object Text, has content.
Then there is the check for tables, and this is handled by the container element which has the “Module/Object/Table” query set.
The paragraphs for Object heading and Object Text have the “before space” and “after space” set, to avoid big spacing between them, that can be caused by custom heading style within the Word stylesheet. Special treatment occurs for the left border color, as this is scripted in order to respect the border color in the DOORS module. Here is the coding for this :
And this is the Properties tab for those two paragraphs :
The table inside the container that parses the tables, has the “fixed cell width in column” set to “false”, because we want to preserve the cell widths as they are in the DOORS table.
The cell element that is set to be drawn every time an object is found inside a DOORS row, has the cell alignment and cell width set with scripted values. For the alignment, the “TableCellAlign” attribute is taken into consider, because it specifies the alignment as it is within the current DOORS cell.
The “cell width” takes the value that comes from DOORS, unprocessed :
The paragraph that extracts DOORS cell content has similar properties with the paragraphs that hold the Object Heading & Object Text that you’ve seen above.
In addition to that, there is a left indent property set, in order to simulate the margin that can be seen inside the DOORS module cell.
Check bellow the Properties tab for the paragraph we discuss :
Considering the properties set above, and the structure of the RPE template, the extraction will now produce the result specified at the beginning of this article. The user can take this example as a starting point in adding details for its custom DOORS extraction : there are cases when it is desired to have a 1 to 1 relation for the source&output pair, so the current article should help in this regard.
Hi. Thanks for sharing your knowledge with RPE.
I have to import a document from MS Word into DOORS. The document has many tables, which have a title row different colour to the table text.
I have two issues.
The tables do not import properly using the Word Export icon, as some tables have merged cells, these do not import into doors the correct way. I have also tried saving as RTF in Word, then exporting that – but with similar incorrect results.
Can you inform me how to import the tables so their layout is preserved in DOORS?
Once in DOORS, i have two requests.
1. colour the first row of the table a diferent colour (shading)
2. Alternate the row backgrounds on odd/even rows
Any help appreciated
I have a table in my document that has cells in the heading that span columns. There are no color differences as they all use black borders. When the table is imported, the cells appear to be merged, but when I run it thru RPE, it only sets each of these cells as single columns and leaves the rest of the row blank. How can I get RPE to recognize the multi-column cells?