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.
Accepted answer
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/
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.