Commit 4267508
committed
Eliminate PDF doc build margin problem [skip appveyor]
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.81 parent 9efe5af commit 4267508
6 files changed
Lines changed: 311 additions & 282 deletions
File tree
- doc
- design
- man
- reference
- user
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
0 commit comments