Re: sitemap and {session:locale} for i18n?

2003-02-27 Thread Enke, Michael
Stephane Amaudruz wrote:
> 
> First,a s you are using input module, you must ensure that they are declared
> in your Cocoon.xconf.
> 
> Second the session input module allows you to access session properties,
> such as creationTime, id, lastAccessedTime and so on.
> 
> I think that if you want to access attribute, you must use the session
> atribute input module instead.
>
> Hope this help.

Yes, that helped.
I never used input modules and didn't know that this are input modules.
For others interested: I use "{session-attr:locale}" where "session-attr"
is the name declared in cocoon.xconf for SessionAttributeModule
and locale is the session attribute.

Thank you,
Michael

> Steph.
> 
> SAM Development, Stephane Amaudruz
> E-Mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



sitemap and {session:locale} for i18n?

2003-02-25 Thread Enke, Michael
Hello,
I need some help with one issue concerning sitemap configuration:

I have this which is working well:

 
 
  
 
 


Somewhere earlier I created a session and LocaleAction is configured to save
the locale in the session. This is working. Now I want to
translate my abc.xml without the LocaleAction:

 
 
  
 
 

But this {session:locale} doesn't work.
Is this syntax wrong? Or not allowed?
I use 2.1 from early December.

Regards,
Michael

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: request:get-remote-user doesn't work?

2001-09-03 Thread Enke Michael

Ok, that may be.
I saw that also tomcat gives me "null" back (without authentication).

Michael

Ryan Worley wrote:
> 
> Is this after you have been authenticated via HTTP Basic authentication?  As
> far as I know, that's the only time the REMOTE_USER environmental variable
> will be set.
> 
> Ryan
> 
> ----- Original Message -
> From: "Enke Michael" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 03, 2001 3:39 AM
> Subject: request:get-remote-user doesn't work?
> 
> > Hi!
> > I try to use (from the request logicsheet) the get-remote-user tag.
> > But it returns always null (get-remote-address works well).
> > I tried it with Netscape 4.77 and konqueror under Linux and
> > with MSIE5 under Windows98.
> > I use tomcat 3.2.3 and cocoon2 from dev snapshot from middle of august.
> > Did anyone run into the same problem or has any suggestions?
> >
> > Thanks,
> > Michael
> >
> > -
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Protecting your XSP Code.

2001-09-03 Thread Enke Michael

I am also very interested in this topic.

Michael

Gerard Maas wrote:
> 
> Hi all,
> 
> I've a critical problem. We've been developing a product based on
> Cocoon1.8.x/XSP and Xforms for a while. Now, the time has come to
> deliver the first (beta) version to a potential customer for testing.
> Nevertheless, we're afraid of the delivery, as all our "knowledge" is
> encoded in the XSLT pages that produce XSP pages. We're using the Taglib
> paradigm, so we've: XML -> XSL -> XSP -> XSL -> HTML.  As you know, the
> first XSL contains the application code, while the second (last one) is
> the presentation layer.
> Delivering the first XSL will give them an open book of our code and
> techniques, making it very easy to plagiate.
> Knowing that Cocoon only needs to compile once the pages, is there a way
> I can make a "compiled" delivery, where I don't include the XSL and make
> my pages based on the .class files created in the repository?
> It's obvious that I've to clean up the .java from the repository as
> well.
> 
> Any ideas?
> 
> Thanks a lot!
> 
> Gerard.  (coming back to the list after a long break)
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




request:get-remote-user doesn't work?

2001-09-03 Thread Enke Michael

Hi!
I try to use (from the request logicsheet) the get-remote-user tag.
But it returns always null (get-remote-address works well).
I tried it with Netscape 4.77 and konqueror under Linux and
with MSIE5 under Windows98.
I use tomcat 3.2.3 and cocoon2 from dev snapshot from middle of august.
Did anyone run into the same problem or has any suggestions?

Thanks,
Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Q: DB-password clear text?

2001-08-28 Thread Enke Michael

Hi!
Is there a possibility or would it be
easy to implement to have the DB password
encrypted in some kind (in *.xsp or cocoon.xconf)?
This doesn't mean a state of the art
encryption (too complicated!?), but only
that not everybody can have direct access
to the database.

Regards,
Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Q: restricted access possible?

2001-08-28 Thread Enke Michael

Hi,
is it possible to restrict the access to a cocoon site
or parts of the site by the IP address of the originating
request? E.g. as parameter to sitemap.xmap?

Regards,
Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: how to view the generated xml ?

2001-08-27 Thread Enke Michael

Andrei Bejenaru wrote:
> 
> I would like to check the XML generated from a XSP. How can I do it?

Comment out the  tag in the
sitemap.
Depending on which browser you use you must view the source, that's the
xml.

Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [C2] Webapp directory for development...

2001-08-27 Thread Enke Michael

Per Kreipke wrote:
> ...
> 1. I could start with the entire contents of the WAR. But I'm wondering if
> the minimum set is:
> 
> - sitemap.xmap (and only the necessary portions of it)
> - cocoon.xconf (leave as is)
> - WEB-INF/web.xml (no changes)
> - WEB-INF/lib (leave as is or modify according do documentation on required
> libs)
> - WEB-INF/db (drop if HSQL isn't needed)
> 
> I don't see that anything else is needed to start a new Cocoon based webapp.
> It might be nice to have an Ant build target that builds a new directory
> (similar to the WAR target) but simpler.
> ...

That's true. But is it very useful to have
stylesheets/system/error2html.xsl
because otherwise if an error occurs inside your xml/xsp/xsl you have no
response what went wrong.

Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: separation of content and logic

2001-08-24 Thread Enke Michael

This is great. Thank you.
I'll try it during weekend ;-)

Michael

Max Larsson wrote:
> 
> Hi,
> 
> well here is my solution, which is completly serverside.
> Thus no javascript is needed.
> 
> First some description to the attached files.
> 
> menu.sql contains the sql command for postgresql 7.1.
> It has a table containing the sql tree, based on the
> nested set model from SQL for smarties. Then there are
> two views for easily getting the direct parent of a menu.
> Actually i would like to have one view does it, but couldn't
> achieve it. Any ideas or improvements are welcome.
> At last there are 4 methods for insert,delete and moving
> a child menu to be the first or last child of menu.
> 
> menu.xsp procuces a flat dump of the menu from the database.
> 
> menu2hier.xsl transforms a flat dump to a hierarchily menu.
> 
> menu2html.xsl transfomrs the hierarchily menu to html.
> 
> The configuration in the sitemap is the following:
> 
> 
>
> 
> 
> 
>  
> 
> 
>
> 
> 
> the Action menu-managment if the following:
> 
> public class MenuManagementAction extends
> AbstractComplementaryConfigurableAction {
> 
> public Map act( Redirector redirector,SourceResolver resolver,Map
> objectModel,String source,Parameters param ) throws Exception {
> getLogger().debug( "HelpDesk : MenuManagementAction/act : start" );
> 
> HashMap result  = new HashMap();
> HttpRequest request = (HttpRequest)objectModel.get(
> Constants.REQUEST_OBJECT );
> Session session = request.getSession();
> 
> getLogger().debug( "HelpDesk : MenuManagementAction/act : request object
> = " + request );
> getLogger().debug( "HelpDesk : MenuManagementAction/act : session object
> = " + session );
> 
> String id_add_str = request.getParameter( "addid" ) != null ?
> request.getParameter( "addid" ) : "0";
> String id_rem_str = request.getParameter( "remid" ) != null ?
> request.getParameter( "remid" ) : "0";
> String menu_ids = session.getAttribute( "menu_ids" ) != null ?
> (String)session.getAttribute( "menu_ids" ) : "$1$";
> 
> getLogger().debug( "HelpDesk : MenuManagementAction/act : add id string
> = " + id_add_str );
> getLogger().debug( "HelpDesk : MenuManagementAction/act : remove id
> string = " + id_rem_str );
> getLogger().debug( "HelpDesk : MenuManagementAction/act : show ids = " +
> menu_ids );
> 
> if( id_add_str.equals( "" ) )
>   id_add_str = "0";
> 
> int id_add = Integer.parseInt( id_add_str.trim() );
> 
> if( id_rem_str.equals( "" ) )
>   id_rem_str = "0";
> 
> int id_rem = Integer.parseInt( id_rem_str.trim() );
> 
> getLogger().debug( "HelpDesk : MenuManagementAction/act : add id int = "
> + id_add );
> getLogger().debug( "HelpDesk : MenuManagementAction/act : remove id int
> = " + id_rem );
> 
> // decompose
> Vector menu_ids_vec = new Vector();
> for( StringTokenizer tokens = new StringTokenizer(
> menu_ids.trim(),"$" );tokens.hasMoreTokens(); )
>   menu_ids_vec.add( (String)tokens.nextToken() );
> 
> // add
> if( id_add > 0 ) {
>   boolean found = false;
>   for( Enumeration ids = menu_ids_vec.elements();ids.hasMoreElements()
> && !found; ) {
> if( ((String)ids.nextElement()).equals( Integer.toString(
> id_add ) ) )
>   found = true;
>   }
> 
>   if( !found )
> menu_ids_vec.add( Integer.toString( id_add ) );
> }
> 
> // rem
> if( id_rem > 1 ) {
>   for( Enumeration ids =
> menu_ids_vec.elements();ids.hasMoreElements(); ) {
> String id = (String)ids.nextElement();
> 
> if( id.equals( Integer.toString( id_rem ) ) ) {
>   menu_ids_vec.removeElement( id );
>   break;
> }
>   }
> }
> 
> // compose
> menu_ids = "$";
> for( Enumeration ids = menu_ids_vec.elements();ids.hasMoreElements(); )
>   menu_ids += (String)ids.nextElement() + "$";
> 
> session.setAttribute( "menu_ids",menu_ids );
> result.put( "menu_ids",menu_ids );
> getLogger().debug( "HelpDesk : MenuManagementAction/act : show ids
> composed = " + menu_ids );
> 
> getLogger().debug( "HelpDesk : MenuManagementAction/act : result = " 
>+
> result );
> getLogger().debug( "HelpDesk : MenuManagementAction/act : end != 
>null" );
> 
> return Collections.unmodifiableMap( result );
> }
> }
> 
> And no some explainantion.
> The actions computes a session attribute menu_ids, which is even
> forwarded to the second stylesheet. It contains a $ seperated
> id from mneu table, which should be displayed expanded.
> 
> Have a lot of fun with it. It may not be the best solution, but i like
> it and suggestion and improvments are as stated welcome.
> 
> Max
> 
> Hi.,
>I appreciate if anyone is generous enough to share
> xsl code for building co

Re: [c2] Q: connect to postgresql

2001-08-23 Thread Enke Michael

Did you start the postmaster before starting tomcat? (or other engine)
Useful for debugging is WEB-INF/logs/cocoon.log

Michael

Christoph Kliemt wrote:
> 
> Hi!
> 
>  Problem : I'm not able to make connections to a postgresql-db
>  (unmodified samples)
>  (cocoon from cvs, branch cocoon_20_branch a few days ago).
> 
>  Exception is : (Yes, i read the faq and browsed the mail-archive...)
>  Could not get the datasource java.sql.SQLException: You cannot get a
>  Poolable before the pool is initialized
> 
>  Driver is loaded . (tomcat 3.2.1 is started with "JAVACMD=/opt/jdk/bin/java
>  -verbose:class" )
> 
>  web.xml :
>  
>   load-class
>
>  org.postgresql.Driver
>
>   
> 
>  
>
> jdbc:postgresql://localhost/ck
> ck
> 
> 
> 
>   cocoon.xconf :
>   
> 
>   
>   jdbc:postgresql://localhost/ck
>   ck
>   
> 
>   
> 
>   postgresql-db (7.1) is up and listens on its default port.
> 
>   netstat tells me that there is no attempt by cocoon to connect the
>   db.
> 
>   All this happens on a Linux-box with a jdk 1.3.0 from sun.
> 
>   So now i have two questions (maybe newbie questions...)
> 
>   1) What am i doing wrong in this special case?
>   2) Is there a way to make cocoon a bit more verbose so that it tells
>  me the reason why (in this case) it can't make a connection?
>  (Maybe this helps in other cases too...)
> 
>  \\// christoph
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Q: separation of content and logic

2001-08-22 Thread Enke Michael

Hi!
Everywhere in the Cocoon docs I lern that
it is the best to separate the content from the logic. Ok.

Now I want to generate a Menuestructure from database
entries in the way a filebrowser works, expand an entry on mouseclick,
on the second mouseclick collapse them (html links). 
My first guess was to use nested select statements
to only get those entries I want to show (expanded or collapsed).

As I thought further may be it would be better in the xsp
to always retrieve all items from the database
and then decide in the stylesheet which entries to
show and which not (e.g. by session attributes).
But in a xsl I cann't use 

My question: Do I have to write a "buildin" logicsheet?
Or is there another way to place  inside a stylesheet?
Or did somebody wrote a stylesheet which cares of such tasks
I want?

Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Need help with session:set-attribute

2001-08-22 Thread Enke Michael

Ok, thanks for the tip.
The problem was the timestamp on the session.xsl
soo the build.sh didn't recognize that src/.../session.xsl
was newer than build/cocoon/src/.../session.xsl
which had no ";"

Michael


Vadim Gritsenko wrote:
> 
> Enke,
> 
> Check session.xsl in cocoon.jar:
>   
> 
> 
>   XSPRequestHelper.setSessionAttribute(objectModel,
> String.valueOf(),
> 
>   );
> 
>   
> 
> Note: there is ";" after setSessionAttribute. If your copy does not have one - it's 
>time to upgrade.
> 
> Vadim
> 
> > -Original Message-
> > From: Enke Michael [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 22, 2001 10:27 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Need help with session:set-attribute
> >
> >
> > Ok, if I do this, I get also an error.
> > Now there is the semicolon missing!
> > The java file looks like:
> > ...
> > XSPObjectHelper.xspExpr(contentHandler,
> > XSPRequestHelper.getSessionId(objectModel));
> >
> >
> > this.contentHandler.endElement("", "session-id", "session-id");
> >
> >
> > this.characters("\n\n ");
> >
> > XSPRequestHelper.setSessionAttribute(objectModel,
> >  String.valueOf("fruit"),
> >
> >  ("apple")
> >         )
> > this.characters("\n ");
> >
> > XSPRequestHelper.invalidateSession(objectModel);
> > ...
> >
> > Michael
> >
> > Vadim Gritsenko wrote:
> > >
> > > Try
> > > name="fruit">"apple"
> > >
> > > Vadim
> > >
> > > > -Original Message-
> > > > From: Enke Michael [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, August 22, 2001 9:01 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Need help with session:set-attribute
> > > >
> > > >
> > > > Hello again,
> > > > I need some help with the session-logicsheet.
> > > > I try to set an attribute in a session
> > > > but I get always a compilation error.
> > > >
> > > > Here is my xsp:
> > > > 
> > > >
> > > >  > > >   xmlns:xsp="http://apache.org/xsp";
> > > >   xmlns:session="http://apache.org/xsp/session/2.0";
> > > > >
> > > >
> > > > 
> > > >  
> > > >
> > > >  apple
> > > >  
> > > > 
> > > > 
> > > >
> > > > I create a session, try to set an attribute and destroy the session.
> > > > In the generted java file I see:
> > > > ...
> > > > XSPRequestHelper.setSessionAttribute(objectModel,
> > > >  String.valueOf("fruit"),
> > > >  this.characters("apple");
> > > > )
> > > > ...
> > > >
> > > > For shure the semicolon must move behind the last right parenthesis.
> > > > As I saw, the session.xsl didn't change since May so this must be my
> > > > fault.
> > > > But where???
> > > >
> > > > Regards,
> > > > Michael
> > > >
> > > > -
> > > > Please check that your question has not already been answered in the
> > > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.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/faqs.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/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Need help with session:set-attribute

2001-08-22 Thread Enke Michael

Ok, if I do this, I get also an error.
Now there is the semicolon missing!
The java file looks like:
...
XSPObjectHelper.xspExpr(contentHandler,
XSPRequestHelper.getSessionId(objectModel));
 
 
this.contentHandler.endElement("", "session-id", "session-id");
 
 
this.characters("\n\n ");
 
XSPRequestHelper.setSessionAttribute(objectModel,
 String.valueOf("fruit"),
 
 ("apple")
)
this.characters("\n ");
 
XSPRequestHelper.invalidateSession(objectModel);
...

Michael

Vadim Gritsenko wrote:
> 
> Try
> name="fruit">"apple"
> 
> Vadim
> 
> > -Original Message-
> > From: Enke Michael [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 22, 2001 9:01 AM
> > To: [EMAIL PROTECTED]
> > Subject: Need help with session:set-attribute
> >
> >
> > Hello again,
> > I need some help with the session-logicsheet.
> > I try to set an attribute in a session
> > but I get always a compilation error.
> >
> > Here is my xsp:
> > 
> >
> >  >   xmlns:xsp="http://apache.org/xsp";
> >   xmlns:session="http://apache.org/xsp/session/2.0";
> > >
> >
> > 
> >  
> >
> >  apple
> >  
> > 
> > 
> >
> > I create a session, try to set an attribute and destroy the session.
> > In the generted java file I see:
> > ...
> > XSPRequestHelper.setSessionAttribute(objectModel,
> >  String.valueOf("fruit"),
> >  this.characters("apple");
> > )
> > ...
> >
> > For shure the semicolon must move behind the last right parenthesis.
> > As I saw, the session.xsl didn't change since May so this must be my
> > fault.
> > But where???
> >
> > Regards,
> > Michael
> >
> > -
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Need help with session:set-attribute

2001-08-22 Thread Enke Michael

Hello again,
I need some help with the session-logicsheet.
I try to set an attribute in a session
but I get always a compilation error.

Here is my xsp:

 
http://apache.org/xsp";
  xmlns:session="http://apache.org/xsp/session/2.0";
>
 

 
 
 apple
 



I create a session, try to set an attribute and destroy the session.
In the generted java file I see:
...
XSPRequestHelper.setSessionAttribute(objectModel,
 String.valueOf("fruit"),
 this.characters("apple");
)
...

For shure the semicolon must move behind the last right parenthesis.
As I saw, the session.xsl didn't change since May so this must be my
fault.
But where???

Regards,
Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: AW: session-invalidator and back-button?

2001-08-16 Thread Enke Michael

konqueror is ignoring both ;-(

Jörn Heid wrote:
> 
> As I know there are two meta-tags.
> The one with expires and another with nocache.
> 
> Perhaps it works if you are using both.
> 
> JOERN_HEID
> ...

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: session-invalidator and back-button?

2001-08-16 Thread Enke Michael

Thank you for the hint, I never used this.
It works.
But: konqueror (KDE webbrowser) seems not to care
about "expires". This confused me awhile.

Michael

java guru wrote:
> 
> Hi.,
>   Correct me if i am wrong...why not use page
> expiration time in http headers?..
> 
>  --- "Morrison, John" <[EMAIL PROTECTED]>
> wrote: > If you use the javascript:location.replace (I
> > *think* that's what its
> > called) I don't *believe* that the new page is added
> > to the history...
> >
> > > -Original Message-
> > > From: Enke Michael
> > [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, 16 August 2001 1:54 pm
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: session-invalidator and back-button?
> > >
> > >
> > > But if I use e-mail or banking over internet,
> > > it is not possible to get the last page back.
> > > And there is no extra window, the back button is
> > selectable.
> > > The server answers that an error occured or that
> > > I have to login again.
> > >
> > > Is there a way in cocoon other than spawning
> > another browser window?
> > >
> > > Michael
> > >
> > > Adrian Geissel wrote:
> > > >
> > > > Hi Michael,
> > > >
> > > > I believe that the only way to solve such an
> > issue is to
> > > 'run' the protected
> > > > portion of your website in a spawned browser
> > window, and
> > > then when the user
> > > > log's out, to close that window. This will
> > ensure that the
> > > Back history,
> > > > which is local to a browser window, cannot be
> > access with
> > > permission.
> > > >
> > > > Hope that this helps,
> > > > Adrian
> > > >
> > > > - Original Message -
> > > > From: Enke Michael
> > <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Thursday, August 16, 2001 11:46 AM
> > > > Subject: session-invalidator and back-button?
> > > >
> > > > > Hi,
> > > > > I tryed the web-application demo from cocoon2
> > > > > where a login and logout can be performed.
> > > > > But after logout if I press the back button of
> > my browser
> > > > > I get back into protected area without
> > authorization.
> > > > > How can this be avoided?
> > > > >
> > > > > Michael
> > > > >
> > > > >
> > >
> >
> -
> > > > > Please check that your question has not
> > already been
> > > answered in the
> > > > > FAQ before posting.
> > <http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html>
> > >
> > > To unsubscribe, e-mail:
> > <[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <[EMAIL PROTECTED]>
> > >
> >
> >
> >
> ===
> > Information in this email and any attachments are
> > confidential, and may
> > not be copied or used by anyone other than the
> > addressee, nor disclosed
> > to any third party without our permission.  There is
> > no intention to
> > create any legally binding contract or other
> > commitment through the use
> > of this email.
> >
> > Experia

Re: session-invalidator and back-button?

2001-08-16 Thread Enke Michael

But if I use e-mail or banking over internet,
it is not possible to get the last page back.
And there is no extra window, the back button is selectable.
The server answers that an error occured or that
I have to login again.

Is there a way in cocoon other than spawning another browser window?

Michael

Adrian Geissel wrote:
> 
> Hi Michael,
> 
> I believe that the only way to solve such an issue is to 'run' the protected
> portion of your website in a spawned browser window, and then when the user
> log's out, to close that window. This will ensure that the Back history,
> which is local to a browser window, cannot be access with permission.
> 
> Hope that this helps,
> Adrian
> 
> - Original Message -
> From: Enke Michael <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 16, 2001 11:46 AM
> Subject: session-invalidator and back-button?
> 
> > Hi,
> > I tryed the web-application demo from cocoon2
> > where a login and logout can be performed.
> > But after logout if I press the back button of my browser
> > I get back into protected area without authorization.
> > How can this be avoided?
> >
> > Michael
> >
> > -
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




session-invalidator and back-button?

2001-08-16 Thread Enke Michael

Hi,
I tryed the web-application demo from cocoon2
where a login and logout can be performed.
But after logout if I press the back button of my browser
I get back into protected area without authorization.
How can this be avoided?

Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: esql and UnsupportedEncodingException - patch proposal

2001-08-09 Thread Enke Michael

Arnaud Bienvenu wrote:
> 
> Oops, I found Michael's patch has a drawback : if you apply it and then you
> do not use the encoding attribute (i.e. ), then you have
> an error :
> Exception java.io.UnsupportedEncodingException is never thrown in the body
> of the corresponding try statement.
> 
> So finally the solution I posted at the beginning of this thread may be
> better.
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


Yes, thats right, shame on me.
But the solution: Don't catch UnsupportedEncodingException but only
Exception.
Than it is working. Here ones more the patch:

Index:
./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
===
RCS file:
/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl,v
retrieving revision 1.16
diff -u -r1.16 esql.xsl
---
./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl   
2001/08/06 15:38:57 1.16
+++
./src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl   
2001/08/09 15:26:48
@@ -636,6 +636,8 @@
   
 
   } catch (Exception _esql_exception__2) {}
+} catch(Exception e) {
+  throw new RuntimeException(e.toString());
 }
 if (_esql_queries.empty()) {
   _esql_query = null;

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: esql and UnsupportedEncodingException - patch proposal

2001-08-09 Thread Enke Michael

Hi,
on tuesday I posted this patch to cocoon-dev,
seems to be equivalent with yours:


Hi,
I'd like to use 
but for the encoding we have to catch
java.io.UnsupportedEncodingException
These exception is not catched yet.
Because I have no access to cvs I post the patch as
diff -u esql.xsl.orig esql.xsl

Regards,
Michael




--- esql.xsl.orig   Tue Aug  7 16:25:16 2001
+++ esql.xslTue Aug  7 16:23:13 2001
@@ -637,6 +637,9 @@
 
   } catch (Exception _esql_exception__2) {}
 }
+catch(java.io.UnsupportedEncodingException e) {
+  throw new RuntimeException(e.toString());
+}
 if (_esql_queries.empty()) {
   _esql_query = null;
 } else {


Arnaud Bienvenu wrote:
> 
> With latest CVS Cocoon2, if you specify the encoding attribute within
>  or  tags, you have to enclose your tags
> inside a try/catch structure because they may throw
> java.io.UnsupportedEncodingException.
> 
> At the end of this mail you will find a patch to workaround this problem. I
> don't know if it's a good or clean job, but it's very useful for me, so I
> post it to you.
> 
> For example, the tedious
> 
>   try {
> 
>   } catch (java.io.UnsupportedEncodingException e) {
> System.out.prinln("Grumpf");
>   }
> 
> 
> Becomes merely
> 
> 
> Info : you need to set the encoding so that special characters will be
> correctly fetched (i.e. accentuated letters in latin languages)
> 
> Index: src/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl
> ===
> RCS file: 
>/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl,v
> retrieving revision 1.5
> diff -u -r1.5 xsp.xsl
> --- src/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl   2001/07/23 
>23:33:45 1.5
> +++ src/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl   2001/08/08 
>14:37:14
> @@ -37,6 +37,7 @@
> 
>  import java.io.File;
>  import java.io.StringReader;
> +import java.io.UnsupportedEncodingException;
>  //import java.net.*;
>  import java.util.Date;
>  import java.util.List;
> @@ -98,7 +99,7 @@
>  /**
>  * Generate XML data.
>  */
> -  public void generate() throws SAXException {
> +  public void generate() throws SAXException, UnsupportedEncodingException {
>  this.contentHandler.startDocument();
>  AttributesImpl xspAttr = new AttributesImpl();
> 
> --
> Arnaud Bienvenu
> http://www.generasound.com/

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: strange Language Exception

2001-08-02 Thread Enke Michael

Thank you very much for the explanation and solution of my problem!
Michael

Vadim Gritsenko wrote:
>  ...
> And here is the solution:
>  can not be used this way when it immediately netsted in ,
> and this is done so to enable interoperability with other stylesheets. An example of
> correct usage would be something like:
> 
> 
>   
> String result = "";
> if(result.equals("")){
>   
> }else{
>   result = ;
> }else{
>   result = result;
> }
>   
>   result
> 
> 
> Hope I described this clear enough,
> 
> Vadim
> ...

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: strange Language Exception

2001-08-01 Thread Enke Michael

Vadim Gritsenko wrote:
> 
> Send your test_error_xsp.java which is found under Cocoon's work directory.
> 
> Vadim
> 
> > -Original Message-----
> > From: Enke Michael [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 01, 2001 5:10 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: strange Language Exception
> >
> >
> > This happened with Cocoon0730041508
> >
> > Regards,
> > Michael
> >
> ...

Here it comes.
Greetings,
Michael





package org.apache.cocoon.www.file_.home.me.reports.calypso_actual.reports;

import java.io.File;
import java.io.StringReader;
//import java.net.*;
import java.util.Date;
import java.util.List;
import java.util.Stack;

//import org.w3c.dom.*;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;

//import org.apache.avalon.framework.*;
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.component.ComponentSelector;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.excalibur.datasource.DataSourceComponent;
//import org.apache.avalon.framework.util.*;

import org.apache.cocoon.Constants;
import org.apache.cocoon.components.parser.Parser;
import org.apache.cocoon.generation.Generator;
//import org.apache.cocoon.util.*;

import org.apache.cocoon.components.language.markup.xsp.XSPGenerator;
import org.apache.cocoon.components.language.markup.xsp.XSPObjectHelper;
import org.apache.cocoon.components.language.markup.xsp.XSPRequestHelper;
import org.apache.cocoon.components.language.markup.xsp.XSPResponseHelper;


/* User Imports */


/**
 * Generated by XSP. Edit at your own risk, :-)
 */
public class test_error_xsp extends XSPGenerator {

  static {
dateCreated = 996679264449L;
dependencies = new File[]{
   };
  }

  /* Built-in parameters available for use */
  // context- ServletContext
  // request- HttpServletRequest
  // response   - HttpServletResponse
  // parameters - parameters defined in the sitemap

  /* User Class Declarations */


  /**
  * Generate XML data.
  */
  public void generate() throws SAXException {
this.contentHandler.startDocument();
AttributesImpl xspAttr = new AttributesImpl();



this.contentHandler.startPrefixMapping("xsp", "http://apache.org/xsp";);

this.contentHandler.startPrefixMapping("i18n", 
"http://apache.org/cocoon/i18n/2.0";);


this.contentHandler.startElement("", "page", "page", xspAttr);

xspAttr.clear();


this.characters("\n ");


this.contentHandler.startElement("", "result", "result", xspAttr);

xspAttr.clear();


this.characters("\n ");

String result = "_d";
if (result.equals("_d")) {


  this.contentHandler.startElement("http://apache.org/cocoon/i18n/2.0";,
   "date", "i18n:date", xspAttr);

  xspAttr.clear();



  this.contentHandler.endElement("http://apache.org/cocoon/i18n/2.0";,
 "date", "i18n:date");


} else {


  (result)
}

this.characters("\n ");


this.contentHandler.endElement("", "result", "result");


this.characters("\n");


this.contentHandler.endElement("", "page", "page");


this.contentHandler.endPrefixMapping("xsp");

this.contentHandler.endPrefixMapping("i18n");


this.contentHandler.endDocument();
  }
}





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

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


Re: strange Language Exception

2001-08-01 Thread Enke Michael

This happened with Cocoon0730041508

Regards,
Michael

Vadim Gritsenko wrote:
> 
> Do you have this problem with latest CVS version?
> 
> I think that this is already fixed in CVS.
> 
> Thanks,
> Vadim
> 
> > -Original Message-
> > From: Enke Michael [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 31, 2001 3:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: xsp: strange Language Exception
> >
> >
> > Hi folks,
> > I have a question which I cann't answer myself and maybe
> > it is an error I have found?
> >
> > Lock at this few lines:
> > 
> > 
> >
> >  >   xmlns:xsp="http://apache.org/xsp";
> >   xmlns:i18n="http://apache.org/cocoon/i18n/2.0"; encoding="UTF-8"
> > >
> >
> > 
> >  
> >String result = "_d";
> >if(result.equals("_d")) {
> >  
> >   
> >  
> >}
> >else {
> >  
> >   result
> >  
> >}
> >  
> > 
> > 
> > 
> > It is without much sense but I wanted to concentrate on the effect.
> > In the if and else branch (in real life I have much more else if
> > branches)
> > I must repeat the  and  elements in each branch.
> >
> > My idea was to put only one  before  and
> > only one  behind 
> > But than I get these Exception:
> >
> > DEBUG   99660   [cocoon  ] (/calypso/test_error)
> > Thread-22/ProgramGeneratorImpl: Language Exception
> > org.apache.cocoon.components.language.LanguageException: Error compiling
> > test_error_xsp:
> > Line 107, column 6:  Invalid expression statement.
> > Line 107, column 14:  ';' expected.
> > at
> > 
>org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:203)
> > at
> > 
>org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage
> > .java:140)
> > at
> > 
>org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:276)
> > at
> > 
>org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:184)
> > at
> > 
>org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:153)
> > at
> > 
>org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
> > ...
> >
> > Does anybody know if this is my problem because I didn't read deep
> > enough
> > into the documentation or is this a cocoon problem?
> >
> > Regards,
> > Michael
> >
> > -
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




xsp: strange Language Exception

2001-07-31 Thread Enke Michael

Hi folks,
I have a question which I cann't answer myself and maybe
it is an error I have found?

Lock at this few lines:


 
http://apache.org/xsp";
  xmlns:i18n="http://apache.org/cocoon/i18n/2.0"; encoding="UTF-8"
>
 

 
   String result = "_d";
   if(result.equals("_d")) {
 
  
 
   }
   else {
 
  result
 
   }
 



It is without much sense but I wanted to concentrate on the effect.
In the if and else branch (in real life I have much more else if
branches)
I must repeat the  and  elements in each branch.

My idea was to put only one  before  and
only one  behind 
But than I get these Exception:

DEBUG   99660   [cocoon  ] (/calypso/test_error)
Thread-22/ProgramGeneratorImpl: Language Exception
org.apache.cocoon.components.language.LanguageException: Error compiling
test_error_xsp:
Line 107, column 6:  Invalid expression statement.
Line 107, column 14:  ';' expected.
at
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:203)
at
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:140)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:276)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:184)
at
org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:153)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
...

Does anybody know if this is my problem because I didn't read deep
enough
into the documentation or is this a cocoon problem?

Regards,
Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: future plans? Made it partly now!

2001-07-31 Thread Enke Michael

Hi Konstantin, hi Marcus,
thank you for your response.
I have added some lines of code to I18nTransformer.java
and tested: ok. It is attached to this mail.
May be you (and others) find it useful and it will find the way
into the release. That is the first time I contribute somthing,
so I don't know how to checkin. That's why I post it here.
I post the whole file because I don't know if somebody has changed
this file since Cocoon0730041508.

!!! For people who are reading this and want's to play with
the attached file but have not the latest Dev-Snapshot:
The i18n configuration has changed.
sitemap.xmap and dictionary are different to C2b2!!!
But it is well documented in the source code.

1) !!! Now we are incompatible with earlier versions !!!
   I changed  so we get now only the date.
   I introduced  for time.
   I didn't introduce  because it is
   the same as  
2) I added a style attribute for date and time:
   
   available values for style: "short","medium","long","full"
   all other will throw an exception.
3) I added a little bit of documentation in the source.

One question about my third topic: different locales for e.g.
currencies: You wrote that it could be better to use xsl to
format currencies. But than I have to provide for each locale
a different xsl file because the locale, currency sign and the
separators are hard wired:
>  decimal-separator="." grouping-separator=","/>
> 
So what would you say about changing the
 to

  1234 

If I can do this in this way and add an attribute 'locale',
where can I effectively insert it: In
public void setup(SourceResolver resolver, Map objectModel, String
source,
  Parameters parameters)
or in the formatXXX for every element???

Another question: actually the value for sub-type currency must be
written
with a comma.  (with a
dot)
doesn't work correctly (only 1 is in the output).
Was that wilful?

Best regards,
Michael

"Piroumian, Konstantin" wrote:
> 
> Hi!
> 
> > Hi,
> > does anybody knows if i18n will be extended in the future
> > or has some undocumented features?
> 
> Currently, I am busy with my work project and don't have much time for
> i18nTransformer. It's open source and you are free to extend it. I hope to
> be a little more free in a week or two then I can do it myself.
> 
> > I have some needs and I wonder that I'm the first one (?)
> > who think and ask about this:
> 
> No, I thought of all this features when I was implementing the transformer,
> but it seems that not many people is interested in it and you are the first
> or the second one who asked about new features.
> 
> > 1) I need more control over  e.g. I need a parameter
> >to specify DateFormat.SHORT, MEDIUM, LONG or FULL.
> 
> Ok.
> 
> > 2) I would like to have more control over date and time: Make it
> >separate, for instance as date the actual date
> >but the time hard wired.
> >So it should give a parameter for selecting analog to java:
> >getDateInstance(), getTimeInstance() or getDateTimeInstance()
> 
> Yes, a pair of tags can be added for that:
> 
> 
> 
> 
> > 2) In the same page I need more than one currency.
> >I think about a parameter to specify a different then the default
> >locale.
> 
> Yes, I thought of this too. I think that every i18n element must have a
> possibility to specify its own locale:
> 
> 
> 
> 
> > I know that I can do this inside a xsp but ...
> 
> You can do it also in XSLT and in some cases it would be better. E.g. for
> currency format you can use   decimal-separator="." grouping-separator=","/> declaratation, then use it
> like this:
> 
> 
> 
> The problem with i18n tranformer is that you cannot use objects as
> arguments. This is not possible now with a transformer:
> 
>  or  value="java:dateVariable" />
> 
> Anyway, thank you for your suggestions and feel free to contact me for any
> questions about i18n transformer.
> 
> P.S. Marcus Crafter <[EMAIL PROTECTED]> is now working on
> the i18n transformer, i18n dictionaries and locale selection, so I think
> that you can ask him about this too.
> 
> >
> > Regards,
> > Michael
> >
> 
> Best regards,
> 
> Konstantin Piroumian
> Software engineer
> 
> Protek Flagship LLC
> Phone: + 7 095 795 0520 (add. 1288)
> Fax: + 7 095 795 0525
> E-mail: [EMAIL PROTECTED]
> http://www.protek.com



/**
 
 * Copyright (C) The Apache Software Foundation. All rights reserved.*
 * - *
 * This software is published under the terms of the Apache Software License *
 * version 1.1, a copy of which has been included  with this distribution in *
 * the LICENSE file. *
 
 */
package org.apache.cocoon.transformation;

import org.apache.cocoon.ProcessingException;
import org.apache.coco

i18n: future plans?

2001-07-30 Thread Enke Michael

Hi,
does anybody knows if i18n will be extended in the future
or has some undocumented features?
I have some needs and I wonder that I'm the first one (?)
who think and ask about this:
1) I need more control over  e.g. I need a parameter
   to specify DateFormat.SHORT, MEDIUM, LONG or FULL.
2) I would like to have more control over date and time: Make it
   separate, for instance as date the actual date
   but the time hard wired.
   So it should give a parameter for selecting analog to java:
   getDateInstance(), getTimeInstance() or getDateTimeInstance()
2) In the same page I need more than one currency.
   I think about a parameter to specify a different then the default
   locale.
I know that I can do this inside a xsp but ...

Regards,
Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-30 Thread Enke Michael

Torsten Curdt wrote:
> Have a closer look - it is not a resultset. it's the
> result of the resultset.execute().
Oh yes, my miss.

> Could you grab the current version from CVS and send me your
> esql page and output. Up to know I cannot reproduce your problems...


Hi Torsten,
I got the snapshot from July 30th, 04:15 and run into the same problem.
One more problem is that if no rows are selected I even don't get the
header and footer in the output.
Here is my esql.xsp:

==

 
http://apache.org/xsp";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";
>
 


 my_pool
 
  select name, number
   from employee
  
  
   
EmpName
EmpNumber
   
   

 

   
   
no Values available
   
   copyright
  
 

 

 

==

And here the xsl:
==

 
http://www.w3.org/1999/XSL/Transform";
  version="1.0"
>
 

 
  
   
   ,
   
   
   

,


   
   
   
  
 

 

==


The output from Cocoon-2.0b1 was this if rows are selected:
==

EmpName
   ,
   EmpNumberKing
,
1Scott
,
2Smith
,
3Tiger
,
4

copyright


==


and if NO rows are selected:
==

EmpName
   ,
   EmpNumber
no Values available
copyright


==


The output from Cocoon-2.0b2 and also for the actual snapshot
is this, if rows are selected:
==

EmpName
   ,
   EmpNumberKing
,
1Scott
,
2Smith
,
3Tiger
,
4
no Values available
copyright


==


and if NO rows are selected - header, noValues and footer is missing
==


   ,
   




==

I hope that you have any idea why this happens only to me.
I use tomcat 3.2.3 with lib/parser.jar copied from
xml-cocoon/lib/xerces_1_4_1.jar, Linux (SuSE 7.1) with
SDK2 version 1.3 and I removed regularly the work-directory

With best regards,
Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-28 Thread Enke Michael

Actually I use the esql.xsl coming with the Cocoon-2.0b2,
1.4.2.5 2001/07/24 11:37:57
but I inserted at line 532 the else brunch which you have posted.
Maybe the lines 521-523 are the problem because
"esql:no-resluts" will be called after each last row.

>From line 504 it looks like this:
  if (_esql_query.results) {
do {
  _esql_query.resultset = _esql_query.statement.getResultSet();
  _esql_query.resultset_metadata =
_esql_query.resultset.getMetaData();
  _esql_query.position = 0;
  if (_esql_connection.use_limit_clause == 0 &&
_esql_query.skip_rows > 0) {
while (_esql_query.resultset.next()) {
  _esql_query.position++;
  if (_esql_query.position == _esql_query.skip_rows) {
break;
  }
}
  }
 
  if (_esql_query.resultset.next()) {

  }
  else {

  }
 
  _esql_query.resultset.close();
} while(_esql_query.statement.getMoreResults());
  } else {
_esql_query.position = _esql_query.statement.getUpdateCount();
if (_esql_query.position >= 0) {
  
}
else{
  
}
  }
  _esql_query.statement.close();

By the way is line 504 correct?
if(_esql_query.results)
Because this is a ResultSet and not a boolean, don't should it
compare against null? Or is this not pure java?

Regards,
Michael


Torsten Curdt wrote:
> 
> > Hi Thorsten,
> > I followed the discussion about esql:no-results
> > In the beta1 release it was ok, if no rows
> > the no-results content was in the tree, otherwise not.
> > But now it is inverted.
> > With beta2 also after applying your patch to esql.xsl
> > I get the content of no-results if the query returns results
> > and the no-results content is not in the tree in case of
> > really no results.
> >
> > There is one other point confusing me: in esql.xsd I find:
> > 
> >  
> >   This element's children are instantiated in the result
> > tree for each row in the resultset
> >  
> > 
> >
> > For each row?
> > Did I misunderstand the meaning of no-results?
> 
> No, you did not. (a bug in the docuentation ;)
> Maybe could tell me which revision of esql.xsl you
> have? Works everything fine here...
> 
> regards
> --
> Torsten

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-27 Thread Enke Michael

Hi Thorsten,
I followed the discussion about esql:no-results
In the beta1 release it was ok, if no rows
the no-results content was in the tree, otherwise not.
But now it is inverted.
With beta2 also after applying your patch to esql.xsl
I get the content of no-results if the query returns results
and the no-results content is not in the tree in case of
really no results.

There is one other point confusing me: in esql.xsd I find:

 
  This element's children are instantiated in the result
tree for each row in the resultset
 


For each row?
Did I misunderstand the meaning of no-results?

Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>