On Feb 7, 2008 4:32 PM, Steve Bennett <stevagewp(a)gmail.com> wrote:
On 2/8/08, Steve Bennett <stevagewp(a)gmail.com>
wrote:
I have successfully parsed my first nested table.
Hey, it parsed this mediawiki example almost perfectly:
{| border="1" cellpadding="5" cellspacing="0"
align="center"
|+'''An example table'''
|-
! style="background:#efefef;" | First header
! colspan="2" style="background:#ffdead;" | Second header
|-
| upper left
|
| rowspan=2 style="border-bottom:3px solid grey;" valign="top" |
right side
|-
| style="border-bottom:3px solid grey;" | lower left
| style="border-bottom:3px solid grey;" | lower middle
|-
| colspan="3" align="center" |
{| border="0"
|+''A table in a table''
|-
| align="center" width="150px" | [[Image:Wiki.png]]
| align="center" width="150px" | [[Image:Wiki.png]]
|-
| align="center" colspan="2" style="border-top:1px solid red;
border-right:1px
solid red; border-bottom:2px solid red; border-left:1px solid red;" |
Two Wikimedia logos
|}
|}
(when I say almost, it treats the image links literally...because, as
I now realise, it doesn't allow nesting elements in single-line table
cells. d'oh...)
Congrats!
My
http://tools.wikimedia.de/~magnus/wiki2xml/w2x.php
parses it correctly as well, but it's still manual PHP hacks, while
your is a real parser - respect!
Cheers,
Magnus