Page 1 of 1
Validate and check for completeness 'no rows are present in tbody'
Posted: Mon Feb 24, 2025 1:51 pm
by JeeWee
When executing 'Validate and check for completeness" and "Report table layout problems" is checked, Oxygen returns an error:
E[Table Layout]No rows are present in the element "tbody".
when the first row in a tbody element contains an attribute assignment.
For example, no error is found for:
<row>
<entry></entry>
</row>
But the error mentioned above is shown for:
<row audience="Maintenance">
<entry></entry>
</row>
I would think the assignment of an attribute is allowed. Why does it throw an error?
Re: Validate and check for completeness 'no rows are present in tbody'
Posted: Tue Feb 25, 2025 1:47 pm
by sorin_carbunaru
Hi,
I just tried your scenario in <oXygen/> XML Editor 27.0, build 2025011506. I opened the samples project, opened "flowers.ditamap" in the DITA Maps Manager, and configured the validation to only report table layout problems.
In one of the topics I added the following table:
Code: Select all
<table frame="all" rowsep="1" colsep="1" id="table_krm_bk3_m2c">
<title/>
<tgroup cols="1">
<colspec colnum="1" colname="c1" colwidth="1*"/>
<thead>
<row>
<entry/>
</row>
</thead>
<tbody>
<row audience="expert">
<entry/>
</row>
</tbody>
</tgroup>
</table>
With or without the @audience attribute, I don't get any errors.
Re: Validate and check for completeness 'no rows are present in tbody'
Posted: Tue Feb 25, 2025 2:12 pm
by JeeWee
It's apparently a bit more complicated than that.
I tested now with another profiling attribute that I have defined: "Administrator" and that does not throw an exception.
I will look into my profiling definitions first to see if I can find the difference.
Re: Validate and check for completeness 'no rows are present in tbody'
Posted: Mon Mar 17, 2025 1:41 pm
by JeeWee
After experimenting a bit more, it seems that the reported error only occurs when the ditaval file excludes the property.
So if I add to the ditaval file:
<prop action="exclude" att="audience" val="Maintenance"/>
and in my table I have defined
<tbody>
<row audience="Maintenance">
<entry/>
</row>
</tbody>
I get the error
"No rows are present in the element "tbody"."
With an include
<prop action="include" att="audience" val="Maintenance"/>
I do not get an error.
So when I use the property to filter rows in my table, the topic does not pass the check if the ditaval property used in the first row is excluded.
Re: Validate and check for completeness 'no rows are present in tbody'
Posted: Mon Mar 17, 2025 3:32 pm
by Radu
Hi,
The error looks correct to me, if you would publish with the same DITAVAL filter file you should get a similar error at publishing time as tbody elements need to have at least one row.
Regards,
Radu
Re: Validate and check for completeness 'no rows are present in tbody'
Posted: Mon Mar 17, 2025 3:48 pm
by JeeWee
Thanks for the quick answer.
The issue here is however, that I have a table with 24 rows, each of them having a profiling defined. I agree that theoretically you could get an empty tbody element if none of the rows are included by ditaval properties. But I'm sure that in my table that can never occur.
If I understand you correctly, the check is not intelligent enough to determine when a tbody element ends up having no rows, so it checks for the existence of the first row to conclude that the structure is valid?
So if I remove the thead element completely and move (and style) that to be the first row in the tbody, I get rid of the error message. Not the cleanest way, but it could work...
Best regards,
Jan Willem
Re: Validate and check for completeness 'no rows are present in tbody'
Posted: Mon Mar 17, 2025 4:00 pm
by Radu
Hi Jan,
From what I know the validate and check for completeness should apply the specified ditaval filter before attempting to build the table layout.
Maybe if you can can up with a small sample DITA topic + ditaval filter exhibiting in your opinion an incorrect behavior of the validation and either post it on this thread or zip and send it to us via email (
support@oxygenxml.com), we could take a look at it and investigate the issue further.
Regards,
Radu
Re: Validate and check for completeness 'no rows are present in tbody'
Posted: Mon Mar 17, 2025 4:43 pm
by JeeWee
Hi Radu,
Sorry for wasting your time

.
It turns out I forgot to add one include statement in one of my ditaval files. No matter how often I checked, I didn't see it until now...
Gathering the info to send to you I suddenly realized the statement was missing.
However, you certainly pointed me in the right direction, thanks for that !!!.
Best regards, Jan Willem
Re: Validate and check for completeness 'no rows are present in tbody'
Posted: Mon Mar 17, 2025 5:14 pm
by Radu
Hello Jan,
Great, thanks for the update!
Regards,
Radu