sql, xml & forms

Subject: sql, xml & forms
From: "Kari M. Scott" <kmscott@xxxxxxxxxxxxxxxx>
Date: Tue, 7 Mar 2000 12:07:46 -0600 (CST)

I'm trying to pass the results of a sql query in an xml file to a variable
in my xsl stylesheet using the xsl:variable element and plugging the
variable into a form and I'm not having any luck discovering the correct
syntax. If someone has any simple examples of using xml with forms or
examples of the xsl:variable element they could send me, I'd really
appreciate it.  Or, here are my xml and xsl files; what am I doing wrong?  
Thanks in advance.


<?xml version="1.0" encoding="iso-8859-1"?>

<?cocoon-process type="sql"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="form.xsl" type="text/xsl"?>

<title>Passing Variables</title>
  <connection name="foo_connection">

 <query connection="foo_connection" doc-element="CATEGORY"
        select child_name from cat_children

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

  <xsl:template match="page">
      <xsl:value-of select="title"/>
    <body bgcolor="#ffffff">
        <form action="results.xml" method="post">
          <BR>Please select a category:</BR>
          <xsl:apply-templates select="CATEGORY"/>
          <P><input type="submit" value="Submit"></P>

  <xsl:template match="CATEGORY">
    <xsl:apply-templates select="ROW">

  <xsl:template match="ROW">
    <xsl:variable name="category">
    <INPUT TYPE="RADIO" NAME="category" VALUE="{$category}"/>{$category}


Kari M. Scott
5520 Research Park Drive
Madison, WI  53711-5377
608.288.3000 ext. 1223
608.298.1223 direct dial
608.288.3037 fax

Berbee...putting the E in business

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread