[xslt] performance: row-col to col-row

Hi all

This is a performance question:

I have an xml that looks like

In the result I need to structur like:

It is no problem to do that, but the performance is not really good
with the following stylesheet:

<xsl:for-each select="/row[1]/col">
  <xsl:variable name="col">
     <xsl:value-of select="position()"/>

  <!-- I think the following xpath is slow -->
  <xsl:for-each select="/row/col[position()=$col]">


If I do that in that way the performance is miserable.
Is there an other possibility to that?

The xmls are output of an exslt:sql database query.


This mail sent through IMP: http://horde.org/imp/

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]