This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Interleaving two lists
- To: xsl-list at mulberrytech dot com
- Subject: Interleaving two lists
- From: "Manuel Montoro" <mmontoro at novasoft dot es>
- Date: Fri, 28 Jul 2000 12:42:35 +0200
- Organization: Novasoft
- Reply-To: xsl-list at mulberrytech dot com
Hi all,
I have an interesting and curious one. I think it hasn't show in the
list before. If so, sorry for reiterate....
Suppose the following XML snip:
<body>
<imagelist>
<image href="img1.jpg"/>
<image href="img2.jpg"/>
......
</imagelist>
<paralist>
<para>Blah, blah....</para>
<para>Burli, burli...</para>
....
</paralist>
</data>
and I want to transform it in something like this:
<table>
<tr>
<td>
<img src="img1.jpg"/>
</td>
<td>
<p>Blah, blah....</p>
</td>
</tr>
<tr>
<td>
<p>Burli, burli....</p>
</td>
<td>
<img src="img2.jpg"/>
</td>
</tr>
.......
</table>
Please note that the image and paragraph lists don't have to be the
same size.
Surprisingly (or not that surprise due to my condition of XSLT
novice) I'm in trouble trying to get it working. Due to the intrinsic
recursive nature of the XSLT templates, I don't imagine how to
iterate through two node sets at the same time.
Suggestions, anyone?
Kind Regards
--------------------------------------------------
Manuel Montoro
Responsable Producto
Novasoft, S.A.
Telf: 952978012
E-mail: mmontoro@novasoft.es
Pensamiento del Dia:
Hay que estudiar mucho para saber poco
Baron de Montesquieu.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list