sitemap map:resource
Hello, In my sitemap, I have some similar pipelines so I have decided to use the map:resource element But I read that when you make the map:call the pipeline finish in the map:resource. So this example is not working : map:components .. map:resources map:resource name=modifyUser map:transform ... /map:resource /map:resources ... /map:components map:match map:generate ... map:call resource=modifyUser/ map:serialize/ /map:match Is there antoher way to do that. (Reuse some part in the sitemap) ? Thanks Lionel Lionel CRINE Société : 4DConcept 22 rue Etienne de Jouy 78353 JOUY EN JOSAS Tel : 01.34.58.70.70 Fax : 01.39.58.70.70 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get a parameter from web.xml
you can try : Context context = ObjectModelHelper.getContext(objectModel); String my_variable = context.getInitParameter(my-variable); Lionel At 18:34 20/06/2003 +0200, you wrote: There are some cocoon parameters set in web.xml, e.g. upload-directory. How can I manage to get the values of my own web.xml-properties in an generator or an action ? Is there a hidden path through the forest called 'objectModel' ? Or am I conceptually wrong ? Greetings Andrew __ UNICEF bittet um Spenden fur die Kinder im Irak! Hier online an UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ArrayIndexOutOfBoundsException when using copy-of to write into a new node
hi, there is an error : use xsl:copy-of select=document(concat('../xmldocs/', string($document)))/*/ instead of xsl:copy-of select=document(concat('../xmldocs/', tring($document)))/*/ Also, $document is an xsl:param ? About the error I don't know. try to send this to the mulberrytech [EMAIL PROTECTED]. Lionel At 17:12 19/06/2003 +0200, you wrote: hi! I'm creating a website using the following software: Tomcat:4.1.24 Cocoon: version 2.0.5-dev Xalan: 2.5.1 Xerces: 2.4.0 What I'd like to do is the following: Create a new tag in the result tree and copy a part of another xml-file in there. Just like this: xsl:template match=content_element abcdef xsl:copy-of select=document(concat('../xmldocs/', tring($document)))/*/ /abcdef /xsl:template This gives the following error which seems strange to me. ERROR MESSAGE- The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies that org.apache.cocoon.ProcessingException says: Exception during processing of file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/commondocs/structure.xml More precisely: org.apache.cocoon.ProcessingException: Exception during processing of file:/C:/Progra~1/jakarta-omcat-4.1.24/webapps/cocoon/docs/educeth/commondocs/structure.xml: java.lang.RuntimeException: Errors in XSLT transformation: Fatal: File file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/stylesheets/assembly.xsl; Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1 -END OF ERROR MESSAGE- I get the same error if I use xsl:template match=content_element xsl:element name=abcdef xsl:copy-of select=document(concat('../xmldocs/', string($document)))/*/ xsl:element/ /xsl:template Every other tag than xsl:copy of.../ works as it should. Below, I have attached the complete exception trace. I would be very glad if someone could help me! Thanks in advance! Stefan Original exception : java.lang.RuntimeException: Errors in XSLT transformation: Fatal: File file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/stylesheets/assembly.xsl; Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1 at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3364) at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:427) at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91) at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:589) at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:302) at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:321) at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:197) at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:258) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:412) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:148) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:151) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:145) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:340) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:301) at
Re: How to get a request parameters as an xml tree?
Can you tell some more ? Is it from an xsp, or an xsl page ? At 11:53 20/06/2003 +0200, you wrote: Hello when i send xhtml = divHello/div i receive parameter name=xhtml valuelt;divgt;Hellolt;/divgt;/value /parameter and i would like to get this as a node not as a string. Is there an easy way to do this? thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: transformers and SAX events
Can you be more explicit. You want to create a String from SAX events with your transformer and then send it to the next component? A transformer take SAX events on entry and return SAX events (using the SAX methods). But I you don't want to use the SAX methods, you can extends your transformer from AbstractDOMTransformer (create a DOM from SAX events) and then parse the DOM to send it the the next component pipeline. Lionel At 14:10 17/06/2003 -0400, you wrote: Hi everyone, I am creating my own transformer which extends abstractSAXTransformer. In the end I am left with a string of XML data. Is there a simple way to send this data in a SAX event to the next pipeline component? I do not want to have to parse it and send StartEvents, textEvents and endEvents. The answer is probably simple, I just can not seem to find it myself. Thanks, Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting session object inside a custom generator
yes. Use the ObjectModelhelper object in the setup method. for example //Get the session parameter id Request request = ObjectModelHelper.getRequest(objectModel); Session session = request.getSession(false); // requete String id = (String)session.getAttribute(id); Lionel At 11:17 18/06/2003 +0100, you wrote: Hey All, I was just wondering if it is possible to get access to a users session object from within a custom generator? Thanks Brian Dela - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ComponentSelector could not find the component for hint [XML] ?
You made a request on Cocoon before it finishes to recomplied. At 14:08 18/06/2003 +0200, you wrote: Anyone know this error ? ERROR (2003-06-18) 13:48.08:461 [sitemap] (/cocoon-dev/foo-login) tcpConnection-8080-3/sitemap_xmap: Sitemap org.apache.avalon.framework.component.ComponentException: UnnamedSelector: ComponentSelector could not find the component for hint [XML] Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ComponentSelector could not find the component for hint [XML] ?
Sorry, I told you crap. In fact you use a component that is not defined in the sitemap.xmap Sorry again. Here is how i call the sunrise components : !-- === SunShine === -- map:action name=sunRise_login src=org.apache.cocoon.sunshine.sunrise.acting.LoginAction / map:action name=sunRise_logout src=org.apache.cocoon.sunshine.sunrise.acting.LogoutAction / map:action name=sunRise_loggedIn src=org.apache.cocoon.sunshine.sunrise.acting.LoggedInAction / map:action name=sunShine_session src=org.apache.cocoon.sunshine.acting.SessionAction / map:action name=sunSpot_auth src=org.apache.cocoon.sunshine.sunspot.acting.AuthAction / map:action name=sunRise_auth src=org.apache.cocoon.sunshine.sunrise.acting.AuthAction handlers handler name=foo_handler xmlns:map=http://apache.org/cocoon/sitemap/1.0; xmlns:sunshine=http://sunshine.sundn.de/sunshine/1.0; redirect-to uri=cocoon://demo / authentication uri=cocoon://authuser / /handler /handlers /map:action Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use an http attribute in an action
Here is what I did from a post (input type=file). I don't know if this that you need!! this is the upload of an illustration : Request request = ObjectModelHelper.getRequest(objectModel); Enumeration e = request.getParameterNames(); while (e.hasMoreElements()) { String param = (String) e.nextElement(); Object value = request.get(param); //get the name of the document String fileName = null; if (value instanceof FilePart) { fileName = ((FilePart) value).getFileName(); } //get the content from the post if (value instanceof FilePartArray) { FilePartArray fpa = (FilePartArray) value; InputStream is = fpa.getInputStream(); int size = is.available(); byte[] b = new byte[size]; try { is.read(b); } finally { is.close(); } Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use an http attribute in an action
you can try : public Map act (Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters parameters) throws Exception { Request request = ObjectModelHelper.getRequest(objectModel); String num = request.getParameter(numero); String protection = request.getParameter(protection); ... At 09:52 12/06/2003 +0200, you wrote: Hello all, Y have a HTTP request like : chargement-decision.html?numero=3805protection=inter and y want to use the numero and protection attributes in an action. Do some one know how to do that ? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: get parameters into Sitemap
1/ to send request parameter to a transformer : for example : map:transform type=xslt src=xsl/modify_status.xsl map:parameter name=use-request-parameters value=true / -- This line is mandatory for the xslt transformer map:parameter name=status value={request-param:status} / /map:transform And the second thing is how to set parameters to a transformer? I tried : map:transform type=ldap map:parameter name=ldap:password value={request-param:passwd}/ /map:transform 2/ ldap:password should be the name you called in the transformer. like this (in the setup method): try { this.password = parameters.getParameter(ldap:password); } ... Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I send sitemap param from my wizard action?
I don't understand quite well your question. but if you want your sitemap parameter you should get them from the act method and then pass them to your perform method. Lionel At 10:36 10/06/2003 -0700, you wrote: Hi all, How I see AbstractXMLFormAction.page(..), objectMap is creating new: protected Map page(String pageName) { Map objectModel = new HashMap(); objectModel.put(OBJECT_MAP_NEXT_PAGE, pageName); return objectModel; } What if I want send some sitemap param from my wizard action ( from perform() )? public Map perform () { ... if ( formView.equals ( VIEW_REGISTRATION ) ) { if ( command.equals( CMD_NEXT ) ) { -- here I want put my sitemap param return page( VIEW_INTEREST ); } } ... Thanks, Hill cocoon 2.1m3-dev, tomcat 4, java 1.4 __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Authentification with requests and ldap HELP!
And it's not working the way you wrote it ? You have an error ? variable ar empty ? Did you look at the core.log or the localhost_log file ? Maybe you're losing the variable from one pipeline to another. lionel At 11:33 11/06/2003 +0200, you wrote: In an easier phrase all I still need to do is : Set the ldap:rootdn and ldap:password values from the login form! map:transform type=ldap map:parameter name=rootdn value={request-param:name}/ map:parameter name=password value={request-param:password}/ /map:transform it's maybe cleaner this way? Thanks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] .org] Sent: Wednesday, June 11, 2003 11:21 AM To: [EMAIL PROTECTED] Subject: Authentification with requests and ldap HELP! I have a portal, on my login page I have the field name and password. When I submit the form : ( form method=post target=_top action=configDBWOCfree-auth?resource=configDBWOC-portal ) I want to execute the authentification pipeline. To authentificate I want to execute an ldap query, but with ldap:rootdn (ldap user) and ldap:password (ldap password) as my two text fields from my login page. Then, if the query suceeds, get the user information from ldap and go to the next page. sitemap.xmap map:pipeline internal-only=true map:match pattern=sunrise-* !-- authentication -- map:match pattern=sunrise-authuser map:generate src=ldap.xml/ map:transform type=ldap map:parameter name=rootdn value={request-param:name}/ map:parameter name=password value={request-param:password}/ /map:transform map:transform type=xslt src=ldap.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:transform src=styles/sunrise-user.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:serialize type=xml/ /map:match ldap.xml ... !-- without ldap:rootdn and ldap:password because they are parameters in the sitemap-- ... ldap.xsl xsl:param name=password/ ... namexsl:value-of select=userName//name !-- userName is an ldap attribute-- passwordxsl:value-of select=normalize-space($password)/password sunrise-user.xsl xsl:param name=password/ xsl:param name=name/ ... xsl:if test=normalize-space(name) = $name and normalize-space(password) = $password ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pipeline with action breaks ?
Did you try ? map:generate src=useradmin/{../1}.xml/ At 13:49 11/06/2003 -0700, you wrote: Hi, I'm having difficulties with useing a action inside a match. When I use a action like this: map:match pattern=useradmin/*.xml map:act type=xmldb-login map:generate src=useradmin/{1}.xml/ map:transform type=xmlform label=xml/ map:transform src=useradmin/stylesheets/wizard2page.xslt type=xalan / map:transform src=useradmin/stylesheets/complex-page2html.xslt label=pre/ map:transform type=cinclude/ map:transform src=useradmin/stylesheets/xmlform2html.xslt/ map:serialize encoding=UTF-8 type=html label=html/ /map:act map:call resource=loginResource/ /map:match The {1} inside the map:act is removed. But if I place a new match inside the map:act like: map:match pattern=useradmin/*.xml map:act type=xmldb-login map:match pattern=useradmin/*.xml it works fine. What's wrong ? I'm running cocoon2.1-m2 Morten Svanaes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Requestparameterselector
I'm trying to use RequestParameterSelector selector but it's not working : here is my pipeline : map:match pattern=searchlink map:select type=request_parameter_selector map:parameter name=parameter-name value={request-param:links} / map:when test=ID map:generate type=GeneratorLink / map:transform type=xslt src=xsl/result_link_list.xsl / map:serialize type=html / /map:when map:otherwise map:generate type=file src=xml/null.xml/ What's wrong ? Lionel Lionel CRINE Société : 4DConcept 22 rue Etienne de Jouy 78353 JOUY EN JOSAS Tel : 01.34.58.70.70 Fax : 01.39.58.70.70 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Requestparameterselector
ok it's working!!! sorry for the question. At 12:16 10/06/2003 +0200, you wrote: I'm trying to use RequestParameterSelector selector but it's not working : here is my pipeline : map:match pattern=searchlink map:select type=request_parameter_selector map:parameter name=parameter-name value={request-param:links} / map:when test=ID map:generate type=GeneratorLink / map:transform type=xslt src=xsl/result_link_list.xsl / map:serialize type=html / /map:when map:otherwise map:generate type=file src=xml/null.xml/ What's wrong ? Lionel Lionel CRINE Société : 4DConcept 22 rue Etienne de Jouy 78353 JOUY EN JOSAS Tel : 01.34.58.70.70 Fax : 01.39.58.70.70 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to debug COCOON with ECLIPSE and TOMCAT?
don't forget to create a tomcat project pointing to your cocoon root directory. At 06:21 05/06/2003 -0700, you wrote: Lionel, I followed your instructions, but I still have problems. Tomcat works, but I can't lanch cocoon. it sais: HTTP Status 404 - /cocoon/ type Status report message /cocoon/ description The requested resource (/cocoon/) is not available. Do you have sugestions what am I doing wrong? I get only Tomcat's index.jsp It appears in work directory on my eclipse server and that's all! Thank you in advance! Galia Lionel Crine [EMAIL PROTECTED] wrote: With the tomcat plugin : 2.1 I think you have setup the windows-preference-tomcat. I repeat it : 1/choose the version you have. 4.1.x is good. 2/choose the tomcat root directory 3/choose the server.xml file 4/i had my tomcat project to my classpath (i'm not sure it's necessary). 5/ If you want to debug Tomcat (check the execute in debug mode) the parameter for the JVM : The JRE by default is not working (or something like that)!!! So you have to change it the another. 6/ Go in window-preferences-java-installed JREs 7/add a new standard VM (the one with your sdk). (for example mine is : d:\software\java\sdk1.4) 8/notch it. 9/Come back to windows-preference-tomcat-JVM parameter 10/select the new JVM Some optionnal things : In window-preferences-java-Classpath Variables create a TOMCAT_HOME identical as CATALINA_HOME - it seems that the plugin uses TOMCAT_HOME In the properties of the project : 11/java Build Path-source : be sure WEB-INF/classes of your project is here 12/java Build Path-librairies : add the cocoon libraries (.jar) and yours. Do pay attention of the message : Build Path entry is missing : TOMCAT_HOME 13/Tomcat : I notched is a tomcat project (check if this is your context) update automatically server.xml and reloadable = true. Hope that help a little. I may have forgotten some things so tell me. PS: With my computer the classpath is not build with eclipse So I had to add all the jars into the libraries (see 12/) Lionel At 04:11 04/06/2003 -0700, you wrote: Yes, please! I'll be grateful! Galia Lionel Crine wrote: Sorry I'm lost : Whould you like me to send the configuration for eclipse to work with cocoon and tomcat and sdk 1.4 ? If yes, tell me. At 10:43 04/06/2003 +0400, you wrote: But who can send the solution about the using the eclipse in this configuration? I use tomcat cocoon and the sdk 1.4 All is working fine. Do you have an error message ? At 07:27 03/06/2003 -0700, you wrote: Hi, I would like to debug cocoon with eclipse and tomcat. I have the blueskytime plugins for eclipse and tomcat but could not make them debug cocoon. May be there's something i'm not doing right? Galia -- Best regards, g Do you Yahoo!? Free http://us.rd.yahoo.com/mail_us/tag/*http://calendar.yahoo.comonline calendar with sync to Outlook(TM). Do you Yahoo!? Free http://us.rd.yahoo.com/mail_us/tag/*http://calendar.yahoo.comonline calendar with sync to Outlook(TM). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Generate() method called two times.
I have created a generator and the generate is called two times. Which is amazing is that another generator is almost exactly the same and works fine. Any idea ? Lionel CRINE Société : 4DConcept 22 rue Etienne de Jouy 78353 JOUY EN JOSAS Tel : 01.34.58.70.70 Fax : 01.39.58.70.70 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No buffer space available
It seems that the buffer is full. Do you open a connection for every rows ? At 15:28 03/06/2003 +0200, you wrote: Hi, I'm trying to extract rows from my MySQL database and convert it to an XML file, using Tomcat/Cocoon. I'm running : FreeBSD 5.0R Sun JRE 1.3.1 (patchset 8) Tomcat 4.1.18 Cocoon 2.0.4 MySQL 3.23.54 MySQL J/Connector 3.0.6 When I start loading my page (a simple XSP/ESQL), I get the normal XML datas but after a moment download stops and a HTML page is added at end of file. All of my other pages work but this one that extract a lot of rows (more than 4,000) doesn't work. In the html part, I got an error page with this message : [...] org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.RuntimeException: Error opening connection to dburl: jdbc:mysql://localhost/my_db: Unable to connect to any hosts due to exception: java.net.SocketException: No buffer space available [...] Any ideas ? Thanks Nicolas SANDRI - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to debug COCOON with ECLIPSE and TOMCAT?
I use tomcat cocoon and the sdk 1.4 All is working fine. Do you have an error message ? At 07:27 03/06/2003 -0700, you wrote: Hi, I would like to debug cocoon with eclipse and tomcat. I have the blueskytime plugins for eclipse and tomcat but could not make them debug cocoon. May be there's something i'm not doing right? Galia Do you Yahoo!? Free http://us.rd.yahoo.com/mail_us/tag/*http://calendar.yahoo.comonline calendar with sync to Outlook(TM). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No buffer space available
I don't know esql, but is it useful to open a connection for each row ? What's happening if you do not open a connection for your second request ? At 19:28 03/06/2003 +0200, you wrote: Yeah, buffer is full ! I open one connection for every rows, and another connection in each one : ?xml version=1.0? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:esql=http://apache.org/cocoon/SQL/v2; Root xsp:commentExtraction catalogue (c)2003 MediaXtend/xsp:comment esql:connectionesql:dburljdbc:mysql://localhost/my_db/ esql:dburlesql:usernamelog/esql:usernameesql:passwordpass/ esql:password esql:execute-query esql:querySELECT a.cle,a.refcomplete,a.titreindex,a.soustitre,a.resume,a.nsupports,s.supp ort,a.cab,lcase(a.ref) AS image,l.label,c.publicTTC,a.motscles FROM article AS a LEFT JOIN label AS l ON l.cle=a.label LEFT JOIN codeprix AS c ON c.cle=a.codeprix LEFT JOIN support AS s ON s.cle=a.support WHERE a.catalogue=7 AND a.dispo=1 AND a.supprime=0 AND a.parution lt; '2003-05-31' AND genre=2 AND catalogue=7 ORDER BY a.titreindex, a.motscles, a.soustitre/esql:query esql:results esql:row-results disque refesql:get-string column=refcomplete//ref titreesql:get-string column=titreindex//titre soustitreesql:get-string column=soustitre//soustitre resumeesql:get-string column=resume//resume labelesql:get-string column=label//label prixesql:get-string column=publicTTC//prix supportesql:get-string column=nsupports/ esql:get-string column=support//support xsp:logic String lbl = esql:get-string column=label/; lbl = lbl.toLowerCase(); lbl = lbl.replace( ' ' ,'_' ); lbl = lbl.replace( '\'' ,'_' ); /xsp:logic xsp:element name=codebarrexsp:attribute name=hreffile:///Scrat/abeille/images/codes-barres/xsp:exprlbl/ xsp:expr/esql:get-string column=cab/.eps/xsp\ :attribute/xsp:element xsp:element name=imagexsp:attribute name=hreffile:///Scrat/abeille/images/references/esql:get-string column=image/.tiff/xsp:attribute/xsp:element recompensesesql:connectionesql:dburljdbc:mysql://localhost/ my_db/esql:dburlesql:usernamelog/ esql:usernameesql:passwordpass/esql:passwordesql:execute- queryesql:querySELECT ra.article,r.code FROM recompensearticle AS ra LEFT JOIN recompense AS r ON r.cle = ra.recompense WHERE ra.article = esql:get-string column=cle/ LIMIT 0,8/esql:queryesql:resultsesql:row-results xsp:element name=recompensexsp:attribute name=hreffile:///Scrat/abeille/images/recompenses/couleurs/ esql:get-string column=code/.eps/xsp:attribute/xsp:element/esql:row-results/ esql:results/esql:execute-query/esql:connection /recompenses /disque /esql:row-results /esql:results /esql:execute-query /esql:connection /Root /xsp:page Le mardi, 3 juin 2003, à 16:53 Europe/Paris, Lionel Crine a écrit : It seems that the buffer is full. Do you open a connection for every rows ? At 15:28 03/06/2003 +0200, you wrote: Hi, I'm trying to extract rows from my MySQL database and convert it to an XML file, using Tomcat/Cocoon. I'm running : FreeBSD 5.0R Sun JRE 1.3.1 (patchset 8) Tomcat 4.1.18 Cocoon 2.0.4 MySQL 3.23.54 MySQL J/Connector 3.0.6 When I start loading my page (a simple XSP/ESQL), I get the normal XML datas but after a moment download stops and a HTML page is added at end of file. All of my other pages work but this one that extract a lot of rows (more than 4,000) doesn't work. In the html part, I got an error page with this message : [...] org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.RuntimeException: Error opening connection to dburl: jdbc:mysql://localhost/my_db: Unable to connect to any hosts due to exception: java.net.SocketException: No buffer space available [...] Any ideas ? Thanks Nicolas SANDRI - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to debug COCOON with ECLIPSE and TOMCAT?
Sorry I'm lost : Whould you like me to send the configuration for eclipse to work with cocoon and tomcat and sdk 1.4 ? If yes, tell me. At 10:43 04/06/2003 +0400, you wrote: But who can send the solution about the using the eclipse in this configuration? I use tomcat cocoon and the sdk 1.4 All is working fine. Do you have an error message ? At 07:27 03/06/2003 -0700, you wrote: Hi, I would like to debug cocoon with eclipse and tomcat. I have the blueskytime plugins for eclipse and tomcat but could not make them debug cocoon. May be there's something i'm not doing right? Galia -- Best regards, Yury Mikhienko. IT engineer, ZAO Mobicom-Kavkaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to debug COCOON with ECLIPSE and TOMCAT?
With the tomcat plugin : 2.1 I think you have setup the windows-preference-tomcat. I repeat it : 1/choose the version you have. 4.1.x is good. 2/choose the tomcat root directory 3/choose the server.xml file 4/i had my tomcat project to my classpath (i'm not sure it's necessary). 5/ If you want to debug Tomcat (check the execute in debug mode) the parameter for the JVM : The JRE by default is not working (or something like that)!!! So you have to change it the another. 6/ Go in window-preferences-java-installed JREs 7/add a new standard VM (the one with your sdk). (for example mine is : d:\software\java\sdk1.4) 8/notch it. 9/Come back to windows-preference-tomcat-JVM parameter 10/select the new JVM Some optionnal things : In window-preferences-java-Classpath Variables create a TOMCAT_HOME identical as CATALINA_HOME - it seems that the plugin uses TOMCAT_HOME In the properties of the project : 11/java Build Path-source : be sure WEB-INF/classes of your project is here 12/java Build Path-librairies : add the cocoon libraries (.jar) and yours. Do pay attention of the message : Build Path entry is missing : TOMCAT_HOME 13/Tomcat : I notched is a tomcat project (check if this is your context) update automatically server.xml and reloadable = true. Hope that help a little. I may have forgotten some things so tell me. PS: With my computer the classpath is not build with eclipse So I had to add all the jars into the libraries (see 12/) Lionel At 04:11 04/06/2003 -0700, you wrote: Yes, please! I'll be grateful! Galia Lionel Crine [EMAIL PROTECTED] wrote: Sorry I'm lost : Whould you like me to send the configuration for eclipse to work with cocoon and tomcat and sdk 1.4 ? If yes, tell me. At 10:43 04/06/2003 +0400, you wrote: But who can send the solution about the using the eclipse in this configuration? I use tomcat cocoon and the sdk 1.4 All is working fine. Do you have an error message ? At 07:27 03/06/2003 -0700, you wrote: Hi, I would like to debug cocoon with eclipse and tomcat. I have the blueskytime plugins for eclipse and tomcat but could not make them debug cocoon. May be there's something i'm not doing right? Galia -- Best regards, Yury Mikhienko. IT engineer, ZAO Mobicom-Kavkaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Do you Yahoo!? Free http://us.rd.yahoo.com/mail_us/tag/*http://calendar.yahoo.comonline calendar with sync to Outlook(TM). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [SOLUTION]Re: Need to use getInputStream() from HttpRequest !!!
Yes, it is. The example in the book use an enumeration to get the document. It test if the file is a filepartfile or a filepartarray. I've decided to work with filepartArray. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stripping space from XSP output
can you tell us more . The spaces are created by the xsp page? Lionel At 12:07 03/04/2003 -0800, you wrote: Anyone know a way (besides XSLT) to strip white space from XSP output. I tried the following: xsp:page default-space=strip xml:space=default However, this has no effect on whitespace in my output. Obviously, I could use XSLT to strip the space, but I have performance concerns - I don't want to add an additional transformation and I want to keep down the size of document going through my existing transformation. Thanks... MV __ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XMLMetaModule
Hello, I'd like to load a module (another xml file) into my cocoon.xconf but I do not have the XMLMetaModule (I use cocoon 2.0.4). this component is not working : component-instance class=org.apache.cocoon.components.modules.input.XMLFileModule logger=core.modules.xml name=RLR-conf file src=file:///{TOMCAT_HOME}/webapps/cocoon-dev/WEB-INF/RLR.xconf/ /component-instance So can I put directly the values from RLR.xconf in the cocoon.xconf and how. Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSP Problem
I won't be able to answer all your questions. for xalan, be careful to put the new jar in the cocoon lib directory \webapps\cocoon\WEB-INF\lib and remove the old one. I don't think that you need to change anything in the cocoon.xconf. Browse the mailing list to be sure. Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [XSP] expr not for int?
the xsp:logic tag should be between the page tag. Lionel At 11:21 02/04/2003 +0200, you wrote: Hello, the following XSP causes an LanguageException: ?xml version=1.0 ? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xsp:logic int value = 1; value = value + 1; /xsp:logic page titlePageTitle/title content 1 + 1 = xsp:exprvalue/xsp:expr /content /page /xsp:page The exception says: org.apache.cocoon.components.language.LanguageException: Error compiling xsptest_xsp: Line 69, column 22: identifier expected Line 69, column 16: class value not found in class org.apache.cocoon.www.xsptest_xsp Line 0, column 0: 2 errors After changing the type from int to String, the XSP works: ?xml version=1.0 ? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xsp:logic String value = 1; value = 2; /xsp:logic page titlePageTitle/title content 1 + 1 = xsp:exprvalue/xsp:expr /content /page /xsp:page Why? Doesn't xsp:expr automatically convert int to String? Thank you! Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSP Problem
hi, Can we see the code in the xsp:logic and the pipeline. Lionel At 14:18 31/03/2003 -0800, you wrote: I use Cocoon 2.0.4 for JDK1.3 on Weblogic 7.0 SP1. I need to use Xalan Extensions to write javascript in my XSL. I use Xalan 2.5.D1 and the XercesImpl that comes with it. If I add the xalan.jar, xercesImpl.jar in my weblogic's classpath the Xalan Extensions work, but the Cocoon's XSP fail with the following error: org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling source_xsp: Line 101, column 25: unclosed character literal Line 101, column 24: illegal start of expression Line 0, column 0: 2 errors sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet stack-trace org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling source_xsp: Line 101, column 25: unclosed character literal Line 101, column 24: illegal start of expression Line 0, column 0: 2 errors I would like to know if there are any changes I would have to make to cocoon.conf to make this work. Any ideas? Do you Yahoo!? http://rd.yahoo.com/platinum/evt=8162/*http://platinum.yahoo.com/splash.htmlYahoo! Platinum - Watch CBS' NCAA March Madness, http://rd.yahoo.com/platinum/evt=8162/*http://platinum.yahoo.com/splash.htmllive on your desktop! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing doctype (newbi)
hum, I think you have an error in your sitemap. map:serialize name=frame/ should be map:serialize type=frame/. Lionel At 13:42 31/03/2003 +0200, you wrote: Hi I have some problems with the doctype of a page. I want to set the doctype for one xsp page different from the others. I want to have the frameset dtd on the frameset ( of course). I have no luck adding the doctype to the the frameset. The loose.dtd is applied to all pages. And it is even applied twice. Does anyone have a clue? I have two entries in my sitemap.xmap map:match pattern= map:generate src=xsp/index.xsp type=serverpages/ map:transform type=i18n/ map:transform src=xsl/index.xsl/ map:serialize name=frame/ /map:match map:match pattern=xsp/* map:generate src=xsp/{1}.xsp type=serverpages/ map:transform type=i18n/ map:transform src=xsl/{1}.xsl/ map:serialize name=html/ /map:match And two serializers map:serializer logger=sitemap.serializer.html mime-type=text/html name=html pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer buffer-size1024/buffer-size doctype-public-//W3C//DTD HTML 4.01 Transitional//EN/doctype-public doctype-systemhttp://www.w3.org/TR/html4/loose.dtd/doctype-system encodingUTF-8/encoding indent1/indent omit-xml-declarationno/omit-xml-declaration /map:serializer map:serializer logger=sitemap.serializer.html mime-type=text/html name=frame pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer buffer-size1024/buffer-size doctype-public-//W3C//DTD HTML 4.01 Frameset//EN/doctype-public doctype-systemhttp://www.w3.org/TR/html4/frameset.dtd/doctype-system encodingUTF-8/encoding indent1/indent omit-xml-declarationno/omit-xml-declaration /map:serializer Magne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie question about CSS display
Joe, you're question is so wide. Here is how I use a CSS in an XSL file. load the CSS. map:pipeline map:match pattern=style/*.css map:read mime-type=text/css src=demo/{1}.css/ /map:match /map:pipeline load the file : map:match pattern=welcome map:generate type=file src=proto/xml/welcome.xml/ map:transform type=xslt src=proto/xsl/welcome.xsl/ map:serialize type=html/ /map:match In the XSL file : xsl:template match=/ html head link rel=stylesheet type=text/css href=style.css/ -- link to the style. /head body xsl:apply-templates/ /body /html /xsl:template hope this help. At 17:19 28/03/2003 +0100, you wrote: Hello Joe, you don't give very exact error description, only it does not work. So it's only possible to guess. Or you give us more information. I guess the error is a missing or a wrong match for the CSS. The information you can provide: 1. Which URL do you type in the browser for the Cocoon delivered HTML. 2. How does the according match pattern in the sitemap for the docbook transformation look like. 3. How does the link/ tag for the CSS in the generated HTML look like? 4. How does the according match pattern in the sitemap for the CSS look like? The transformation offline or in Cocoon may be different (but I don't really think so), but has nothing to do with the loading of the CSS. Regards, Joerg Joe Williams wrote: Forgive the elementary nature of this question, but I am new to Cocoon, my background is documentation and not development, and I have read and searched for an explanation for this weirdness without success. Using DocBook XML and the DocBook XSL with a customization layer, I want to change the styles using a CSS. My formatting changes are displayed when I run the transformation from the command line, but not when I use Cocoon. Is this to be expected, or what? Does the transformation occur differently when using Cocoon than when using Xalan alone? A helpful link or answer would be appreciated. -- System Development VIRBUS AG Fon +49(0)341-979-7419 Fax +49(0)341-979-7409 [EMAIL PROTECTED] www.virbus.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie question about CSS display
It's a little bit confused but if you want to do it. You should declare do : map:pipeline map:match pattern=*.css map:read src={1}.css mime-type=text/css/ /map:match /map:pipeline then : map:pipeline map:match pattern=book map:generate src=book.xml/ map:transform src=book.xsl map:parameter name=css-stylesheet value=cocoon:/book.css/ -- I'm not really sure value attribute can get a cocoon protocol, but why not. /map:transform map:serialize/ /map:match /map:pipeline In the xsl document : xsl:param name=css-stylesheet select=book.css/ -- I'm not sure this is working because if you want to call an URL, you should use the document() fonction like this. document('host:8080/book.css). xsl:param name=html.stylesheet.typetext/css/xsl:param Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
encoding problem and xsp
Hello, I'm having trouble with my xsp page and ISO-8859-1 encoding. I use cocoon-2.0.4. I have an xsp which get the request object of a form and create again a link for an xsl page which redirect all to frame. All generators, transfomers and serializer have to encoding parameter. the sitemap : !-- frame page -- map:match pattern=frame map:generate type=serverpages src=proto/xsp/frame.xsp/ --create a link from request parameters map:transform type=xslt src=proto/xsl/frame.xsl/ -- redirection to three pages (via frames). map:serialize type=html/ /map:match frame.xsl : ?xml version=1.0 encoding=ISO-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output encoding=ISO-8859-1/ xsl:template match=page html head link rel=stylesheet type=text/css href=style.css/ /head frameset rows=120,* cols=* frameborder=1 border=1 framespacing=0 !-- top frame -- frame name=top marginwidth=0 marginheight=0 scrolling=NOxsl:attribute name=srcxsl:value-of select=content/link/top//xsl:attribute/frame frameset cols=512,* rows=* frameborder=1 border=1 framespacing=0 !-- left frame -- frame name=search marginwidth=0 marginheight=0xsl:attribute name=srcxsl:value-of select=content/link/left//xsl:attribute/frame -- this frame the the link !-- right frame -- frame name=empty marginwidth=0 marginheight=0xsl:attribute name=srcxsl:value-of select=content/link/right//xsl:attribute/frame /frameset /frameset noframes body/ /noframes /html /xsl:template /xsl:stylesheet I also put a piece of frame.xsp : ?xml version=1.0 encoding=ISO-8859-1? ... content titlePrototype RLR/title link toptop/top rightempty/right leftsearch?xsp:logicfor(int i=0;i lt; values.size();i++){/xsp:logicxsp:expr(String)tempVector.elementAt(i)/xsp:expr=xsp:expr(String)values.elementAt(i)/xsp:exprxsp:logicif(i lt; values.size()-1){/xsp:logicamp;xsp:logic}}/xsp:logic/left /link /content When the sitemap is called the accentuated characters are not well displayed. I tried different things. 1/ the search(in left tag) page is a request generator which display : ... requestParameters parameter name=Contenu Texte_wordindex valueécole/value -- I should see école (without quote) /parameter ... 2/Furthermore I tried : !-- frame page -- map:match pattern=frame map:generate type=serverpages src=proto/xsp/frame.xsp/ --create a link from request parameters map:serialize type=xmltext/ /map:match This send an answer with good characters (é, â, etc, are well displayed). Any clue ? Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [SUMMARY] : Encoding problems
This method works well. But for me it's more complicated. In my case, The URL should go from the xsp (which have the good encoding) through an xsl page in a frame element as src attribute. But at this moment, characters are converted into UTF-8, which I don't want. Does I reach the cocoon limits ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [SUMMARY] : Encoding problems
THis error means that the eclaration of the sitemap is UTF-8 and you insert ISO character in it maybe in comment) .At 15:44 25/03/2003 +0100, you wrote: hello, any one ever have this problem with the Webserviceproxy mode ? : org.apache.cocoon.ProcessingException : Failed to execute pipeline : java.io.UTFDataFormat Exception : Invalid byte 2 of 3 byte UTF-8 sequence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: action in a pipeline
I found an answer to this problem. I can't write a pipeline with only one action. A pipeline should have one generator and one serialize at least. At 14:26 18/03/2003 -0800, you wrote: I am assuming you want the value of save to equal foobar in the case where the URI is save/foobar. Try using {../1} instead. Since actions add their own parameters to the sitemap you need to tell Cocoon to get the parameter from the match. Lionel Crine wrote: I wrote that this match: map:match pattern=save/* map:act type=Save map:parameter name=save value={1}/ /map:act /map:match Cocoon didn't find the resource. Is it illegal to write that ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cant get an exception
I tried the log transformer but it write the getLogger.debug() statements in a file ? At 10:23 18/03/2003 -0800, you wrote: Lionel Crine wrote: Hello, I also have created my own transformer, generator, etc ... I didn't had time to use getlogger, so instead of that I use System.err.println to get my message into the console. 1) I recommend you take the time to add the 'getLogger().debug() statements. 2) System.err might be changed from console to a file by your servlet container ( I think in Tomcat it goes to catalina.out) 3) Test your generator by using it in a pipeline with no transformers, just an xml serializer 4) Use the logging transformer http://xml.apache.org/cocoon/userdocs/transformers/log-transformer.html Charles At 16:43 17/03/2003 +, you wrote: Hi, I have built my own generator, using the tutorials. I can get it to work in a test harness and it produces a well-formed set of SAX events. However once inside cocoon, I get nothing, just an empty HTML page. I have recreated the cocoon libraries environment on the command line and it works. A simple helloworld generator works, so I am deploying OK, nothing in the error logs. Apart from attatching a debugger to the VM, I am at a loss as where to go from here. If you have a strategy for this, please let me know. tia, Lee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WELCOME to cocoon-users@xml.apache.org
Look at the sitemap.xmap for examples. And : http://xml.apache.org/cocoon http://wiki.cocoondev.org/Wiki.jsp Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tabs in the output
Why don't you try : a xsl:attribute name=hrefresults?city=xsl:value-of select=name//xsl:attribute xsl:value-of select=name/ /a instead of : a href=results?city={name} xsl:value-of select=name/ /a At 16:10 20/03/2003 +0100, you wrote: Hi! I don' know if this is OT, beause I cant find the problem! I'm writing a stylesheet that transforms xml int xhtml (Transitional/basic/Mobile Profile). I use Cocoon 2.0.4 as publishing framework. I have a problem with a portion of code generated: The goal is to produce something like this: a href=results?city=RomeRome/a The xml is like this: city nameRome/name state.../state . /city The stylesheet I wrote is this: xsl:template match=city . a href=results?city={name}xsl:value-of select=name//a . /xsl:template But the result is a href=results?:#10;Rome:#10; Rome/a I think the :#10; are tabs, but I really don't know why they are inserted! Of course this causes an error when you follow that link... (not on all browsers... with IE it works correctly, but, for example, with the Nokia Mobile Browser... It doesn't) Is this a encoding problem?? Or a serialization problem? ( Here I put the serializaer I use... map:serializer logger=sitemap.serializer.xhtml mime-type=text/html name=xhtml-Basic pool-grow=2 pool-max=64 pool-min=2 src=org.apache.cocoon.serialization.XMLSerializer doctype-public-//W3C//DTD XHTML Basic 1.0//EN/doctype-public doctype-systemhttp://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd/doctype-system /map:serializer ) If yes, How can I solve it?? Any idea is well accepted!! Thank you for all the answers. Best regards, Nesto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cocoon.xconf error
Hello, I use cocoon 2.0.3 : I tried to add some new components-instance in cocoon.xconf as Jeremy Quinn wrote it in http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=104490756424028w=2 : ... component-instance class=org.apache.cocoon.components.modules.input.XMLFileModule logger=core.modules.xml name=RLR-conf file src=WEB-INF/RLR.xconf/ /component-instance component-instance class=org.apache.cocoon.components.modules.input.ChainMetaModule logger=core.modules.input name=chain input-module name=request-param/ input-module name=request-attr/ input-module name=session-attr/ input-module name=defaults/ !-- START CONFIGURATION RLR -- input-module name=simple-map prefix/vars//prefix input-module name=RLR-conf/ /input-module !-- END CONFIGURATION RLR -- /component-instance ... then I wrote RLR.xconf : ?xml version=1.0? vars urlblabla/url domainblabla/domain serverblabla/server baseblabla/base nameblabla/name passwordblabla/password intervalblabla/interval pathblabla/path /vars Here is the error : org.apache.avalon.framework.component.ComponentException: Cannot obtain the URLFactory at org.apache.cocoon.sitemap.AbstractSitemap.compose(AbstractSitemap.java:215) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:239) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:98) at org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:187) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:357) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:312) at org.apache.cocoon.sitemap.Handler.run(Handler.java:267) at java.lang.Thread.run(Thread.java:479) Someone has an answer ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cant get an exception
Hello, I also have created my own transformer, generator, etc ... I didn't had time to use getlogger, so instead of that I use System.err.println to get my message into the console. At 16:43 17/03/2003 +, you wrote: Hi, I have built my own generator, using the tutorials. I can get it to work in a test harness and it produces a well-formed set of SAX events. However once inside cocoon, I get nothing, just an empty HTML page. I have recreated the cocoon libraries environment on the command line and it works. A simple helloworld generator works, so I am deploying OK, nothing in the error logs. Apart from attatching a debugger to the VM, I am at a loss as where to go from here. If you have a strategy for this, please let me know. tia, Lee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing parameters from xsp to xsp
I don't know if it's possible but why don't you try this : map:match pattern=db/*/*.xsp map:generate src=db/{1}/{2}.xsp type=xsp/ map:transform src=xsl/db.generatexsp.xsl/ map:serialize type=xml/ /map:match map:match pattern=db/*/*.html map:generate src=cocoon:/db/{1}/{2}.xsp/ map:serialize type=xml/ /map:match Lionel At 22:44 17/03/2003 +0100, you wrote: Hi, I need to pass request parameters from one XSP to another This is my sitemap map:match pattern=db/*/*.xsp map:generate src=db/{1}/{2}.xsp type=xsp/ map:transform src=xsl/db.generatexsp.xsl/ map:serialize type=xml/ /map:match map:match pattern=db/*/*.html map:generate src=http://web/implements/db/{1}/{2}.xsp/ map:serialize type=xml/ /map:match As you can see, I call the XSP from my call to the HTML. I need one XSP as a generator, because it must execute an ESQL query. But, the XSP called in that match (html match) calls another XSP that uses the request parameters. However, they are not passed in that call. I cannot use map:parameter name=use-request-parameters since this is for a transformer. I need the same kind of thing, but for a generator. Anyone with an idea ?? Some code: This is my XSP that is called: ?xml version=1.0 encoding=ISO-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=true xml query select fnSiteRegisteredUserInsert ('xsp-request:get-parameter name=email/', 'xsp-request:get-parameter name=password/') /query results result value0/value messageYou have been registered/message /result /results errors error valueERROR: Cannot insert a duplicate key into unique index tblsiteregistereduser_login_key/value messageYou already exist/message /error /errors /xml /xsp:page As you can see, that needs the parameters. This is the XSL for transformation to a valid XSP ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xsl:template match=/xml xsp:page language=java create-session=true xml esql:connection esql:poolimplements/esql:pool esql:execute-query esql:query xsl:value-of select=query/ /esql:query esql:results esql:row-results result esql:get-columns/ /result /esql:row-results /esql:results esql:error-results erroresql:get-message//error /esql:error-results /esql:execute-query /esql:connection /xml /xsp:page /xsl:template /xsl:stylesheet -- Met vriendelijke groeten, Kind regards, Bien à vous, Yves Vindevogel Implements Kempische Steenweg 206 -- 3500 Hasselt -- Belgium Phone/Fax: +32 (11) 43.55.76 -- Mobile: +32 (478) 80.82.91 Mail: [EMAIL PROTECTED] -- www.implements.be Quote: The winner never says participating is more important than winning. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
action in a pipeline
I wrote that this match: map:match pattern=save/* map:act type=Save map:parameter name=save value={1}/ /map:act /map:match Cocoon didn't find the resource. Is it illegal to write that ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Auth-protect action problem
Hi, Here is the sunshine part from my sitemap. I use cocoon-2.0.4. 1/ in the map:components element !-- === SunShine === -- map:actions map:action name=sunRise_login src=org.apache.cocoon.sunshine.sunrise.acting.LoginAction/ map:action name=sunRise_logout src=org.apache.cocoon.sunshine.sunrise.acting.LogoutAction/ map:action name=sunRise_loggedIn src=org.apache.cocoon.sunshine.sunrise.acting.LoggedInAction/ map:action name=sunShine_session src=org.apache.cocoon.sunshine.acting.SessionAction/ map:action name=sunSpot_auth src=org.apache.cocoon.sunshine.sunspot.acting.AuthAction/ map:action name=sunRise_auth src=org.apache.cocoon.sunshine.sunrise.acting.AuthAction handlers handler name=foo_handler xmlns:map=http://apache.org/cocoon/sitemap/1.0; xmlns:sunshine=http://sunshine.sundn.de/sunshine/1.0; redirect-to uri=cocoon://login_page/ authentication uri=cocoon://authuser/ /handler /handlers /map:action /map:actions 2/ in the map:pipelines element map:pipeline !-- === SunShine === -- map:match pattern=demo !-- check you are already logged -- map:act type=sunRise_loggedIn map:parameter name=handler value=foo_handler/ map:redirect-to uri=protected/display/ /map:act !-- if not go to page login-- map:generate type=serverpages src=demo/login_page.xsp/ map:transform src=demo/login_page.xsl/ map:transform type=encodeURL/ map:serialize type=html/ /map:match !-- the login which call authuser via the handler -- map:match pattern=login !-- check if the user is logged -- map:act type=sunRise_loggedIn map:parameter name=handler value=foo_handler/ map:redirect-to uri=protected/display/ /map:act !-- log the user -- map:act type=sunRise_login map:act type=sunShine_session/ map:parameter name=handler value=foo_handler/ map:parameter name=parameter_name value=request:name/ map:parameter name=parameter_password value=request:password/ !-- if the authentication is successfull then this redirect will be performed -- map:redirect-to uri=demo/ /map:act !-- authentication failed -- map:generate src=demo/login_failed.xml/ map:transform src=demo/login_failed.xsl/ map:serialize type=html/ /map:match !-- the authentication -- map:match pattern=authuser map:generate src=demo/user.xml/ !-- check the user -- map:transform src=demo/user.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:serialize type=xml/ /map:match !-- = the protected resources == -- map:match pattern=protected/** map:act type=sunRise_auth map:parameter name=handler value=foo_handler/ !-- welcome page -- map:match pattern=protected/display map:generate type=serverpages src=demo/display.xsp/ map:transform type=xslt src=demo/display.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:serialize type=html/ /map:match /map:act /map:match map:pipeline Hope that help. Moreover I had this error but I don't remember how I solved it. I think the handler (authentication-manager) is not in the right place. Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Get a sitemap parameter for an xsl page
Is it possible to get a sitemap parameter and using it into an xsl page. Here is my pipeline: map:match pattern=search map:generate type=Request/ map:transform type=Query map:parameter name=interval value=50/ /map:transform map:transform type=xslt src=proto/xsl/documents.xsl/ map:serialize/ /map:match I want to use the parameter interval in the xslt transformation. But I don't want to declare it again into the xslt transformer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Auth-protect action problem
You're right, I use the scratchpad. Be careful to my code, I only use sunrise actions and not auth-protect. By the way, is there a pre compiled version of 2.1 ? At 13:10 17/03/2003 +0100, you wrote: To clarify versioninng issues of the authentication and portal frameworks: 2.0.4 contains these parts in the scratchpad area as sunrise and sunspot. So, if you use 2.0.4, there is no auth-protect action but an sunrise-... action. 2.0.5-dev (cvs) contains the authentication and portal framework in the core; the action is called auth-protect 2.1-dev (cvs) the same version as 2.0.5-dev Carsten -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 12:52 PM To: [EMAIL PROTECTED] Subject: Re: Auth-protect action problem Hi, I have just been experimenting with the authentication system, below is the pipelines section of my sitemap, which is now working, but this is a 2.1system. Check carefully the documentation you have been using, I believe the authentication system as evolved between 2.0.4 and 2.1 and some of the documentation on the web site refers only to the new 2.1 system. You may have a mixture of setting and configurations in your sitemap, some for the 2.0.4 version and some for the 2.1 version Tony = map:pipelines map:component-configurations authentication-manager handlers handler name=global redirect-to uri=cocoon://login_page/ authentication uri=cocoon:raw://check/ /handler /handlers /authentication-manager /map:component-configurations !-- main pipeline -- map:pipeline map:match pattern=check map:generate type=serverpages src=check.xsp / map:serialize type=xml / /map:match map:match pattern=login_page map:read mime-type=text/xhtml src=login_page.html/ /map:match map:match pattern=**/*.jpg map:read mime-type=images/jpeg src=bodycare/common/images/{2}.jpg / /map:match map:match pattern=login_ok map:read mime-type=text/html src=login_ok.html / /map:match map:match pattern=login map:act type=auth-login map:parameter name=handler value=global / map:parameter name=parameter_userid value={request-param:name} / map:parameter name=parameter_password value={request-param:password} / map:redirect-to uri=login_ok / /map:act map:read mime-type=text/html src=login_failed.html / /map:match map:match pattern=logout map:act type=auth-logout map:parameter name=handler value=global / map:redirect-to uri=login_page / /map:act /map:match map:match pattern=sage/* map:mount check-reload=yes src=bodycare/sage/ uri-prefix=sage/ /map:match /map:pipeline /map:pipelines === Ungvári Sándor [EMAIL PROTECTED] 16/03/2003 14:31 Please respond to cocoon-users To:[EMAIL PROTECTED] cc: Subject:Auth-protect action problem Hi! I'd like to use the user authentication in cocoon 2.0.4. but I always get some errors. I've read much about this topic but I couldn't solve my problem. Here is my sitemap: ... pipelines map:component-configurations authentication-manager handlers handler name=userPortal redirect-to uri=login/ authentication uri=userLogin/ /handler /handlers /authentication-manager /map:component-configurations pipeline ... map:match pattern=login map:generate type=xsp src=login.xsp/ map:serialize/ /map:match map:match pattern=userLogin map:act type=auth-login map:parameter name=handler value =userPortal/ map:parameter name=parameter_userid value ={request:user}/ map:parameter name=parameter_password value={request:password}/ map:redirect-to uri=services/ /map:act !-- authentication failed: Back to login-page -- map:generate type=xsp src=login.xsp/ map:serialize/ /map:match map:match pattern=services map:act type=auth-protect map:parameter name=handler value =userPortal/ map:read src=docs/bart.gif mime-type=image/gif/ /map:act /map:match ... /pipeline ... type fatal message
Re: Get a sitemap parameter for an xsl page
I think there is a confusion. I only want to use a parameter which have the same value in all the pipelines without declare it in each pipeline. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
manage the sessions ?
What actions should I use ? How does they act between the pipeline ? Is there any documentation, besides besides these on the cocoon site ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: manage the sessions ?
I have these two books. I want to manage the sessions in the pipeline. At 14:55 17/03/2003 +0100, you wrote: You can use xsp-session for this. Docs: the website under XSP / Session Two good books: Cocoon, Building XML applications (Langham / Ziegeler) Cocoon, Developer's handbook (Moczar / Aston) What actions should I use ? How does they act between the pipeline ? Is there any documentation, besides besides these on the cocoon site ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Met vriendelijke groeten, Kind regards, Bien à vous, Yves Vindevogel Implements Kempische Steenweg 206 -- 3500 Hasselt -- Belgium Phone/Fax: +32 (11) 43.55.76 -- Mobile: +32 (478) 80.82.91 Mail: [EMAIL PROTECTED] -- www.implements.be Quote: The winner never says participating is more important than winning. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
generator and action
Does an action can get the SAX events created by a generator ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generator and action
That's what I did. But I have a problem in my transformer. In the transformer I query an XMLDB but the results are really long to come up due to the XMLDB methods (this methods applies to a proprietary object). So I need to display the results piece by piece. Now I'm trying different ways : 1/Get the proprietary object using session and putting it into an xsp. But I have trouble to manipulate the proprietary object (in fact I can't initialise it) in the xsp page. 2/ Get the proprietary object using a session and manipulate it into an action but and i Wrote that : map:match pattern=search map:act type=sunShine_session -- create a session map:parameter name=action value=create/ map:generate type=Request/ -- create sax events map:transform type=Query/ -- get the SAX events and put the proprietary into the session map:act type=Action/ -- get the proprietary Object from the session. map:serialize/ /map:act /map:match But it doesn't not, the session is on but the attribute doesn't go from the transformer to the action. Any idea ? Finally, I'm on the good way to do wHat I want or should I change my plans ? Please, give me some hints. Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
empty session attribute ?
I have a Transformer which store an object into the session and thean Action, but the Action only get the name of the attribute, why ? Here is my action code : public class MyAction extends AbstractAction implements ThreadSafe { public Map act (Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters parameters) throws Exception { Request req = ObjectModelHelper.getRequest(objectModel); if (req == null) { getLogger ().debug (No request object); return null; } /* check session validity */ Session session = req.getSession (); if (session == null) { getLogger ().debug (No session object); return null; } else { System.err.println(Session is on); proprietary_Object res = (proprietary_Object)session.getAttribute(resultspace); res is empty, why that ? } return null; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
send form attribute from one pattern to another ?
Hello, I have these four pipelines : 1/ map:match pattern=start map:generate type=XMLDB=indexdefinition.xml/ map:transform type=xslt src=proto/xsl/start.xsl/ map:serialize type=html/ /map:match 2/ !-- Frame page (the xsl call search and empty pattern)-- map:match pattern=frame map:generate type=file src=proto/xml/frame.xml/ map:transform type=xslt src=proto/xsl/frame.xsl/ map:serialize type=html/ /map:match 3/ !-- Request the database -- map:match pattern=search map:generate type=Request/ map:transform type=Query/ map:transform type=xslt src=proto/xsl/documents.xsl/ map:serialize/ /map:match 4/ !-- Empty page-- map:match pattern=empty map:generate type=file src=proto/xml/empty.xml/ map:transform type=xslt src=proto/xsl/empty.xsl/ map:serialize type=html/ /map:match My question is : Start.xsl create a form. The values should be send to the frame pattern and then to search pattern. How can I pass into the different pages ? I was thinking about adding a sunshine session transformer, is it a good idea ? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
loop for into xsp
I'm trying to use a for loop into my xsp page but the character is interpreted by the sax parser. xsp:logic ... for (int i = 0; i array.length(); i++) { ... /xsp:logic Why ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: loop for into xsp
Found an answer : i use lt; instead of . At 17:19 12/03/2003 +0100, you wrote: I'm trying to use a for loop into my xsp page but the character is interpreted by the sax parser. xsp:logic ... for (int i = 0; i array.length(); i++) { ... /xsp:logic Why ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: object in a transformer
If I understand well, this is possible. But how can I add the object to the session. I think I should do that in the transformer. Can you tell me some more ? At 14:32 11/03/2003 +0100, you wrote: On 11.Mar.2003 -- 02:20 PM, Lionel Crine wrote: I have a pipeline in which there is my custom transformer. In this transformer I have a method which access to an XMLDB and get a result object. I want my transformer to get the object (in a session) and get it to an xsp page. Is it possible to do such a thing ? Sure. Just add the object to the session and retrieve it in your XSP e.g. using the session logicsheet. However, since the transformer runs in parallel to the XSP, they may not be within the same pipeline. IOW the XSP can reliably read the value only for a subsequent (i.e. different) request. 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
enable getlogger error
How can I enable the getlogger error ? does the errors are showed in the console. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: object in a transformer
By the way, I have few more question 1/Can I put anything in the session ? 2/In the xsp page, haow can I get attribute from the DOM object in the session ? Like that : xsp-session:get-attribute name=the_object_in_the DOM/ 3/If I want the xsp generator to retreive the DOMsessionelement from my custom transfomer, should I use a resource ? At 14:51 11/03/2003 +0100, you wrote: On 11.Mar.2003 -- 02:46 PM, Lionel Crine wrote: At 14:32 11/03/2003 +0100, you wrote: On 11.Mar.2003 -- 02:20 PM, Lionel Crine wrote: I have a pipeline in which there is my custom transformer. In this transformer I have a method which access to an XMLDB and get a result object. I want my transformer to get the object (in a session) and get it to an xsp page. Is it possible to do such a thing ? Sure. Just add the object to the session and retrieve it in your XSP e.g. using the session logicsheet. However, since the transformer runs in parallel to the XSP, they may not be within the same pipeline. IOW the XSP can reliably read the value only for a subsequent (i.e. different) request. If I understand well, this is possible. But how can I add the object to the session. I think I should do that in the transformer. Can you tell me some more ? You need to get hold of the request object through the objectModel and the ObjectModelHelper. Get a session object from the request and set an attribute. Have a look at the transformers in the distribution for sample code. 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: object in a transformer
Yes. Shouldn't be too big, though, unless you have enough memory. 2/In the xsp page, haow can I get attribute from the DOM object in the session ? Like that : xsp-session:get-attribute name=the_object_in_the DOM/ Retrieve the object and use e.g. jxpath or the dom java api on it. I'm confused ? Here is what I understand : 1/ get the DOM from the session with xsp tag ? 2/manipulate the DOM with jxpath or DOM api. 3/If I want the xsp generator to retreive the DOMsessionelement from my custom transfomer, should I use a resource ? Wait - you want to generate your XSP from a session attribute? Doesn't sound too good to me. Remember that it needs to be compiled everytime it changes Apart from that, a source seems to be right. for now I have : map:match pattern=search map:generate type=customRequest/ - create sax events map:transform type=customQuery /map:transform map:transform type=xslt src=proto/xsl/documents.xsl/ map:serialize type=html/ /map:match and I want : 1/ this first pipeline generate a DOM object in a session. map:match pattern=search map:generate type=customRequest/ - create sax events from a form first possibility : map:transform type=customQuery/ - get the result of the request and put it in a DOM into a session second possibility : map:transform type=writeDOMsession map:parameter name=dom-name value=result/ map:parameter name=dom-root-element value=docs/ docs is the root element of the sax event which comes from the first transformer. /map:transform xml:serialize/ /map:match 2/ this second pipeline get the DOM, so I could manipulate the result in the xsp page. map:match pattern=xsppage map:generate type=serverpages src=anyxsp.xsp/ - Get, I don't know how the DOM session object map:transform type=xslt src=demo/documents.xsl/ map:serialize/ /map:match Furthermore, I don't know how to link the two pipeline! Hope that helps. Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: object in a transformer
Perhaps it would be simpler to manipulate the DOM -- to be precise the resulting XML -- with XSL rather than XSP? For now I manipulate the result object in the transformer : for (int i = 0; i = count; i++) { try { SpecialDocument doc = result.Item(i); String contenT = null; response.append(docname+doc.GetName()+/name/doc); But I have 3 documents and the Item method is to long. That's why I need to get the result out of the transformer. So I will be able to use Item method (in the xsp page) onto how many documents I want. Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How using writeDOMsession and readDOMsession, nobody seams to know!!!
I'd like to use this two transformer but don't know how. Can people who used it explain to me ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to parse an object
I have a transformer in which I want to parse a Document Object : I use org.apache.avalon.excalibur.xml.Parser : Is it possible to give an object to the parser ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Change default encoding in the transformer
I'd like to change the default encoding in my custom transformer, how can I do that ? Lionel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Change default encoding in the transformer
You're right. But my transformer take a part of SAX events sent by the generator and parse it : Here some lines of my transformer : . public void endElement(String uri, String loc, String raw) throws SAXException { if (extractLevel == 0) { super.endElement(uri,loc,raw); } else { this.currentBuilder.endElement(uri,loc,raw); if (this.extractURI.equals(uri) this.extractElement.equals(loc)) { extractLevel--; getLogger().debug(extractLevel now + extractLevel + .); if (extractLevel == 0) { // finish building the DOM. remove existing prefix mappings. Iterator itt = prefixMap.entrySet().iterator(); while (itt.hasNext()) { Map.Entry entry = (Map.Entry) itt.next(); this.currentBuilder.endPrefixMapping((String)entry.getKey()); } this.currentBuilder.endDocument(); /** * request in textml */ Document doc = this.currentBuilder.getDocument(); - create the DOM document String id = null; String stringQuery = null; ByteArrayInputStream my_string_as_stream = null; InputSource input_source = null; this.request = new StringBuffer(); try { this.format.put(OutputKeys.ENCODING, UTF-16); id = org.apache.cocoon.xml.XMLUtils.serializeNode(doc, this.format); - serialized the DOM to a String this.request.append(id); That doesn't work...the is still have the header ISO-8859-1 encoding. At 14:45 10/03/2003 +0100, you wrote: Lionel Crine [EMAIL PROTECTED] writes: I'd like to change the default encoding in my custom transformer, how can I do that ? How is a transformer related to encoding? It's a internal component and is working on java strings only (unless it is reading additional data from a external source). Set the encoding in your serializer. Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Change default encoding in the transformer
i found something which work. ... try { this.format2 = org.apache.cocoon.xml.XMLUtils.defaultSerializeToXMLFormat(true); id = org.apache.cocoon.xml.XMLUtils.serializeNode(doc, this.format2); this.request.append(id); ... Hope that helps other people. At 14:53 10/03/2003 +0100, you wrote: You're right. But my transformer take a part of SAX events sent by the generator and parse it : Here some lines of my transformer : . public void endElement(String uri, String loc, String raw) throws SAXException { if (extractLevel == 0) { super.endElement(uri,loc,raw); } else { this.currentBuilder.endElement(uri,loc,raw); if (this.extractURI.equals(uri) this.extractElement.equals(loc)) { extractLevel--; getLogger().debug(extractLevel now + extractLevel + .); if (extractLevel == 0) { // finish building the DOM. remove existing prefix mappings. Iterator itt = prefixMap.entrySet().iterator(); while (itt.hasNext()) { Map.Entry entry = (Map.Entry) itt.next(); this.currentBuilder.endPrefixMapping((String)entry.getKey()); } this.currentBuilder.endDocument(); /** * request in textml */ Document doc = this.currentBuilder.getDocument(); - create the DOM document String id = null; String stringQuery = null; ByteArrayInputStream my_string_as_stream = null; InputSource input_source = null; this.request = new StringBuffer(); try { this.format.put(OutputKeys.ENCODING, UTF-16); id = org.apache.cocoon.xml.XMLUtils.serializeNode(doc, this.format); - serialized the DOM to a String this.request.append(id); That doesn't work...the is still have the header ISO-8859-1 encoding. At 14:45 10/03/2003 +0100, you wrote: Lionel Crine [EMAIL PROTECTED] writes: I'd like to change the default encoding in my custom transformer, how can I do that ? How is a transformer related to encoding? It's a internal component and is working on java strings only (unless it is reading additional data from a external source). Set the encoding in your serializer. Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: class and package
found the error. At 09:54 24/02/2003 +0100, you wrote: I'm trying to link my classes into cocoon but It seem that nothing works. I have two classes : Generator and Access : Generator is supposed to use Access (create an object) but it doesn't work. private Access access = new Access(); --send a cannot resolve symbol error. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is this question too simple to be answered ?
here is what I did : In the main sitemap : !-- === mount sub sitemap === -- map:pipeline map:match pattern=request/* map:mount uri-prefix=request check-reload=true src=demo/sitemap.xmap method-reload=synchron/ /map:match /map:pipeline !-- == -- In the subsitemap : map:match pattern=request map:generate type=serverpages src=request.xsp/ map:transform type=xslt src=request.xsl/-- map:transform type=xslt src=documents.xsl/ map:serialize type=html/ /map:match Try relative location for your files. Hope this help At 10:27 20/02/2003 +0100, you wrote: Hi, is this question too simple to be answered ? -Message d'origine- De : Laurent Comte [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 19 février 2003 13:25 A : [EMAIL PROTECTED] Objet : Simple pb with subsitemap mount Hi, I just try to create subsitemap as written in docs. I have : [sitemap.xmap] ... map:pipelines !-- very simple test -- map:pipeline map:match pattern=view/** map:mount uri-prefix=view check-reload=true src=file:///D:\work\web.xmap / /map:match /map:pipeline /map:pipelines ... [D:\work\web.xmap] ... map:pipelines map:pipeline map:match pattern=**/index.xml map:generate src=index.xml/ map:transform src=index.xsl/ map:serialize/ /map:match /map:pipeline /map:pipelines ... So, when I type http://localhost:8080/cocon/view/index.xml, i've got this beautiful thing : description org.apache.cocoon.ProcessingException: Exception during processing of file:/D:/index.xsl: java.io.FileNotFoundException: \index.xsl (The system cannot find the file specified) sender org.apache.cocoon.servlet.ParanoidCocoonServlet source Cocoon servlet stack-trace org.apache.cocoon.ProcessingException: Exception during processing of file:/D:/index.xsl: java.io.FileNotFoundException: \index.xsl (The system cannot find the file specified) at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea mSource.java:211) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS LTProcessorImpl.java:268) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS LTProcessorImpl.java:239) at org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java: 298) at org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab stractEventPipeline.java:215) at org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven tPipeline.java:278) at org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi ngEventPipeline.java:141) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS treamPipeline.java:317) at org.apache.cocoon.www.file_.D_.work.web_xmap.matchN10224(D:\Java\Oodrive\Tom cat\work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1530 ) at org.apache.cocoon.www.file_.D_.work.web_xmap.process(D:\Java\Oodrive\Tomcat\ work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1439) at org.apache.cocoon.www.file_.D_.work.web_xmap.process(D:\Java\Oodrive\Tomcat\ work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1385) at org.apache.cocoon.sitemap.Handler.process(Handler.java:224) at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) at org.apache.cocoon.www.sitemap_xmap.matchN1020C(D:\Java\Oodrive\Tomcat\work\c ocoon-files\org/apache/cocoon/www\sitemap_xmap.java:1447) at org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo n-files\org/apache/cocoon/www\sitemap_xmap.java:1394) at org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo n-files\org/apache/cocoon/www\sitemap_xmap.java:1340) at org.apache.cocoon.sitemap.Handler.process(Handler.java:224) at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154) at org.apache.cocoon.Cocoon.process(Cocoon.java:575) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at
RE: Is this question too simple to be answered ?
i''m using cocoon 2.0.4 and tomcat 3.3.1. I didn't encounter this trouble. It's working fine for me. If your subsitemap is not reloaded you should look at te different option in map:mount ... At 11:23 20/02/2003 +0100, you wrote: Hi, and thanks for your reply :) quote Try relative location for your files. /quote The problem is that my subsitemap is not located in a subfolder under the main sitemap. So I must specify as src something like ../../../Apache/htdocs/myFolder/itsHere. Humf! == BUT, finally I found 2 interesting things : 1/ Even in Windows, if I specify the path as file:///D:/work/web.xmap instead file:///D:\work\web.xmap, it works ! Not really logic. 2/ When I change something in the main sitemap without updating the subsitemap file, it fails ! I must make a fake modification in the subsitemap file to make things working ... A little bit confusing, isn't it ? BTW, do you have the same behaviours (I use 2.0.4) ??? Laurent. - 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]
sunrise authentication and request Object
I'm using sunrise authentication and I need to get the request parameter send by the form tag. It seems that during the pipelines processing, the request parameters are lost so when I use xsp-request:get-parameter name=login/ in my xsp page, there is nothing. If I don't use sunrise auhentication, I can get the parameter(s). I'm sure I loose the parameters during the pipeline processing, I saw it in the core.log file. In my pipeline, I have : !-- log the user -- map:act type=sunRise_login map:parameter name=handler value=foo_handler/ map:parameter name=parameter_name value=request:name/ map:parameter name=parameter_password value=request:password/ !-- if the authentication is successfull then this redirect will be performed -- map:redirect-to uri=ixia_demo/ /map:act ... map:match pattern=ixia_demo !-- check you are already logged -- map:act type=sunRise_loggedIn map:parameter name=handler value=foo_handler/ map:redirect-to uri=protected/display/ /map:act !-- if not go to page login-- ... /map:match map:match pattern=protected/** map:act type=sunRise_auth map:parameter name=handler value=foo_handler/ !-- welcome page -- Is there a way to keep the parameter during the pipeline processing ? Lionel - 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: sunrise authentication and request Object
Here is the handler : map:action name=sunRise_auth src=org.apache.cocoon.sunshine.sunrise.acting.AuthAction handlers handler name=foo_handler xmlns:map=http://apache.org/cocoon/sitemap/1.0; xmlns:sunshine=http://sunshine.sundn.de/sunshine/1.0; redirect-to uri=cocoon://login_page/ authentication uri=cocoon:raw://authuser/ /handler /handlers At 16:01 19/02/2003 +0100, you wrote: Lionel, please send also the definition of the handler. Martin - Original Message - From: Lionel Crine [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 3:35 PM Subject: sunrise authentication and request Object I'm using sunrise authentication and I need to get the request parameter send by the form tag. It seems that during the pipelines processing, the request parameters are lost so when I use xsp-request:get-parameter name=login/ in my xsp page, there is nothing. If I don't use sunrise auhentication, I can get the parameter(s). I'm sure I loose the parameters during the pipeline processing, I saw it in the core.log file. In my pipeline, I have : !-- log the user -- map:act type=sunRise_login map:parameter name=handler value=foo_handler/ map:parameter name=parameter_name value=request:name/ map:parameter name=parameter_password value=request:password/ !-- if the authentication is successfull then this redirect will be performed -- map:redirect-to uri=ixia_demo/ /map:act ... map:match pattern=ixia_demo !-- check you are already logged -- map:act type=sunRise_loggedIn map:parameter name=handler value=foo_handler/ map:redirect-to uri=protected/display/ /map:act !-- if not go to page login-- ... /map:match map:match pattern=protected/** map:act type=sunRise_auth map:parameter name=handler value=foo_handler/ !-- welcome page -- Is there a way to keep the parameter during the pipeline processing ? Lionel - 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]
get sunrise session values from an xsp page
How can I get sunrise session values in an xsp page. I'm trying this ? My login page : ?xml version=1.0 encoding=UTF-8? page content form urllogin?resource=ixia_demo/url field name=name type=text length=24 description=User/ field name=password type=password length=10 description=Password/ /form /content /page /xsp:page My xsp page : ?xml version=1.0 encoding=UTF-8? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:sunshine=http://cocoon.apache.org/sunshine/1.0; page content session-info sunshine:getxml context=session path=/parameter/name/ /session-info /content /page xsp:page xsl document : xsl:template match=session_info xsl:apply-templates/ /xsl:template The xsp page does not understand the sunshine:getxml context=session path=/parameter/name/ I'm kind of lost. - 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: sunrise authentication and request Object
It's not working. At 16:48 19/02/2003 +0100, you wrote: Try to replace cocoon:raw: with cocoon: in authentication uri=cocoon:raw://authuser/ I am not sure, but I think the raw attribute causes parameters to be lost. Martin - Original Message - From: Lionel Crine [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 4:10 PM Subject: Re: sunrise authentication and request Object Here is the handler : map:action name=sunRise_auth src=org.apache.cocoon.sunshine.sunrise.acting.AuthAction handlers handler name=foo_handler xmlns:map=http://apache.org/cocoon/sitemap/1.0; xmlns:sunshine=http://sunshine.sundn.de/sunshine/1.0; redirect-to uri=cocoon://login_page/ authentication uri=cocoon:raw://authuser/ /handler /handlers At 16:01 19/02/2003 +0100, you wrote: Lionel, please send also the definition of the handler. Martin - Original Message - From: Lionel Crine [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 3:35 PM Subject: sunrise authentication and request Object I'm using sunrise authentication and I need to get the request parameter send by the form tag. It seems that during the pipelines processing, the request parameters are lost so when I use xsp-request:get-parameter name=login/ in my xsp page, there is nothing. If I don't use sunrise auhentication, I can get the parameter(s). I'm sure I loose the parameters during the pipeline processing, I saw it in the core.log file. In my pipeline, I have : !-- log the user -- map:act type=sunRise_login map:parameter name=handler value=foo_handler/ map:parameter name=parameter_name value=request:name/ map:parameter name=parameter_password value=request:password/ !-- if the authentication is successfull then this redirect will be performed -- map:redirect-to uri=ixia_demo/ /map:act ... map:match pattern=ixia_demo !-- check you are already logged -- map:act type=sunRise_loggedIn map:parameter name=handler value=foo_handler/ map:redirect-to uri=protected/display/ /map:act !-- if not go to page login-- ... /map:match map:match pattern=protected/** map:act type=sunRise_auth map:parameter name=handler value=foo_handler/ !-- welcome page -- Is there a way to keep the parameter during the pipeline processing ? Lionel - 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] - 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: cocoon-reload parameter
You're right, but when I don't use it the sax events from my transformer are lost. They are in the tomcat console (the windows where we see the error) but the xslt transformer do not get them. At 13:22 17/02/2003 -0500, you wrote: I would really suggest going back and finding the solution to the problem that made cocoon-reload necessary. That causes the entire cocoon instance to be destroyed and reloaded - reading all configuration from files on disk, re-initializing all components, etc. It is going to be a very big drain on your system to use it the way you are. Additionally, I'd highly recommend disabling its use (in web.xml) for live sites. Geoff Howard At 04:28 AM 2/17/2003, you wrote: I generate file from a form and I need to use cocoon-reload parameter, I don't know why but I had to. To use it I'm doing, from my xsl file. ... form method=post target=_top action=../ixiarequest?cocoon-reload=true ... Is there another way to use it without passing it in the URL. - 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: cocoon-reload parameter
The pipeline : map:match pattern=request map:generate type=Mygenerator/ map:transform type=Mytransformer map:parameter name=url value=http://localhost/there.wdsl/ map:parameter name=domain value=domain/ map:parameter name=server value=server/ map:parameter name=base value=base/ map:parameter name=name value=name/ map:parameter name=password value=password/ /map:transform !-- map:transform type=xslt src=demo/documents.xsl/-- map:serialize type=xmltext/ /map:match The xsl document : ... xsl:template match=indexdefinition html head link rel=stylesheet type=text/css href=../style/style.css/ /head body h1 class=text IXIASOFT DEMO/h1 !-- form method=post target=_top action=../ixiarequest-- form method=post target=_top action=../ixiarequest?cocoon-reload=true xsl:apply-templates select=indexes/ /form /body /html /xsl:template ... etc hope this help At 08:38 18/02/2003 +, you wrote: Lionel, You're right, but when I don't use it the sax events from my transformer are lost. They are in the tomcat console (the windows where we see the error) but the xslt transformer do not get them. Could you post the map:match pattern=ixiarequest section of your sitemap, so that we can see what you are trying to do? Thanks, Upayavira - 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]
partial answer of cocoon-reload parameter
I have a partial answer about cocoon-reload. In my transformer, I initialized a parser like this : public void compose( ComponentManager manager ) { super.compose(manager); try { this.parser = (Parser) manager.lookup(Parser.ROLE); } catch ( ComponentException cme ) { getLogger().warn( Could not get the DataSource Selector, cme ); } } Then, I invoke the recycle method : public void recycle() { super.recycle(); this.inputStringSource = null; this.url = null; this.domain = null; this.server = null; this.base = null; this.login = null; this.password = null; this.request = null; this.manager.release(this.parser); // this.parser = null; I have commented this line above, so I do not empty the parser. Now I don't have to use cocoon-reload parameter and when I relod the page I still have my data. - 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]
cocoon-reload parameter
I generate file from a form and I need to use cocoon-reload parameter, I don't know why but I had to. To use it I'm doing, from my xsl file. ... form method=post target=_top action=../ixiarequest?cocoon-reload=true ... Is there another way to use it without passing it in the URL. - 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]
What does cocoon-reload initialized
I'd like to know which objects and files and parsed during the initialization (in a very detailed way) - 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]
parameters for custom requestgenerator
Hello, I hava to get some parameters from a form but I'm stuck. I have some code like in my html file (created with an xsl transformation): index NAME=Prices Index tr td class=text_align_right_withoutPrices Index : From : /tdtd class=text_align_left_withoutinput name=numericindex_Start size=10 type=text/td /tr tr td class=text_align_right_without To : /tdtd class=text_align_left_withoutinput name=numericindex_End size=10 type=text/td /tr /index And I want to get : Prices Index, numericindex_Start and numericindex_End, in the file created by my custom requestgenerator, like this : parameters name=numericindex_Start valuePrices Indexvalue valuevalue - 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: parameters for custom requestgenerator
Sorry I did a bad manipulation. Herer is the thing : Hello, I have to get some parameters from a form but I'm stuck. I have some code like in my html file (created with an xsl transformation): index NAME=Prices Index tr td class=text_align_right_withoutPrices Index : From : /tdtd class=text_align_left_withoutinput name=numericindex_Start size=10 type=text/td /tr tr td class=text_align_right_without To : /tdtd class=text_align_left_withoutinput name=numericindex_End size=10 type=text/td /tr /index And I want to get : Prices Index, numericindex_Start and numericindex_End, in the file created by my custom requestgenerator, like this : parameters name=numericindex_Start valuePrices Indexvalue valuevalue of valuevalue of the inputvaluevalue valuevalue of numericindex_Endvalue Thanks - 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: parameters for custom requestgenerator
I found a solution. I'm gonna pass as parameter: input name=Prices Index_numericindex_Start size=10 type=text And in the generator I'll separate the name into 3 parts. At 10:51 14/02/2003 -0500, you wrote: send me your generator file Geoff -Original Message- From: Lionel Crine [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 10:23 AM To: [EMAIL PROTECTED] Subject: Re: parameters for custom requestgenerator Sorry I did a bad manipulation. Herer is the thing : Hello, I have to get some parameters from a form but I'm stuck. I have some code like in my html file (created with an xsl transformation): index NAME=Prices Index tr td class=text_align_right_withoutPrices Index : From : /tdtd class=text_align_left_withoutinput name=numericindex_Start size=10 type=text/td /tr tr td class=text_align_right_without To : /tdtd class=text_align_left_withoutinput name=numericindex_End size=10 type=text/td /tr /index And I want to get : Prices Index, numericindex_Start and numericindex_End, in the file created by my custom requestgenerator, like this : parameters name=numericindex_Start valuePrices Indexvalue valuevalue of valuevalue of the inputvaluevalue valuevalue of numericindex_Endvalue Thanks - 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: Too much java in xsp
OK, why not writing a generator. But how can I get the values from the form to my generator? With the xsp generator it was easy, I only had to use :xsp:request get-parameter ... At 12:31 12/02/2003 -0500, you wrote: Well, Robert's suggestion is a good one and I've already written a tutorial about that (http://xml.apache.org/cocoon/tutorial/tutorial-generator.htmlhttp://xml.apache.org/cocoon/tutorial/tutorial-generator.html) But if that seems out of reach, you can use something like: xsp:page xsp:structure xsp:includeyourpackage.*/xsp:include /xsp:structure ... to include any java class in your xsp and use it like you would anywhere else: yourpackage.YourHelper.doSomethingComplicated(object); or whatever. In the end, your xsp winds up as a java file (a Generator) so you can do whatever can be done in java from within an xsp (except inheritance??) including code encapsulation. See http://xml.apache.org/cocoon/userdocs/xsp/logicsheet-concepts.html#java-logicsheetshttp://xml.apache.org/cocoon/userdocs/xsp/logicsheet-concepts.html#java-logicsheets for some specific things to look out for when doing that - the doc is aimed at logicsheet development, but applies to this as well. Some of the logicsheets do this as well, and would make good examples, though they are slightly more complicated because they introduce one layer of abstraction from an xsp. Geoff -Original Message- From: Lionel Crine [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 12, 2003 12:03 PM To: [EMAIL PROTECTED] Subject: RE: Too much java in xsp Please, can you give me more information (hints) about the helper Geoff ? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlhttp://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: newbies : problem with sitemap.xmap
you need a reader : map:readers default=resource map:reader logger=sitemap.reader.resource name=resource pool-max=32 src=org.apache.cocoon.reading.ResourceReader/ /map:readers in the components see the sitemaAt 09:55 13/02/2003 +0100, you wrote: hi i got a problem with cocoon 2 i would like to serve static page so i write sitemap.xmap like this - map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; map:components map:generators map:generator name=serverpages src=org.apache.cocoon.generation.ServerPagesGenerator/ /map:generators map:serializers map:serializer name=xml mime-type=text/xml src=org.apache.cocoon.serialization.XMLSerializer/ /map:serializers map:matchers map:matcher name=wildcard src=org.apache.cocoon.matching.WildcardURIMatcher/ /map:matchers /map:components map:pipelines map:pipeline map:match pattern=index.html map:read src=index.html mime-type=text/html/ /map:match /map:pipeline /map:pipelines /map:sitemap but it doesnt work in browser i always obtaint this message Cocoon 2 - Internal server error type fatal message Language Exception description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: Line 241, column 54: '}' expected Line 63, column 11: class org.apache.cocoon.www.sitemap_xmap should be declared abstract; it does not define method process(org.apache.cocoon.environment.Environment, org.apache.cocoon.components.pipeline.StreamPipeline, org.apache.cocoon.components.pipeline.EventPipeline) in class org.apache.cocoon.sitemap.AbstractSitemap Line 0, column 0: 2 errors sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet stack-trace org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: Line 241, column 54: '}' expected Line 63, column 11: class org.apache.cocoon.www.sitemap_xmap should be declared abstract; it does not define method process(org.apache.cocoon.environment.Environment, org.apache.cocoon.components.pipeline.StreamPipeline, org.apache.cocoon.components.pipeline.EventPipeline) in class org.apache.cocoon.sitemap.AbstractSitemap Line 0, column 0: 2 errors at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR esource(ProgramGeneratorImpl.java:360) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr ogramGeneratorImpl.java:312) at org.apache.cocoon.sitemap.Handler.run(Handler.java:267) at java.lang.Thread.run(Thread.java:536) Caused by: org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: Line 241, column 54: '}' expected Line 63, column 11: class org.apache.cocoon.www.sitemap_xmap should be declared abstract; it does not define method process(org.apache.cocoon.environment.Environment, org.apache.cocoon.components.pipeline.StreamPipeline, org.apache.cocoon.components.pipeline.EventPipeline) in class org.apache.cocoon.sitemap.AbstractSitemap Line 0, column 0: 2 errors at org.apache.cocoon.components.language.programming.java.JavaLanguage.compile( JavaLanguage.java:243) at org.apache.cocoon.components.language.programming.CompiledProgrammingLanguag e.load(CompiledProgrammingLanguage.java:207) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat eResource(ProgramGeneratorImpl.java:417) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR esource(ProgramGeneratorImpl.java:353) ... 3 more org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: Line 241, column 54: '}' expected Line 63, column 11: class org.apache.cocoon.www.sitemap_xmap should be declared abstract; it does not define method process(org.apache.cocoon.environment.Environment, org.apache.cocoon.components.pipeline.StreamPipeline, org.apache.cocoon.components.pipeline.EventPipeline) in class org.apache.cocoon.sitemap.AbstractSitemap Line 0, column 0: 2 errors at org.apache.cocoon.components.language.programming.java.JavaLanguage.compile( JavaLanguage.java:243) at org.apache.cocoon.components.language.programming.CompiledProgrammingLanguag e.load(CompiledProgrammingLanguage.java:207) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat eResource(ProgramGeneratorImpl.java:417) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR esource(ProgramGeneratorImpl.java:353) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr ogramGeneratorImpl.java:312) at
RE: newbies : problem with sitemap.xmap
in my sitemap i write that : map:generator name=html src=org.apache.cocoon.generation.HTMLGenerator/ ... map:match pattern=html map:generate type=html src=test.html/ map:serialize/ /map:match It's working fine .. The reader is used for the css, jpg, etc Hope that help At 10:09 13/02/2003 +0100, you wrote: i had it in sitemap.xmap but it doesnt work in catalina stdout i obtaint this -- Starting service Tomcat-Standalone Apache Tomcat/4.1.12-LE-jdk14 java.lang.RuntimeException: Fatal: Errors in XSLT transformation: Warning: File jar:file:/C:/etango/tomcat/webapps/cocoonsamples/WEB-INF/lib/cocoo n-2.0.4.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitem ap.x sl; Line 1817; Column 34; [Logicsheet processor] Attribute 'type' missing in dynamic tag map:match Fatal: Ach?vement dirigU de la feuille de style at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java :3170) at java.lang.Thread.run(Thread.java:536) - and exactely the same message in browser -Message d'origine- De : Lionel Crine [mailto:[EMAIL PROTECTED]] Envoye : jeudi 13 fevrier 2003 10:01 A : [EMAIL PROTECTED] Objet : Re: newbies : problem with sitemap.xmap you need a reader : map:readers default=resource map:reader logger=sitemap.reader.resource name=resource pool-max=32 src=org.apache.cocoon.reading.ResourceReader/ /map:readers in the components see the sitemaAt 09:55 13/02/2003 +0100, you wrote: hi i got a problem with cocoon 2 i would like to serve static page so i write sitemap.xmap like this - map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; map:components map:generators map:generator name=serverpages src=org.apache.cocoon.generation.ServerPagesGenerator/ /map:generators map:serializers map:serializer name=xml mime-type=text/xml src=org.apache.cocoon.serialization.XMLSerializer/ /map:serializers map:matchers map:matcher name=wildcard src=org.apache.cocoon.matching.WildcardURIMatcher/ /map:matchers /map:components map:pipelines map:pipeline map:match pattern=index.html map:read src=index.html mime-type=text/html/ /map:match /map:pipeline /map:pipelines /map:sitemap but it doesnt work in browser i always obtaint this message Cocoon 2 - Internal server error - --- type fatal message Language Exception description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: Line 241, column 54: '}' expected Line 63, column 11: class org.apache.cocoon.www.sitemap_xmap should be declared abstract; it does not define method process(org.apache.cocoon.environment.Environment, org.apache.cocoon.components.pipeline.StreamPipeline, org.apache.cocoon.components.pipeline.EventPipeline) in class org.apache.cocoon.sitemap.AbstractSitemap Line 0, column 0: 2 errors sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet stack-trace org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: Line 241, column 54: '}' expected Line 63, column 11: class org.apache.cocoon.www.sitemap_xmap should be declared abstract; it does not define method process(org.apache.cocoon.environment.Environment, org.apache.cocoon.components.pipeline.StreamPipeline, org.apache.cocoon.components.pipeline.EventPipeline) in class org.apache.cocoon.sitemap.AbstractSitemap Line 0, column 0: 2 errors at org.apache.cocoon.components.language.generator.ProgramGeneratorI mpl.createR esource(ProgramGeneratorImpl.java:360) at org.apache.cocoon.components.language.generator.ProgramGeneratorI mpl.load(Pr ogramGeneratorImpl.java:312) at org.apache.cocoon.sitemap.Handler.run(Handler.java:267) at java.lang.Thread.run(Thread.java:536) Caused by: org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: Line 241, column 54: '}' expected Line 63, column 11: class org.apache.cocoon.www.sitemap_xmap should be declared abstract; it does not define method process(org.apache.cocoon.environment.Environment, org.apache.cocoon.components.pipeline.StreamPipeline, org.apache.cocoon.components.pipeline.EventPipeline) in class org.apache.cocoon.sitemap.AbstractSitemap Line 0, column 0: 2 errors at org.apache.cocoon.components.language.programming.java.JavaLangua ge.compile( JavaLanguage.java
RE: Too much java in xsp
I'll write a generator. FInally it's a good idea. Thanks for the advices. At 09:29 13/02/2003 +0100, you wrote: OK, why not writing a generator. But how can I get the values from the form to my generator? With the xsp generator it was easy, I only had to use :xsp:request get-parameter ... At 12:31 12/02/2003 -0500, you wrote: Well, Robert's suggestion is a good one and I've already written a tutorial about that (http://xml.apache.org/cocoon/tutorial/tutorial-generator.htmlhttp://xml.apache.org/cocoon/tutorial/tutorial-generator.html) But if that seems out of reach, you can use something like: xsp:page xsp:structure xsp:includeyourpackage.*/xsp:include /xsp:structure ... to include any java class in your xsp and use it like you would anywhere else: yourpackage.YourHelper.doSomethingComplicated(object); or whatever. In the end, your xsp winds up as a java file (a Generator) so you can do whatever can be done in java from within an xsp (except inheritance??) including code encapsulation. See http://xml.apache.org/cocoon/userdocs/xsp/logicsheet-concepts.html#java-logicsheetshttp://xml.apache.org/cocoon/userdocs/xsp/logicsheet-concepts.html#java-logicsheets for some specific things to look out for when doing that - the doc is aimed at logicsheet development, but applies to this as well. Some of the logicsheets do this as well, and would make good examples, though they are slightly more complicated because they introduce one layer of abstraction from an xsp. Geoff -Original Message- From: Lionel Crine [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 12, 2003 12:03 PM To: [EMAIL PROTECTED] Subject: RE: Too much java in xsp Please, can you give me more information (hints) about the helper Geoff ? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlhttp://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: newbies : problem with sitemap.xmap
Starting service Tomcat-Standalone Apache Tomcat/4.1.12-LE-jdk14 java.lang.RuntimeException: Fatal: Errors in XSLT transformation: Warning: File jar:file:/C:/etango/tomcat/webapps/cocoonsamples/WEB-INF/lib/cocoo n-2.0.4.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitem ap.xsl; Line 1817; Column 34; [Logicsheet processor] Attribute 'type' missing in dynamic tag map:match Fatal: Ach?vement dirigU de la feuille de style at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3170) at java.lang.Thread.run(Thread.java:536) last sitemap.xmap - map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; map:components ONE COMPONENTS IS ENOUGHT remove this on - map:components map:generators default=file/ map:generator name=html src=org.apache.cocoon.generation.HTMLGenerator/ map:transformers default=xslt/ map:readers default=resource/ map:serializers default=html/ map:matchers default=wildcard/ /map:components AND THIS ONE - /map:components map:pipelines map:pipeline map:match pattern=index.html map:generate type=html src=index.html/ map:serialize/ /map:match /map:pipeline /map:pipelines /map:sitemap Moreover you should declare explicitly what you're using. Like that for the generator : map:generator name=html src=org.apache.cocoon.generation.HTMLGenerator/ the transformers ... etc this synthax is allowed in sub sitemap...I'm not quite sure you can write it in the main sitemap. /*/ map:transformers default=xslt/ map:readers default=resource/ map:serializers default=html/ map:matchers default=wildcard/ /*/ Have a look at the sitemap.xmap in webapps/cocoon/. If you're doing a sub sitemap you should declare it in the main sitemap. As for as I am concern, I made a copy of the directory cocoon (called for example cocoon-dev), remove what I didn't want and wrote a new sitemap.xconf. Lionel - 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]
question about cocoon object
/* I'm reading the code located in the requestgenerator */ public void generate() throws SAXException { Request request = ObjectModelHelper.getRequest(objectModel); this.contentHandler.startDocument(); === this method comes from AbstractXMLProducer /*** Add xmlns ***/ /*this.contentHandler.startPrefixMapping(,URI);*/ AttributesImpl attr=new AttributesImpl(); this.attribute(attr,target, request.getRequestURI()); === this method comes from AbstractServerPage My questions are : In this.attribute, this reference which object ? How can a class (requestgenerator) can use object from an abstract class at the same level ? Maybe my question are silly, but I like knowing what I'm reading and using. Lionel - 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: Too much java in xsp
II figured it out. It was a stupid question from me. - 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: question about cocoon object
Yes, stardocuments comes from contenthandler. Another question : where does data method comes from ? I know that I only have to look at the javadocs, but after long time I didn't find where this method comes from. Also, I'm a little bit surprise about the source of attribute method. Where is the link between AbstractServerPage and RequestGenerator ? At 08:50 13/02/2003 -0500, you wrote: Maybe I don't understand your question, but this in java refers to the current instance of the class itself. So this refers to the current RequestGenerator object. And this.attribute refers to a method defined somewhere in the class itself or in one of the classes this generator inherits from. You note (partially correctly) that this.contentHandler is inherited from AbstractXMLProducer, but startDocument() is in the contentHandler class, not AbstractXMLProducer. Don't know offhand where attribute() is inherited from, but it shouldn't take long to find out - the java docs will tell you where it came from. Geoff -Original Message- From: Lionel Crine [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 8:23 AM To: [EMAIL PROTECTED] Subject: question about cocoon object /* I'm reading the code located in the requestgenerator */ public void generate() throws SAXException { Request request = ObjectModelHelper.getRequest(objectModel); this.contentHandler.startDocument(); === this method comes from AbstractXMLProducer /*** Add xmlns ***/ /*this.contentHandler.startPrefixMapping(,URI);*/ AttributesImpl attr=new AttributesImpl(); this.attribute(attr,target, request.getRequestURI()); === this method comes from AbstractServerPage My questions are : In this.attribute, this reference which object ? How can a class (requestgenerator) can use object from an abstract class at the same level ? Maybe my question are silly, but I like knowing what I'm reading and using. Lionel - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlhttp://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: question about cocoon object
I found my answers!! At 08:50 13/02/2003 -0500, you wrote: Maybe I don't understand your question, but this in java refers to the current instance of the class itself. So this refers to the current RequestGenerator object. And this.attribute refers to a method defined somewhere in the class itself or in one of the classes this generator inherits from. You note (partially correctly) that this.contentHandler is inherited from AbstractXMLProducer, but startDocument() is in the contentHandler class, not AbstractXMLProducer. Don't know offhand where attribute() is inherited from, but it shouldn't take long to find out - the java docs will tell you where it came from. Geoff -Original Message- From: Lionel Crine [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 8:23 AM To: [EMAIL PROTECTED] Subject: question about cocoon object /* I'm reading the code located in the requestgenerator */ public void generate() throws SAXException { Request request = ObjectModelHelper.getRequest(objectModel); this.contentHandler.startDocument(); === this method comes from AbstractXMLProducer /*** Add xmlns ***/ /*this.contentHandler.startPrefixMapping(,URI);*/ AttributesImpl attr=new AttributesImpl(); this.attribute(attr,target, request.getRequestURI()); === this method comes from AbstractServerPage My questions are : In this.attribute, this reference which object ? How can a class (requestgenerator) can use object from an abstract class at the same level ? Maybe my question are silly, but I like knowing what I'm reading and using. Lionel - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlhttp://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]
sub sitemap whith protected resource
Hello, Every time I need a pattern I need to pass cocoon-reload=true to relaod the sitemap even it 's unchanged. The issue is that is really slow, so I've decided to create a sub sitemap so that only it would be reloaded. I'm not sure it will works. The thing is that I need to insert protected patterns into the sub sitemap. Should I store all the authenticate process into it or only the patterns I want ? If it works, how can I be sure cocoon-reload=true will reload only the sub sitemap ? Lionel - 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]
Too much java in xsp
I'm using an xsp in which I manipulate some code (xsp:request parameters, for example). But unfortunately, There is too much code java in it and so the xsp is very HUGE. I was thinking about using an action in the sitemap to modify my document instead of java code in the xsp, is it a good idea ? am I on the right way ? - 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: Too much java in xsp
Please, can you give me more information (hints) about the helper Geoff ? - 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: Too much java in xsp
Robert, Here is my issue : I have create a portal : When I come to the form page : 1/An xsp file is generated from the form. 2/This xsp get the request parameters and modify the structure as I want it to be 3/A transformer Get the SAX events of the xsp generator, get information from XML DB and return a response 4/ Finally I dispay the result in the browser. I think creating a new generator would be an error. - 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: custom generator not working on a fresh install
Usually this error happens when I jar file is missing in the classpath or it is a syntax error in the sitemap. Hope this help. At 22:09 10/02/2003 +0100, you wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi again! nobody any idea? i'm getting desperate here, so any hint/pointer/tip would be very very welcome! thanks, rick On Friday 07 February 2003 22:52, peter riegersperger wrote: Hi all! We reactivated a Cocoon-based project that I haven't touched for a while, and I try to get Cocoon (and that project) running on my notebook. Included in this project is a custom generator, and this seems to be a bit of a problem. On the development server, all is running fine, but as soon as I add the custom generator to the sitemap on my notebook, I get the following error: org.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.NoClassDefFoundError: org/apache/cocoon/generation/AbstractGenerator Our custom generator extends AbstractGenerator, but why can't Cocoon find it? On our server, there's no problem with the custom generator. (The rest of cocoon is running excellent, as is everything else I modified. It's just the mention of the generator) The server is running on cocoon-2.0.3, I'm using 2.0.4 (Source distribution) on my notebook. All in all, I'm running: Linux Tomcat 4.0.4 Cocoon 2.0.4 (the source distribution) j2sdk1.4.1_01 First, I built Cocoon with ./build.sh -Dinclude.webapp.libs=yes -Dinstall.war=$TOMCAT_HOME/webapps webapp Then, I copied it to /tomcat/webapps I copied the following files to tomcat/common/lib: xalan-2.3.1.jar xercesImpl-2.0.0.jar these two where present: xercesImpl.jar xmlParserAPIs.jar I copied the following files to jdk1.4-home/jre/endorsed: xalan-2.3.1.jar xercesImpl-2.0.0.jar xml-apis.jar The jar with our custom generator is in cocoon/WEB-INF/lib and tomcat/common/lib I've been fiddling around with this the whole day, and obviously I've forgotten something. I hope anyone can help me, and that this mail makes any sense (after 13 hours of copying, deleting and modifying files on a 12-screen), rick ps: In my desperation, I even tried copying the complete cocoon-directory from our server, but the error is exactly the same. - -- |- | peter riegersperger [EMAIL PROTECTED] |- | ein windows switcher tagebuch: | http://forum.subnet.at/viewforum.php?f=22 |- | subnet | platform for media art and experimental technologies |- | http://www.subnet.at/ |- | muehlbacherhofweg 5 // 5020 salzburg // austria |- | fon/fax +43/662/842 897 |- -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+SBTuIMP39JYOy9IRAkpDAKDEfKf1C8XyBEd600yRj2YxZTx+twCgtKJ1 iMyuvq4cyWUL+Pn5xjqj+bY= =/mC5 -END PGP SIGNATURE- - 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]
passing sax events through transformer
Hello, I'm trying to pass sax events through my transformer but nothing is happening. here is my pattern : map:match pattern=protected/request map:generate type=request/ map:transform type=xslt src=demo/request.xsl/ map:transform type=My_transformer/ ==It seems that transformer do nothing map:serialize type=xml/ /map:match Should I write something specified into my transformer ? NB : The pattern is working fine map:match pattern=/index* map:generate src=demo/{1}.xml/ map:transform type=My_transformer/ map:transform type=xslt src=demo/documents.xsl/ map:serialize type=html/ /map:match thanks in advance - 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: passing sax events through transformer
It's working now At 16:11 11/02/2003 +0100, you wrote: Hello, I'm trying to pass sax events through my transformer but nothing is happening. here is my pattern : map:match pattern=protected/request map:generate type=request/ map:transform type=xslt src=demo/request.xsl/ map:transform type=My_transformer/==It seems that transformer do nothing map:serialize type=xml/ /map:match Should I write something specified into my transformer ? NB : The pattern is working fine map:match pattern=/index* map:generate src=demo/{1}.xml/ map:transform type=My_transformer/ map:transform type=xslt src=demo/documents.xsl/ map:serialize type=html/ /map:match thanks in advance - 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]
error links to the sitemap
I have a strange error. I wrote this pipeline : !-- generate an xml request file -- map:match pattern=ixia/request map:generate type=request/ map:transform type=xslt src=demo/request.xsl/ map:transform type=IXIASOFTQuery/ map:serialize type=xmltext/ /map:match When I test it, it's working ONLY once. When I refresh the page, the transformers works fine (saw that in tomcat console) but the page is empty. So if I want it to work again i need to save again sitemap!!! What's happening ? - 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]
how always regenerate sitemap.xmap
How can I do that ? - 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]
Call a css into an xsl
I'd like to generate an html document using a css file, with an xsl transformation. Here is what i wrote : xsl:template match=content html head /head link rel=stylesheet type=text/css href=style.css/ body h1 align=centerDEMO/h1 xsl:apply-templates/ /body /html /xsl:template ... I think this is not the way to use css with cocoon? I read about a resource tag but I don't figure out how to join my documents. - 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: Call a css into an xsl
I did, my mistake. At 14:09 10/02/2003 +0100, you wrote: Lionel Crine wrote: xsl:template match=content html head /head link rel=stylesheet type=text/css href=style.css/ I assume this was just a typo, but you need to put the link element inside the head element, not outside. Ugo -- Ugo Cei - http://www.beblogging.com/blog/ - 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]