Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Print By RPE The Tables Authored Among Text In DNG Artifact

 I would like to understand how to identify and print properly through RPE the tables I have in DOORS Next Artifacts.


My case is the following:
I have in DOORS Next some artifacts authored in a module.
Some of those artifacts contain a table among the text, like:
ID              |   Summary
ArtifactID   |   <Standard Text>
                  |   <Table>
                  |   <Standard Text>

So, basically, within a single artifact I have both "standard text" and other text inside a table.
My simple question is: there is a way in RPE to identify that some text in a DNG Artifact is manage within a table?
This because I would like to display it differently (other formats, colors, whatever) by RPE.

Thanks in advance for any answers / suggenstions.

0 votes


Accepted answer

Permanent link

You can try formatting it using javascript, here is an example where ETM rich text is rendered using XHTML - https://rpeactual.wordpress.com/2018/05/07/render-test-script-step-description-rich-text-xhtml-with-execution-variables/


Massimo Maschio selected this answer as the correct answer

0 votes

Comments

Hi Karan, Thank you very much for your kind answer. After some additional exploration I found out the solution that works properly for me: I use the following JavaScript:


var textToPrint = div;
textToPrint = textToPrint.replace(/(font-size.?pt)/gi, "");
textToPrint = textToPrint.replace(/(<span style="font-family.?">)/gi, "<span>");
textToPrint = textToPrint.replace(/( font-family.*?">)/gi, "\">");
textToPrint;

The extracted and used "div" is the one you can find in the query "dataSource/artifact/content/text/richTextBody/div". XHTML Input and XHTML Output are both checked and selected in the Script Expression window.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019

Question asked: Jan 30 '23, 5:17 a.m.

Question was seen: 1,042 times

Last updated: May 18 '23, 8:39 a.m.

Confirmation Cancel Confirm