Randall Hopper wrote:
I've noted a problem with our wiki at work where some nested tables
will not print, even though they're displayed in the browser (Firefox 1.0.7).
The underlying cause is that when you define nested tables in
Mediawiki, in the generated HTML the <caption> on the outer table is never closed.
For example: {| border="0" cellpadding="3" align="center" |+ '''TABLE 1<br>Age of the Universe...''' {| border="1" cellpadding="2" cellspacing="0" align="center" |+ '''(Table 1a Caption)''' |- bgcolor="#dfdfdf" ! Header1 !! Header2 !! Header3 !! Header4 |- align="right" | 1 || 2 || 3 || 4 |} || {| border="1" cellpadding="2" cellspacing="0" align="center" |+ '''(Table 1b Caption)''' |- bgcolor="#dfdfdf" ! Header1 !! Header2 !! Header3 !! Header4 |- align="right" | 5 || 6 || 7 || 8 |} |}
I notice you didn't add a row and cell before begining the new table.
{| border="0" cellpadding="3" align="center" |+ '''TABLE 1<br>Age of the Universe...''' |- | {| border="1" cellpadding="2" cellspacing="0" align="center" ...
Using MW 1.5.0, it comes out fine.
Drop this into a wiki, and then View Source. You can see the first
<caption> is never closed:
<!-- start content --> <table border="0" cellpadding="3" align="center"> <caption> <b>TABLE 1<br />Age of the Universe...</b> <table border="1" cellpadding="2" cellspacing="0" align="center"> <caption> <b>(Table 1a Caption)</b> </caption>
This may actually be valid HTML (but not XHTML), because many tags do not have to be closed in HTML. (The page itself is not valid because the DOCTYPE is for XHTML.)
-- Jamie ------------------------------------------------------------------- http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB.