Re: AW: Not handle the XML header in the sax parser

2003-02-06 Thread Heiko Milke
Hey Jan

Am Don, 2003-02-06 um 18.03 schrieb Jan Harms:
> Well, that´s basically what the IncludeXMLConsumer (in package 
>org.apache.cocoon.xml) does, doesn´t it? 
> It additionally ignores the startDTD() and endDTD() methods.
> 
> Regards,
> 
> -Jan
> 


didnt know :)

Thanks for the hint !
Heiko


-
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: Not handle the XML header in the sax parser

2003-02-06 Thread Heiko Milke
Hey there,

well actually i dont recommend doing that but here is a way to do it.

You simple write yourself a documenthandler transmitter or whatever you
call it (i named it FragmentHandler in the Example):P

--
public class FragmentHandler implements ContentHandler {

ContentHandler parent = null;
public FragmentHandler(ContentHandler parent) {
this.parent = parent;
}
}
--


you have to implement ALL memberfunction of the ContentHandler interface
and send all the events to the parent like this.

--
public void characters(char[] ch, int start, int length) throws
SAXException {
parent.characters( ch,  start,  length);
}
--

and in the last step you simply catch the startDocument and endDocument
events and dont tell the parent 


BUT like i said i'd only use it for testing. You never know which
complications you can get into with this =))


Greetings Heiko



Am Don, 2003-02-06 um 11.00 schrieb Lionel Crine:
> I'm using the avalon component sax parser and I parse a string value. but 
> it returns
> the header .
> 
> I don't want it because the String value is inline in the document :
> 
> here is what I have in my browser :
> 
> 
> 
> 
> http://apache.org/xsp"; 
> xmlns:ixia-query="http://www.ixiasoft.com/ixia/query/1.0";>
> 
> 
> 
>
> 
> 
> 
> 
> 
> How do I not handle the header during the parsing ? 
> 
> 
> -
> 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]>




IRC, SILC

2003-02-03 Thread Heiko Milke
Hey folks,

is there any channel on IRCNet or SILCNET for cocoon?

Heiko Milke


-
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: [POLL] JDK 1.2 Support

2003-02-02 Thread Heiko Milke
using 1.3.1 and above



-
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: Accessing session variables in the sitemap.xmap

2003-01-31 Thread Heiko Milke
Hello Marco,

thank you very much for your reply. It is a bit irretating that you
can't read something from the session that was set to it earlier in a
serverpage (while working on the same request) but i'll have to live
with it.

Now I wrote an action that does the talking to the session and it works
fine. The serverpages just lost some of their value for me. I was so
happy with the XMLFragment implementation of mine working out so well
but if session modifications are delayed to the next page request 

Gn8 Heiko!


Am Fre, 2003-01-31 um 20.07 schrieb Marco Rolappe:
> hi heiko,
> 
> please have a look at:
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16246
> 
> this explains why the session created in an XSP is not visible later in the
> pipeline (being created after pipeline setup).
> 
> you could create your session within your XSP if you override the
> generator's setup() method within your XSP, creatint your session at that
> point, so the session will be created at pipeline setup time.
> 
> but maybe it's easier to create the session via an action, as already
> suggested.
> 
> 
> > -Ursprüngliche Nachricht-
> > Von: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]Im
> > Auftrag von Heiko Milke
> > Gesendet: Donnerstag, 30. Januar 2003 16:44
> > An: [EMAIL PROTECTED]
> > Betreff: Re: Accessing session variables in the sitemap.xmap
> >
> >
> > Hey Andrew,
> >
> > Thanks for all your help! But well, it still aint working :(
> >
> > I tried on several browsers. I tried in the mount directory and i
> > tried from
> > the main sitemap. None if it works.
> >
> > Im using cocoon version 2.0.4 (on Windows 2000).
> >
> >
> > Heiko
> >
> >
> > -
> > 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: Accessing session variables in the sitemap.xmap

2003-01-30 Thread Heiko Milke
Hello Christian,

Thank you very much!

It's good to know that it is impossible. I already guessed that.

I'll write an action and see how it works out.

Bye Heiko :)

- Original Message -
From: "Christian Haul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 30, 2003 4:56 PM
Subject: Re: Accessing session variables in the sitemap.xmap


> On 30.Jan.2003 -- 02:56 PM, Heiko Milke wrote:
> > Hello,
> >
> > I want my application to work like the following.
> >
> >
> > 
> > 
> > 
> > 
> > 
> >
> >
> >
> > 1. the serverpages generator accesses a script named "xsp/example.xsp"
> > Withing this script a session variable named "selected_stylesheet" is
set.
> >
> > xsp/example.xsl >
> > 2. In the next step i want to transform the generated data using the
stylesheet whose path is stored in the session variable.
>
> This is impossible because of the order things are actually
> done. (This is becoming a FAQ, too lazy to explain yet again, search
> this list or see comments in sample sitemap.xmap)
>
> You're better off selecting the stylesheet in an action or an input
> module (not by reading a parameter set by the generator, of course).
> If you deem that too complex, you might be interested to know that you
> can write actions in xsp.
>
> Without further knowledge it is difficult to suggest the path to
> follow. But if the stylesheet name is obtained from a database, you
> might want to look into the database actions. If it is a simple key
> value mapping depending on a request parameter, you might want to look
> into the surprising things that can be done with input modules.
>
> Chris.
> --
> C h r i s t i a n   H a u l
> [EMAIL PROTECTED]
> 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: <[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: Accessing session variables in the sitemap.xmap

2003-01-30 Thread Heiko Milke
Hey Andrew,

Thanks for all your help! But well, it still aint working :(

I tried on several browsers. I tried in the mount directory and i tried from
the main sitemap. None if it works.

Im using cocoon version 2.0.4 (on Windows 2000).


Heiko


-
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: Accessing session variables in the sitemap.xmap

2003-01-30 Thread Heiko Milke
Hey Andrew,

> Heiko
>
> Have you set the session to be created?
>
> In the xsp:page declaration:
>
> xmlns:xsp-session="http://apache.org/xsp/session/2.0";
>   create-session="true"

Yes I did.

And if i "echo" the value from "selected_stylesheet" in the xsp page then it
is correctly set. The sitemap simply doesn't get notified about the new
session variable. =(

Heiko



-
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: Accessing session variables in the sitemap.xmap

2003-01-30 Thread Heiko Milke
Hey Andrew,

> You probably want to change your pipeline as follows:
>
> 
> 
> 
> 
> 
>
> This is an input module which will retrieve the session attribute named
> selected_stylesheet. The way you have it written is trying to access a
> sitemap parameter named selected_stylesheet.
> There is a little written about input modules on the cocoon wiki.

sadly this doesn't change much.
I still get "resource not found"

Like i said i guess its a special problem with sessions that were just
created. If i come from a different page where i already set the
"selected_stylesheet" then it works.

The timeline looks broken. Whatever is done to the session in the generator
doesnt come to the sitemap.


Heiko


-
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]>




Accessing session variables in the sitemap.xmap

2003-01-30 Thread Heiko Milke



Hello,
 
I want my application to work like the 
following.
 
 
    

 
 
1. the serverpages generator accesses a script 
named "xsp/example.xsp"
Withing this script a session variable named 
"selected_stylesheet" is set.
 
xsp/example.xsl
 
2. In the next step i want to transform the 
generated data using the stylesheet whose path is stored in the session 
variable.
 
3. finally i want to serialize and close the 
pipe.
 
 
This one is not working. Cocoon complains about a 
resource that cannot be found. Actually it can't find  the stylesheet. 
Its all about coming to the page for the first time. Im creating the session in 
the serverpages - generator. But somehow the sitemap doesnt get it.
 
---
 
Thats why i did this one right here :
 
                
        
        
    
    

 
 
the descriptor file looks like this:
 
  

 
 
I expected cocoon to find out that, when coming to 
the page for the first time, even if there is no "selected_stylesheet", that it 
can get the default parameter  from the descriptor and get 
lucky.
 
 
This one aint working too.
 
What am I supposed to do to make it work 
?
Maybe it would be a good idea to create the session 
earlier, maybe before i enter the pipe but i dont know how to do 
that.
 
 
Thanks in advance
 
Heiko.