Skip to content

Commit

Permalink
Merge pull request docbook#425 from ndw/iss-410
Browse files Browse the repository at this point in the history
Fix bug where CALS column width didn't specify px
  • Loading branch information
ndw authored Oct 23, 2023
2 parents bc2f03c + 7da46e7 commit e9280d5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/xslt/modules/tablecals.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
<xsl:otherwise>
<colgroup>
<xsl:for-each select="$widths">
<col style="width: {f:absolute-length(.)}"/>
<col style="width: {f:absolute-length(.)}px"/>
</xsl:for-each>
</colgroup>
</xsl:otherwise>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/expected/table-cals.016.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" class="no-js"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link href="https://purl.org/dc/elements/1.1/" rel="schema.dc"/><meta content="2011-04-22T17:02:00-06:00" name="dc.modified"/><meta content="DocBook xslTNG" name="generator"/><link href="./css/docbook.css" rel="stylesheet" media="screen"/></head><body class="home"><nav class="top"></nav><main><div id="d1e1220" class="informalobject informaltable pgwide"><table><colgroup><col style="width: 192"/><col style="width: 192"/><col style="width: 384"/></colgroup><thead><tr><th class="colsep left rowsep">Category</th><th class="colsep left rowsep">System Considerations, Issues</th><th class="left rowsep">Notes</th></tr></thead><tbody><tr><td class="colsep left rowsep">General Company Information</td><td class="colsep empty rowsep"></td><td class="empty rowsep"></td></tr><tr><td class="colsep left">Company Financials</td><td class="colsep empty"></td><td class="empty"></td></tr></tbody></table></div></main><nav class="bottom"></nav></body></html>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" class="no-js"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link href="https://purl.org/dc/elements/1.1/" rel="schema.dc"/><meta content="2011-04-22T17:02:00-06:00" name="dc.modified"/><meta content="DocBook xslTNG" name="generator"/><link href="./css/docbook.css" rel="stylesheet" media="screen"/></head><body class="home"><nav class="top"></nav><main><div id="d1e1220" class="informalobject informaltable pgwide"><table><colgroup><col style="width: 192px"/><col style="width: 192px"/><col style="width: 384px"/></colgroup><thead><tr><th class="colsep left rowsep">Category</th><th class="colsep left rowsep">System Considerations, Issues</th><th class="left rowsep">Notes</th></tr></thead><tbody><tr><td class="colsep left rowsep">General Company Information</td><td class="colsep empty rowsep"></td><td class="empty rowsep"></td></tr><tr><td class="colsep left">Company Financials</td><td class="colsep empty"></td><td class="empty"></td></tr></tbody></table></div></main><nav class="bottom"></nav></body></html>
2 changes: 1 addition & 1 deletion src/test/resources/expected/table-cals.022.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" class="no-js"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link href="https://purl.org/dc/elements/1.1/" rel="schema.dc"/><meta content="2011-04-22T17:02:00-06:00" name="dc.modified"/><meta content="DocBook xslTNG" name="generator"/><link href="./css/docbook.css" rel="stylesheet" media="screen"/></head><body class="home"><nav class="top"></nav><main><div id="d1e1552" class="formalobject table"><header><div class="title">Table <span class="label">1</span><span class="sep"></span>Server machine minimum required software<sup id="d1e1552-f1-fref" class="footnote-number table-footnote"><a href="#d1e1552-f1-fnote">a</a></sup></div></header><table><colgroup><col style="width: 240"/></colgroup><thead><tr><th class="bleft btop colsep rowsep top">Foo<sup id="d1e1552-f2-fref" class="footnote-number table-footnote"><a href="#d1e1552-f2-fnote">b</a></sup></th></tr></thead><tbody><tr><td class="bleft btop colsep rowsep">foo</td></tr></tbody></table><div class="footnotes table-footnotes"><div class="footnote" id="d1e1552-f1-fnote"><div class="footnote-number"><sup class="footnote-number table-footnote"><a href="#d1e1552-f1-fref">a</a></sup></div><div class="footnote-body"><p>Table title footnote test.</p></div></div><div class="footnote" id="d1e1552-f2-fnote"><div class="footnote-number"><sup class="footnote-number table-footnote"><a href="#d1e1552-f2-fref">b</a></sup></div><div class="footnote-body"><p>Table cell footnote test.</p></div></div></div></div><footer><div class="footnotes"><hr/><div class="footnote" id="d1e1552-f1-fnote"><div class="footnote-number"><sup class="footnote-number table-footnote"><a href="#d1e1552-f1-fref">a</a></sup></div><div class="footnote-body"><p>Table title footnote test.</p></div></div></div></footer></main><nav class="bottom"></nav></body></html>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" class="no-js"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link href="https://purl.org/dc/elements/1.1/" rel="schema.dc"/><meta content="2011-04-22T17:02:00-06:00" name="dc.modified"/><meta content="DocBook xslTNG" name="generator"/><link href="./css/docbook.css" rel="stylesheet" media="screen"/></head><body class="home"><nav class="top"></nav><main><div id="d1e1552" class="formalobject table"><header><div class="title">Table <span class="label">1</span><span class="sep"></span>Server machine minimum required software<sup id="d1e1552-f1-fref" class="footnote-number table-footnote"><a href="#d1e1552-f1-fnote">a</a></sup></div></header><table><colgroup><col style="width: 240px"/></colgroup><thead><tr><th class="bleft btop colsep rowsep top">Foo<sup id="d1e1552-f2-fref" class="footnote-number table-footnote"><a href="#d1e1552-f2-fnote">b</a></sup></th></tr></thead><tbody><tr><td class="bleft btop colsep rowsep">foo</td></tr></tbody></table><div class="footnotes table-footnotes"><div class="footnote" id="d1e1552-f1-fnote"><div class="footnote-number"><sup class="footnote-number table-footnote"><a href="#d1e1552-f1-fref">a</a></sup></div><div class="footnote-body"><p>Table title footnote test.</p></div></div><div class="footnote" id="d1e1552-f2-fnote"><div class="footnote-number"><sup class="footnote-number table-footnote"><a href="#d1e1552-f2-fref">b</a></sup></div><div class="footnote-body"><p>Table cell footnote test.</p></div></div></div></div><footer><div class="footnotes"><hr/><div class="footnote" id="d1e1552-f1-fnote"><div class="footnote-number"><sup class="footnote-number table-footnote"><a href="#d1e1552-f1-fref">a</a></sup></div><div class="footnote-body"><p>Table title footnote test.</p></div></div></div></footer></main><nav class="bottom"></nav></body></html>
2 changes: 1 addition & 1 deletion src/test/resources/expected/table-cals.039.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" class="no-js"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link href="https://purl.org/dc/elements/1.1/" rel="schema.dc"/><meta content="2011-04-22T17:02:00-06:00" name="dc.modified"/><meta content="DocBook xslTNG" name="generator"/><link href="./css/docbook.css" rel="stylesheet" media="screen"/><script src="./js/copy-verbatim.js" defer="defer"></script></head><body class="home"><nav class="top"></nav><main><div id="d1e2433" class="informalobject informaltable"><table><colgroup><col style="width: 144"/><col style="width: 240"/></colgroup><tbody><tr><td class="bleft btop rowsep"><strong class="bold">Address:</strong></td><td class="btop colsep rowsep"><div class="pre-wrap" db-startinglinenumber="1" db-numberoflines="2"><pre class="literallayout numbered verbatim verblines"><span class="line" db-line="1"><span class="ln"> <span class="nsep">|</span></span><span class="ld">Some literal layout</span></span>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" class="no-js"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link href="https://purl.org/dc/elements/1.1/" rel="schema.dc"/><meta content="2011-04-22T17:02:00-06:00" name="dc.modified"/><meta content="DocBook xslTNG" name="generator"/><link href="./css/docbook.css" rel="stylesheet" media="screen"/><script src="./js/copy-verbatim.js" defer="defer"></script></head><body class="home"><nav class="top"></nav><main><div id="d1e2433" class="informalobject informaltable"><table><colgroup><col style="width: 144px"/><col style="width: 240px"/></colgroup><tbody><tr><td class="bleft btop rowsep"><strong class="bold">Address:</strong></td><td class="btop colsep rowsep"><div class="pre-wrap" db-startinglinenumber="1" db-numberoflines="2"><pre class="literallayout numbered verbatim verblines"><span class="line" db-line="1"><span class="ln"> <span class="nsep">|</span></span><span class="ld">Some literal layout</span></span>
<span class="line" db-line="2"><span class="ln"> <span class="nsep">|</span></span><span class="ld">goes here.</span></span>
</pre></div></td></tr></tbody></table></div></main><nav class="bottom"></nav></body></html>

0 comments on commit e9280d5

Please sign in to comment.