You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christofer Dutz <ch...@danet.de> on 2000/09/01 16:35:08 UTC

Problems with XSP ... im desperate ...

Hi,

I'm sitting at a problem here for quite some time. What I want to do is create a XSL-file ( "page-xml.xsl" ) which simply adds login-information to the original page-tree and lets the resulting document be rendered by another XSL-file ( "page-html.xsl" ). So far so good. I've created my own Java-Library which contains all the classes I need for doing that.
At the moment my login information is simply an element called "user" which has the name of the current user as content. This element is added if the user in logedin. If the user is not logedin no element is added and the input and output data looks exactly the same ( except for the stylesheet name ) ...
This works fine if I input a static XML-file to the stylesheet but if I want a XSP-page to be processed by this stylesheet everything is stuffed.

This is wat my pages should do :
- page-html.xsl: this stylesheet displays a page indey around the real page content and at th bottom of the index there is a link. If the user is loged on ( a user-element exists ) it is a link to my logout.xml-page. If no user-element exists th user is not loged on and the link is a link to my logon.xml-page. ( This works fine )
- page-xml.xsl : here the original page is taken and some code is added for adding a user-element if the user is loged on. For doing this I add the appropriate processing-instructions which let the generated XSP-page be processed. ( This works fine )
- example for static page : my page text.xml simply contains a centance that says "everything OK". It gets correctly rendered and looks good ( even the login/logout link stuff works fine ).
-example for dynmic page : my login-page displays a form in which the user should enter name and password. This information is submitted to a pure logic XSP-Page processLogin.xml( the only HTML it generates is a redirect ). My login-page also displays any errors ( which are added to my session by processLogin ( "wrong password" ,"invalid user", ... ) ) For doing this I added some Code for checking any error-messages in my session-object )  ( This works fine aswell )

Everything works fine for itself and everything is fine for static pages but the dynamic stuff screws up whe I put i together. 
When I open login.xml cocoon takes hours and quits with an SAX-exception. I dont get the thing to work unless I comment out the library-include which is generated by page-xml.xsl Then login opens. When i access the page again cocoon complains that the libs arend defined so i uncomment the include again and now everything works. 
this works even if I delete the whole repository after every step.

What am I doing wrong ?



from New comer to Cocoon

Posted by Pratik Machchar <pr...@elitecore.com>.
Hi friends I am new to cocoon.
Can anybody please send me some realtime implemetion code in cocoon.
So that I can learn more on cocoon.

Thanks in Advance

Re: Problems with XSP ... im desperate ...

Posted by sudhi <su...@insage.com>.
Nope, there is no work around AFAIK.

Christofer Dutz wrote:
> 
> > Hi,
> > If I understand correctly, u r using xsp in xml as well as xsl right ?
> > If yes, u can't do two xsp passes, (u can't use xsp in both xml or xsl)
> > HTH
> > Sudhi
> What? .... but ... but ..... buhuhu .... snif ...
> 
> Is there A workaround ?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

Re: Problems with XSP ... im desperate ...

Posted by Christofer Dutz <ch...@danet.de>.
> Hi,
> If I understand correctly, u r using xsp in xml as well as xsl right ?
> If yes, u can't do two xsp passes, (u can't use xsp in both xml or xsl)
> HTH
> Sudhi
What? .... but ... but ..... buhuhu .... snif ...

Is there A workaround ?


Re: Problems with XSP ... im desperate ...

Posted by sudhi <su...@insage.com>.
Hi,
If I understand correctly, u r using xsp in xml as well as xsl right ?
If yes, u can't do two xsp passes, (u can't use xsp in both xml or xsl)
HTH
Sudhi


Christofer Dutz wrote:
> - page-xml.xsl : here the original page is taken and some code is
> added for adding a user-element if the user is loged on. For doing
> this I add the appropriate processing-instructions which let the
> generated XSP-page be processed. ( This works fine )

> -example for dynmic page : my login-page displays a form in which the
> user should enter name and password. This information is submitted to
> a pure logic XSP-Page processLogin.xml( the only HTML it generates is
> a redirect ). My login-page also displays any errors ( which are added
> to my session by processLogin ( "wrong password" ,"invalid user", ...
> ) ) For doing this I added some Code for checking any error-messages
> in my session-object )  ( This works fine aswell )
>