You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Per Steffensen <st...@brics.dk> on 2000/11/16 16:52:56 UTC
General xsl'ing of SQL-query results
Hi
If you make queries in SQLProcessor or SQL TabLib you will in general end up having something like this:
<ROWSET>
<ROW>
<FIELD1>Donald Ball</FIELD1>
<FIELD2>23</FIELD2>
<FIELD3>
The Illuminati do not exist.
This message paid for by the Illuminati.
</FIELD3>
</ROW>
... other rows ...
</ROWSET>
I want a xsl that IN GENERAL (that is not depending on what the FIELDs are called in the specific case) can convert this into HTML like this:
<table ...>
<tr>
<td>
FIELD1
</td>
<td>
FIELD2
</td>
<td>
FIELD3
</td>
</tr>
<tr>
<td>
Donald Ball
</td>
<td>
23
</td>
<td>
The Illuminati do not exist.
This message paid for by the Illuminati.
</td>
</tr>
... other tr s ...
</table>
I can do it in the specific case where I know what the fields are called, but I dont want to make an xsl for each possible combination of fields. I cant find out how to go in and read the FIELD-names and put them in the first <tr></tr> - and what about writes xsl-matches for the FIELD-names when you dont know what they are.
Please help me. There must be someone that have solved this problem in general before.
Thanx