[xsl] accessing node by position

Subject: [xsl] accessing node by position
From: "Vincent Finn" <vincent.finn@xxxxxxxxxxxxx>
Date: Wed, 19 May 2004 11:05:40 +0100

I need to access an xml value by it's position.
can this be done (or is there a better way to do it)

I have the xml below for generating a table.
I process <columns> to build the table header, then <rows> to build
the body.

When I am in a cell I need to find the type of the data for formatting
I don't know how to access the correct type node

I was thinking of something like
<xsl:value-of select="../../../columns/column(position())/type"/>
but after reading the faq that sort of 'on-the-fly' XPath generation
isn't allowed

Is there a nice way doing this?

Any help appreciated!



Current Thread