New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid content generated by filtered elements #2701 #2712

merged 3 commits into from Jun 5, 2017


None yet
2 participants

robander commented May 31, 2017

As reported in #2701, if a conref fails to resolve, in some cases the empty element will be retained. PDF code has a special rule for unresolved conref that does not account for context; this rule with priority="99" results in bad FO that causes a build to fail. The bad conref already generates messages in the conref resolution step, so there is no reason for this rule.

At a more general level, this is caused by code that expects required elements to be present. When they are missing (due to unresolved conref, or due to filtering, or due to bad input), bad XSL-FO is generated that generally kills FOP. The same markup will generate bad XHTML / HTML5; while browsers typically handle this, we should not generate invalid output. Additionally, simpletable processing currently fails in XHTML / HTML5 when it encounters a table with no entries.

This pull request will:

  • Where we do not already do so, it will ignore lists and tables that have no content for PDF - fixing a variety of related build crashes
  • Refactor the generated headings for choice tables, to avoid a build crash when one or both header entries is filtered out
  • In XHTML / HTML5, ignore simpletables with no entries, fixing a build crash when calculating entries within a row
  • In XHTML / HTML5, ignore lists with no list items + tables with no entries, to avoid generating invalid XHTML / HTML5

robander added some commits May 31, 2017

Fix invalid HTML generated by filtered-out content #2701
Signed-off-by: Robert D Anderson <>
Fix invalid XHTML generated by filtered-out content #2701
Signed-off-by: Robert D Anderson <>
Fix invalid XSL-FO generated by filtered-out content #2701
Signed-off-by: Robert D Anderson <>

@jelovirt jelovirt merged commit d7eb830 into dita-ot:hotfix/2.5.1 Jun 5, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@jelovirt jelovirt added this to the 2.5.1 milestone Jun 5, 2017

@robander robander deleted the robander:hotfix/2701 branch Jun 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment