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

[xsl] GUI layout mechanism in XSLT


Subject: [xsl] GUI layout mechanism in XSLT
From: Ilya Boyandin <ilyabo@xxxxxxxxx>
Date: Wed, 5 Jan 2005 11:49:39 +0100

Hello All!

I'm trying to implement a simple GUI layout mechanism with XSLT
without much success for now. The problem is that the task requires to
produce an output tree, which structure differs significantly from the
original tree, and in which the elements are likely to be presented in
a different order.

Here's the problem description:

The input is a GUI elements tree. Elements are contained in horizontal
or vertical groups. Naturally, groups can contain other groups. For
instance:

<hgroup>
<vgroup>
  <item>A1</item>
  <item>A2</item>
</vgroup>
<vgroup>
  <item>B1</item>
  <item>B2</item>
  <hgroup>
    <item>B3</item>
    <item>C3</item>
  </hgroup>
</vgroup>
</hgroup>

The output must be one plain table (without nested tables!) in which
the elements are layed out the same as in the input tree. So for the
input tree above the output should be something like this:

<table>
<tr>
  <td>A1</td>
  <td colspan="2">B1</td>
</tr>
<tr>
  <td>A2</td>
  <td colspan="2">B2</td>
</tr>
<tr>
  <td>&nbsp;</td>
  <td>B3</td>
  <td>C3</td>
</tr>
</table>

As I am a newbie, I don't see an obvious solution. I'd be very
thankful if somebody could give me a hint or in the worst case make it
clear that the problem cannot be solved with XSLT alone.

Thank you!
Ilya


Current Thread
Keywords