Subject: Re: Swapping table rows and columns From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 5 Jul 1999 16:25:10 +0100 (BST) |
<css:stylesheet xmlns:css="http://www.w3.org/XSL/Transform/1.0" xmlns="http://www.w3.org/TR/REC-html40" result-ns=""> <css:template match="table"> <table> <css:for-each select="tr[1]/td"> <tr> <css:variable name="n" expr="position()"/> <css:for-each select="//td[position()=$n]"> <td><css:apply-templates/></td> </css:for-each> </tr> </css:for-each> </table> </css:template> </css:stylesheet> the above turns <table> <tr> <td>11</td><td>12</td><td>13</td><td>14</td><td>15</td> </tr> <tr> <td>21</td><td>22</td><td>23</td><td>24</td><td>25</td> </tr> <tr> <td>31</td><td>32</td><td>33</td><td>34</td><td>35</td> </tr> </table> into <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <table> <tr> <td>11</td> <td>21</td> <td>31</td> </tr> <tr> <td>12</td> <td>22</td> <td>32</td> </tr> <tr> <td>13</td> <td>23</td> <td>33</td> </tr> <tr> <td>14</td> <td>24</td> <td>34</td> </tr> <tr> <td>15</td> <td>25</td> <td>35</td> </tr> </table> David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Swapping table rows and columns, Steve Slatcher | Thread | Re: Swapping table rows and columns, G. Ken Holman |
Re: External processing., Didier BOLF | Date | RE: Two Hard Questions (at least fo, Kay Michael |
Month |