Re: Not handle the XML header in the sax parser
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 : ?xml version=1.0 encoding=UTF-8? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:ixia-query=http://www.ixiasoft.com/ixia/query/1.0; ixia-query:document ?xml version=1.0 encoding=UTF-8? coucou/ /ixia-query:document /xsp:page 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. 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: AW: Not handle the XML header in the sax parser
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. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IRC, SILC
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
using 1.3.1 and above - 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: AW: Accessing session variables in the sitemap.xmap
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
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. 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
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]
Re: Accessing session variables in the sitemap.xmap
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. map:match pattern=xsp/example.xsp map:generate src=xsp/example.xsp type=serverpages/ map:transform src={selected_stylesheet}/ map:serialize/ /map:match 1. the serverpages generator accesses a script named xsp/example.xsp Withing this script a session variable named selected_stylesheet is set. xsp-session:set-attribute name=selected_stylesheetxsp/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]