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

RPE unable to process the caption tag post alignment change in RQM

Hi,

I have inserted table in rich text field of one of the sections in RQM test plan.

Now, I generated document using custom template in RPE and I am getting the table caption and Table of Tables. However, Table caption is Left Aligned.

I need to get the table caption as Center Aligned. So, I aligned the caption in RQM test plan as center aligned. However, after that table caption is not coming and no value in table of tables is shown.

Can anybody help to resolve the issue?

Regards,

Ajay Kumar

0 votes



2 answers

Permanent link
You can create a defect against RQM for this. If you see the XHTML data returned by RQM it is like the following:
p><p>My Table</p><table
style="overflow-wrap:break-word;table-layout:fixed;width:500px;" dir="ltr"
border="1"><tbody><tr><td style="overflow: hidden; width: 250px;">11</td><td
style="overflow: hidden; width: 250px;">12</td></tr><tr><td style="overflow: hidden; width:
250px;">21</td><td style="overflow: hidden; width: 250px;">22</td></tr><tr><td
style="overflow: hidden; width: 250px;">31</td><td style="overflow: hidden; width:
250px;">32</td></tr></tbody></table>

Ideally <caption> tag must be inserted immediately after the <table> tag so that it will be considered as table caption and shown in Table of Tables. Also, since there is no "align" attribute for caption, it is always left aligned.

You can try using a post processing macro that inserts Table caption for all the tables in the output. I don't think of other workarounds in RPE.

0 votes

Comments
Pl refer XML:
1. Before Alignment
<table border="1" dir="ltr" style="table-layout: fixed; width: 500px; word-wrap: break-word;">
<caption>Caption Check</caption>
<tbody><tr>...</tr><tr>...</tr><tr>...</tr></tbody>
</table>
2. After Alignment of Caption
<table border="1" dir="ltr" style="table-layout: fixed; width: 500px; word-wrap: break-word;">
<caption><p style="text-align: left;">Caption Check</p></caption>
<tbody><tr>...</tr><tr>...</tr><tr>...</tr></tbody>
</table>

In both caption is in <table> tag, however after alignment it is in <p>.  As a result while publishing it seems that it is considered as normal para rather than caption as it was handled before alignment.
So, it seems the issue is in RPE processing.


Permanent link
I was checking the XHTML parsed by RPE, so did not realize RPE is the culprit (and not RQM).

If you print RQM test plan section containing table through Script Expression with only "XHTML Input" checked in RPE, the XHTML will have caption element outside the table, due to which it is not added as table caption in the output.

This is an issue with parsing in RPE. As a workaround, if you can somehow move <caption> element after <table> (using Script Expression with replace function along with regexp), you will get the table caption correctly.

0 votes

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,024

Question asked: May 23 '19, 12:33 a.m.

Question was seen: 1,552 times

Last updated: Jul 20 '19, 2:30 p.m.

Confirmation Cancel Confirm