XSL-T reordering question: how would you...

The following message is a courtesy copy of an article
that has been posted to comp.infosystems.www.authoring.stylesheets as well.


Suppose you have a document marked up sequentially as follows:

<section title="section one">
  <entry>
    Angela
  </entry>
  <entry>
    Belinda
  </entry>
  <entry>
    Carol
  </entry>
</section>
<section title="section two">
  <entry>
    Daphne
  </entry>
  <entry>
    Enid
  </entry>
  <entry>
    Frederika
  </entry>
</section>

and you want to produce output in columns, thus:

	+---------------+---------------+
	| section one	| section two	|
	+---------------+---------------+
	| Angela	| Daphne	|
	| Belinda	| Enid		|
	| Carol		| Federika	|
	+---------------+---------------+

so that the output HTML wanted to look something like

<table>
  <tr>
    <th>
      section one
    </th>
    <th>
      section two
    </th>
  </tr>
  <tr>
    <td>
      Angela
    </td>
    <td>
      Daphne
    </td>
  </tr>

and so on...

This is an actual problem I'm looking at now, and trying to work out
whether to use XSL-T to solve it. It's not an improbable problem, it
must crop up all over the place. It's basic reordering, and reordering 
is supposed to be what XSL-T is good for. But, I know I'm not greatly
practised wit this technology, but I can't for the life of me see how
you would do it. Am I stupid, or is it really difficult? If it is
really difficult, what remaining benefit has XSL over CSS?

Cheers

Simon

-- 
simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon

			-- mens vacua in medio vacuo --

Received on Monday, 19 July 1999 08:43:06 UTC