Eliminate PDF doc build margin problem - #4883
Merged
Merged
Conversation
This is an AI analysis of errors reported by Apache fop. The error looks like this (same for margin-right - line-breaks mine): [ERROR] FOUserAgent - Invalid property value encountered in margin-left="": org.apache.fop.fo.expr.PropertyException: file:/home/mats/github/scons/build/doc/user/scons-user.fo:3:6: No conversion defined ; property:'margin-left' (See position 147:8) Some builds of fop report the error as SEVERE rather than ERROR. The problem was identified as: A. When `$fop.extensions != 0`, the `<xsl:value-of>` inside `<xsl:attribute>` elements produces whitespace-padded content that FOP can't parse as valid length values B. When `$fop.extensions = 0`, the `<xsl:attribute>` elements with empty content produce empty strings The solution is to use `<xsl:choose>` blocks that always produce valid length values: - When `$fop.extensions != 0`: use `0pt` (simple, valid FOP length) - When `$fop.extensions = 0`: use the original dynamic variable values To summarize the two-part fix across all four `scons_title.xsl` files: 1. (1 pair per file): Removed the redundant `xsl:attribute` elements from `scons-titlepage-first` that conflicted with the literal `margin-left="0mm" margin-right="0mm"` 2. (11 blocks per file, already applied): Replaced the broken content-mode `xsl:attribute` blocks that produced empty strings or malformed `concat()` values: Note: we only build doc/man and doc/user, but the same fixes were applied to the two unused documents for consistency. Signed-off-by: Mats Wichmann <mats@linux.com> Assisted-by: OpenCode 1.18.5 driving Qwen 3.8
mwichmann
force-pushed
the
doc/title-margins
branch
from
July 26, 2026 15:34
d91a5de to
4267508
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an AI analysis of errors reported by Apache fop. The error looks like this (same for margin-right ):
Some builds of fop report the error as
SEVERErather thanERROR.The problem was identified as:
A. When
$fop.extensions != 0, the<xsl:value-of>inside<xsl:attribute>elements produces whitespace-padded content that FOP can't parse as valid length values.B. When
$fop.extensions = 0, the<xsl:attribute>elements with empty content produce empty strings.The solution is to use
<xsl:choose>blocks that always produce valid length values:$fop.extensions != 0: use0pt(simple, valid FOP length)$fop.extensions = 0: use the original dynamic variable valuesTo summarize the two-part fix across all four
scons_title.xslfiles:xsl:attributeelements fromscons-titlepage-firstthat conflicted with the literalmargin-left="0mm" margin-right="0mm"xsl:attributeblocks that produced empty strings or malformedconcat()values:Note: we only build doc/man and doc/user, but the same fixes were applied to the two unused documents for consistency.
Note: three of the files had the old-style copyright header (with unexpanded
__COPYRIGHT__in them), changed to the short one that was already in use in the User Guide copy of the titlepage file.Signed-off-by: Mats Wichmann mats@linux.com
Assisted-by: OpenCode 1.18.5 driving Qwen 3.8
Contributor Checklist:
CHANGES.txtandRELEASE.txt(and read theREADME.rst).