Subject: Re: [xsl] Create Table From: "Eric J. Bowman" <eric@xxxxxxxxxxxxxxxx> Date: Mon, 22 Mar 2010 19:42:18 -0600 |
bernie bonn wrote: > HI Eric & List, > > Thanks for this solution. There is another gotcha. I realized I > didn't make clearthat, all the changes are inside of one parent > element <interface-categories name='Source Changes' > category='Source'>. So I need to switch on <data> children inside of > that. How I know it is the start of a new change and table row, is > the data node will have the attribute 'changes' <data > section='changes' field='file'>ConvertHistoryWages.java</data>. > There can be mutliple 'changes' inside the parent element > <interface-changes>. I apologize, for not being clear. Any > additional guidance is sure appreciated. > OK, I see what you need now. I'm relatively new at this myself, and only deal with XSLT 1. I'll reply in a bit with some code, then see how the pros would do it, because I'm kinda curious about different approaches to this problem, myself. O/T: I'm happy to answer any questions about <table> markup (off-list as it's o/t), since I'm a real stickler about proper <table> design. The output _could_ leave the top-left cell as an empty <td>, the file names could be marked up with <th>, and all the @scope's removed. The table would then be using the "Basic algorithm" [1] for machine- readability. Column widths may be assigned using <col> and <colgroup> elements, preceding <thead>. Column widths may be assigned as ratios, instead of the columns being either sized-to-fit or equal-width. As with any object in (X)HTML, you must assign @width to enable single-pass rendering in browsers. With tables the width can be zero in the (X)HTML and set using CSS. The CSS table-layout:fixed directive is also required for single-pass rendering, that's why I stuck it in there. So my next example will have slightly different <table> markup, but just one <tbody>, as I was imagining non-existent structure in your source file, before. I recommend the next example over the last one -- all accessibility devices grok the Basic algorithm, but the same can't be said for @scope, unfortunately. -Eric [1] http://www.w3.org/TR/html401/struct/tables.html#h-11.4.3
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Create Table, bernie bonn | Thread | Re: [xsl] Create Table, Eric J. Bowman |
[xsl] combine on key and dedupe, Joyce Chapman | Date | Re: [xsl] combine on key and dedupe, David Carlisle |
Month |