xsl-list
[Top] [All Lists]

[xsl] selecting associated headings based on sequence position

2008-07-30 20:54:05
Hi,

My input document is spreadsheet stuff like below.  In the first Row element, I 
have the names of the columns, in subsequent Row/Cell/Data elements I have the 
values of the columns.  I need to output a list for each Row with the heading 
followed by the value, something like this:

<b>Project name: </b>The name of a project

<b>Proponent: </b>The proponent of a project

etc

such that the stuff inside the <b> element is taken from the first Row's 
Cell/Data element from the same position in the sequence of Cell elements in 
the first Row as the current Row's Cell/Data element sequence position.

Is this possible?

Thanks

Peter

<Worksheet xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<Table>
<Row>
<Cell><Data>Project name</Data></Cell>
<Cell><Data>Proponent</Data></Cell>
<Cell><Data>Authority</Data></Cell>
<Cell><Data>Theme</Data></Cell>
<Cell><Data>Year</Data></Cell>
<Cell><Data>Province</Data></Cell>
<Cell><Data>Region</Data></Cell>
<Cell><Data>Sector</Data></Cell>
<Cell><Data>Proponent Address</Data></Cell>
<Cell><Data>City</Data></Cell>
<Cell><Data>PostalCode</Data></Cell>
<Cell><Data>Country</Data></Cell>
<Cell><Data>Government contribution</Data></Cell>
<Cell><Data>Proponent contribution</Data></Cell>
<Cell><Data>Partner(s) contribution</Data></Cell>
<Cell><Data>In-Kind contributions</Data></Cell>
<Cell><Data>latitude</Data></Cell>
<Cell><Data>longitude</Data></Cell>
</Row>
<Row>
<Cell><Data>The name of a project</Data></Cell>
<Cell><Data>The proponent of a project</Data></Cell>
<Cell><Data>The name of the project manager</Data></Cell>
<Cell><Data>The theme of a project</Data></Cell>
<Cell><Data>2008-2009</Data></Cell>
<Cell><Data>New Brunswick</Data></Cell>
<Cell><Data>Atlantic</Data></Cell>
<Cell><Data>Provincial/Territorial</Data></Cell>
<Cell><Data>65 Some St.</Data></Cell>
<Cell><Data>Fredericton</Data></Cell>
<Cell><Data>E5B 5B1</Data></Cell>
<Cell><Data>Canada</Data></Cell>
<Cell><Data>40000</Data></Cell>
<Cell><Data>3000</Data></Cell>
<Cell><Data>6000</Data></Cell>
<Cell><Data>41600</Data></Cell>
<Cell><Data>45.364286000000001</Data></Cell>
<Cell><Data>-66.621815000000007</Data></Cell>
</Row>



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>