You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andre Taube <an...@attbi.com> on 2003/02/15 10:44:16 UTC

MySQL date conversion with modular database action

Any pointers on how to convert a date before it's inserted into MySQL
database while using cocoon's Modular Database Action?

I tried

<value name="start_date" type="date">
    <mode name="attribute"
parameter="org.apache.cocoon.components.modules.input.DateMetaInputModule:st
art_date[0]" type="attrib"/>
</value>

It seems this "mode" parameter is being ignored.

Any suggestions?

Thank you!


Re: R: MySQL date conversion with modular database action

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Christian Haul dijo:
> On 17.Feb.2003 -- 03:31 PM, Marco Taiuti wrote:
>> I have a DatabaseAction with the followed descriptor
>>
>> <?xml version="1.0"?>
>> <tabelle>
>> 	<connection>line_db</connection>
>> 	<table name="t_news">
>> 		<keys>
>> 			<key param="numprg" dbcol="numprg" type="int" mode="manual"/>
>> 		</keys>
>> 		<values>
>> 			<value param="datpub" dbcol="datpub" type="date" >
>>       </value>
>> 		</values>
>> 	</table>
>> </tabelle>
>>
>> How i can use the DateMetaInputModule or DateInputModule to format
>> date "datpub" to 'dd/MM/yyyy'?
>> Thanks,
>
> Short answer: Since you apparently do not use the "modular" database
> actions, you cannot.
>
> Long answer: There are two sets of database actions: one set in
> org.apache.cocoon.acting and another one in
> org.apache.cocoon.acting.modular They are similar to a great deal but
> differ in details. Configuration files from the "original" actions can
> mostly be used with the "modular" ones.
>
> Formating the date is an output issue, which is not handled by the
> actions. At least in case of the modular actions, they return a java
> date object, not a string. Parsing input data is an issue. Of my head I
> believe both Date*Module take a format parameter that is expected to
> conform to the SimpleDateFormat specs. See javadocs for details.

More info at: http://wiki.cocoondev.org/Wiki.jsp?page=DatabaseActions

Antonio Gallardo
>
> 	Chris.
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: R: MySQL date conversion with modular database action

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 17.Feb.2003 -- 03:31 PM, Marco Taiuti wrote:
> I have a DatabaseAction with the followed descriptor
> 
> <?xml version="1.0"?>
> <tabelle>
> 	<connection>line_db</connection>
> 	<table name="t_news">
> 		<keys>
> 			<key param="numprg" dbcol="numprg" type="int" mode="manual"/>
> 		</keys>
> 		<values>
> 			<value param="datpub" dbcol="datpub" type="date" >
>       </value>
> 		</values>
> 	</table>
> </tabelle>
> 
> How i can use the DateMetaInputModule or DateInputModule to format date
> "datpub" to 'dd/MM/yyyy'?
> Thanks,

Short answer: Since you apparently do not use the "modular" database
actions, you cannot.

Long answer: There are two sets of database actions: one set in
org.apache.cocoon.acting and another one in
org.apache.cocoon.acting.modular They are similar to a great deal but
differ in details. Configuration files from the "original" actions
can mostly be used with the "modular" ones.

Formating the date is an output issue, which is not handled by the
actions. At least in case of the modular actions, they return a java
date object, not a string. Parsing input data is an issue. Of my head
I believe both Date*Module take a format parameter that is expected to
conform to the SimpleDateFormat specs. See javadocs for details.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


R: MySQL date conversion with modular database action

Posted by Marco Taiuti <ma...@plangroup.it>.
I have a DatabaseAction with the followed descriptor

<?xml version="1.0"?>
<tabelle>
	<connection>line_db</connection>
	<table name="t_news">
		<keys>
			<key param="numprg" dbcol="numprg" type="int" mode="manual"/>
		</keys>
		<values>
			<value param="datpub" dbcol="datpub" type="date" >
      </value>
		</values>
	</table>
</tabelle>

How i can use the DateMetaInputModule or DateInputModule to format date
"datpub" to 'dd/MM/yyyy'?
Thanks,
Marco

> -----Messaggio originale-----
> Da: Christian Haul [mailto:haul@dvs1.informatik.tu-darmstadt.de]
> Inviato: lunedi 17 febbraio 2003 9.54
> A: cocoon-users@xml.apache.org
> Oggetto: Re: MySQL date conversion with modular database action
>
>
> On 15.Feb.2003 -- 01:44 AM, Andre Taube wrote:
> > Any pointers on how to convert a date before it's inserted into MySQL
> > database while using cocoon's Modular Database Action?
> >
> > I tried
> >
> > <value name="start_date" type="date">
> >     <mode name="attribute"
> >
> parameter="org.apache.cocoon.components.modules.input.DateMetaInpu
> tModule:start_date[0]"
> >           type="attrib"/>
> > </value>
> >
> > It seems this "mode" parameter is being ignored.
>
> Hi. You don't include all involved configuration lines so let's
> analyse only the above mode element:
>
> @name -> use the input module known as "attribute". This used to be
>          the one operating on request attributes. This has been
> 		 renamed to "request-attr" for default configurations.
>          Make sure there is an input modules with short-hand
> 		 "attribute"!
>
> @parameter -> interpretation depends on the input module used. Not all
>          modules accept this parameter. For the request attribute
> 		 module, this is the name of the request attribute to use
> 		 instead of the one actually passed to the getAttribute()
> 		 method. The default name generated by the database
> actions is
> 		 "table.column"
> 		 Make sure that this attribute exists and contains a
> 		 compatible value!
>
> @type -> By placing XML-attributes "others-mode" or
>          "autoincrement-mode" to the <table/> elements inside the
> 		 <table-set/> elements, different modes can be
> selected. This
> 		 mode is only used when the table in the table-set has the
> 		 XML-attribute others-mode="attrib"
> 		 Make sure that this is the case!
>
> But I reckon that you really wanted to write
>
> <value name="start_date" type="date">
>    <!-- if "attrib" is requested, convert string to a Date using the
>         date conversion module -->
>    <mode name="datemeta" type="attrib">
>       <!-- pass the following as attribute name to the nested module -->
>       <parameter>start_date</parameter>
>       <!-- use the request parameter module to obtain the string -->
>       <input-module name="request-param"/>
>    </mode>
> </value>
>
> or the like.
>
> BTW if you were using a recent snapshot (of either branch), then you
> might not need to convert a string to a date if it is a valid SQL date
> representation.
>
> 	Chris.
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: MySQL date conversion with modular database action

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 19.Feb.2003 -- 11:45 AM, Andre Taube wrote:
> Still the same:
> 
> DEBUG   (2003-02-19) 12:28.28:239   [sitemap.action.DatabaseUpdateAction]
> (/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
> column pcm_contract.contract_status from request-param using getAttribute
> method
> 

OK, let's look at the samples for the database actions. Let's add a
date column to user:

   alter table add column since date;

(use org.hsqldb.util.DatabaseManager to connect to the server at port
9002 to do this or edit cocoondb.script accordingly)

Change database.xml: (Note: a typo prevented specifying parameter and
format like below. Update the Date*Module.java files from CVS -- don't
update everything yet, Stefano is tweaking the build system and you
might not be able to build a new CVS version right away.)

   <table name="user" alias="user">
      <keys>
         <key name="uid" type="int" autoincrement="true">
            <mode name="auto"  type="autoincr"/>
         </key>
      </keys>
      <values>
         <value name="name"      type="string"></value>
         <value name="firstname" type="string"></value>
         <value name="uname"     type="string"></value>

		 <!-- this is new -->
         <value name="since"     type="date">
           <mode name="datemeta" type="all">
             <parameter>user.since</parameter>
             <format>MM/dd/yy</format>
             <input-module name="request-param"/>
           </mode>
         </value>

         <!-- end new stuff -->

      </values>   
   </table>


I have used the @type="all" here, since I alway want to convert dates
here.

Add the following to user-list.xsp:

    <since>
      <esql:get-date column="since" format="MM/dd/yy"/>
    </since>

and

    <since>
      <input type="text" name="user.since" size="20" maxsize="20">
        <xsp:attribute name="value"><!-- <xsp-request:get-parameter default="" name="user.uname"/> --></xsp:attribute>
      </input>
    </since>

I trust you figure out where to add this ;-)

Please veryfy that this does indeed work for you.

Now, let's look at the other issue: using a different mode for an
operation. Look at the following table-set

   <table-set name="user+groups">
      <table name="user"/>
      <table name="user_groups" others-mode="attrib"/>
   </table-set>

and compare with the table definition below

   <table name="user_groups">
      <keys>
         <key name="uid" type="int">
            <mode name="request-param" type="request"/>
            <mode name="request-attr"  type="attrib">
               <parameter>org.apache.cocoon.components.modules.output.OutputModule:user.uid[0]</parameter>
            </mode>
         </key>
         <key name="gid" type="int" set="master">
            <mode name="request-param" type="all"/>
         </key>
      </keys>
   </table>

Now, look at sitemap.log (note: default recently switched to log level
ERROR, make sure you have set log level in web.xml and logkeit.xconf
to DEBUG)

 DatabaseAction: modeTypes : {1=attrib, 2=request-attr, 0=autoincr}

this line shows that we are really using "attrib" for others-mode,
"request-attr" for output and "autoincr" for autoincrement columns
(when inserting)

 DatabaseAction: i=0
 DatabaseAction: requested mode was "attrib" returning "attrib"

this shows that we're indeed requesting "attrib" as mode for the first
column (-> user_groups.uid) and that it was found.

 DatabaseAction: i=1
 DatabaseAction: requested mode was "attrib" returning "all"

again, "attrib" was requested but "all" is found (first) thus the mode
with @type="all" is used for column 2 (-> user_groups.gid)

 DatabaseAction: query: INSERT INTO user_groups (uid, gid) VALUES (?, ?)
 DatabaseAction: Trying to set column user_groups.uid from request-attr using getAttribute method
 DatabaseAction: Setting column user_groups.uid [0] 6
 DatabaseAction: Trying to set column user_groups.gid from request-param using getAttributeValues method
 DatabaseAction: Setting column user_groups.gid [0] 0
 DatabaseAction: ====> row no. 0
 DatabaseAction: Setting column user_groups.uid[0] to 6
 DatabaseAction: Setting column user_groups.gid[0] to 0
 DefaultComponentFactory: ComponentFactory decommissioning instance of org.apache.cocoon.acting.modular.DatabaseAddAction.

HTH

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


RE: MySQL date conversion with modular database action

Posted by Andre Taube <an...@attbi.com>.
Still the same:

DEBUG   (2003-02-19) 12:28.28:239   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.contract_status from request-param using getAttribute
method


> -----Original Message-----
> From: Christian Haul [mailto:haul@informatik.tu-darmstadt.de]
> Sent: Wednesday, February 19, 2003 11:32 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: MySQL date conversion with modular database action
>
>
> Andre Taube wrote:
> > It still does not work.
>
> > 		<table name="pcm_contract" others-mode="attribute"/>
>                                                          =========
>
> > 				<mode name="datemeta" type="attrib">
>                                                              =======
> This does not match!
>
> 	Chris.
>
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>      fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: MySQL date conversion with modular database action

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Andre Taube wrote:
> It still does not work.

> 		<table name="pcm_contract" others-mode="attribute"/>
                                                         =========

> 				<mode name="datemeta" type="attrib">
                                                             =======
This does not match!

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: MySQL date conversion with modular database action

Posted by Andre Taube <an...@attbi.com>.
It still does not work.

descriptor:

	<table-set name="pcm_contract">
		<table name="pcm_contract" others-mode="attribute"/>
	</table-set>


	<table name="pcm_contract" alias="pcm_contract">
		<keys>
			<key name="id" type="int" autoincrement="true">
				<mode name="auto" type="autoincr"/>
			</key>
		</keys>

		<values>
			<value name="contract_name"	type="string"></value>
			<value name="contract_type"	type="int"></value>
			<value name="contract_code"	type="string"></value>
			<value name="job_number"	type="string"></value>
			<value name="misc_code"		type="string"></value>
			<value name="start_date"	type="date">
				<mode name="datemeta" type="attrib">
					<parameter>pcm_contract.start_date</parameter>
					<format>MM/dd/yyyy</format>
					<input-module name="request-param"/>
			   </mode>
			</value>
			<value name="end_date"		type="date">
				<mode name="datemeta" type="attrib">
					<parameter>pcm_contract.end_date</parameter>
					<format>MM/dd/yyyy</format>
					<input-module name="request-param"/>
			   </mode>
			</value>
			<value name="contract_status"	type="int"></value>
		</values>
	</table>


and the log is:

DEBUG   (2003-02-19) 11:22.42:540   [sitemap]
(/pcm/contract_admin.contract.html) Thread-9/DefaultComponentFactory:
ComponentFactory creating new instance of
org.apache.cocoon.acting.modular.DatabaseUpdateAction.
DEBUG   (2003-02-19) 11:22.42:541   [sitemap]
(/pcm/contract_admin.contract.html) Thread-9/DefaultComponentFactory: logger
attribute is sitemap.action.DatabaseUpdateAction
DEBUG   (2003-02-19) 11:22.42:543   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html)
Thread-9/AbstractComplementaryConfigurableAction: Using cached configuration
for contract_descriptor.xml
DEBUG   (2003-02-19) 11:22.42:547   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: modeTypes :
{2=request-attr, 1=others, 0=autoincr}
DEBUG   (2003-02-19) 11:22.42:548   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: i=0
DEBUG   (2003-02-19) 11:22.42:549   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: i=1
DEBUG   (2003-02-19) 11:22.42:550   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: i=2
DEBUG   (2003-02-19) 11:22.42:551   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: i=3
DEBUG   (2003-02-19) 11:22.42:552   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: i=4
DEBUG   (2003-02-19) 11:22.42:553   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: i=5
DEBUG   (2003-02-19) 11:22.42:554   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: i=6
DEBUG   (2003-02-19) 11:22.42:555   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: i=7
DEBUG   (2003-02-19) 11:22.42:556   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: i=8
DEBUG   (2003-02-19) 11:22.42:557   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: query: UPDATE
pcm_contract SET contract_name= ?, contract_type= ?, contract_code= ?,
job_number= ?, misc_code= ?, start_date= ?, end_date= ?, contract_status= ?
WHERE id= ?
DEBUG   (2003-02-19) 11:22.42:558   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.id from request-param using getAttribute method
DEBUG   (2003-02-19) 11:22.42:559   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.id [0] 17
DEBUG   (2003-02-19) 11:22.42:560   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.contract_name from request-param using getAttribute
method
DEBUG   (2003-02-19) 11:22.42:561   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_name [0] Qwerty 123123
DEBUG   (2003-02-19) 11:22.42:562   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.contract_type from request-param using getAttribute
method
DEBUG   (2003-02-19) 11:22.42:563   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_type [0] 1
DEBUG   (2003-02-19) 11:22.42:564   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.contract_code from request-param using getAttribute
method
DEBUG   (2003-02-19) 11:22.42:565   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_code [0] QWERTY 123123
DEBUG   (2003-02-19) 11:22.42:566   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.job_number from request-param using getAttribute method
DEBUG   (2003-02-19) 11:22.42:566   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.job_number [0] ABC DEF
DEBUG   (2003-02-19) 11:22.42:567   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.misc_code from request-param using getAttribute method
DEBUG   (2003-02-19) 11:22.42:568   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.misc_code [0] 123123
DEBUG   (2003-02-19) 11:22.42:569   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.start_date from request-param using getAttribute method
DEBUG   (2003-02-19) 11:22.42:570   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.start_date [0] 02/03/2003
DEBUG   (2003-02-19) 11:22.42:571   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.end_date from request-param using getAttribute method
DEBUG   (2003-02-19) 11:22.42:572   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.end_date [0] 02/03/2003
DEBUG   (2003-02-19) 11:22.42:573   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.contract_status from request-param using getAttribute
method
DEBUG   (2003-02-19) 11:22.42:574   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_status [0] 0
DEBUG   (2003-02-19) 11:22.42:575   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: ====> row no. 0
DEBUG   (2003-02-19) 11:22.42:576   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_name[0] to Qwerty 123123
DEBUG   (2003-02-19) 11:22.42:577   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_type[0] to 1
DEBUG   (2003-02-19) 11:22.42:579   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_code[0] to QWERTY 123123
DEBUG   (2003-02-19) 11:22.42:580   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.job_number[0] to ABC DEF
DEBUG   (2003-02-19) 11:22.42:582   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.misc_code[0] to 123123
DEBUG   (2003-02-19) 11:22.42:583   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.start_date[0] to 02/03/2003
DEBUG   (2003-02-19) 11:22.42:585   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Rolling back
transaction. Caused by null
DEBUG   (2003-02-19) 11:22.42:599   [sitemap]
(/pcm/contract_admin.contract.html) Thread-9/DefaultComponentFactory:
ComponentFactory decommissioning instance of
org.apache.cocoon.acting.modular.DatabaseUpdateAction.


Thanks for your help!
Andre

> -----Original Message-----
> From: Christian Haul [mailto:haul@informatik.tu-darmstadt.de]
> Sent: Tuesday, February 18, 2003 9:46 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: MySQL date conversion with modular database action
>
>
> Andre Taube wrote:
>
> <snip/>
>
>  > Trying to set column pcm_contract.start_date from request-param using
> getAttribute method
>  > Setting column pcm_contract.start_date [0] 2/9/2003
>
> This shows cleanly that you haven't requested the "attribute" mode here.
> Please check your table set!
>
> 	Chris.
>
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>      fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: MySQL date conversion with modular database action

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Andre Taube wrote:

<snip/>

 > Trying to set column pcm_contract.start_date from request-param using 
getAttribute method
 > Setting column pcm_contract.start_date [0] 2/9/2003

This shows cleanly that you haven't requested the "attribute" mode here. 
Please check your table set!

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: MySQL date conversion with modular database action

Posted by Andre Taube <an...@attbi.com>.
I am running the latest cocoon that I got from the CVS.

My table descriptor is

        <table name="pcm_contract" alias="pcm_contract">
                <keys>
                        <key name="id" type="int" autoincrement="true">
                                <mode name="auto" type="autoincr"/>
                        </key>
                </keys>

                <values>
                        <value name="contract_name"
type="string"></value>
                        <value name="contract_type"     type="int"></value>
                        <value name="contract_code"
type="string"></value>
                        <value name="job_number"
type="string"></value>
                        <value name="misc_code"
type="string"></value>
                        <value name="start_date"        type="date">
                                <mode name="datemeta"   type="attribute">
                                        <!-- pass the following as attribute
name to the nested module -->

<parameter>pcm_contract.start_date</parameter>
                                        <!-- use the request parameter
module to obtain the string -->
                                        <input-module name="request-param"
format="MM/dd/yyyy">
                           </mode>
                        </value>
                        <value name="end_date"          type="date">
                                <mode name="datemeta" type="attribute">
                                        <!-- pass the following as attribute
name to the nested module -->

<parameter>pcm_contract.end_date</parameter>
                                        <!-- use the request parameter
module to obtain the string -->
                                        <input-module name="request-param"
format="MM/dd/yyyy"/>
                           </mode>
                        </value>
                        <value name="contract_status"   type="int"></value>
                </values>
        </table>


And my logs only show:

DEBUG   (2003-02-18) 09:24.53:804   [sitemap]
(/pcm1/contract_admin.contract.html) Thread-26/DefaultComponentFactory:
ComponentFactory creating new instance of
org.apache.cocoon.acting.modular.DatabaseUpdateAction.
DEBUG   (2003-02-18) 09:24.53:805   [sitemap]
(/pcm1/contract_admin.contract.html) Thread-26/DefaultComponentFactory:
logger attribute is sitemap.action.DatabaseUpdateAction
DEBUG   (2003-02-18) 09:24.53:807   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html)
Thread-26/AbstractComplementaryConfigurableAction: Using cached
configuration for contract_admin/contract_descriptor.xml
DEBUG   (2003-02-18) 09:24.53:823   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: modeTypes :
{2=request-attr, 1=others, 0=autoincr}
DEBUG   (2003-02-18) 09:24.53:843   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: i=0
DEBUG   (2003-02-18) 09:24.53:845   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: i=1
DEBUG   (2003-02-18) 09:24.53:846   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: i=2
DEBUG   (2003-02-18) 09:24.53:847   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: i=3
DEBUG   (2003-02-18) 09:24.53:848   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: i=4
DEBUG   (2003-02-18) 09:24.53:849   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: i=5
DEBUG   (2003-02-18) 09:24.53:851   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: i=6
DEBUG   (2003-02-18) 09:24.53:852   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: i=7
DEBUG   (2003-02-18) 09:24.53:853   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: i=8
DEBUG   (2003-02-18) 09:24.53:855   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: query: UPDATE
pcm_contract SET contract_name= ?, contract_type= ?, contract_code= ?,
job_number= ?, misc_code= ?, start_date= ?, end_date= ?, contract_status= ?
WHERE id= ?
DEBUG   (2003-02-18) 09:24.53:857   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.id from request-param using getAttribute method
DEBUG   (2003-02-18) 09:24.53:859   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.id [0] 19
DEBUG   (2003-02-18) 09:24.53:860   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.contract_name from request-param using getAttribute
method
DEBUG   (2003-02-18) 09:24.53:861   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_name [0] Date Test
DEBUG   (2003-02-18) 09:24.53:862   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.contract_type from request-param using getAttribute
method
DEBUG   (2003-02-18) 09:24.53:863   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_type [0] 1
DEBUG   (2003-02-18) 09:24.53:864   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.contract_code from request-param using getAttribute
method
DEBUG   (2003-02-18) 09:24.53:865   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_code [0] TEMP 123
DEBUG   (2003-02-18) 09:24.53:866   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.job_number from request-param using getAttribute method
DEBUG   (2003-02-18) 09:24.53:867   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.job_number [0]
DEBUG   (2003-02-18) 09:24.53:868   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.misc_code from request-param using getAttribute method
DEBUG   (2003-02-18) 09:24.53:869   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.misc_code [0]
DEBUG   (2003-02-18) 09:24.53:870   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.start_date from request-param using getAttribute method
DEBUG   (2003-02-18) 09:24.53:871   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.start_date [0] 2/9/2003
DEBUG   (2003-02-18) 09:24.53:872   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.end_date from request-param using getAttribute method
DEBUG   (2003-02-18) 09:24.53:873   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.end_date [0] 2/9/2003
DEBUG   (2003-02-18) 09:24.53:874   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.contract_status from request-param using getAttribute
method
DEBUG   (2003-02-18) 09:24.53:875   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_status [0] 1
DEBUG   (2003-02-18) 09:24.53:876   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: ====> row no.
0
DEBUG   (2003-02-18) 09:24.53:877   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_name[0] to Date Test
DEBUG   (2003-02-18) 09:24.53:919   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_type[0] to 1
DEBUG   (2003-02-18) 09:24.53:922   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_code[0] to TEMP 123
DEBUG   (2003-02-18) 09:24.53:928   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.job_number[0] to
DEBUG   (2003-02-18) 09:24.53:930   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.misc_code[0] to
DEBUG   (2003-02-18) 09:24.53:932   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.start_date[0] to 2/9/2003
DEBUG   (2003-02-18) 09:24.53:940   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Rolling back
transaction. Caused by null
DEBUG   (2003-02-18) 09:24.53:975   [sitemap]
(/pcm1/contract_admin.contract.html) Thread-26/DefaultComponentFactory:
ComponentFactory decommissioning instance of
org.apache.cocoon.acting.modular.DatabaseUpdateAction.


Thanks!!!

> -----Original Message-----
> From: Christian Haul [mailto:haul@informatik.tu-darmstadt.de]
> Sent: Tuesday, February 18, 2003 3:18 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: MySQL date conversion with modular database action
>
>
> Andre Taube wrote:
> > Thanks, that's exactly what I need.  However, my date is in MM/dd/YYYY
> > format, how could I pass a format string to the
> DateMetaInputModule?  API
> > says: "Configuration options: child element "input-module"
> holds InputModule
> > to obtain the string from, attribute "format" to "input-module"
> that holds a
> > java.text.SimpleDateFormat format string"
> >
> > but the following does not work for me:
> >
> > <value name="start_date" type="date">
> >    <!-- if "attrib" is requested, convert string to a Date using the
> >         date conversion module -->
> >    <mode name="datemeta" type="attrib">
> >       <!-- pass the following as attribute name to the nested module -->
> >       <parameter>start_date</parameter>
>          <format>MM/dd/YYYY</format>
> >       <!-- use the request parameter module to obtain the string -->
>          <input-module name="request-param"/>
> >    </mode>
> > </value>
>
> If this doesn't work, make sure that a) you are running a recent
> snapshot (either branch) and b) include complete file (i.e. table-set)
> and logs showing invokation of your action.
>
> 	Chris.
>
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>      fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: MySQL date conversion with modular database action

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Andre Taube wrote:
> Thanks, that's exactly what I need.  However, my date is in MM/dd/YYYY
> format, how could I pass a format string to the DateMetaInputModule?  API
> says: "Configuration options: child element "input-module" holds InputModule
> to obtain the string from, attribute "format" to "input-module" that holds a
> java.text.SimpleDateFormat format string"
> 
> but the following does not work for me:
> 
> <value name="start_date" type="date">
>    <!-- if "attrib" is requested, convert string to a Date using the
>         date conversion module -->
>    <mode name="datemeta" type="attrib">
>       <!-- pass the following as attribute name to the nested module -->
>       <parameter>start_date</parameter>
         <format>MM/dd/YYYY</format>
>       <!-- use the request parameter module to obtain the string -->
         <input-module name="request-param"/>
>    </mode>
> </value>

If this doesn't work, make sure that a) you are running a recent 
snapshot (either branch) and b) include complete file (i.e. table-set) 
and logs showing invokation of your action.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: MySQL date conversion with modular database action

Posted by Andre Taube <an...@attbi.com>.
Thanks, that's exactly what I need.  However, my date is in MM/dd/YYYY
format, how could I pass a format string to the DateMetaInputModule?  API
says: "Configuration options: child element "input-module" holds InputModule
to obtain the string from, attribute "format" to "input-module" that holds a
java.text.SimpleDateFormat format string"

but the following does not work for me:

<value name="start_date" type="date">
   <!-- if "attrib" is requested, convert string to a Date using the
        date conversion module -->
   <mode name="datemeta" type="attrib">
      <!-- pass the following as attribute name to the nested module -->
      <parameter>start_date</parameter>
      <!-- use the request parameter module to obtain the string -->
      <input-module name="request-param" format="MM/dd/YYYY"/>
   </mode>
</value>



> -----Original Message-----
> From: Christian Haul [mailto:haul@dvs1.informatik.tu-darmstadt.de]
> Sent: Monday, February 17, 2003 12:54 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: MySQL date conversion with modular database action
>
>
> On 15.Feb.2003 -- 01:44 AM, Andre Taube wrote:
> > Any pointers on how to convert a date before it's inserted into MySQL
> > database while using cocoon's Modular Database Action?
> >
> > I tried
> >
> > <value name="start_date" type="date">
> >     <mode name="attribute"
> >
> parameter="org.apache.cocoon.components.modules.input.DateMetaInpu
> tModule:start_date[0]"
> >           type="attrib"/>
> > </value>
> >
> > It seems this "mode" parameter is being ignored.
>
> Hi. You don't include all involved configuration lines so let's
> analyse only the above mode element:
>
> @name -> use the input module known as "attribute". This used to be
>          the one operating on request attributes. This has been
> 		 renamed to "request-attr" for default configurations.
>          Make sure there is an input modules with short-hand
> 		 "attribute"!
>
> @parameter -> interpretation depends on the input module used. Not all
>          modules accept this parameter. For the request attribute
> 		 module, this is the name of the request attribute to use
> 		 instead of the one actually passed to the getAttribute()
> 		 method. The default name generated by the database
> actions is
> 		 "table.column"
> 		 Make sure that this attribute exists and contains a
> 		 compatible value!
>
> @type -> By placing XML-attributes "others-mode" or
>          "autoincrement-mode" to the <table/> elements inside the
> 		 <table-set/> elements, different modes can be
> selected. This
> 		 mode is only used when the table in the table-set has the
> 		 XML-attribute others-mode="attrib"
> 		 Make sure that this is the case!
>
> But I reckon that you really wanted to write
>
> <value name="start_date" type="date">
>    <!-- if "attrib" is requested, convert string to a Date using the
>         date conversion module -->
>    <mode name="datemeta" type="attrib">
>       <!-- pass the following as attribute name to the nested module -->
>       <parameter>start_date</parameter>
>       <!-- use the request parameter module to obtain the string -->
>       <input-module name="request-param"/>
>    </mode>
> </value>
>
> or the like.
>
> BTW if you were using a recent snapshot (of either branch), then you
> might not need to convert a string to a date if it is a valid SQL date
> representation.
>
> 	Chris.
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: MySQL date conversion with modular database action

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 15.Feb.2003 -- 01:44 AM, Andre Taube wrote:
> Any pointers on how to convert a date before it's inserted into MySQL
> database while using cocoon's Modular Database Action?
> 
> I tried
> 
> <value name="start_date" type="date">
>     <mode name="attribute" 
>           parameter="org.apache.cocoon.components.modules.input.DateMetaInputModule:start_date[0]" 
>           type="attrib"/>
> </value>
> 
> It seems this "mode" parameter is being ignored.

Hi. You don't include all involved configuration lines so let's
analyse only the above mode element:

@name -> use the input module known as "attribute". This used to be
         the one operating on request attributes. This has been
		 renamed to "request-attr" for default configurations.
         Make sure there is an input modules with short-hand
		 "attribute"!

@parameter -> interpretation depends on the input module used. Not all
         modules accept this parameter. For the request attribute
		 module, this is the name of the request attribute to use
		 instead of the one actually passed to the getAttribute()
		 method. The default name generated by the database actions is
		 "table.column"
		 Make sure that this attribute exists and contains a
		 compatible value!

@type -> By placing XML-attributes "others-mode" or
         "autoincrement-mode" to the <table/> elements inside the
		 <table-set/> elements, different modes can be selected. This
		 mode is only used when the table in the table-set has the
		 XML-attribute others-mode="attrib"
		 Make sure that this is the case!

But I reckon that you really wanted to write

<value name="start_date" type="date">
   <!-- if "attrib" is requested, convert string to a Date using the
        date conversion module -->
   <mode name="datemeta" type="attrib">
      <!-- pass the following as attribute name to the nested module -->
      <parameter>start_date</parameter>
      <!-- use the request parameter module to obtain the string -->
      <input-module name="request-param"/>
   </mode>
</value>

or the like.

BTW if you were using a recent snapshot (of either branch), then you
might not need to convert a string to a date if it is a valid SQL date
representation. 

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>