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 |} |}
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 is on Mediawiki 1.4.7 (Gentoo Linux 1.4.16).
Has this by chance been fixed in a later version of Mediawiki?
Thanks,
Randall
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.
Jamie Bliss: |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. ... |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" | ...
Thanks. I didn't realize you needed to follow the caption line with a row and cell delimeter. When I add that, the </caption> appears and the table prints fine.
Randall
mediawiki-l@lists.wikimedia.org