Skip to content

Commit 1592ca4

Browse files
authored
configure.php: recover failed XIncludes inside classsynopsis (#326)
* configure.php: recover failed XIncludes inside classsynopsis xinclude_residual_fixup handled listitem/refentry/refsect1/tbody/variablelist parents but not classsynopsis, so a failed XInclude targeting a methodsynopsis or fieldsynopsis inside a class synopsis hit the default branch and hard-failed the build (Unknown parent of failed XInclude: classsynopsis). Add a classsynopsis case that injects a <classsynopsisinfo role="comment"> carrying the failure marker. This is a valid child of classsynopsis per the DocBook 5.2 RNG (verified), so translations with a missing class-member include now surface the failure and keep validating, as intended for the other parents. * Use single-quoted role='comment', keep the attribute for PhD Dropping the attribute passes RNG but PhD's format_classsynopsisinfo (Generic/XHTML.php:1145) treats a role-less classsynopsisinfo as the class-body opener: it appends ' {', sets classsynopsis close=true and asserts legacy rendering. role='comment' renders the marker as '/* ... */' instead, which is what the fixup needs.
1 parent eee3873 commit 1592ca4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

configure.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,9 @@ function xinclude_residual_fixup( DOMDocument $dom )
850850
case "variablelist":
851851
$fixup = "<varlistentry><term></term><listitem><simpara>$alert</simpara></listitem></varlistentry>";
852852
break;
853+
case "classsynopsis":
854+
$fixup = "<classsynopsisinfo role='comment'>$alert</classsynopsisinfo>";
855+
break;
853856
default:
854857
echo " (Unknown parent of failed XInclude: $parent)\n";
855858
$hardfail = true;

0 commit comments

Comments
 (0)