[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Late requirement for uniform wrapping of differently generated elements


Subject: Re: [xsl] Late requirement for uniform wrapping of differently generated elements
From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx>
Date: Sat, 11 Feb 2012 17:16:41 +0100

On 11 February 2012 16:59, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
>> An new requirement demands that all the various <table> elements are
>> to be wrapped with another <table> (with a single <tr>) for layout
>> purposes, adding one <td> with uniform contents to the <td> containing
>> the original table.
>
> It's hard to give a decent answer with an actual example, but 2 options
are:
>
> - modify the transform to just output the wrapper code

This would be the added layout table for enclosing the actual table
and the new additions - but how would the original tables be added?

<table class="wrapper">
  <tr>
     <td><table class="original table, one of many different
tables"><tr>...</table></td>
     <td><div class="new stuff, same for all"/></td>
  </tr>
</table>

>
> - use 'micro-pipelining' to post-process the result to wrap the <table>s

OK, I understand. But I'd have to identify the "original" tables or
XPath-pick them carefully because a <table> might crop up as an
element within an "original" table.

Thanks
Wolfgang

> --
> Andrew Welch
> http://andrewjwelch.com


Current Thread