You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Martin Bouman <M....@telecats.nl> on 2000/11/02 15:43:47 UTC

XML: SQL column names

Hello everyone!

I am using the XSP SQL TagLib to query a MySQL Database from within a
XML-file.
Now I would like to know how I can get the column names from a certain table
by means of a sql-query and put them in (sql-)variables without knowing how
many columns there are and what their names are.


Martin

Re: SQL column names

Posted by Rob van der Zeijden <r....@tiscon.de>.
> I am using the XSP SQL TagLib to query a MySQL Database from within a
> XML-file.
> Now I would like to know how I can get the column names from a certain table
> by means of a sql-query and put them in (sql-)variables without knowing how
> many columns there are and what their names are.


I used something like this:

<xsl:template match="ROWSET">
  <xsl:for-each select="(ROW[1]/*)">
    <xsl:value-of select="name()"/>
  </xsl:for-each>
</xsl:template>