Re: Impossible to use reader as source of XSLT?
[EMAIL PROTECTED] wrote: Hi, I have a problem. I want to use transformer, it gets XSL stylesheets not from filesystem, but from database. As some good mind advised, I used cocoon:/ protocol to call another pipeline with databasereader, which returns appropriate XSL stylesheet. But cocoon reports: Streaming of an internal pipeline is not possible with a reader. OK, I was afraid that this will happen. I see basically three options: a) try the blob source instead of the cocoon one. See javadocs on BlobSource and BlobSourceFactory from the databases block for details. b)You might do the trick using eg XSP (+ esql logicsheet) to retrieve the stylesheet. However, IIRC you will need to enclose the output with a tag otherwise the XSP will not work correctly, so you will need to filter out this additional root tag. c) write your own source / generator Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSL template from database
Jorg Heymans wrote: Hi, Can you elaborate a bit on what you mean by creating a source? Is this an avalon component? I've seen this word popup every now and then, just curious :) please see http://avalon.apache.org/excalibur/api/ Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wiki page : WyonaXopusEditor
hi i thing that something wrong is happen here. --stavros - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon 2.1.2 on Weblogic 6.1 is performing slower than on Tomcat 4.1.29
Mr Igor Galperin wrote: The XSL processing by Cocoon installed on Tomcat is pretty fast. The same application deployed in Weblogic 6.1 SP3 takes about 5 times more time to do the XSL part. In Tomcat it takes about 1 second , in Weblogic 5 seconds. We tried to use the SAXON, but it still very slow. I never tried if this is also correct for 6/5 but on Weblogic 7/8 it's speeding up a lot when changing the the servlet reload checks from -1 (always check) to something highter (we're using 0, never check). I don't have a WL console available at the moment but if you need details tell me! Patrick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wiki page : WyonaXopusEditor
[EMAIL PROTECTED] wrote: hi i thing that something wrong is happen here. it's a very old page and used for migration to Lenya. The Xopus interface has been refactored in the meantime and is documented within the Lenya documentation. I will delete it from the Lenya overview. Michi --stavros - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Wechner Wyona Inc. - Open Source Content Management - Apache Lenya http://www.wyona.com http://cocoon.apache.org/lenya/ [EMAIL PROTECTED][EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP: using fo:external-graphic with SVG
J.Pietschmann wrote: Is there a DOCTYPE in the SVG, or does the SVG reference other images? The No ImageReader is a kind of catch-all. It seems the SVG reader gets an error during parsing the SVG or while determining the image size. Delete any DOCTYPE (but keep the SVG and perhaps XLINK namespaces), add an heigth and width to the top-level element, and use absolute file path for referenced bitmaps. Thanks for your reply. I tried removing the DOCTYPE and checked the width/height - no change... There are no external bitmaps... And rendering to JPG/PNG works fine. The file was exported from Adobe Illustrator -- is there someone with some expirience on using Illustrator's SVG in Cocoon/FOP? I will try to create a simple SVG by hand to see if it's related to the exported SVG. Patrick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting the prefix URI form within a subsitemap
Thanks for your tip. I don't use XSP that much but it's useful to see that you too are using workaroung. So I can stop digging into the docs for some hidden method :) --- Jan Hoskens [EMAIL PROTECTED] wrote: Hello, I had the same problem to find the prefix in a subsitemap. I did not find a simple way to retreive it, but I just managed to develop a workaround in XSP: (This is just a fragment, I'm using own tags and stuff that I replaced here) ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xsp:structure xsp:includeorg.apache.cocoon.environment.Environment/xsp:include xsp:includeorg.apache.cocoon.components.CocoonComponentManager/xsp:includ e /xsp:structure html body xsp:logic try{ CocoonComponentManager m = (CocoonComponentManager)manager; Environment env = m.getCurrentEnvironment(); pxsp:exprenv.getURIPrefix()/xsp:expr/p } catch(Exception e){ pe.toString()/p } /xsp:logic /body /html /xsp:page This is just an xsp page that shows the prefix, if you create an XSPaction and save the result in a variable, you can pass it anywhere. I just found this and haven't tested it in all situations yet, but it seems to work. Hope this helps;-) Bye, Jan - Original Message - From: Oscar Picasso [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 08, 2004 5:53 AM Subject: Getting the prefix URI form within a subsitemap Hi, I am trying to retrieve the prefix URI from inside a subsitemap. Let say I have: +-- webapps +-- cocoon +-- my-app I would like to retrieve dynamically the string my-app to construct some uris inside my generator. From what I have seen only the request object store url/uri like strings and I have not seen 'prefix-uri' or something like that. It would be convenient. Did I miss something? __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - 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!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested actions
Flavio Palumbo wrote: i wrote two little actions that i put nested in a pipeline. When the first action fails it returns a null and the second action is not called, but if the second action fails it also returns a null but the confirmation page is called as if the second action was successfull. You can do something like this: map:act ...first... map:act ...second... !-- success for 1st AND second action -- map:generate ... map:serialize ... /map:act /map:act !-- no success/error page --- map:generate ... map:serialize ... Patrick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[entities] Problem
Hi, You're my last chance to find my problem. I have an XML document which contains some XML entities (quot, gt, etc ). According to the element the entities are, the document is well or badly parsed. I'm not talking about entities into attributes but only into elements. All the elements wich may contain this entities are #PCDATA. Here is the parser method : DocumentBuilder db = null; db = DocumentBuilderFactory.newInstance().newDocumentBuilder(); myDocument = db.parse(stream); If I write : elementquot;/element (Ultraedit) [Fatal Error] :1:644: Element type module must be followed by either attribute specifications, or /. The crazy thing is that the document is well displayed in IE or mozilla AND there are other quot; in other elements of the document which don't crash the parser. If I write elementamp;quot;/element(Ultraedit) The parser is OK. But IE and mozilla displayed elementquot;/element. By the way, this problem is only happening in a transformer. I don't know if this is related. This transformer gets the document from an XMLDB, convert it into a DOM and is returned into the flow. Please what's happening ? Lionel Lionel CRINE Ingénieur Systèmes documentaires 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: [entities] Problem
Be carrefull ultraedit can transform in entity automatically (if it's like textpad) when you write your data. Use notepad for more security. Do the test Sebastien - Original Message - From: Lionel Crine [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 08, 2004 2:45 PM Subject: [entities] Problem Hi, You're my last chance to find my problem. I have an XML document which contains some XML entities (quot, gt, etc ). According to the element the entities are, the document is well or badly parsed. I'm not talking about entities into attributes but only into elements. All the elements wich may contain this entities are #PCDATA. Here is the parser method : DocumentBuilder db = null; db = DocumentBuilderFactory.newInstance().newDocumentBuilder(); myDocument = db.parse(stream); If I write : elementquot;/element (Ultraedit) [Fatal Error] :1:644: Element type module must be followed by either attribute specifications, or /. The crazy thing is that the document is well displayed in IE or mozilla AND there are other quot; in other elements of the document which don't crash the parser. If I write elementamp;quot;/element(Ultraedit) The parser is OK. But IE and mozilla displayed elementquot;/element. By the way, this problem is only happening in a transformer. I don't know if this is related. This transformer gets the document from an XMLDB, convert it into a DOM and is returned into the flow. Please what's happening ? Lionel Lionel CRINE Ingénieur Systèmes documentaires 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: [entities] Problem
I'm sure ultraedit works well because it does not display as the same as textpad. At 15:20 08/01/2004 +0100, you wrote: Be carrefull ultraedit can transform in entity automatically (if it's like textpad) when you write your data. Use notepad for more security. Do the test Sebastien - Original Message - From: Lionel Crine [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 08, 2004 2:45 PM Subject: [entities] Problem Hi, You're my last chance to find my problem. I have an XML document which contains some XML entities (quot, gt, etc ). According to the element the entities are, the document is well or badly parsed. I'm not talking about entities into attributes but only into elements. All the elements wich may contain this entities are #PCDATA. Here is the parser method : DocumentBuilder db = null; db = DocumentBuilderFactory.newInstance().newDocumentBuilder(); myDocument = db.parse(stream); If I write : elementquot;/element (Ultraedit) [Fatal Error] :1:644: Element type module must be followed by either attribute specifications, or /. The crazy thing is that the document is well displayed in IE or mozilla AND there are other quot; in other elements of the document which don't crash the parser. If I write elementamp;quot;/element(Ultraedit) The parser is OK. But IE and mozilla displayed elementquot;/element. By the way, this problem is only happening in a transformer. I don't know if this is related. This transformer gets the document from an XMLDB, convert it into a DOM and is returned into the flow. Please what's happening ? Lionel Lionel CRINE Ingénieur Systèmes documentaires 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] Lionel CRINE Ingénieur Systèmes documentaires 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: Global variable/parameter in sitemap
--- Oscar Picasso [EMAIL PROTECTED] wrote: Hi, I would like to use some kind of global variable in my pipelines but don't figure out how to do that. Let assume you have something like this: map:pipeline map:match pattern=rela/** map:act type=valid-path-action src=docs/toc.xml map:select type=parameter map:parameter name=parameter-selector-test value={best-matching-path}/ map:when test={../0} map:aggregate element=site map:part src=cocoon:/{../0}/internal/path-steps-factory/ map:part src=docs/toc.xml/ /map:aggregate map:transform src=structure.xsl/ map:serialize type=xml/ /map:when map:otherwise !-- this one should be global -- !-- | -- !-- V -- map:redirect-to uri={absolute-base-url}/{best-matching-path}/ this should be uri={global:absolute-base-url}/... /map:otherwise /map:select /map:act /map:match /map:pipeline I have tried to declare 'absolute-base-url' like this: map:pipelines map:component-configurations global-variables absolute-base-url http://my-host/cocoon/company /absolute-base-url /global-variables /map:component-configurations The above syntax is correct. or like this: map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; map:parameter name=absolute-base-url value=http://my-host/cocoon/company/ ... But so far, nothing has worked. Any idea? __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Alex Romayev Software Architect http://www.romayev.com [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Html issue
you dont give information of your transofrmations (xslt) so i can not help you a lot but some hints 1. use xml serialization for your support/beya-menu 2. check your support/beya-menu match direclty from your browser to see if the output is what you expect 3. create your home .../home xml fragment using xml serialization for all parts and transform this fragment to html. note: check othello sample in cocoon scratchpad area to see a similar aproach --stavros On Thu, 8 Jan 2004, beyaRecords - The home Urban music wrote: Hi, I have a pipe line that does some aggregation: map:aggregate element=home map:part src=cocoon:/support/beya-menu / map:part src=cocoon:/support/contract-summary / map:part src=context://beyarecords/content/adv-xyz-01.xml / map:part src=context://beyarecords/content/site_title.xml / /map:aggregate The line of issue is map:part src=cocoon:/support/beya-menu /, for which the code is: map:match pattern=support/beya-menu map:generate type=serverpages src=xsp/beya-menu.xsp/ map:serialize type=html/ /map:match The xsp code is: page menu table width=100% border=1 tr td align=left valign=topa href=/temp/homemenu item 1/a/td /tr tr td align=left valign=topa href=/temp/homemenu item 2/a/td /tr /table /menu /page What is happening at the moment is that the html between the menu tags is being stripped and only menu item 1 and 2 are being written to the screen, when in fact I want the integrity of the html kept intact so that when written to the screen the links are available to be clicked. Could someone please inform me how to do this? regards Uzo - 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: File Upload using cocoon. Unable to catch FilePartFile object from request object
1) in your sitemap below, I don't see where you are calling the xsp. As far as I can see it's not running at all. 2) I'd really recommend _not_ using an xsp generator to do business logic (like saving an uploaded file). If you're stuck in 2.0x use an action (which can also be coded using xsp though i've never done it personally). If you can move to 2.1 (which I would consider a must for any new development) use flow. 3) In your xsp below you only have to do a file.renameTo() to move the file - does that not get what you want? Geoff bajji m wrote: Hi Stephan, Thanks for info. pls have a look at my code as follows web.xml init-param param-nameupload-directory/param-name param-valueE:\upfiles/param-value /init-param init-param param-nameautosave-uploads/param-name param-valuetrue/param-value /init-param init-param param-nameoverwrite-uploads/param-name param-valuerename/param-value /init-param init-param param-nameupload-max-size/param-name param-value1000/param-value /init-param i put autosave-uploads true also. HTML form --- form method=post enctype=multipart/form-data name=sayHello action=fileUpload.html bFile:/binput type=file name=uploadfile size=25/ /tr input type=submit value=Upload name=button / /form And sitemap.xmap entry as follows -- map:match pattern=body-*/fileUpload.xml map:act type=sunRise-auth map:parameter name=handler value=videopro-handler/ map:generate type=wapi map:parameter name=wsdlURL type=String value=http://localhost:8080/ssfsoap/services/VideoproService?wsdl/ map:parameter name=methodName type=String value=uploadFile001 / map:parameter name=secure type=String value=false / /map:generate map:transform src=content/xdocs/services/xsl/fileUploadResult2Html.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:transform src=content/xdocs/session2html.xsl/ map:transform type=sunShine/ map:call resource=skinit map:parameter name=type value=document2html / /map:call /map:act /map:match And my XSP: -- ?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; -- xsp:structure xsp:includejava.io.File/xsp:include xsp:includejava.util.Enumeration/xsp:include xsp:includejava.util.Collections/xsp:include xsp:includejava.util.Map/xsp:include xsp:includeorg.apache.cocoon.environment.*/xsp:include xsp:includeorg.apache.cocoon.components.request.multipart.*/xsp:include /xsp:structure uploadFile001 xsp:logic Request request = ObjectModelHelper.getRequest(objectModel); System.out.println(1+request); FilePart filePart = (FilePart) request.get(uploadfile); System.out.println(2+filePart); File file = ((FilePartFile)filePart).getFile(); System.out.println(2+file.getCanonicalPath()); //getLogger().debug(Uploaded file = + file.getCanonicalPath()); statusFile...uploaded/status /xsp:logic /uploadFile001 /xsp:page But here my problem is the file was succssfully uploaded to the uploaded-dir ( E:\uploadfile\) which i gave in web.xml file. But i need to store that file into dynamically created directory name based on the user who uploads that file. so i want to catch that File object from the FilePartFile object from the request object. But my doubt is according to wikki they are cathing that file object in action class. But i am invoking or catching in XSP file. Is this request object comes to XSP page with file object? pls clarify me? Pls look my sitemap.xmap entry and all files. pls let me know where i am doing wrong. Thanks bajji */Stephan Coboos [EMAIL PROTECTED]/* wrote: Stephan Coboos wrote: bajji m wrote: Hi Stephan, Thanks for help. But i am using cocoon 2.0 version. So i do't have enable-uploads tag in my web.xml file. So according to wikki document on cocoon 2.0 i followed that document steps. i thibk this enable-upload tag was in 2.1 version. so let me the further steps pls. so how can i proceed it? pls help me? Regards bajji OK. In 2.0 I had not used uploads but let me see your HTML-Form and I hope I can help you. Did you take a look into your log files? Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Next try: Have you tried autosave-uploads=true? Form the wiki-docs about the action example: *Examples*
Showing plain text files with cocoon
Hi all, Does anybody know how to show plain text files with cocoon? For example: a href=logfile.logLink to Logfile/a Should open a new browser window with the plain text log file as its content. How can I do this with Cocoon. I tried to use the resource reader, like this: map:match pattern=*.log map:read type=resource src={1}.log mime-type=text/plain/ /map:match But this does not work. The editor is opened, but then an error message pops up, saying that the file can not be found. The Editor seems to search for the file under Temporary Internet Files/Content.IE5 I'm using Cocoon 2.1.2 with Internet Explorer 6.0. Can anybody help? Thanks, Stephanie -- +++ GMX - die erste Adresse für Mail, Message, More +++ Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Showing plain text files with cocoon
On Thu, 8 Jan 2004 16:47:31 +0100 (MET) Stephanie Zohner [EMAIL PROTECTED] wrote: Hi all, Does anybody know how to show plain text files with cocoon? For example: a href=logfile.logLink to Logfile/a Should open a new browser window with the plain text log file as its content. How can I do this with Cocoon. I tried to use the resource reader, like this: map:match pattern=*.log map:read type=resource src={1}.log mime-type=text/plain/ /map:match try map:match pattern=*.log map:read src={1}.log mime-type=text/plain/ /map:match -- Best regards, Yury Mikhienko. IT ERP group head, ZAO Mobikom-Kavkaz tel: (8632) 704188 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
role-based access to pages and parts of pages - ideas?
Hi, Could anyone of you give some URLs or ideas about the best way to handle role-based access to pages and parts of pages? I reworked the authentication-fw flow example into my webapp, so now I have some user information available in a session. I added the protect() function to all pipelines that need protection and I'm able to include parts of pages based on the role of the user. I could of course modify protect() to check the role and decide whether the page can be accessed or not, but I feel I'm spreading the authorization information throughout the application and I'd prefer to keep it together. Any ideas? Bye, Helma van der Linden - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help! mime-type on map:read
On Jan 6, 2004, at 4:10 PM, Joerg Heinicke wrote: Unfortunately an already known bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25121 Can you replace it with map:generate src=cocoon:/FooBar/home/ map:serialize type=html/ Certainly... just wondered what I was missing w/ map:read, or this this was really a bug, and indeed it was a bug! Thanks a lot, Joerg! ~mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Optional authentication
Hi, I'd like to ask, if you have some experiences with optional autenthication. I mean, that sites can be viewed without authentication (without log in) as well as with authentication. But if you are authenticated, serverpages script (one and the same script) can offer you additional informations (for example can show you private data etc.). Or aren't there any examples? Thanks! Otmar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Optional authentication
In portal block. When you build cocoon make sure to include portal (in blocks.properties). You should be able then to execute the sample by going to http://localhost:8080/cocoon/samples/portal/portal Cheers, -Alex --- [EMAIL PROTECTED] wrote: Thanks and where I can found this sample? Otmar Cituji z emailu od Alex Romayev [EMAIL PROTECTED]: I have noticed in the sample for the new portal engine that it by default behind the scenes logs you in as an annonymous user, which allows to show you some data. When you log in you have access to portal pages/portlets based on your permissions. I supposed this is one way of doing this. Cheers, -Alex --- [EMAIL PROTECTED] wrote: Hi, I'd like to ask, if you have some experiences with optional autenthication. I mean, that sites can be viewed without authentication (without log in) as well as with authentication. But if you are authenticated, serverpages script (one and the same script) can offer you additional informations (for example can show you private data etc.). Or aren't there any examples? Thanks! Otmar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Alex Romayev Software Architect http://www.romayev.com [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] = Alex Romayev Software Architect http://www.romayev.com [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
null pointer error
hi, i am getting a null pointer error when trying to validate a form. I have 2 definition files 1 to validate a login form and the other to validate the user input. 1 My map actions is as follows: map:actions map:action name=char-counter src=test.CharCounterAction/ map:action name=session-validator src=org.apache.cocoon.acting.SessionValidatorAction / map:action name=session-invalidator src=org.apache.cocoon.acting.SessionInvalidatorAction / map:action name=authenticator src=org.apache.cocoon.acting.DatabaseAuthenticatorAction / map:action name=validator logger=sitemap.Action.validator src=org.apache.cocoon.acting.FormValidatorAction / map:action name=request logger=sitemap.Action.request src=org.apache.cocoon.acting.RequestParamAction / /map:actions 2. My login definition file is: root parameter name=user typr=string max-len=20 nullable=no / parameter name=pass typr=string max-len=20 nullable=no / constraint-set name=add validate name=user / validate name=pass / /constraint-set /root 3. My database definition file is: auth-descriptor connectionpostgresql/connection table name=usertbl select dbcol=username request-param=user to-session=user / select dbcol=userpassword request-param=pass to-session=password / /table /auth-descriptor 4. My pipe is: map:match pattern=login map:act type=validator map:parameter name=descriptor value=context://beyarecords/content/def/login-def.xml/ map:parameter name=validate-set value=add / map:act type=authenticator !-- Ok, login details are being checked. If they exist we get logged into system -- map:parameter name=descriptor value=context://beyarecords/content/def/auth-def.xml/ map:redirect-to uri=support/home/ /map:act /map:act !-- if not we get redirected back to the login page -- map:redirect-to uri=login.html / /map:match 5. And my html form is: form action=login method=post table tr td align=rightUser:/td td align=leftinput type=text name=user //td /tr tr td align=rightPassword:/td td align=leftinput type=text name=pass //td /tr tr td colspan=2 align=centerinput type=submit value=login //td /tr /table /form What am I doing wrong here? regards Uzo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Excel Generator
Is it possible to use Excel files as input for a pipeline ? All the examples I've seen from POI, are to generate output in XLS format, but that's not what I need. I really need to read the Excel file (eg. range A1 - B10) and transform that into XML. An example would be nice, if one is available.
dowloading an image
I would like to serve (with cocoon-2.0.4) an image by fetching it on a remote server and also store it on my local filesystem. Does anyone know how I to do this? thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: role-based access to pages and parts of pages - ideas?
Helma, Any ideas? might not be of much use for you, cause I am not using the authentication-fw, but I thought, I'd tell you anyway. I am using a structure very much like the authentication-fw, but using my own actions, thus a lot lighter and tailored exactly to my needs (thus not as nice and flexible as the framework). There are actions for logging in, logging out, authenticating and protecting, just like the framework.My sitemap looks very much like the one in the authentication-example without flow (thus not the one you adopted). Unlike the framework, my protecting action takes a parameter role and it checks whether the user who is locked in has that role. If so, access is granted. so something like: map:match pattern=protected map:act type=authorize map:parameter name=role value=admin page-generation.../ /map:act /map:match That way, I keep everything in the sitemap and my actions. Also, I could do authorization depending on the url and the user who is logged in, e.g.: map:match pattern=protected/* map:act type=authorize map:parameter name=role value={1} page-generation.../ /map:act /map:match Here everything in protected/admin could only be accessed by users with role admin. HTH. Maybe you can derive an idea for your problem from this. I am also happy to share the code, if you want to have a look. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: role-based access to pages and parts of pages - ideas?
Hi Helma, Here is a simplified version of what you can do with portal: 1. Define users and roles. 2. Define page modules, known as coplets or portlets 3. Define page templates and map coplets to where within the template they should appear. 4. Define user/role permissions in terms of which coplets they are allowed to see. 5. Define user/role permissions in terms of coplet layouts. 6. Allow users to customize portlets (for example, remove, minimize, maximize, etc). For example, I reuse pages on my website for regular users and adminitrators, but the administrators get to see extra portlets, which allow them to edit information. If your pages/portlets don't change and the only thing that changes is data, the portal is probably not what you need. Hope this helps, -Alex --- [EMAIL PROTECTED] wrote: Hi, Thanks for the idea, but I don't think a portal is really what I need. I will look at how it's handled there. My application is a medical application where you first select a patient and then enter/retrieve information for that patient in views based on the current paper-based forms. I think introducing a portal now will make everything too confusing for the users. Bye, Helma -Original Message- From: Alex Romayev [mailto:[EMAIL PROTECTED] Sent: Thursday, 08 January 2004 17:34 To: [EMAIL PROTECTED] Subject: Re: role-based access to pages and parts of pages - ideas? Have you considered using portal-fw or the new portal engine? I am using portal-fw and authentication-fw to protect pages (based on pattern matching) and construct the pages out of coplets based on user/role configuration. Cheers, -Alex --- [EMAIL PROTECTED] wrote: Hi, Could anyone of you give some URLs or ideas about the best way to handle role-based access to pages and parts of pages? I reworked the authentication-fw flow example into my webapp, so now I have some user information available in a session. I added the protect() function to all pipelines that need protection and I'm able to include parts of pages based on the role of the user. I could of course modify protect() to check the role and decide whether the page can be accessed or not, but I feel I'm spreading the authorization information throughout the application and I'd prefer to keep it together. Any ideas? Bye, Helma van der Linden - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Alex Romayev Software Architect http://www.romayev.com [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] = Alex Romayev Software Architect http://www.romayev.com [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer error
Any takers for this question? On 8 Jan 2004, at 18:58, beyaRecords - The home Urban music wrote: hi, i am getting a null pointer error when trying to validate a form. I have 2 definition files 1 to validate a login form and the other to validate the user input. 1 My map actions is as follows: map:actions map:action name=char-counter src=test.CharCounterAction/ map:action name=session-validator src=org.apache.cocoon.acting.SessionValidatorAction / map:action name=session-invalidator src=org.apache.cocoon.acting.SessionInvalidatorAction / map:action name=authenticator src=org.apache.cocoon.acting.DatabaseAuthenticatorAction / map:action name=validator logger=sitemap.Action.validator src=org.apache.cocoon.acting.FormValidatorAction / map:action name=request logger=sitemap.Action.request src=org.apache.cocoon.acting.RequestParamAction / /map:actions 2. My login definition file is: root parameter name=user typr=string max-len=20 nullable=no / parameter name=pass typr=string max-len=20 nullable=no / constraint-set name=add validate name=user / validate name=pass / /constraint-set /root 3. My database definition file is: auth-descriptor connectionpostgresql/connection table name=usertbl select dbcol=username request-param=user to-session=user / select dbcol=userpassword request-param=pass to-session=password / /table /auth-descriptor 4. My pipe is: map:match pattern=login map:act type=validator map:parameter name=descriptor value=context://beyarecords/content/def/login-def.xml/ map:parameter name=validate-set value=add / map:act type=authenticator !-- Ok, login details are being checked. If they exist we get logged into system -- map:parameter name=descriptor value=context://beyarecords/content/def/auth-def.xml/ map:redirect-to uri=support/home/ /map:act /map:act !-- if not we get redirected back to the login page -- map:redirect-to uri=login.html / /map:match 5. And my html form is: form action=login method=post table tr td align=rightUser:/td td align=leftinput type=text name=user //td /tr tr td align=rightPassword:/td td align=leftinput type=text name=pass //td /tr tr td colspan=2 align=centerinput type=submit value=login //td /tr /table /form What am I doing wrong here? regards Uzo - 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: null pointer error
--- beyaRecords - The home Urban music [EMAIL PROTECTED] wrote: Any takers for this question? No time to look into it now, but posting the exception and stack traces would likely help in diagnosing this problem. On 8 Jan 2004, at 18:58, beyaRecords - The home Urban music wrote: hi, i am getting a null pointer error when trying to validate a form. I have 2 definition files 1 to validate a login form and the other to validate the user input. snip details/ --Tim Larson __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer error
The exact error I am getting is: java.lang.NullPointerException On 8 Jan 2004, at 18:58, beyaRecords - The home Urban music wrote: hi, i am getting a null pointer error when trying to validate a form. I have 2 definition files 1 to validate a login form and the other to validate the user input. 1 My map actions is as follows: map:actions map:action name=char-counter src=test.CharCounterAction/ map:action name=session-validator src=org.apache.cocoon.acting.SessionValidatorAction / map:action name=session-invalidator src=org.apache.cocoon.acting.SessionInvalidatorAction / map:action name=authenticator src=org.apache.cocoon.acting.DatabaseAuthenticatorAction / map:action name=validator logger=sitemap.Action.validator src=org.apache.cocoon.acting.FormValidatorAction / map:action name=request logger=sitemap.Action.request src=org.apache.cocoon.acting.RequestParamAction / /map:actions 2. My login definition file is: root parameter name=user typr=string max-len=20 nullable=no / parameter name=pass typr=string max-len=20 nullable=no / constraint-set name=add validate name=user / validate name=pass / /constraint-set /root 3. My database definition file is: auth-descriptor connectionpostgresql/connection table name=usertbl select dbcol=username request-param=user to-session=user / select dbcol=userpassword request-param=pass to-session=password / /table /auth-descriptor 4. My pipe is: map:match pattern=login map:act type=validator map:parameter name=descriptor value=context://beyarecords/content/def/login-def.xml/ map:parameter name=validate-set value=add / map:act type=authenticator !-- Ok, login details are being checked. If they exist we get logged into system -- map:parameter name=descriptor value=context://beyarecords/content/def/auth-def.xml/ map:redirect-to uri=support/home/ /map:act /map:act !-- if not we get redirected back to the login page -- map:redirect-to uri=login.html / /map:match 5. And my html form is: form action=login method=post table tr td align=rightUser:/td td align=leftinput type=text name=user //td /tr tr td align=rightPassword:/td td align=leftinput type=text name=pass //td /tr tr td colspan=2 align=centerinput type=submit value=login //td /tr /table /form What am I doing wrong here? regards Uzo - 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: Global variable/parameter in sitemap
Correct. It works now. Thanks. ... this should be uri={global:absolute-base-url}/... ... __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer error
As requested, here is the relevant stack trace: java.lang.NullPointerException at org.apache.cocoon.acting.AbstractValidatorAction.validateSetOfParameters(AbstractValidatorAction.java:1022) at org.apache.cocoon.acting.AbstractValidatorAction.act(AbstractValidatorAction.java:285) at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:152) 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:163) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:152) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:354) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133) 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:163) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:152) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:354) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307) at org.apache.cocoon.Cocoon.process(Cocoon.java:656) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at
Re: Sudden difference in interpretation of #160 - update
[EMAIL PROTECTED] wrote: Internet Explorer is on encoding: auto-select which defaults to ISO 8859-1 with or without metatag content-type UTF-8 in the page header. Same goes for Opera. There are multiple ways for a browser to get hints for the encoding: 1. The HTTP content-type header, which optionally specifies a character set. Unfortunately, the default character set is iso-8859-1. See, for example http://www.jorendorff.com/articles/unicode/unicode-http.html 2. An XML declaration, in case the content type is application/xhtml+xml (or XML or another XML based content). Unfortunately, if there is an XML declaration without an encoding, the default is either UTF-8 or UTF-8/UTF-18 autodetection, at the discretion of the consumer 3. A META-element in the (X)HTML head defining an encoding. There is no default in case there is no such element. IEx adds its own guess, and all browsers add manual overide by the user. If you send UTF-8 encoded content, and both IEx and Opera detect it as ISO-8859-1, most likely there is no character set defined in the HTTP content type header, no XML decl (applies only to XHTML) and no META element declaring an encoding. The HTTP header should be set by the serializer, but there may be a servlet container override in place. I'd sniff the HTTP headers in order to check whether the content type header properly declares an UTF-8 encoding, absent this, I'd either - track down why this isn't set and fix this or - add a META element declaring an UTF-8 encoding, which probably works only if the content-type doesn't define a character set. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP: using fo:external-graphic with SVG
Patrick Hess wrote: Thanks for your reply. I tried removing the DOCTYPE and checked the width/height - no change... There are no external bitmaps... Any internal references, for example to gradients and such? They wont work in an embedded SVG with older Batik releases (I don't know which Batik release your Cocoon contains). They should fail with FOP before 0.20.5RC3 too. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Showing plain text files with cocoon
--- Yury Mikhienko [EMAIL PROTECTED] wrote: On Thu, 8 Jan 2004 16:47:31 +0100 (MET) Stephanie Zohner [EMAIL PROTECTED] wrote: I tried to use the resource reader, like this: map:match pattern=*.log map:read type=resource src={1}.log mime-type=text/plain/ /map:match But this does not work. The editor is opened, but then an error message pops up, saying that the file can not be found. The Editor seems to search for the file under Temporary Internet Files/Content.IE5 try map:match pattern=*.log map:read src={1}.log mime-type=text/plain/ /map:match I have this problem also (with IE 5.5), but this did not solve it for me. Any other ideas? --Tim Larson __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Showing plain text files with cocoon
Tim Larson wrote: --- Yury Mikhienko [EMAIL PROTECTED] wrote: On Thu, 8 Jan 2004 16:47:31 +0100 (MET) Stephanie Zohner [EMAIL PROTECTED] wrote: I tried to use the resource reader, like this: map:match pattern=*.log map:read type=resource src={1}.log mime-type=text/plain/ /map:match But this does not work. The editor is opened, but then an error message pops up, saying that the file can not be found. The Editor seems to search for the file under Temporary Internet Files/Content.IE5 try map:match pattern=*.log map:read src={1}.log mime-type=text/plain/ /map:match I have this problem also (with IE 5.5), but this did not solve it for me. Any other ideas? AFAIK, MSIE thinks that it knows better and generally looks at the file extension coming off the server, not the mime-type. It's very frustrating to say the least. Try changing the map:match to *.txt and see if that works. Regards, Tony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Excel Generator
On 08.01.2004 18:15, [EMAIL PROTECTED] wrote: Is it possible to use Excel files as input for a pipeline ? No, it isn't. I guess POI itself is able to do it, but it's not implemented in the Cocoon components. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Showing plain text files with cocoon
--- Tony Collen [EMAIL PROTECTED] wrote: Tim Larson wrote: I have this problem also (with IE 5.5), but this did not solve it for me. Any other ideas? AFAIK, MSIE thinks that it knows better and generally looks at the file extension coming off the server, not the mime-type. It's very frustrating to say the least. Try changing the map:match to *.txt and see if that works. Thanks, but in my case it already is something.txt. One other data point: When I get the file was not found message, it also asks me if I want to create a new file. If I click yes, then it creates an empty file. Clicking on the link after this procedure succeeds in loading the file without errors. --Tim Larson __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer error
sorted. thanks again for your help on this issue. On 8 Jan 2004, at 19:34, beyaRecords - The home Urban music wrote: Any takers for this question? On 8 Jan 2004, at 18:58, beyaRecords - The home Urban music wrote: hi, i am getting a null pointer error when trying to validate a form. I have 2 definition files 1 to validate a login form and the other to validate the user input. 1 My map actions is as follows: map:actions map:action name=char-counter src=test.CharCounterAction/ map:action name=session-validator src=org.apache.cocoon.acting.SessionValidatorAction / map:action name=session-invalidator src=org.apache.cocoon.acting.SessionInvalidatorAction / map:action name=authenticator src=org.apache.cocoon.acting.DatabaseAuthenticatorAction / map:action name=validator logger=sitemap.Action.validator src=org.apache.cocoon.acting.FormValidatorAction / map:action name=request logger=sitemap.Action.request src=org.apache.cocoon.acting.RequestParamAction / /map:actions 2. My login definition file is: root parameter name=user typr=string max-len=20 nullable=no / parameter name=pass typr=string max-len=20 nullable=no / constraint-set name=add validate name=user / validate name=pass / /constraint-set /root 3. My database definition file is: auth-descriptor connectionpostgresql/connection table name=usertbl select dbcol=username request-param=user to-session=user / select dbcol=userpassword request-param=pass to-session=password / /table /auth-descriptor 4. My pipe is: map:match pattern=login map:act type=validator map:parameter name=descriptor value=context://beyarecords/content/def/login-def.xml/ map:parameter name=validate-set value=add / map:act type=authenticator !-- Ok, login details are being checked. If they exist we get logged into system -- map:parameter name=descriptor value=context://beyarecords/content/def/auth-def.xml/ map:redirect-to uri=support/home/ /map:act /map:act !-- if not we get redirected back to the login page -- map:redirect-to uri=login.html / /map:match 5. And my html form is: form action=login method=post table tr td align=rightUser:/td td align=leftinput type=text name=user //td /tr tr td align=rightPassword:/td td align=leftinput type=text name=pass //td /tr tr td colspan=2 align=centerinput type=submit value=login //td /tr /table /form What am I doing wrong here? regards Uzo - 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: Excel Generator
And through XSP ? xsp:logic Code in Java to open the file with POI and generate xml?/xsp:logic -Original Message- From: Joerg Heinicke [mailto:[EMAIL PROTECTED] Sent: donderdag 8 januari 2004 21:40 To: [EMAIL PROTECTED] Subject: Re: Excel Generator On 08.01.2004 18:15, [EMAIL PROTECTED] wrote: Is it possible to use Excel files as input for a pipeline ? No, it isn't. I guess POI itself is able to do it, but it's not implemented in the Cocoon components. Joerg - 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: Excel Generator
Yves Vindevogel wrote: And through XSP ? xsp:logic Code in Java to open the file with POI and generate xml?/xsp:logic -Original Message- From: Joerg Heinicke [mailto:[EMAIL PROTECTED] Sent: donderdag 8 januari 2004 21:40 To: [EMAIL PROTECTED] Subject: Re: Excel Generator On 08.01.2004 18:15, [EMAIL PROTECTED] wrote: Is it possible to use Excel files as input for a pipeline ? No, it isn't. I guess POI itself is able to do it, but it's not implemented in the Cocoon components. I've done something like this but in context just needed to put out a final document (not sax stream) and so used dom and did not implement it as a Generator. I almost went ahead and did a separate implementation for Cocoon but started feeling like the various ways one might want to interpret a series of excel spreadsheets as xml was too infinitely variable to warrant a quick solution of general use. Because my parsing requirements were complex, it would not be of general use even if I were free to release the code (which I'm not). Still, if you (or someone else) want to tackle it I could help. Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: role-based access to pages and parts of pages - ideas?
Hi Stefan and Alex, Both thank you very much for your ideas. I'll comment on them below, not to criticize you, but hoping that it will trigger more ideas. Alex: I've looked at the portal code and it would make me rewrite my current cocoon application (which is still in the middle of a rewrite of my previous version :-( ). Also, for now I've done something similar: add extra features to a page that are only visible to administrators. Stefan: your approach comes close to what I was thinking, but there are several things I don't like in this setup: 1. I have various roles (between 5 and 10) which overlap in access authentication, so every pipeline would need to check for several roles and if I need to add extra roles I need to revisit every pipeline. :-( 2. My sitemap is growing rapidly and by adding enormous amounts of comment I'm trying to keep it clear, but I find it more and more difficult to find what I'm looking for. So configuring authorisation in the sitemap is not really my idea of keeping it clear and separated. 3. I want a general way of handling several pages, i.e. with a minimal number of pipelines. If in future I add a page, I want it to be integrated without touching the sitemap. I was thinking of adding access rules to the source of the form, but that would also spread the authorization. :-( 4. One or more roles may have more features/information on a page than others. This would mean I have to customize role checking for every page item. :-( 5. Ideally I should add read/write access to data, e.g. you're only allowed to edit information you've entered yourself. I'll skip this for now, but I'll have to keep that in mind. Bye, Helma -Original Message- From: Stefan Klein [mailto:[EMAIL PROTECTED] Sent: Thursday, 08 January 2004 20:09 To: [EMAIL PROTECTED] Subject: Re: role-based access to pages and parts of pages - ideas? Helma, Any ideas? might not be of much use for you, cause I am not using the authentication-fw, but I thought, I'd tell you anyway. I am using a structure very much like the authentication-fw, but using my own actions, thus a lot lighter and tailored exactly to my needs (thus not as nice and flexible as the framework). There are actions for logging in, logging out, authenticating and protecting, just like the framework. My sitemap looks very much like the one in the authentication-example without flow (thus not the one you adopted). Unlike the framework, my protecting action takes a parameter role and it checks whether the user who is locked in has that role. If so, access is granted. so something like: map:match pattern=protected map:act type=authorize map:parameter name=role value=admin page-generation.../ /map:act /map:match That way, I keep everything in the sitemap and my actions. Also, I could do authorization depending on the url and the user who is logged in, e.g.: map:match pattern=protected/* map:act type=authorize map:parameter name=role value={1} page-generation.../ /map:act /map:match Here everything in protected/admin could only be accessed by users with role admin. HTH. Maybe you can derive an idea for your problem from this. I am also happy to share the code, if you want to have a look. Stefan - 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: Excel Generator
Yes, but then you are very near to a XLSGenerator - and I would be happy to commit it :) The problem I see: it will not be that easy, at least if you do the same thing the other around like the XLSSerializer. Joerg On 08.01.2004 21:38, Yves Vindevogel wrote: And through XSP ? xsp:logic Code in Java to open the file with POI and generate xml?/xsp:logic -Original Message- From: Joerg Heinicke [mailto:[EMAIL PROTECTED] Sent: donderdag 8 januari 2004 21:40 To: [EMAIL PROTECTED] Subject: Re: Excel Generator On 08.01.2004 18:15, [EMAIL PROTECTED] wrote: Is it possible to use Excel files as input for a pipeline ? No, it isn't. I guess POI itself is able to do it, but it's not implemented in the Cocoon components. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newbie: Could not setup jtidy
Try it the standard way first, i.e. without jtidy.properties. There is also a sample in the Cocoon distribution - try it out. And: there is no problem having XHTML in the pipeline. You need even XML in it - and for HTML the format is XHTML. If you don't want XHTML at the end, simply don't use XHTML serializer. Joerg On 08.01.2004 17:57, [EMAIL PROTECTED] wrote: Hi, I am trying to use the HTMLGenerator and I get a NullPointerException because the component could not setup jtidy. I have created an empty jtidy.properties because, according to the documentation, without any configuration, the generator produces an XHTML document. But still, I 've this error helpp!!! thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: role-based access to pages and parts of pages - ideas?
Hi Helma, I would imagine the time in not on your side either -- at least it never is on mine ;-) It's hard to tell without seeing your sitemap, but it sounds like a lot of your problems come from that side. In theory things like authentication rules and adding new pages should involve little effort if the sitemap is right. I know this because I had to refactor it twice! I can take a look at it if you like -- maybe I'd be able to come up with some suggestions. Cheers, -Alex --- [EMAIL PROTECTED] wrote: Hi Stefan and Alex, Both thank you very much for your ideas. I'll comment on them below, not to criticize you, but hoping that it will trigger more ideas. Alex: I've looked at the portal code and it would make me rewrite my current cocoon application (which is still in the middle of a rewrite of my previous version :-( ). Also, for now I've done something similar: add extra features to a page that are only visible to administrators. Stefan: your approach comes close to what I was thinking, but there are several things I don't like in this setup: 1. I have various roles (between 5 and 10) which overlap in access authentication, so every pipeline would need to check for several roles and if I need to add extra roles I need to revisit every pipeline. :-( 2. My sitemap is growing rapidly and by adding enormous amounts of comment I'm trying to keep it clear, but I find it more and more difficult to find what I'm looking for. So configuring authorisation in the sitemap is not really my idea of keeping it clear and separated. 3. I want a general way of handling several pages, i.e. with a minimal number of pipelines. If in future I add a page, I want it to be integrated without touching the sitemap. I was thinking of adding access rules to the source of the form, but that would also spread the authorization. :-( 4. One or more roles may have more features/information on a page than others. This would mean I have to customize role checking for every page item. :-( 5. Ideally I should add read/write access to data, e.g. you're only allowed to edit information you've entered yourself. I'll skip this for now, but I'll have to keep that in mind. Bye, Helma -Original Message- From: Stefan Klein [mailto:[EMAIL PROTECTED] Sent: Thursday, 08 January 2004 20:09 To: [EMAIL PROTECTED] Subject: Re: role-based access to pages and parts of pages - ideas? Helma, Any ideas? might not be of much use for you, cause I am not using the authentication-fw, but I thought, I'd tell you anyway. I am using a structure very much like the authentication-fw, but using my own actions, thus a lot lighter and tailored exactly to my needs (thus not as nice and flexible as the framework). There are actions for logging in, logging out, authenticating and protecting, just like the framework.My sitemap looks very much like the one in the authentication-example without flow (thus not the one you adopted). Unlike the framework, my protecting action takes a parameter role and it checks whether the user who is locked in has that role. If so, access is granted. so something like: map:match pattern=protected map:act type=authorize map:parameter name=role value=admin page-generation.../ /map:act /map:match That way, I keep everything in the sitemap and my actions. Also, I could do authorization depending on the url and the user who is logged in, e.g.: map:match pattern=protected/* map:act type=authorize map:parameter name=role value={1} page-generation.../ /map:act /map:match Here everything in protected/admin could only be accessed by users with role admin. HTH. Maybe you can derive an idea for your problem from this. I am also happy to share the code, if you want to have a look. Stefan - 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] = Alex Romayev Software Architect http://www.romayev.com [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cocoon 212 and weblogic 6.1
Hello! Cocoon 212 on Tomcat 4129 seems to be performing several times better than on weblogic 6.1/sp5. The throughput is also higher on tomcat. In the test, a static xml file is transformed using Saxon 653 and serialized into html. Initially we thought the weblogic could be misconfigured. When the servletreloadchecksec has been set to -1, the static xml file (using File generator) without any xsl transformation was rendered very fast. This indicates that the xsl transformation is the issue on this setup. But it is not clear what is different with xslt transformation on the weblogic. Saxon has been configured with weblogic in the same way as with Tomcat (cocoon.xconf and sitemap.xmap have been updated). So wondering if there is a way, using any tools, or APIs, or monitoring logs we could determine the XML Parser, XSLT being used in a cocoon pipeline for a particular request. This should help the issue with weblogic/cocoon 212platform. The cocoon.xmap states that it uses the xml parser org.apache.excalibur.xml.impl.JaxpParser by default. Would changing this to org.apache.excalibur.xml.impl.XercesParser give better page response and throughput? Many Thanks Kumar Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
Re: PHP Generator, compilation problems??
I don't know your problem, but I got further than you I think: java.lang.UnsatisfiedLinkError: no phpsrvlt in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:834) at net.php.reflect.loadLibrary(reflect.java:34) at net.php.reflect.clinit(reflect.java:29) at net.php.servlet.init(servlet.java:157) at org.apache.cocoon.generation.PhpGenerator.generate(PhpGenerator.java: 193) I don't know exactly what it means, but I'm already in net.php.* code. 'phpsrvlt' is referenced from two properties files in phpsrvlt.jar. I don't think it's a problem of Cocoon, compiling should be ok. Joerg On 08.01.2004 11:32, Davide wrote: Hi! I finally got php working at 99% (i get some warning messages probably due to my fast configuration of php) but with some tricks...because i think cocoon doesn't comile php generator... Following the instructions oh thw cocoon wiki about php generator, I put phpsrvlt.jar (bundled with the php binaries for win) in cocoon-2.1.3\lib\local then i compile cocoon but php generator doesn't work, with no errors, but also no results...only blank page... Looking at the dos window of tomcat i noticed this exception, after my php request: java.lang.NoSuchMethodError: org.apache.cocoon.generation.PhpGenerator$PhpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljava/lang/String;)V at org.apache.cocoon.generation.PhpGenerator$PhpServlet.run(PhpGenerator.java:149) at java.lang.Thread.run(Thread.java:534) So i decided to have a look at the source code of PhpGenerator.java but it seemd to me perfect (i'm a really bginner in java...) I decidet do try so I put the PhpGenerator.java into my jar, where i had my transformer... (obviously adding to che classpath phpsrvlt.jar and servlet-api.jar, and changing the name to mcnavigator.generation.PhpGenerator) i recompiled my package, built jar and put into WEB-INF/lib; after changing in the cocoon sitemap the generator src from org.apache.cocoon.generation.PhpGenerator to mcnavigator.generation.PhpGenerator i tried to load my php and FINALLY it ran!! I'm really new to cocoon and java...but it seems cocoon doesn't compile the PhpGenerator maybe the cocoon-2.1.3\lib\local dir is wrong?? or there is something else to do?? Best Regards, Davide - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Excel Generator
On 08.01.2004 22:53, Yves Vindevogel wrote: What if we start from this ?? http://www.onjava.com/pub/a/onjava/2003/01/22/poi.html http://www.onjava.com/pub/a/onjava/2003/04/16/poi_excel.html Why not, we can later go on to output Gnumeric file format. A start is always important. To be honest, I do not require the formulas in the Excel file. AFAIK only the formulas are stored in the file, not their result. I need the results of the cells. And output like: Workbook file=AZERTY Sheet name=QSDFGH AA1MyName/A1A2Something Else/A2/A BB1 /Sheet /Workbook I'm willing to contribute on it, and I have a developer at hands who can spend time at it. I willing to give him 3 days (tomorrow friday and two days in his weekend off ;-)) to produce something What a poor guy! ;-) Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Showing plain text files with cocoon
On 08.01.2004 21:27, Tim Larson wrote: I tried to use the resource reader, like this: map:match pattern=*.log map:read type=resource src={1}.log mime-type=text/plain/ /map:match But this does not work. The editor is opened, but then an error message pops up, saying that the file can not be found. The Editor seems to search for the file under Temporary Internet Files/Content.IE5 try map:match pattern=*.log map:read src={1}.log mime-type=text/plain/ /map:match I have this problem also (with IE 5.5), but this did not solve it for me. Any other ideas? Of course the above propagated solution can not work if the original does not work: resource reader is the default reader, so there is no difference between both. But I don't know why it shouldn't work, tried it and it works (snippet from root sitemap): map:match pattern=*.log map:read src=WEB-INF/logs/{1}.log mime-type=text/plain/ /map:match IE doesn't display the file, but asks me to save it somewhere. So I guess it's simply question of configuration in your windows. The hint with Temporary Internet Files also points to the download as all files are downloaded to this directory and later copied to the selected directory. Does deleting the cache help, so that the file can't be found there and the file must be dwonloaded again? Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Forrest and dynamic site.xml
I'm using forrest 0.5.1 sample webapp as a basis for my web application. What I'm trying to accomplish is a dynamic site.xml. I have a generator that generates the site.xml dynamically from the database. However I'm unable to override default forrest behaviour. site.xml is always generated from filesystem no matter what I do. So my question is: 1. What is the exact place in forrest xmap-files which defines how and by which generator site.xml is generated? * Janne Kario * Mermit Business Applications Ltd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML Full Merge
Thank you !Joerg Heinicke [EMAIL PROTECTED] wrote: First please do not reply to other mails when starting a new thread. Your mail can get lost in the other thread and you will get no answer, otherwise it's just annoying to have few threads mixed.Second your problem. The task itself is to be done in XSLT, but the question is, how you get the necessary data put together. You read already about document() and it's one possible solution with the downside of having problems with the caching: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10203. If only the included document is changing the cache isn't invalidate and so you will get the old result. You must know if it works for you. Other possible solutions are sitemap aggregation, cinclude or xinclude. All three only put the XML side by side so that you can transform the merged XML structure into this structure you want to have. The XSLT is up to you I would say. Instead of using document() you have to use simple XPaths in this XML structure.JoergOn 07.01.2004 00:10, apurva zaveri wrote: How do you do a full merge in cocoon?? Full merge, occurs when you need to combine two documents with slightly different structures and data into a third document. For example, you might want to combine a document containing employee names with a similar document containing employee addresses. You need some way to link the records in the two files, probably through an ID field. The following document fragments illustrate a full merge. Document 1: Smith Marsha Document 2: 115 Marshal Rd., Greenville, MN 39281 Merge Result: Smith Marsha 115 Marshal Rd., Greenville, MN 39281 I found something (http://www.fawcette.com/archives/premier/mgznarch/xml/2001/06jun01/rj0103/rj0103.asp) that does it using and xslt. But cocoon does like to support document() function in xslt. So how can this be done?Regards, Apurva Zaveri-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
XPath problem with default namespace (was: content aggregation + links to used files)
On 08.01.2004 09:09, Nele Vogel wrote: Joerg, it works! :-))) I removed the default namespace from cincludeFiles.xsl as you suggested and changed the match statements in news.xsl. Further I removed the default namespace from my XML data. The elements news and file are now matched and properly displayed. ... I understand, that working without namespaces is not a good idea, *but for now* it enables me to continue my work. Nice to hear. I played around with your stylesheets and the namespaced and prefixed version. First I can confirm the non-working. Second I found the reason for it. IMO it's a but in Xalan. If I change the select=./@path to select=./@s:path it works (with prefix 's' bound to you namespace uri). But AFAIK while elements should be in default namespace, attributes should not. (CCing J.Pietschmann as I know he knows a bit about XSLT and XPath too. But I don't know if he reads more than encoding and FOP related questions. Also CCing xalan-dev as they might be interested or can tell me I'm wrong.) To summarize it shortly: An element is created using following template xsl:template match=dir:file xsl:element name=file xsl:attribute name=path xsl:value-of select=concat($path,./@name)/ /xsl:attribute /xsl:element /xsl:template and default namespace is declared: xmlns=http://www.sevencs.com;. In another stylesheet same default namespace is declared and additionally this namespace uri is bound to prefix s. Following template matches, but the value-of does not work: xsl:template match=s:file xsl:textfollowing file was added:/xsl:text xsl:value-of select=./@path/ /xsl:template Only if I change it to @s:path it works. Is this correct??? And what's the appropriate part in the spec - always when I search for a specific answer I don't find it. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]