cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Vinueza M." <car...@ecuadorexplorer.com>
Subject SQLProcessor and WML problem
Date Fri, 31 Mar 2000 07:28:30 GMT
Hi, guys
I´m designing an application with WML and MySQL.
Cocoon and SQLProcessor work really cool, but now I have a stupid
problem that I´m not able to solve yet...
The thing is that the user has to type a value (an ID number) in the
first card, and then in the next one with that value I will have to
build my select to show the result, but the thing is that I´m really
confused in how to build the code with the xsl and the xml files to get
the number.

This is what I have now:


-----the xml file-----

<?xml version="1.0" encoding="iso-8859-1"?>
<?cocoon-process type="sql"?>
<?xml-stylesheet href="http://xx.xx.xx.xx/wap/res2.xsl"
type="text/xsl"?>
<?cocoon-process type="xslt"?>
<page>
 <connectiondefs>
  <connection name="www_odbc">
   <driver>org.gjt.mm.mysql.Driver</driver>
   <dburl>jdbc:mysql://xx.xx.xx.xx/myDB</dburl>
  </connection>
 </connectiondefs>
 <query connection="www_odbc">
  select icc from icc_search where id='1712907870'  //HERE´S THE NUMBER
THAT I HAVE TO GET FROM THE USER
 </query>
</page>


------------XSL page------------

<?xml version="1.0"?>
<!--Veamos si funciona rapido-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:template match="page">
  <xsl:processing-instruction
name="cocoon-format">type="text/wml"</xsl:processing-instruction>
  <wml>

   <card id="index" title="ICC">
    <p align="center">
      To pay: <xsl:apply-templates select="ROWSET">
      </xsl:apply-templates>
    </p>
   </card>
   </wml>
   </xsl:template>
</xsl:stylesheet>


With this I know that Cocoon and SQLProcessor work, ´cause I can see the
card in the phone with the result but the user never input anything yet
The problem is that I don´t how to define the xsl and the xml to create
a first card that can get the number from the user and after that pass
this value to the next card to build the select and generate the final
card

I know that maybe this is an out of topic question but I hope someone
can help me with this

Thank you

BTW   CocOON is GREAT!!!!!!

--
Computers let you make More mistakes faster
than any other invention in human history
with the possible exception of handguns and tequila.


cArLos  8-)



Mime
View raw message