AW: date translation
Would be if only I need to change all the '/' into '.' -Ursprüngliche Nachricht- Von: Konstantin Piroumian [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 31. Januar 2003 08:57 An: [EMAIL PROTECTED] Betreff: Re: date translation Yes, that's it. Another option could be to use the XSLT translate() function if you only need to change all the '/' into '.' in your date string: . This way you can do it in XSLT. -- Konstantin - Original Message - From: "Scherler, Thorsten" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 30, 2003 20:28 Subject: AW: date translation Thanks! I found: http://xml.apache.org/cocoon1/xsp.html -Ursprüngliche Nachricht- Von: Joerg Heinicke [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 30. Januar 2003 17:57 An: [EMAIL PROTECTED] Betreff: Re: date translation Only a comment: Using is mostly not the optimum. It will create a Result Tree Fragment, where it is not needed. Using is shorter and is of a "normal" data type like node set, string or number. While working with strings it's only a question of conversions the processor has to do. But when working with node sets it can be really a problem: You can't operate on $any like on a node set. Only string operatrions are allowed. So for example "$any/path/to/a/node" is not possible. Another problem: ==> false ==> true You can't test that simply on the emptyness of a RTF, because it returns always true. You must explicitely convert it into a string via test="string($emptyRTF)". http://www.w3.org/TR/xslt#section-Result-Tree-Fragments So in general it's better to avoid RTFs. Regards, Joerg Scherler, Thorsten wrote: > Hello group, > > if anybody need a date translation, here it is: > > e.g. test.html?date=29.1.2003 (like we write in Germany) will be 1/29/2003. > > > > > > > ... > // > > King regards > > >>Mit freundlichem Gruss, >> >>Thorsten Scherler - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
Re: date translation
Yes, that's it. Another option could be to use the XSLT translate() function if you only need to change all the '/' into '.' in your date string: . This way you can do it in XSLT. -- Konstantin - Original Message - From: "Scherler, Thorsten" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 30, 2003 20:28 Subject: AW: date translation Thanks! I found: http://xml.apache.org/cocoon1/xsp.html -Ursprüngliche Nachricht- Von: Joerg Heinicke [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 30. Januar 2003 17:57 An: [EMAIL PROTECTED] Betreff: Re: date translation Only a comment: Using is mostly not the optimum. It will create a Result Tree Fragment, where it is not needed. Using is shorter and is of a "normal" data type like node set, string or number. While working with strings it's only a question of conversions the processor has to do. But when working with node sets it can be really a problem: You can't operate on $any like on a node set. Only string operatrions are allowed. So for example "$any/path/to/a/node" is not possible. Another problem: ==> false ==> true You can't test that simply on the emptyness of a RTF, because it returns always true. You must explicitely convert it into a string via test="string($emptyRTF)". http://www.w3.org/TR/xslt#section-Result-Tree-Fragments So in general it's better to avoid RTFs. Regards, Joerg Scherler, Thorsten wrote: > Hello group, > > if anybody need a date translation, here it is: > > e.g. test.html?date=29.1.2003 (like we write in Germany) will be 1/29/2003. > > > > > > > ... > // > > King regards > > >>Mit freundlichem Gruss, >> >>Thorsten Scherler - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
AW: date translation
Thanks! I found: http://xml.apache.org/cocoon1/xsp.html -Ursprüngliche Nachricht- Von: Joerg Heinicke [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 30. Januar 2003 17:57 An: [EMAIL PROTECTED] Betreff: Re: date translation Only a comment: Using is mostly not the optimum. It will create a Result Tree Fragment, where it is not needed. Using is shorter and is of a "normal" data type like node set, string or number. While working with strings it's only a question of conversions the processor has to do. But when working with node sets it can be really a problem: You can't operate on $any like on a node set. Only string operatrions are allowed. So for example "$any/path/to/a/node" is not possible. Another problem: ==> false ==> true You can't test that simply on the emptyness of a RTF, because it returns always true. You must explicitely convert it into a string via test="string($emptyRTF)". http://www.w3.org/TR/xslt#section-Result-Tree-Fragments So in general it's better to avoid RTFs. Regards, Joerg Scherler, Thorsten wrote: > Hello group, > > if anybody need a date translation, here it is: > > e.g. test.html?date=29.1.2003 (like we write in Germany) will be 1/29/2003. > > > > > select="substring-after($date,'.')"/> > select="substring-before($GETmonth_year,'.')"/> > select="substring-after($GETmonth_year,'.')"/> > ... > //select="$GETyear"/> > > King regards > > >>Mit freundlichem Gruss, >> >>Thorsten Scherler - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
Re: date translation
Only a comment: Using is mostly not the optimum. It will create a Result Tree Fragment, where it is not needed. Using is shorter and is of a "normal" data type like node set, string or number. While working with strings it's only a question of conversions the processor has to do. But when working with node sets it can be really a problem: You can't operate on $any like on a node set. Only string operatrions are allowed. So for example "$any/path/to/a/node" is not possible. Another problem: ==> false ==> true You can't test that simply on the emptyness of a RTF, because it returns always true. You must explicitely convert it into a string via test="string($emptyRTF)". http://www.w3.org/TR/xslt#section-Result-Tree-Fragments So in general it's better to avoid RTFs. Regards, Joerg Scherler, Thorsten wrote: Hello group, if anybody need a date translation, here it is: e.g. test.html?date=29.1.2003 (like we write in Germany) will be 1/29/2003. ... // King regards Mit freundlichem Gruss, Thorsten Scherler - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
AW: date translation
Hello Konstantin, I want to do the following: I produce reports from a database. e.g. select * from info_bericht where Info_datum = ## AND country ='' This is be done from a html form. e.g. France Italy Netherland Swiss The actual date of the has to be in the format e.g. 01/29/2003, but we are a company in Germany were we use this date format: 29.01.2003. So I would like to "translate" the 29.01.2003 into 01/29/2003 before I put it in the . SimpleDateFormat.parse() will do the job? I will try! // perform your date translation using any method you like, e.g. SimpleDateFormat.parse(), etc. Thanks a million! -Ursprüngliche Nachricht- Von: Konstantin Piroumian [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 30. Januar 2003 16:34 An: [EMAIL PROTECTED] Betreff: Re: date translation Please tell us what is the final target of your date translation and we'll try to advice something. In XSP you do it just the same way as in pure Java: // perform your date translation using any method you like, e.g. SimpleDateFormat.parse(), etc. -- Konstantin - Original Message - From: "Scherler, Thorsten" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 30, 2003 18:28 Subject: AW: date translation it is me again. How can I do it with xsp? -Ursprüngliche Nachricht- Von: Scherler, Thorsten Gesendet: Donnerstag, 30. Januar 2003 16:22 An: Cocoon-Users (E-Mail) Betreff: date translation Hello group, if anybody need a date translation, here it is: e.g. test.html?date=29.1.2003 (like we write in Germany) will be 1/29/2003. ... // King regards > Mit freundlichem Gruss, > > Thorsten Scherler > Marketing / Telefonmarketing > > Weidmüller GmbH & Co. > P.O. Box 2807 > 33058 Paderborn > Tel.:+ 49 - 5252-960-350 > Fax:+ 49 - 5252-960-116 > eMail: [EMAIL PROTECTED] > http://www.weidmueller.de > > - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
Re: date translation
Please tell us what is the final target of your date translation and we'll try to advice something. In XSP you do it just the same way as in pure Java: // perform your date translation using any method you like, e.g. SimpleDateFormat.parse(), etc. -- Konstantin - Original Message - From: "Scherler, Thorsten" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 30, 2003 18:28 Subject: AW: date translation it is me again. How can I do it with xsp? -Ursprüngliche Nachricht- Von: Scherler, Thorsten Gesendet: Donnerstag, 30. Januar 2003 16:22 An: Cocoon-Users (E-Mail) Betreff: date translation Hello group, if anybody need a date translation, here it is: e.g. test.html?date=29.1.2003 (like we write in Germany) will be 1/29/2003. ... // King regards > Mit freundlichem Gruss, > > Thorsten Scherler > Marketing / Telefonmarketing > > Weidmüller GmbH & Co. > P.O. Box 2807 > 33058 Paderborn > Tel.:+ 49 - 5252-960-350 > Fax:+ 49 - 5252-960-116 > eMail: [EMAIL PROTECTED] > http://www.weidmueller.de > > - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
AW: date translation
it is me again. How can I do it with xsp? -Ursprüngliche Nachricht- Von: Scherler, Thorsten Gesendet: Donnerstag, 30. Januar 2003 16:22 An: Cocoon-Users (E-Mail) Betreff: date translation Hello group, if anybody need a date translation, here it is: e.g. test.html?date=29.1.2003 (like we write in Germany) will be 1/29/2003. ... // King regards > Mit freundlichem Gruss, > > Thorsten Scherler > Marketing / Telefonmarketing > > Weidmüller GmbH & Co. > P.O. Box 2807 > 33058 Paderborn > Tel.:+ 49 - 5252-960-350 > Fax:+ 49 - 5252-960-116 > eMail: [EMAIL PROTECTED] > http://www.weidmueller.de > > - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
date translation
Hello group, if anybody need a date translation, here it is: e.g. test.html?date=29.1.2003 (like we write in Germany) will be 1/29/2003. ... // King regards > Mit freundlichem Gruss, > > Thorsten Scherler > Marketing / Telefonmarketing > > Weidmüller GmbH & Co. > P.O. Box 2807 > 33058 Paderborn > Tel.:+ 49 - 5252-960-350 > Fax:+ 49 - 5252-960-116 > eMail: [EMAIL PROTECTED] > http://www.weidmueller.de > > - 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>