Issue
When attempting to create a PDF file through the document generator microflow activity, users have encountered an issue related to the document template. Specifically, within the template, there is HTML content that is set to render as XHTML, which is indicated by the configuration option Render as XHTML = Yes.
The error message is the following:
com.mendix.modules.microflowengine.MicroflowException: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: "fo:table-body" is missing child elements. Required content model: marker* (table-row+|table-cell+) (See position -1:-1)Environment
Studio Pro (all versions)
Cause
This error arises from the structure of the HTML snippet, specifically due to the presence of tables that are improperly nested within other tables. In HTML, it is essential to adhere to a specific structure when creating tables to ensure they render correctly in web browsers.
When tables are nested, each inner table must be properly enclosed within the appropriate table row tr and table data td elements. Failing to do so can lead to rendering issues and unexpected behavior in how the tables are displayed.
Solution/Workaround
To resolve this error, the HTML code should be reviewed to ensure that all nested tables are correctly placed within the required tr and td elements. This adjustment will help maintain the integrity of the table structures and enhance the overall quality of the HTML markup.
The appropriate syntax for this is as follows.:
<table>
<tbody>
<tr>
<td>
<table> </table>
</td>
</tr>
</tbody>
</table>
It is recommended that the support for the document template HTML snippet does not include highly complex inline styling. For a more advanced HTML template, it is advisable to transition to the new document generation module (PDF Document Generation), which provides improved support for such situations.
Internal information related
- 245657
- CJZ85RLTA/p1744293333838679
- UFC-1594
0 Comments