cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Steffensen" <st...@brics.dk>
Subject General xsl'ing of SQL-query results
Date Thu, 16 Nov 2000 15:52:56 GMT
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

Mime
View raw message