Subject: [xsl] Transforming Tables - repost From: Jeff Sese <jsese@xxxxxxxxxxxx> Date: Tue, 16 May 2006 14:58:14 +0800 |
So if you have a table xml like this: <table row="4" col="5"> <row> <cell col="1">Data</cell> <cell col="2" colspan="3">Data</cell> <cell col="5">Data</cell> </row> <row> <cell col="1" rowspan="3">Data</cell> <cell col="2">Data</cell> <cell col="3">Data</cell> <cell col="4">Data</cell> <cell col="5">Data</cell> </row> <row> <cell col="2" rowspan="2">Data</cell> <cell col="3">Data</cell> <cell col="4">Data</cell> <cell col="5">Data</cell> </row> <row> <cell col="3">Data</cell> <cell col="4">Data</cell> <cell col="5">Data</cell> </row> </table>
I should have a InDesign tagged text like this: <tStart:4,12> <rStart:> <cStart:1,1>Data<cEnd:> <cStart:1,3>Data<cEnd:> <cStart:1,1><cEnd:> <cStart:1,1><cEnd:> <cStart:1,1>Data<cEnd:> <rEnd:> <rStart:> <cStart:3,1>Data<cEnd:> <cStart:1,1>Data<cEnd:> <cStart:1,1>Data<cEnd:> <cStart:1,1>Data<cEnd:> <cStart:1,1>Data<cEnd:> <rEnd:> <rStart:> <cStart:1,1><cEnd:> <cStart:2,1>Data<cEnd:> <cStart:1,1>Data<cEnd:> <cStart:1,1>Data<cEnd:> <cStart:1,1>Data<cEnd:> </row> <rEnd:> <cStart:1,1><cEnd:> <cStart:1,1><cEnd:> <cStart:1,1>Data<cEnd:> <cStart:1,1>Data<cEnd:> <cStart:1,1>Data<cEnd:> <rEnd:> <tEnd:>
I can get my xslt to handle column spanning, but i'm having trouble with rowspanning. Here is my template for the cell element:
<row> <cell col="1" rowspan="3">Data</cell> <cell col="2">Data</cell> <cell col="3">Data</cell> <cell col="4">Data</cell> <cell col="5">Data</cell> </row> <row> <cell col="2" rowspan="2">Data</cell> <cell col="3">Data</cell> <cell col="4">Data</cell> <cell col="5">Data</cell> </row> <row> <cell col="3">Data</cell> <cell col="4">Data</cell> <cell col="5">Data</cell> </row>
Thanks, Jeff
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Collect word count with x, Karen McAdams | Thread | RE: [xsl] Transforming Tables - rep, Michael Kay |
[xsl] Collect word count with xslt2, Karen McAdams | Date | Re: [xsl] Collect word count with x, George Cristian Bina |
Month |