RE: Link Hosting: WebHostingSpace.Net
I just checked this site and can't find any mention of Cocoon or Java hosting. Searching for either just returns you to their main page... Maybe they only support Cocoon through dedicated servers? Steve Running the latest version of Tomcat and Cocoon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [HELP]
Hi Brittany, What website are you trying to login to? I'm guessing you might be accessing a website Powered by Cocoon and the developer of that site might not have put in place error handling to direct you to them instead of this mailing list. You might look at the site for a contact email address for the webmaster. If I am misunderstanding your post and you are a Cocoon developer please post your full stack trace and we can try to help. I hope this helps. Best Wishes, Steve Each time I try to log-in I receive a message an error occured. I need help accessing your website. Description:java.lang.NullPointerException - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sorting html tables dynamically
Anna, Yet another client-side approach is to look at Domapi www.domapi.com. IIRC he's implemented a sortable Grid that uses rpc to talk to the server to pull data. That way he can support paging and other dynamic activities. I think he is using JSON as the wire representation of the data sets. HTH, Steve I have a cocoon portal appliation that displays information in html tables. I have to provide sorting of columns in this table to users. How can we do this? Can someone please shed some light on this and send me some code snippets. _ MSN Toolbar provides one-click access to Hotmail from any Web page FREE download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ojb + forms = I can't get it to work
Joose I believe you do have to enhance the new classes. I don't have a dist here. But look in the build.xml file in the ojb/samples. I recall it has a line in there enhancing the category and department classes. Hope this helps Steve I forgot to say that I have not enhanced the new classes. Could this be a problem? If yes, how to enhance it then? - Joose _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[repost] Generating XML from flow for auth-fw
Hi again, Anyone have any ideas? Thanks Steve Hi I've written some flowscript to perform login validation using OJB and on success I end up with a populated bean. I then call sendPage() to a pipeline that uses JXPathGenerator along with the bean to create the XML that meets the needs of the authentication framework. My problem is that while the auth-fw invokes my flow appropriately to validate the login, my calling sendPage() provides the output XML directly to the browser. The auth-fw needs be to return XML directly to it. I looked in PipelineAuthenticator.java and it's authenticate() method is performing: source = SourceUtil.getSource(authenticationResourceName, null, parameters, this.resolver); doc = SourceUtil.toDOM(source); on my validation flow pipeline. Can someone give me an idea how I can either: - invoke a pipeline from within flow with my bean whose output is returned to the flow caller instead of sent to the browser. - how to directly return XML from within flow (I can have Castor marshal my bean if I have to). The auth-fw flow example just reads the login info from an XML file on disk with an appropriate stylesheet to retrieve only the desired login info (or none as appropriate); so it doesn't cover this scenario. Thanks for any pointers, Steve _ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Generating XML from flow for auth-fw
Hi I've written some flowscript to perform login validation using OJB and on success I end up with a populated bean. I then call sendPage() to a pipeline that uses JXPathGenerator along with the bean to create the XML that meets the needs of the authentication framework. My problem is that while the auth-fw invokes my flow appropriately to validate the login, my calling sendPage() provides the output XML directly to the browser. The auth-fw needs be to return XML directly to it. I looked in PipelineAuthenticator.java and it's authenticate() method is performing: source = SourceUtil.getSource(authenticationResourceName, null, parameters, this.resolver); doc = SourceUtil.toDOM(source); on my validation flow pipeline. Can someone give me an idea how I can either: - invoke a pipeline from within flow with my bean whose output is returned to the flow caller instead of sent to the browser. - how to directly return XML from within flow (I can have Castor marshal my bean if I have to). The auth-fw flow example just reads the login info from an XML file on disk with an appropriate stylesheet to retrieve only the desired login info (or none as appropriate); so it doesn't cover this scenario. Thanks for any pointers, Steve _ Discover the best of the best at MSN Luxury Living. http://lexus.msn.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
When/where are demo database tables created?
Hi I was playing around to add a new sample to the ojb samples and can't seem to find the script that is run in the build or startup of the standalone demo that creates the tables used by this sample... I'd like to integrate some new tables directly into the existing script(s). Thanks, Steve _ Get fast, reliable Internet access with MSN 9 Dial-up now 2 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Programmatically setting fd:output widget values
Hi I was reading in the WoodyWidgetReference that you can set the value of output widgets either by binding or programmatically. I'd like to create a widget into which I set user messages from my flowscript but I can't find an example of how to do it w/o using a binding. Thanks, Steve _ MSN Life Events gives you the tips and tools to handle the turning points in your life. http://lifeevents.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to access authentication context or to set up custom context during logi
Hi, IIUC your solution below will put the user on the page they requested. It should only leave you with the do-login url if someone had tried to access a link to a protected page and was not yet logged in. Once they login their links will be correct for all other protected and non-protected pages and they will have the auth information on all pages(?). What I ended up doing in this scenario was putting the user on their account info page and embedding a link in it to the page they originally requested. I did this because in my case it is unlikely they will have stored a link to a protected page and all the protected pages are explictly available on the account info page. map:match pattern=dologin !-- In case someone re-logs in when already logged in send them to account view -- map:act type=auth-loggedIn map:parameter name=handler value=uploadHandler/ map:redirect-to uri=cocoon:/account/view.htm/ /map:act map:act type=auth-login map:parameter name=handler value=uploadHandler/ map:parameter name=name value={request-param:name}/ map:parameter name=password value={request-param:password}/ !-- Take the default account view page and use it to put the authentication session into my own session for use in pipelines outside of auth-protected actions. If we have a redirect then transform it to include the new page as a link -- map:generate src=cocoon:/account/view.htm/ map:transform src=style/account/view.xsl map:parameter name=redirect value={request-param:resource}/ map:parameter name=site-root value={global:site-root}/ /map:transform map:transform type=session/ map:serialize type=html/ /map:act map:redirect-to uri=cocoon:/login/ /map:match Another solution in this scenario would be to send out a page with a client side redirect to the originally requested page. This page could have the usual pithy comment like Successfully logged in you'll be taken to your requested page in x seconds. An action to put the auth info into the session should work too since you can see that the actions in this pipeline are invoked and a redirect can follow them. I'm not sure if an action already exists for this but you can look at the SessionAction. Lastly, you can take a look at the flow examples in 2.1.5 I'm not sure if they handle this any differently. I'll be interested in your solution. Hope this helps, Steve This is weird solution i figured out: map:match pattern=do-login !-- try to login -- map:act type=auth-login map:parameter name=handler value=mainhandler/ map:parameter name=parameter_loginame value={request-param:loginame}/ map:parameter name=parameter_password value={request-param:password}/ map:aggregate element=jopa !-- this xml commands to create and merge contexts -- map:part src=resources/merge-auth-context.xml/ !-- this is original page where login was submitted -- map:part src=cocoon://{request-param:resource}/ /map:aggregate map:transform type=session/ !-- this XSLT removes html page out of aggregation -- map:transform src=trans/utils/outofjopa.xslt/ map:serialize type='html'/ /map:act !-- something was wrong, get back to the innocence -- map:redirect-to uri={request-param:resource}/ /map:match This works, but looks too ugly. And the url in browser is left as do-login, because there was no redirect. It is not valid to do redirect after generate. Maybe i miss something conceptual here ? Is original task implementable using standard components ? If not, could someone hint me what components should i reimplement ? (actions|session contexts|whatever) ? _ MSN Life Events gives you the tips and tools to handle the turning points in your life. http://lifeevents.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re[2]: how to access authentication context ?
Hi I'm still away from my code (I can send a sample Thurs PM CDT) IIRC: !-- sitemap -- map:match pattern=do-login !-- try to login -- map:act type=auth-login map:parameter name=handler value=mainhandler/ map:parameter name=parameter_loginame value={request-param:loginame}/ map:parameter name=parameter_password value={request-param:password}/ !-- since you have to use a transformer you need to generate a full pipeline here w/o a redirect -- map:generate src-file-containing-successful-result-and-merge-auth-context.xml / map:transform type=session/ map:serialize/ !-- I can't remember the trick I did to handle the redirect case where you are sent to this pipeline and you need to redirect to someother protected page -- map:redirect-to uri={request-param:resource}/ /map:act !-- something was wrong, try it again -- map:redirect-to uri={request-param:resource}/ /map:match Hope this helps, Steve SS Hi SS I had the same need. I'm not where my source is but if I recall I use the SS session transformer within the login pipeline to load the authentication SS session info into my own session context only on success. Then this info is SS available to all pipelines (either via the session input module or the SS session transformer) and I use XSL to add the loginname to the XML if it is SS available. As i suppose, this should be done like this: !-- merge-auth-context.xml -- session:createcontext name=test/ session:setxml context=test path=/ session:getxml context=authentication path=// /session:setxml !-- /merge-auth-context.xml -- This works fine, but i need to include this code into page that will be displayed on succesfull login. And i want this to be original page, so after login user gets back on page where login form was submitted. That is: !-- sitemap -- map:match pattern=do-login !-- try to login -- map:act type=auth-login map:parameter name=handler value=mainhandler/ map:parameter name=parameter_loginame value={request-param:loginame}/ map:parameter name=parameter_password value={request-param:password}/ map:redirect-to uri={request-param:resource}/ /map:act !-- something was wrong, try it again -- map:redirect-to uri={request-param:resource}/ /map:match !-- /sitemap -- How to deal with this ? _ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to access authentication context ?
Hi I had the same need. I'm not where my source is but if I recall I use the session transformer within the login pipeline to load the authentication session info into my own session context only on success. Then this info is available to all pipelines (either via the session input module or the session transformer) and I use XSL to add the loginname to the XML if it is available. I don't know the security implications of this approach; in my case there is no sensitive info in the auth info. I assume it is the same as using sessions in general. Hope this helps, Steve I want to implement very simple scheme: if user is not loged in, every page on site contains login form, if user is logged in, there is hello, $user message and logout button. session context authentication is only available if pipeline is within auth-protect acition, but not in auth-loggedIn action. How should I pass auth ID to XSLT stylesheet that forms page? The only way I've found is to manually encode it in URL and using different map:matches to tell logged access from nonloged. Is there better way ? Are there better authentication techniques, other then actions and flowscripts ? _ MSN Life Events gives you the tips and tools to handle the turning points in your life. http://lifeevents.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't bind query parameters in SQLTransformer??
Terry I started using SQLTransformer and for a lot of things it works great. It doesn't do parameter substitution (AFAIK) so my queries/inserts/updates are built dynamically and build the query explicitly. I'm sure there are still a lot of Cocoon apps deployed and currently being built using this stable technology. Most of my code has been converted to use OJB so my object model is independent (mostly) from the database code used to persist the model. Other developers are using Hibernate or Castor. Since these are ubiquitous techologies at this point you won't see too much discussion about them unless someone has problems. Using an ORM (and many would argue together with CForms and flow) is the way to go especially if your object model already exists or is expected to be reused in another context. The beauty of Cocoon is its ability to provide integration with all of these persistence mechanisms. Hope this helps, Steve Thanks for the tip. I started with SqlTransformer because I *thought* that it was the new/improved/suggested way of doing things with sql. I'm starting to get the impression db support is low priority here. I guess that's fine... I guess I just could've figured it out sooner :) --- Anderson J. Vitous [EMAIL PROTECTED] wrote: I've not done anything using SqlTransformer, but parameter binding can be done with ESQL in XSPs, in which your query becomes something like esql:query select * from foo where foo_date lt; esql:parameterxsp:exprdatevar/xsp:expr/esql:parameter /esql:query That being said, I've had trouble doing this with date values but instead of looking for a 'proper' solution just did format conversion and passed strings... HTH, Anderson On 7/6/2004 1:05 PM, Terry Brick wrote: Anyone? Am I the only one attempting serious database back-end work with cocoon? --- Terry Brick [EMAIL PROTECTED] wrote: Looking through the doc and the source code, I don't see that it's possible to use standard JDBC query parameter binding. I would've expected to be able to do something like this... query select * from foo where foo_date ? param type=date value=${datevar}/ /query or something along those lines. Is something like this possible? If not, I would conside the SqlTransformer thing not ready for prime time what would be the suggested approach (besides implementing an entirely custom approach, which I AM leaning toward at this point)? _ MSN Toolbar provides one-click access to Hotmail from any Web page FREE download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best place to store information : another question
Lionel, You could come up with a script that collected input data on the command line from the installing client and have it use XSL to update the sitemap for the user. I've done that for XML config files on other projects and folks seem to like it. They don't have to hunt through the XML and you can do any sanity checking you feel is necessary. But maybe that is overkill for your needs. If you don't need the config data to get Cocoon running...then you could collect the data via a form on your initial page and have Cocoon to edit it's own sitemap using SourceWritingTransformer :^) Just an idea, Steve Thanks, I thought about it. It would be a solution. My problem is that I don't know if my client would be familiar by changing the parameters in the sitemap. Steve Schwarz wrote: Hi Lionel If I understand correctly, I think you can put them in the sitemap global-variables section. Then the variable assignments are copied along with the sitemap at installation. From the default sitemap: global-variables !--+ | Define global parameters here: | skinmy_skin/skin | ... | You can access them by {global:*name*}, e.g. {global:skin}. | These values are inherited into sub-sitemaps and can | be extended there. +-- /global-variables You can then access the global variables via the global input module. Hope this helps, Steve Another question : If I want to set some parameters, is there a place. These parameter have to be set before the application starts. by now, I put them into the web.xml but I'm not sure this is for the best. I always forget each time I install the application. _ MSN 9 Dial-up Internet Access helps fight spam and pop-ups now 2 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OJB Sample sitemap error(?)
Hi I just went to use the 2.1.5 OJB sample and it looks like there are three paths wrong in the sitemap. At least for my build of the standalone there is no samples/forms only samples/blocks/forms so these: catalogue id=other name=OtherMessages location=context://samples/forms/messages/ catalogue id=forms name=FormsMessages location=context://samples/forms/messages/ should be: catalogue id=other name=OtherMessages location=context://samples/blocks/forms/messages/ catalogue id=forms name=FormsMessages location=context://samples/blocks/forms/messages/ and: map:transform src=context://samples/forms/resources/forms-samples-styling.xsl/ should be: map:transform src=context://samples/blocks/forms/resources/forms-samples-styling.xsl/ If someone could verify if I'm right or wrong I can create a bug report. Thanks, Steve _ MSN Life Events gives you the tips and tools to handle the turning points in your life. http://lifeevents.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best place to store information : another question
Hi Lionel If I understand correctly, I think you can put them in the sitemap global-variables section. Then the variable assignments are copied along with the sitemap at installation. From the default sitemap: global-variables !--+ | Define global parameters here: | skinmy_skin/skin | ... | You can access them by {global:*name*}, e.g. {global:skin}. | These values are inherited into sub-sitemaps and can | be extended there. +-- /global-variables You can then access the global variables via the global input module. Hope this helps, Steve Another question : If I want to set some parameters, is there a place. These parameter have to be set before the application starts. by now, I put them into the web.xml but I'm not sure this is for the best. I always forget each time I install the application. _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Iam new , I Want to know Struts or Cocoon more sophisticated ?
Hi This has been discussed several times on the list. I'd take a look in the archives. I know I've also seen discussions of using both depending on a developer's needs. Goggle: http://www.google.com/search?hl=enlr=ie=UTF-8q=cocoon+struts+compare turned up a number of articles, Wiki entries, and blogs containing feature comparisons, use cases and how tos. Hope this helps Steve Dear all , i am new user and want to learning struts and cocoon, but iam confused to choose ? which is the best , and what is the advantage each other. thank you _ MSN Movies - Trailers, showtimes, DVD's, and the latest news from Hollywood! http://movies.msn.click-url.com/go/onm00200509ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Howto suppress cinclude namespace
Hi, Take a look at: http://wiki.cocoondev.org/Wiki.jsp?page=RemoveNamespaces I think there was also other discussion about this in the last month or so if you search the mail archives(?). Hope this helps, Steve How can I make cinclude _not_ to put it's own namespace to the result? _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Does not retrieve ID
Hi I think I read that the auth-fw session info is only made available from within an auth-protected pipeline. Take a look at the section in the auth framework docs about accessing session information. Hope this helps Steve From: Oro smith [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Does not retrieve ID Date: Wed, 09 Jun 2004 13:19:07 +0600 (IST) hi, Im trying to retrieve the user id from the session and displaying it by passing it as a parameter. However the parameter contains no value and a blank page is displayed. Can someone tell me where the problem is? here are the sitemap and xsp codes. Sitemap: map:match pattern=test1.wml map:generate src=testing1.xsp type=serverpages map:parameter name=ups value={session-context:authentication/authentication/ID}/ map:parameter name=ups1 value=hello/ /map:generate map:serialize type=wml / /map:match XSP: xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:util=http://apache.org/xsp/util/2.0; xmlns:xsp-session-fw=http://apache.org/xsp/session-fw/1.0; sdata xsp:logic String lang=loop; lang=parameters.getParameter(ups,default); body xsp:exprlang/xsp:expr /body /xsp:logic /sdata /xsp:page - Still single? Click here to find the perfect match. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?141 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Get fast, reliable Internet access with MSN 9 Dial-up now 3 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem: Enabling uploads
Hi Tuomo IIRC the file will only exist for the duration of the pipeline invoked by the form action. So you need to process it within that pipeline as cocoon deletes it right afterwards. HTH, Steve Hi, We're having some serious problems with Cocoon upload mechanism. Nothing ends up in the upload-dir. The form enctype is set to multipart/form-data, enable-uploads=true and autosave-uploads=true in web.xml. What could be the problem? Running Cocoon 2.1.4 on Tomcat 4.1.24. _ Get rid of annoying pop-up ads with the new MSN Toolbar FREE! http://toolbar.msn.com/go/onm00200414ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem: Enabling uploads
Tuomo I believe the behavior changed in 2.1 so that that is no longer true: http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithCocoon2.1 Steve Hi, But if autosave-uploads=true, the the file should be saved in the upload-dir permanently, right? -Tuomo On Tue, 20 Apr 2004, Steve Schwarz wrote: Hi Tuomo IIRC the file will only exist for the duration of the pipeline invoked by the form action. So you need to process it within that pipeline as cocoon deletes it right afterwards. HTH, Steve Hi, We're having some serious problems with Cocoon upload mechanism. Nothing ends up in the upload-dir. The form enctype is set to multipart/form-data, enable-uploads=true and autosave-uploads=true in web.xml. What could be the problem? Running Cocoon 2.1.4 on Tomcat 4.1.24. _ From must-see cities to the best beaches, plan a getaway with the Spring Travel Guide! http://special.msn.com/local/springtravel.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Including XML into HTML as CDATA
Hi I'm trying to generate html that displays the content of XML files to the user. I found this archive mail: http://archives.real-time.com/pipermail/cocoon-users/2002-August/020937.html And I looked at the the snippet sitemap for how Cocoon documentation displays xml in its html (it just embeds the ![CDATA[ ... ]] directly in the xml file (which I can't do). But I'm still stumped... My sitemap declaration: map:serializer logger=sitemap.serializer.html mime-type=text/html name=ACML pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer encodingISO-8859-1/encoding cdata-section-elementsdiv/cdata-section-elements /map:serializer My sitemap pattern map:match pattern=(courses|view)/(.*).acml$ type=regexp map:generate src=web/{1}/{2}/{2}.acml / map:serialize type=ACML / /map:match Src file: ?xml version=1.0 encoding=UTF-8? div course id=20040408204930391 version=1.0 units=in width=1200 length=240 copyright2004 Anonymous Person/copyright /course /div In my browser I get: div![CDATA[ ]]course id=20040408204930391 version=1.0 units=in width=1200 length=240 copyright2004 Anonymous Person/copyright /course![CDATA[ ]]/div Seems to me the CDATA isn't wrapping the div element correctly...?? Is there some other way to do this? I tried using a stylesheet to wrap the element but then I get the raw chars and not the CDATA behavior. i.e. xsl:template match=/ div xsl:textlt;![CDATA[/xsl:text xsl:copy xsl:apply-templates/ /xsl:copy xsl:text]]gt;/xsl:text /div /xsl:template Any pointers are greatly appreciated. Thanks Steve _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Including XML into HTML as CDATA
Conal Thank you very much that did the trick! Steve Have a look @ xml2html.xslt (one of the Cocoon system stylesheets). Hi I'm trying to generate html that displays the content of XML files to the _ Tax headache? MSN Money provides relief with tax tips, tools, IRS forms and more! http://moneycentral.msn.com/tax/workshop/welcome.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: (Easy) Passing a Variable From Sitemap to StyleSheet?
David I think you want: ... xsl:param name=requestedfile/ ... thebody cinclude:include src={$requestedfile}/ /thebody ... I highly recommend Michael Kay's XSLT 2nd Edition Hope this helps Steve _ Tax headache? MSN Money provides relief with tax tips, tools, IRS forms and more! http://moneycentral.msn.com/tax/workshop/welcome.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: (Easy) Passing a Variable From Sitemap to StyleSheet?
David You can't do it directly within the document. But maybe you just need to think about the problem a little differently. Remember you don't need this aggregate document to physically exist. It just needs to be assembled at some point in your pipeline. So I'd use a stylesheet to get what you. Often you can structure your stylesheet(s) as a general template into which you pass params to configure the included subelements. So you might have a simple document (say a table layout template for your page) and use the pipeline to pass the configuration information to the stylesheet that modifies your basic document. I do this with a single style sheet into which I pass params to cinclude the various fixed and variable content of each page's layout. HTH, Steve Ok, I see the source of the problem now. I am trying to resolve the value of a variable from within an xml document, not within the stylesheet. I'm using the xml document to collect a bunch of xml documents using cinclude. That's where I need to have the name of a file requested in the uri by the user. So the question becomes how to pass the name of a file to a cinclude:include directive inside an xml document, if that makes sense. _ Get rid of annoying pop-up ads with the new MSN Toolbar FREE! http://toolbar.msn.com/go/onm00200414ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clarification on DownloadFilesToLocalDisk?
Hi First of all Lionel Crine thank you for creating this wiki page: http://wiki.apache.org/cocoon/DownloadFilesToLocalDisk The first approach using an action and a reader works fine for me. But I have a question about the second approach. Which serializer should be configured to match type=file ? It doesn't seem to be specified by default in the 2.1.2 sitemap. Thanks Steve _ Limited-time offer: Fast, reliable MSN 9 Dial-up Internet access FREE for 2 months! http://join.msn.com/?page=dept/dialuppgmarket=en-usST=1/go/onm00200361ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: svg2gif Serializer?
Hi AFAIK the serialization is implemented through Batik and Batik doesn't support SVG to GIF conversion here's a link from their mail archives (if you search them you will see many such discussions): http://koala.ilog.fr/batik/mlists/batik-users/archives/msg04499.html I use svg2png and for IE I use a hack based on this approach to get transparency: http://homepage.ntlworld.com/bobosola/index.htm HTH, Steve I am looking for a serializer which lets me use transparency. After I found out that png seems to support transparency, I gave the svg2png serializer a try. When using Firebird/Firefox everything looks perfect. In the Internet-Explorer the transparent parts are white. As I don't seem to be able to use transparency in the Internet-Explorer, I would have to use another format which supports transparency. _ Get reliable access on MSN 9 Dial-up. 3 months for the price of 1! (Limited-time offer) http://join.msn.com/?page=dept/dialuppgmarket=en-usST=1/go/onm00200361ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jetty/Cocoon Config Question
Hi I've been using the 2.1 bundled Jetty and would like to change the configuration to remove the cocoon from the uri as described here (for Tomcat): http://cocoon.apache.org/2.1/faq/faq-configure-environment.html#faq-N10005 Can someone give me the clue for how to setup the bundled Jetty in the same way? Thanks, Steve _ Get business advice and resources to improve your work life, from bCentral. http://special.msn.com/bcentral/loudclear.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jetty/Cocoon Config Question
Geoff, I'm sorry I mis-stated my request... I'd like to move one of my sub sitemaps into the default context. Thanks Steve Can someone give me the clue for how to setup the bundled Jetty in the same way? ? The bundled jetty puts cocoon on the defualt context (i.e., without the /cocoon). Geoff _ Store more e-mails with MSN Hotmail Extra Storage 4 plans to choose from! http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[repost] authentication-fw accessing resource for redirect
Hi Sorry to post again; but I'm stumped on this one... Thanks Steve Hi I've been pouring through the mail archives and can't seem to find what I'm doing wrong... If I am not yet authenticated and I try to access a protected page, I am (correctly) redirected to the login page with the uri containing the (encoded) resource that I tried to access. How do I redirect back to the protected resource I was originally seeking after logging in successfully? If it matters, I am doing all of this in a sub sitemap. Here's relevant sitemap entries: authentication-manager handlers handler name=uploadHandler redirect-to uri=cocoon://agilitycourses/login/ authentication uri=cocoon:/upload-authuser/ applications application loadondemand=true name=courses /application /applications /handler /handlers /authentication-manager this pipeline is called from the login form post action: map:match pattern=dologin map:act type=auth-loggedIn map:parameter name=handler value=uploadHandler/ map:redirect-to uri=alreadyLoggedIn/ /map:act map:act type=auth-login map:parameter name=handler value=uploadHandler/ map:parameter name=name value={request-param:name}/ map:parameter name=password value={request-param:password}/ map:parameter name=use-request-parameters value=true/ !-- I've tried {request-attr:resource} also w/no success -- map:redirect-to uri={request-param:resource}/ /map:act map:redirect-to uri=login/ /map:match map:match pattern=protected/* map:act type=auth-protect map:parameter name=handler value=uploadHandler/ map:parameter name=application value=courses/ map:match pattern=**/upload_acml map:generate src=web/content/upload_acml.html / map:serialize type=html / /map:match /map:act /map:match The login html is: html headtitleLOGIN/title/head bodyform method=post action=dologin tabletrtdName: input type=text name=name//td/tr trtdPassword: input type=password name=password//td/tr trtdinput type=submit//td/tr/table/form/body /html So if it access protected/upload_acml I am sent to: http://192.168.1.102:/agilitycourses/login?resource=%2Fagilitycourses%2Fprotected%2Fupload_acml I just can't seem to access the resource once the form is submitted. So the redirect goes to the root of my site submap. Any help is greatly appreciated. Thanks Steve _ Find things fast with the new MSN Toolbar includes FREE pop-up blocking! http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
authentication-fw accessing resource for redirect
Hi I've been pouring through the mail archives and can't seem to find what I'm doing wrong... If I am not yet authenticated and I try to access a protected page, I am (correctly) redirected to the login page with the uri containing the (encoded) resource that I tried to access. How do I redirect back to the protected resource I was originally seeking after logging in successfully? If it matters, I am doing all of this in a sub sitemap. Here's relevant sitemap entries: authentication-manager handlers handler name=uploadHandler redirect-to uri=cocoon://agilitycourses/login/ authentication uri=cocoon:/upload-authuser/ applications application loadondemand=true name=courses /application /applications /handler /handlers /authentication-manager this pipeline is called from the login form post action: map:match pattern=dologin map:act type=auth-loggedIn map:parameter name=handler value=uploadHandler/ map:redirect-to uri=alreadyLoggedIn/ /map:act map:act type=auth-login map:parameter name=handler value=uploadHandler/ map:parameter name=name value={request-param:name}/ map:parameter name=password value={request-param:password}/ map:parameter name=use-request-parameters value=true/ !-- I've tried {request-attr:resource} also w/no success -- map:redirect-to uri={request-param:resource}/ /map:act map:redirect-to uri=login/ /map:match map:match pattern=protected/* map:act type=auth-protect map:parameter name=handler value=uploadHandler/ map:parameter name=application value=courses/ map:match pattern=**/upload_acml map:generate src=web/content/upload_acml.html / map:serialize type=html / /map:match /map:act /map:match The login html is: html headtitleLOGIN/title/head bodyform method=post action=dologin tabletrtdName: input type=text name=name//td/tr trtdPassword: input type=password name=password//td/tr trtdinput type=submit//td/tr/table/form/body /html So if it access protected/upload_acml I am sent to: http://192.168.1.102:/agilitycourses/login?resource=%2Fagilitycourses%2Fprotected%2Fupload_acml I just can't seem to access the resource once the form is submitted. So the redirect goes to the root of my site submap. Any help is greatly appreciated. Thanks Steve _ FREE pop-up blocking with the new MSN Toolbar get it now! http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validating transformer
Please search the mail archives, I think a couple months ago someone posted source to do what you wish; it might have been an action that would pass/fail a document based on a DTD... HTH, Steve In order to improve the quality of my app, I would like to have a transformer that: * given a DTD, schema or something similar, * it could validate the XML data received. Does anybody know if there is already one? _ Dream of owning a home? Find out how in the First-time Home Buying Guide. http://special.msn.com/home/firsthome.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Coccon/FOP/SVG/PDF viewBox affecting dsiplayed size
Hi I've got a weird problem generating pdfs using FOP from xml containing SVG; but only when converted through Cocoon (2.1.2). Generation directly with FOP is problem free. For viewBox values larger than 0 0 525 525 (you know this is going to be weird already...) the generated image within the PDF is proportionally smaller. For example this renders as a black square filled in red and is 7 in on each side: fo:block text-align=center fo:instream-foreign-object text-align=center svg:svg xmlns:xlink=http://www.w3.org/1999/xlink; height=7in width=7in viewBox=0 0 500, 500 svg:rect x=0px y=0px width=500 height=500 style=stroke-width:1;stroke:black;fill:red/ /svg:svg /fo:instream-foreign-object /fo:block But this renders as a black edged square filled in red and is ~6 in on each side: fo:block text-align=center fo:instream-foreign-object text-align=center svg:svg xmlns:xlink=http://www.w3.org/1999/xlink; height=7in width=7in viewBox=0 0 600, 600 !-- rect sized to completely fill viewBox -- svg:rect x=0px y=0px width=600 height=600 style=stroke-width:1;stroke:black;fill:red/ /svg:svg /fo:instream-foreign-object /fo:block Of course the data I'm rendering is in a scale requiring viewBox sizes well over 1000 in width/height. Has anyone got a pointer for me? I took a look at FOPSerializer and it doesn't really do anything suspicious... Thanks Steve _ Find and compare great deals on Broadband access at the MSN High-Speed Marketplace. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SVG broken images.....HELP!!
Hi Don't you need to specify a viewPort attribute in your outermost svg element? Steve xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:xlink=http://www.w3.org/1999/xlink; . xsl:template match=artists-photo1 svg width=300 height=300 xsl:apply-templates / /svg /xsl:template _ Say good-bye to spam, viruses and pop-ups with MSN Premium -- free trial offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SVG broken images.....HELP!!
Hi Sorry if I lead you astray before... How's about a divide and conquer strategy? Seems like it isn't clear if the SVG being delivered to the svg2png serializer is correct or not. I think someone else mentioned this already, but the way I debugged a similar problem was to: - install the Adobe plugin for IE on a windows machine. - change the map:match pattern=frame/*.jpg to use the standard xml serializer (or make a new match that does the same thing with pattern=frame/*.xml if you think you might need to do this again in the future :^) - request the page from the browser then you can either see what is wrong directly in the XML or save the page as source and load the page from the filesystem as SVG using the plugin and look for the error. I'd start with a single filled rectangle as my image to further simplify the task... HTH, Steve _ Store more e-mails with MSN Hotmail Extra Storage 4 plans to choose from! http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SVG broken images.....HELP!!
Well it ain't SVG. If this is what you are giving to the SVG serializer it will never work. It has to be an SVG document. Looks like you are giving the serializer a whole HTML page that doesn't contain any svg elements at all. Please take a look at the svg samples that ship with Cocoon to see how they work. HTH Steve Ok guys, my brains have nearly turned to tapioca over this svg issue!! ;-). I have attached the generated xml document, if you could have a look at the doc and see what is going on it will be a great help to me. _ Click, drag and drop. My MSN is the simple way to design your homepage. http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Embedded JavaScript file inside dynamic SVG isn't working
Hi Guatam, hi Steve, This is the same mail that i sent to your mail box directly.. i am extremely sorry for that.These mail is to the cocoon users group to rectify that mistake of mine. It was my bad that started this; I must have sent directly to you. and wrt ur mail ,these is what i found: I tried accesing the MoveCircle.js file from the client machine using these (url = http://localhost/cocoon/SvgApps/scripts/MoveCircle.js) and it works fine from there.So i think that sitemap seems to pick it up fine. I tried removing the mime-type for .JS files and still got the same error Message Box which says Microsoft JScript runtime error:Object expected line:1,column:0 I'm not an SVG/JS expert, so I'd tackle this by trying to remove some more variables. Since it looks like Cocoon is delivering all the pieces; double check your paths are generated as you expect. If that is good I'd modify your example to just run in the browser from the local filesystem and not send any of it through Cocoon. Forgive me if you've tried this already; I'd just try to figure out if this a Cocoon problem or an SVG problem... I am not using the .js file from inside the html page which gets generated but from inside the .svg file...bcos the in the future, i would like the dynamically generated svg to just work as the main svg container which internally is built up of other svg image layers using the svg:image tag so that the final svg image created have there own user event handling based on what layer is currently active. Since you said you have been using .JS from the html container page,have you been able to get hold of the handle to the svg doc element ? Take a look at the O'Reilly SVG Essentials by J. David Eisenberg he has a small section on ecmascript and SVG. There might be other books that are better... He does: script type=text/ecmascript ![CDATA[ function ecircle(evt) { var circle=evt.getTarget(); circle.setAttribute(r, 50); } function scircle(evt){ var circle=evt.getTarget(); circle.setAttribute(r,25); } //]] /script circle cx='150 y=175 r=25 fill=red onmouseover=ecircle(evt) onmouseout=scircle(evt)/ He states the JS onmouse*() handlers interact with the SVG using the evt SVG instance. That is all I know! HTH Steve _ Check out the great features of the new MSN 9 Dial-up, with the MSN Dial-up Accelerator. http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems compiling action
Yoshi, It all depends how many iterations you need to make an action work; how complex the action is, how many actions you have. Softlinking is the the quick and dirtyapproach and puts your compiled code into the deployed cocoon class structure (or even jar file if that is what you want); it's a no-brainer from a cocoon build/configuration perspective. This was the approach I was using when I only had a couple actions and was trying out cocoon. Then choose the build.sh option you really need to minimize the work done. Just put your class structure under cocoon/src/java and the build/ant scripts will do the right thing when you perform build.sh with your argument of choice. i.e. build.sh compile i.e. if your class is com.mine.acting.FileUpload.java just put it under the cocoon/src/java tree: ~/cocoon-2.1/src/java/com/mine/acting/FileUpload.java or if you have your files in /home/yoshi/java/com/mine/acting cd ~/cocoon-2.1/src/java ln -s ~/java/com . I'm using Eclipse now and have my project put its compiled classes into the WEB-INF/classes tree when it compiles, together with the sunBow extensions it makes working with Cocoon a lot easier. Hope this helps, Steve Hi steve, in a post you made at http://www.mail-archive.com/[EMAIL PROTECTED]/msg07833.html you suggest softlinking an action source under cocoon's and using the cocoon build script. Wont this require cocoon to be rebuilt (a somewhat timely process). Also how is this done exactly? Any help you can give me would help and be much appreciated Yoshi _ Rethink your business approach for the new year with the helpful tips here. http://special.msn.com/bcentral/prep04.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems compiling action
4. The error message I am getting is : tcsh: ./build-action.sh: Permission denied. what am I doing wrong here? Isn't this obvious? On any file or directory that is touched you have not the permission to touch it, maybe build-action.sh itself. It's not a problem with compilation or Cocoon, simply with the file system. Joerg Get a hold of a UNIX shell intro... if you are just learning this won't be your last question along this line :^) The script probably doesn't have execute permission try: ls -l build-action.sh probably shows -rw-r--r-- build-action.sh to fix this give it execute permission: chmod +x build-action.sh HTH Steve p.s. you could just softlink your action sources under Cocoon's and use the Cocoon build script. Or even better is to use the sunBow plugin for Eclipse which does everything for you once you set it up. _ Make your home warm and cozy this winter with tips from MSN House Home. http://special.msn.com/home/warmhome.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Comments?? [RT] SVGRenderingTransformer?
Hi Does anyone have any comments on this idea? Thanks Steve Hi, I have a problem for which a general solution might be useful to others and am looking for feedback on my idea. As much as I'd like to supply SVG directly to the client; few people have SVG plugins installed. So, like many of you, I've been using svg2png to generate images. But SVG also provides for interactivity through scripting. To provide some of (scripted) SVG's features I'd like to break up the SVG image into a number of SVG sub documents, render them each as PNG and then use html divs to position the subimages at the client in the correct position relative to the base SVG document origin. (e.g. an office floor plan where each desk, chair, etc is it's own image extracted from an SVG document and positioned as they were in the original document). This idea opens up the ability to use JavaScript for drag/drop/delete/modify of the presentation layer on JavaScript enabled browsers. In order to perform the extractions the bounding box would need to be determined and the transformation to the root coordinate system calculated. From my cursory investigations the Batik library provides all of these features(???). This approach would also allow for building image maps around significant areas of the image using the area's bounding box dimensions (bbox dimensions can't always be known without rendering; e.g.complex paths, rendering rectangles around text in arbitrary fonts). I was thinking of creating an SVGRenderingTransformer that would render the entire SVG document and then allow extracting subtrees as annotated standalone SVG documents. i.e. input pseudo svg doc: root svg viewBox=0 0 1512 1512 height=600 width=600 defs/defs g transform=translate(0, 1320) scale(1,-1) id=globalTransform g id=obstacles svgX:extract g transform=translate(344,865) rotate(-170,0,0) id=ac.74 some elements /g /svgX:extract svgX:extract g transform=translate(1297,956) rotate(-86,0,0) id=ac.75 some elements /g /svgX:extract /g /svg /root output pseudo doc (assuming svgX:extract are the extraction elements and *text* are the values computed by the transformer): root svg viewBox=0 0 1512 1512 height=600 width=600 defs/defs g transform=translate(0, 1320) scale(1,-1) id=globalTransform g id=obstacles /g /svg svg viewBox=0 0 *minBoundingWidth* *minBoundingHeight* width=*minBoundingWidth* height=*minBoundingHeight* x=*xWRTRoot* y=yWRTRoot id=ac.74 some elements /svg svg viewBox=0 0 *minBoundingWidth* *minBoundingHeight* width=*minBoundingWidth* height=*minBoundingHeight* x=*xWRTRoot* y=yWRTRoot id=ac.75 some elements /svg /root You could then put XSLT, SourceWriting, and FragmentExtractor Transformers afterwards in the pipeline to remove, cache, render the individual elements as PNG/JPG if so desired. Is a transformer really the right component to implement this functionality? Of course performance could be an issue for a dynamic data driven pipelines... Any Batik power users who know if my speculation on Batik's abilities are correct? In addition to extract, other options could include: copy w/o extracting, wrapping a new root. Any suggestions or comments would be greatly appreciated! Thanks, Steve _ Tired of slow downloads? Compare online deals from your local high-speed providers now. https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OT: How do you use CVS?
Justin, I'm using eclipse http://www.eclipse.org and use it to put my whole tree under CVS. You can choose to exclude various directories if you don't want to include your jars. I created a separate sub project for my Cocoon application. If you use the sunbow extensions http://radio.weblogs.com/0108489/ it hooks in nicely with Cocoon. I think there is also an ant task(?) for generating the Eclipse project file that makes this trivial. SmartCVS is also a real nice Java GUI for CVS http://www.smartcvs.com if you don't want an IDE. I guess my summary would be disk is cheap put it all under CVS :^) HTH, Steve From: Justin Fagnani-Bell [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: OT: How do you use CVS? Date: Tue, 16 Dec 2003 16:05:32 -0800 I'm just now starting to setup CVS for my Cocoon based projects and I'm wondering how other Cocoon users use CVS. My project directory structure is probably similar to others using Cocoon and Ant. It's something like this: Project - build.sh - build.xml - etc - - cocoon.xconf (and others) - lib - src - web - - (various files and directories, some text and some binary) I'd need to put at least src/ and two dirs under web/ (stylesheets and xsp's) into CVS, but I'd actually like to just import the whole project. I'm not so sure what to do about the JAR's in lib/ and the graphics under web/ What are others doing out there? And are you integrating CVS with Ant? Thanks a bunch, Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Get dial-up Internet access now with our best offer: 6 months @$9.95/month! http://join.msn.com/?page=dept/dialup - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cocoon and svg rasteriser
Hi, Unless I'm missing something, it looks like you've got one too many / in your cocoon: statement. How's about: cocoon://svgdiagram/ HTH, Steve I am using cocoon 2.0.3. I have a transform to a xml file which contains a xlink to an cocoon pipeline for static images but it does not get rendered into jpeg. image xsl:attribute namespace=http://www.w3.org/1999/xlink; name=xlink:hrefcocoon:///svgdiagram/xsl:value-of select=/page/extra/svgbackgroundimage//xsl:attribute /image So I have a pipeline for serving /svgdiagram/something.jpg but the above doesn't work... am I using cocoon:// correctly here? _ Get holiday tips for festive fun. http://special.msn.com/network/happyholidays.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cocoon and svg rasteriser
Hi Sorry I guess I did misunderstand your request. A couple ideas: - recently in the mail lists I seem to recall discussions about using source resolver to do this. But I'm not an XSP guy so I don't know how you go about accessing the source resolver w/in xsp... - another post for this type of problem recommended putting your root dir in a config file and then using Xinclude to extract the root from the config file into the XSL. - I have used a global site map variable named root and use the {global:root} to pass this into my XSLT. HTH, Steve I just wonder if I can resolve/expand this url: cocoon://svgdiagram/image.jpg via java in my xsp to the full one... http://server:port/cocoon/svgdiagram/image.jpg; using come java call by passing in cocoon://svgdiagram/image.jpg as an argument? Then I will have the full url in my xsl transform. It is because the rasteriser only works if that link is a full http url! _ Cell phone switch rules are taking effect find out more here. http://special.msn.com/msnbc/consumeradvocate.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[RT] SVGRenderingTransformer?
Hi, I have a problem for which a general solution might be useful to others and am looking for feedback on my idea. As much as I'd like to supply SVG directly to the client; few people have SVG plugins installed. So, like many of you, I've been using svg2png to generate images. But SVG also provides for interactivity through scripting. To provide some of (scripted) SVG's features I'd like to break up the SVG image into a number of SVG sub documents, render them each as PNG and then use html divs to position the subimages at the client in the correct position relative to the base SVG document origin. (e.g. an office floor plan where each desk, chair, etc is it's own image extracted from an SVG document and positioned as they were in the original document). This idea opens up the ability to use JavaScript for drag/drop/delete/modify of the presentation layer on JavaScript enabled browsers. In order to perform the extractions the bounding box would need to be determined and the transformation to the root coordinate system calculated. From my cursory investigations the Batik library provides all of these features(???). This approach would also allow for building image maps around significant areas of the image using the area's bounding box dimensions (bbox dimensions can't always be known without rendering; e.g.complex paths, rendering rectangles around text in arbitrary fonts). I was thinking of creating an SVGRenderingTransformer that would render the entire SVG document and then allow extracting subtrees as annotated standalone SVG documents. i.e. input pseudo svg doc: root svg viewBox=0 0 1512 1512 height=600 width=600 defs/defs g transform=translate(0, 1320) scale(1,-1) id=globalTransform g id=obstacles svgX:extract g transform=translate(344,865) rotate(-170,0,0) id=ac.74 some elements /g /svgX:extract svgX:extract g transform=translate(1297,956) rotate(-86,0,0) id=ac.75 some elements /g /svgX:extract /g /svg /root output pseudo doc (assuming svgX:extract are the extraction elements and *text* are the values computed by the transformer): root svg viewBox=0 0 1512 1512 height=600 width=600 defs/defs g transform=translate(0, 1320) scale(1,-1) id=globalTransform g id=obstacles /g /svg svg viewBox=0 0 *minBoundingWidth* *minBoundingHeight* width=*minBoundingWidth* height=*minBoundingHeight* x=*xWRTRoot* y=yWRTRoot id=ac.74 some elements /svg svg viewBox=0 0 *minBoundingWidth* *minBoundingHeight* width=*minBoundingWidth* height=*minBoundingHeight* x=*xWRTRoot* y=yWRTRoot id=ac.75 some elements /svg /root You could then put XSLT, SourceWriting, and FragmentExtractor Transformers afterwards in the pipeline to remove, cache, render the individual elements as PNG/JPG if so desired. Is a transformer really the right component to implement this functionality? Of course performance could be an issue for a dynamic data driven pipelines... Any Batik power users who know if my speculation on Batik's abilities are correct? In addition to extract, other options could include: copy w/o extracting, wrapping a new root. Any suggestions or comments would be greatly appreciated! Thanks, Steve _ Browse styles for all ages, from the latest looks to cozy weekend wear at MSN Shopping. And check out the beauty products! http://shopping.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serializer preserve spaces
Thank you for spotting my operator error! Moz fooled me when I was viewing the styled xml in the browser. I verified via SourceWritingTransformer serializing to xml that whitespace is preserved. Thanks again, Steve Steve Schwarz wrote: How do I configure the XMLSerializer to preserve whitespace? The XML serializer preserves whitespace it gest from earlier stages. What kind of tool do you use to view the result? Try a plain text editor. _ Cell phone switch rules are taking effect find out more here. http://special.msn.com/msnbc/consumeradvocate.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recommended XML to Java binding framework for Cocoon?
Andrezej, About 6 months ago I looked at JAXB and Castor. Settled on Castor for the following business/tech reasons: - It wasn't clear what the licensing terms for JAXB as part of Sun's larger XML suite would be. - JAXB either didn't handle polymorphism and/or substitution groups (I don't have my notes with me). - Castor's SourceGenerator did a good job of generating Beans directly from the document XSD. - Castor's generated code can marshal/unmarshal w/o any mapping file. Supports validation. Alternately, a mapping file to/from an existing object model is also supported. - Castor supports polymorphic collections. Castor can also generate a mapping file automatically or, generate an XSD from an instance doc. So the helper apps helped me a lot. My development flow was from a UML design of the XSD to the data model (document-centric design) to object/relational model. The SourceGenerator allowed me to push out new code whenever the UML design changed. Is the generated code exactly how I'd hand code it? No, but I'm thinking it can be reverse-engineered back into the modeling tool (Enterprise Architect) and ancillary functions re-merged back into the generated code. A downside of the generated model approach is that if you plan to regenerate often, I think you have to design the rest of the system to interact with the model through non-invasive methods (not modifying the generated code). I ended up using visitors to implement some operations on the data model that I might have edited directly into the model's source otherwise. Similarly extending the data model classes can only be supported if you go through a mapping file and don't use the generated code for marshaling/unmarshaling (unless you want to manually modify the generated descriptor classes to construct the extended classes in place of the generated classes). My original plan was to use Castor for both XML binding and O/RM binding but OJB was more complete for my needs in comparison to Castor (but that's another story). HTH, Steve Anyone have any recommendations as to which XML to Java binding framework works best under Cocoon? I have a requirement for one to do with PDF file manipulation, and was wondering if there were any to stay away from, or any others that might work better under Cocoon. _ Get holiday tips for festive fun. http://special.msn.com/network/happyholidays.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Serializer preserve spaces
Hi This must be a FAQ but I can't seem to find the answer in the wiki or the archives... How do I configure the XMLSerializer to preserve whitespace? Here's my test case: Given an XML doc test.xml: ?xml version=1.0 encoding=UTF-8? textSome text withspaces/text I use an XSLT stylesheet text.xsl: ?xml version=1.0? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xsl:strip-space elements=*/ xsl:preserve-space elements=text/ xsl:template match=text new-textxsl:apply-templates//new-text /xsl:template /xsl:stylesheet With this pipeline the extra whitespace is removed: map:match pattern=text.xml map:generate src=text.xml/ map:transform src=style/text.xsl/ map:serialize type=xml/ /map:match Changing to the TextSerializer preserves the whitespace. Can I control this behavior for the XMLSerializer? Thanks for any help, Steve _ Get holiday tips for festive fun. http://special.msn.com/network/happyholidays.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fw: Uploading files with Cocoon 2.1 (one more)
Joesp, Hmmm. I haven't checked the archives to see what I posted. But it is possible I cut and pasted with some errorI'm very sorry if that is the case! I didn't just attach the action since it wouldn't persist in the mail archives that way. In my code I have: // Create the upload folder(s) if need be File folder = new File(uploadFolder); if (!folder.exists()) { folder.mkdirs(); } File destFile = new File(folder + File.separator + filename); // code that does the copy So the creation of the directories is independent from the file copying.. File folder = new File (uploadfolder); if (!folder.exists()){ folder.mkdirs(); //code for uploading and saving a file } That generates the next problem: if you upload a file, a folder is created, and the file is saved into this folder. So if you make the change as you indicate I'm sure all is well. (?) Steve _ Set yourself up for fun at home! Get tips on home entertainment equipment, video game reviews, and more here. http://special.msn.com/home/homeent.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CInclude XInclude Transformers
Nacho If I understand correctly, it looks like you can just create a pipeline that serves your modified config file and then refer to it using the cocoon: protocol when you need it. I do something similar - here is where I generate my config data (from a db instead of a file) !-- Pull xml config data from database as XML -- map:match pattern=^(category|club|difficulty|style|organization)$ type=regexp map:generate type=file src=web/content/simple_select.xml / !-- Yor transform would go here and you can pass it any params you need in the request to modify your config file -- map:transform type=xslt src=style/simple_select.xsl map:parameter name=table-name value={1} / /map:transform map:transform type=sql map:parameter name=use-connection value=agilitycourses / map:parameter name=preserve-column-case value=true / /map:transform map:serialize type=xml / /map:match Then I cinclude the output in other pipellines by refering to it via cocoon:/category or cocoon:/club I found an interesting and (to me) unexpected effect when doing this. The request to the cocoon protocol is the request as you've processed it thus far, so you can use the request to modify the result of the cincluded pipeline as you need. Best Regards, Steve From: Nacho Jimenez [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: CInclude XInclude Transformers Date: Thu, 27 Nov 2003 22:44:41 + Hello all, I need to merge several different pipelines into a single one. At first, I looked at aggregators as the tool for the job, but I have to decide dinamically what to merge from an XML config file, so Aggregators are not the answer. I can manipulate with XSLT the config file and transform it so that it becomes an XML file with xinclude or cinclude tags, but I want to access pipelines, not external documents.. Is that posible, or do I have to access URLs? Please.. Any help would be much appreciated. Nacho - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Set yourself up for fun at home! Get tips on home entertainment equipment, video game reviews, and more here. http://special.msn.com/home/homeent.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Docs or examples for modular database actions?
Hi Thomas, I'm building a simple CrUD (Create/Update/Delete) db app, similar to the users/groups and users/depts examples, and I'd like to use - XSP/ESQL for queries (some of which could get quite complex) - modular DB actions for insert / update / delete. This is from experimentation and from studying - Christian Haul's excellent GT 2003 paper: http://wiki.cocoondev.org/Wiki.jsp?page=GT2003Christian ... you are looking in all the right places ModularDB actions, however, still have me baffled. Before cluttering up the list with boring RTFM questions, I'd like to check which F***ing Manual I should be reading :-) Have you taken a look at: http://localhost:/samples/databases/mod-db/user-list It is what I used to really figure out how to configure/use the modular db actions. Searching the list archives I can find other similar questions with few answers, does this mean ModularDB is best left until it is more stable / better documented? ModularDb is quite stable and Christian has been very helpful in answering any questions. I can't quite put a finger on what is wrong with the current docs. The information is there but the examples are almost too involved when you are just starting out. A very simple CRUD example using a single table would be very helpful when starting out. I'll see if I can find some time to put one together...I had said I'd do this a while back and never did though... :^) HTH Steve _ Has one of the new viruses infected your computer? Find out with a FREE online computer virus scan from McAfee. Take the FreeScan now! http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Uploading files with Cocoon 2.1 (one more)
Josep, I think part of the problem is an overloading of the term upload directory... I have a problem with the upload directory. immediately after your pipeline completes Cocoon will delete the file from the upload-dir if it is still there. This iis the directory specified in the web.xml. For consistency let's call it the upload-dir. My action will copy the file from the upload-dir to the specified destination directory. Let's call it the destination-dir. Cocoon definitely deletes the file from the upload-dir once your pipeline finishes processing (this has nothing to do with the action). But you didn't answer my question...Are you configuring your upload-dir to the same path as the destination-dir? Well, this doesn't happen into my application. When the server receives a file, it processes the file, and generates a result. After it, I need to delete the file, in order to prepare the sever for other receivements. Furthermore, I want to delete incoming directory, because the Upload Action doesn't work if incoming directory already exists. That is ... incoming directory only accepts one file. If the server wants to adquire another file, there is a problem, because upload action tries to create incoming directory again. This shouldn't be necessary. I have been running this action for months copying hundreds of files into the same directory without ever deleting the directory. Are you getting some error message pointing to the directory creation as the problem? If so what is it? Didn't you say in a previous email that you are reusing the same file name over and over? Try this same stuff with different filenames and verify that it works correctly. Then try it reusing the same file names. If you still have a problem please post the logfile output for the success case and the error case with logging set to DEBUG. It is very painful trying to debug your problem if you don't supply the log information. Best Regards, Steve _ Has one of the new viruses infected your computer? Find out with a FREE online computer virus scan from McAfee. Take the FreeScan now! http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Uploading files with Cocoon 2.1 (one more)
Josep, Steven Schwarz posted his own upload action, but I can't run it. What error / failure condition are you getting? Please supply the logfile showing the action output. It contains a request action, that I don't need It *has* to contain a request...that is where cocoon puts the directory/filename of the temporary location where it put the uploaded file. The action copies or moves the file from the temporary location to the final location you specify. and I think it is too complex. Beauty is in the eye of the beholder :^) It's only ~120 lines long and the vast majority of that is debug logging. I put all the logging to make it easy to debug when others use it. This action has to handle three scenarios: 1. The input is a Part 2. The input is a PartOnDisk (the most common case) 3. The input is a PartOnDisk and it is not on the same filesystem as the destination Please run this action along with the pipelines I provided with debug turned on and submit the logs. I can only help if you can provide specific problems. Regards Steve _ Has one of the new viruses infected your computer? Find out with a FREE online computer virus scan from McAfee. Take the FreeScan now! http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: file upload - another question
Hi Jan, Sorry if this is a re-reply, my mailer just hiccuped... Did you compile this before the code change from the command line as you show? I'd recommend using the build script in the cocoon root, it will setup everything correctly and copy the output to the correct places. Steve I get an error message where I don't know what may be wrong: - E:\cocoon-2.1.2\build\webapp\WEB-INF\classes\org\apache\cocoon\actingjavac Mult iPartFileAction.java MultiPartFileAction.java:103: cannot resolve symbol symbol : method resolveURI (java.lang.String) location: interface org.apache.cocoon.environment.SourceResolver Source outSource = resolver.resolveURI(uploadDir + fileName); ^ 1 error _ Frustrated with dial-up? Get high-speed for as low as $26.95. https://broadband.msn.com (Prices may vary by service area.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Sodipodi SVG flags 1.0
I just saw this in the SVG mail list and I know there are a lot of SVG users in the Cocoon community who might want to use national flags in their web apps as buttons and such. Take Care, Steve Sodipodi flags 1.0 This is the first release of the Sodipodi flag collection. This collection currently consist of over 210 different international and local flags. The flags are donated by their authors into the public domain. The flags are in the scalable and free SVG format which today is supported by most major vector graphics programs. Most flags are done using the Sodipodi vector drawing application. In others words these are free flags in a free format made with a free application. The core collection of flags in this collection are meant to be as accurate as possible. If you discover flags in here that have wrong proportions or wrong colors then please update the flag with the correct colors or sizes and send it to us with an explanation. New flags are of course also welcomed, but remember we need a clear statement from you that you dedicate the flag to the public domain, preferably using the Creative Commons public domain dedication process found here: http://creativecommons.org/license/publicdomain-2 We do hope that many of you take some time to help us make this an even more complete collection. We hope that this collection can be useful to people in many different settings be that in relation to software, publishing, education and so on. The assembly of this huge collection has been made possible thanks to the hard work of many people. We big thank you goes to all our contributors listed in the CREDITS file distributed with this package. We would especially like to thank Tobias Jacobs, Sigge Kotliar, Cezary Biel, Brett Roper, Daniel McRae and Lauris Kaplinski, whose contributions count for around half the collection. You can see all of the currently contributed flags here: http://www.sodipodi.com/index.php3?section=clipart/flags The creation of these flags had not been possible without the hard work that free software coders have put into great tools like Sodipodi and librsvg. The projects have helped increase the viability of SVG in free and open source software a lot. Both these two tools and the new Inkscape project do need more coders in order to improve further. For instance you will notice that many of the SVG flags do not render correctly in Nautilus due to some problems with librsvg. People interested in working on these and other issues are highly encouraged to join the project mailing-lists. You find the projects here: http://www.sodipodi.org http://librsvg.sf.net http://www.inkscape.org You can download the package in either tar.gz or zip format from the sourceforge file area: http://prdownloads.sourceforge.net/sodipodi/sodipodi-flags-1.0.tar.gz?download http://prdownloads.sourceforge.net/sodipodi/sodipodi-flags-1.0.zip?download Sincerely, Christian Schaller _ From Beethoven to the Rolling Stones, your favorite music is always playing on MSN Radio Plus. No ads, no talk. Trial month FREE! http://join.msn.com/?page=offers/premiumradio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File upload
Hi Jan Please search the archives. I know in the last three weeks or so I've posted a full action for upload that works for 2.1. Also I believe someone else posted an action (or maybe a flow?) that is being considered for inclusion into the official distribution. HTH Steve I would like to get the file upload working with cocoon 2.1, but unfortunately the examples in wiki don't give enough for such newbie as me :( In the wikipage about upload with flow written by Geoff Howard there are two possibilities showed. The first one, with JavaScript contains the following line: _ Is your computer infected with a virus? Find out with a FREE computer virus scan from McAfee. Take the FreeScan now! http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is it possible to upload files with Cocoon 2.1???
Josep, I week or so ago I posted a complete solution that I am using every day. I never saw you reply that you had any problems..?? I assumed you had moved on with your development. Steve I have posted some messages in order to learn about uploading files with Cocoon 2.1. via an action, but there's no clear solution to this problem. What do you think about this mistery??? Anybody has achieved it? Thanks a lot Josep. _ Compare high-speed Internet plans, starting at $26.95. https://broadband.msn.com (Prices may vary by service area.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is it possible to upload files with Cocoon 2.1???
Josep 1. I'm pretty sure you need the enctype set on your form: form method=post enctype=multipart/form-data action=upload 2. Temporarilly replace your sitemap entry to just return a static page: map:match pattern=upload map:generate src=upload.html/ map:serialize type=html/ /map:match Once you get your upload.html served correctly then put your action back and test again; check the logs to see what shows up from the action. I'd log something as the first line in the action to verify that it is getting accessed. HTH Steve I get next error: Page not found ... It seems that Cocoon does not recognize the pattern map:match pattern=upload There is no file named upload, and Cocoon does not redirect the query to the action... _ Is your computer infected with a virus? Find out with a FREE computer virus scan from McAfee. Take the FreeScan now! http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configurable Transformers?
Hi I'm writing a transformer that I need to make Configurable but as soon as I add implements Configurable to my class, compile it, restart Jetty, and request a pipeline using the transformer it get: Lookup of transformer for role 'date' failed If I remove implements Configurable the lookup succeeds... Is there something special I need to do? My sitemap entry: map:transformer name=date logger=sitemap.transformer.date src=com.agilitycourses.transformation.DateTransformer/ The class contains: public class DateTransformer extends AbstractTransformer implements Configurable { ... public void setup(SourceResolver resolver,Map objectModel,String src,Parameters par){...} public void configure(Configuration conf) throws ConfigurationException {...} public void startElement(String uri, String loc, String raw, Attributes a) {...} public void characters(char[] c, int start, int len) throws SAXException {...} public void endElement(String uri, String loc, String raw){...} } Any pointers greatly appreciated! Steve _ Concerned that messages may bounce because your Hotmail account has exceeded its 2MB storage limit? Get Hotmail Extra Storage! http://join.msn.com/?PAGE=features/es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Passing objects as parameters
Hi Ralph For an example of storing and retrieving objects in the Request take a look at AbstractValidatorAction and SimpleFormTransformer. The action fills a map with the validation information (for both success and failure of the action) and pushes it into the request. The transformer then extracts the map from the request and uses it. They each know of the name of the request attribute through a shared constant string... Request#setAttribute(key,object) and Object Request#getAttribute(key) are what you want. Sorry I don't know how to communicate this info via input modules :^( HTH Steve I'm not using flowscript, just the sitemap. Even so, how would the object be passed to the generator? The only thing I can think of is that it has to be store in the request or the temporary context, in which case the input module would have to return the name the value is stored as. The generator would then need to know to retrieve it. Quite ugly. Ralph _ Want to check if your PC is virus-infected? Get a FREE computer virus scan online from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SQLTransformer support column aliases?
Hi I have a select query containing joins across tables which have the same column names. I'd like to be able to differentiate the similarly named columns in the sql:row elements by explicitly naming them. I've tried changing my query to include aliases for the selected columns but the output is always named with the actual table's column name. Is there a config for SQLTransformer to use the alias name? If possible I'd rather not have my stylesheet use XPath to index by position in to each sql:row in case column order is changed in the query. Thanks, Steve _ See when your friends are online with MSN Messenger 6.0. Download it now FREE! http://msnmessenger-download.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FYI - Standalone demo and file uploads
I just ran across this and thought it might help someone else... If you are using the standalone demo Jetty servlet where it creates its temp files (and consequently it's upload directory) on a different file system from the cocoon deployment AND your File Upload Action naively uses File.renameTo() to copy the file to its final resting place File.renameTo() can fail. According to the Java spec this behavior is platform specific; this stands to reason since internally the rename probably just updates some filesystem pointers within the filesystem table/FAT, which it can't do if the file is destined for a different filesystem. I saw this behavior using the standalone demo on my dev Linux machine since Jetty writes to /tmp/Jetty_ etc and my cocoon install is in /home on a different filesystem. Anyway, to make a long story short, if this is an issue for anyone else you can change the action to try the rename and then do a copy if the rename fails. Best regards, Steve _ Never get a busy signal because you are always connected with high-speed Internet access. Click here to comparison-shop providers. https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.sql.SQLException: Unexpected token: in statement [SELECT 1]
Hi I'm using cocoon 2.1.1 running the standalone-demo against hsqldb. I'm using ModularDatabaseActions to access my database. It looks like the ping to check if the db connection is still up sends an invalid select (select 1) which throws an exception in my log files. Is it possible I have a configuration incorrect? At one point I was connecting to MySQL and select 1 is a valid select for MySQL. I've looked at my cocoon.xconf and web.xml and don't see my error... Any ideas where to look? Thanks Steve DEBUG (2003-10-16) 09:33.09:602 [core.datasources.agilitycourses] (/agilitycourses/category-add) PoolThread-4/AbstractJdbcConnection: Pinging database after 185263ms of inactivity. DEBUG (2003-10-16) 09:33.09:603 [core.datasources.agilitycourses] (/agilitycourses/category-add) PoolThread-4/AbstractJdbcConnection: Ping of connection failed. java.sql.SQLException: Unexpected token: in statement [SELECT 1] at org.hsqldb.Trace.getError(Unknown Source) at org.hsqldb.Result.init(Unknown Source) at org.hsqldb.jdbcConnection.executeHSQL(Unknown Source) at org.hsqldb.jdbcConnection.execute(Unknown Source) at org.hsqldb.jdbcStatement.fetchResult(Unknown Source) at org.hsqldb.jdbcStatement.executeQuery(Unknown Source) at org.hsqldb.jdbcPreparedStatement.executeQuery(Unknown Source) at org.apache.avalon.excalibur.datasource.AbstractJdbcConnection.isClosed(AbstractJdbcConnection.java:235) at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.avalon.excalibur.datasource.AbstractJdbcConnection.invoke(AbstractJdbcConnection.java:357) at $Proxy1.isClosed(Unknown Source) at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcConnectionPool.validatePoolable(ResourceLimitingJdbcConnectionPool.java:159) at org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.get(ValidatedResourceLimitingPool.java:141) at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.getConnection(ResourceLimitingJdbcDataSource.java:222) at org.apache.cocoon.acting.modular.DatabaseAction.act(DatabaseAction.java:658) at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:157) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:176) 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:164) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:161) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:327) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:309) 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:164) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:161) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:327) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:309) at org.apache.cocoon.Cocoon.process(Cocoon.java:639) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1096) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) at
ModularDb OutputModule Mapping Confusion
Hi I'm using ModularDb to check if an entry already exists in the database and I'm having trouble mapping the form fields to the mod db key/values. I'm using simpleform validation together with the modular db also. My simplified input form (there are actually a couple on the page - so I prefix the input fields): form name=category method=post action=category-add input type=text cols=32 name=category.name/ input type=hidden name=category.id/ input type=hidden name=category.default/ input type=submit value=Add Category name=add-category/ /form My first approach in the database.xml file: !-- used for select checking that name doesn't already exist -- table name=category alias=category-exists keys key name=category.name type=string autoincrement=false/ /keys values value name=id type=int/ value name=default type=string/ /values /table This generates this SQL (if the user supplies 'YY' for the category.name field): SELECT category.id, category.default FROM category WHERE category.name= 'YY' Unfortunately HSQLDB doesn't like this syntax...so I'd like to generate: SELECT id, default FROM category WHERE name= 'YY' After studying the sample and the online docs: !-- used for select checking that name doesn't already exist -- table name=category alias=category-exists keys key name=name type=string autoincrement=false mode name=request-attr type=all parameter org.apache.cocoon.components.modules.output.OutputModule:category.name[0]/parameter /mode /key /keys values value name=id type=int mode name=request-attr type=all parameter org.apache.cocoon.components.modules.output.OutputModule:category.id[0]/parameter /mode /value value name=default type=string mode name=request-attr type=all parameter org.apache.cocoon.components.modules.output.OutputModule:category.default[0]/parameter /mode /value /values /table But then null is assigned to the name field. Can someone give me the clue as to how to map the fields correctly? Thanks, Steve _ Enjoy MSN 8 patented spam control and more with MSN 8 Dial-up Internet Service. Try it FREE for one month! http://join.msn.com/?page=dept/dialup - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serializing to a request attribute?
Andrzej, I'm just getting this to work myself... Have you taken a look at the modular db samples in 2.1? You'll have to pick your way through the sample; there is a lot going on there. Also this doc shows a one liner about doing what you describe: http://cocoon.apache.org/2.1/userdocs/actions/database-actions.html Specifically: table name=user_groups keys key name=uid type=int mode name=request type=request parameteruser_groups.uid/parameter /mode mode name=attribute type=attrib parameterorg.apache.cocoon.components.modules.output.OutputModule:user.uid[0]/parameter /mode /key key name=gid type=int set=master mode name=request type=all parameteruser_groups.gid/parameter /mode /key /keys /table An important thing to know is that the mode name corresponds to the input module name in the cocoon.xconf file. So with the latest 2.1 code you'd want to substitute mode name=request-attr above. The mode type can be set to all to make it work in all cases. What the above does is allow the request to contain the attribute user.uid (the modules always return a list - so if there is always one field you need index 0) to database field uid in table user_groups. Unfortunately, that's about all I can help with... HTH, Steve Is there any action/module/component that can take a sax stream in a pipeline and save it in a request attribute as an XML text string? I think I've figured out how to get modular database actions to workbut somehow need to take the output of a pipeline and store it in a request attribute or otherwise make it available to a database insert/add action. Any hints on how to accomplish this? thanks! Andrzej Jan Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Surf and talk on the phone at the same time with broadband Internet access. Get high-speed for as low as $29.95/month (depending on the local service providers in your area). https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SVG graphics not working
Take a look at: http://cocoon.apache.org/2.1/installing/index.html#Headless+UNIX+and+PJA You might also look at the batik install stuff because I think they made some changes (due to 1.4?) that made this easier(???) http://xml.apache.org/batik/ HTH Steve Yes, for headless operation u need to pass a parameter to jvm. Read JDK 1.4 docs for details. THis is only necessary on UNIX systems In older JDKs you had to install a headless virtuall framebuffer. Doug Chestnut wrote: I ran into this problem on Solaris because I did not have my DISPLAY environmental variable set when I started tomcat. I thing that batik requires an x server because of its use of awt. --Doug - Original Message - From: Nesto [EMAIL PROTECTED] To: Cocoon Users [EMAIL PROTECTED] Sent: Monday, October 06, 2003 9:50 AM Subject: SVG graphics not working Hi! I'm trying to write an application, that make use of svg graphics. I'm developing the application on my windows pc and I run it without any problems (cocoon 2.1.2 under tomcat 4.1.18). When I want to deploy the application on a Linux server I cannot put it work correctly: I cannot view the images in my browser. I use the simple serializers svg2pgn or svg2jpeg. I installed the same distribution (cocoon 2.1.2, built with the same options), and all seems to work fine... but the svg graphics doesn't! (in my browser (IE) I view the empty box with the red x inside). I cannot view even the svg samples (from the hello world! section). Have you any idea of the reason of this behaviour? Solution?? Thanks in advance! Nesto - 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] _ Instant message during games with MSN Messenger 6.0. Download it now FREE! http://msnmessenger-download.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SQL Transformer sample MySQL
Hi Jeff When I first setup this up against MySQL I found that I had to specify my hostname in the dburl. So instead of: dburljdbc:mysql://127.0.0.1:3306/test?autoReconnect=true/dburl dburljdbc:mysql://myhostnamehere:3306/test?autoReconnect=true/dburl I don't have access to my machine right now, but I think the MySQL logs mentioned something when I had this problem. Don't know if you've tried this already... Hope this helps Steve _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please Help: Re: Cocoon 2.1rc2 SVG Error
Bruno I just grabbed the one file. Works perfectly now. Thank you very, very much for looking into this and resolving it so quickly. Best Regards, Steve From: Bruno Dumon [EMAIL PROTECTED] Looking at the code, that's quite logical because the stored document locator isn't properly reset between uses. I've fixed that. So if you'd like to have this fix, you'll have to grab the latest code from CVS. If you don't want to use a complete CVS-version of Cocoon, you can grab just the file src/blocks/batik/java/org/apache/cocoon/xml/dom/SVGBuilder.java and put that over your local copy. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cocoon 2.1rc2 batik 1.5b5 transcoder error
Hi I switched this week from 2.0.4 to 2.1rc2 and svg2png is now throwing on my SVG documents with this error: DEBUG (2003-08-11) 23:36.50:858 [sitemap.generator.file] (/~sschwarz/assets/images/SwayBridge_93.png) PoolThread-3/FileGenerator: file resolved to file:/home/sschwarz/websites/agilitycourses/assets/images/src/SwayBridge.xml WARN(2003-08-11) 23:36.50:889 [sitemap.serializer.svg2png] (/~sschwarz/assets/images/SwayBridge_93.png) PoolThread-3/SVGBuilder: setDocumentLocator was not called, URI resolution will not work DEBUG (2003-08-11) 23:36.50:899 [sitemap.serializer.svg2png] (/~sschwarz/assets/images/SwayBridge_93.png) PoolThread-3/SVGSerializer: Got transcoder exception writing image, rethrowing nested exception org.apache.batik.transcoder.TranscoderException: null Enclosed Exception: null:-1 An I/O error occured while processing the URI '#slats' specified on the element use at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) at org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:232) at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:162) at org.apache.xml.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.java:222) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1274) I'm wondering specifically about: setDocumentLocator was not called, URI resolution will not work which might indicate why the only docs that fail are those that contain internal xlinks?? i.e. ?xml version=1.0? svg width=352px height=352px viewBox=0 0 176 176 xmlns:xlink=http://www.w3.org/1999/xlink; defs g id=slats rect x=0 y=0 width=78 height=20 style=fill:white;/ line x1=0 y1=10 x2=78 y2=10 style=stroke-width:20;stroke-linecap:butt;stroke-dasharray:2,2/ /g g id=SwayBridge style=stroke:black; stroke-width:1.5; stroke-linecap:round rect x=0 y=0 width=45 height=20 style=fill:#ffcc33;/ use xlink:href=#slats transform=translate(45,0)/ rect x=123 y=0 width=45 height=20 style=fill:#ffcc33;/ /g /defs g transform=translate(4,78) g id=rotate transform=rotate(90,84,10) use xlink:href=#SwayBridge/ /g /g /svg Any help would be greatly appreciated. Thanks Steve _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Please Help: Re: Cocoon 2.1rc2 SVG Error
I'm really confused by this problem and would appreciate any opinions! I've simplified my issue down to Cocoon/Batik throwing an error on specific styles of SVG documents if and only if a stylesheet is applied to the document. Interestingly, once a single SVG document is processed w/o error by SVGSerializer all SVG documents (including ones that failed previously) are processed w/o error. I'm guessing SVGBuilder.setDocumentLocator() is called in the success case and once it is called the serializer works correctly for all SVG documents. Under 2.04 these documents/stylesheets worked w/o errors. The type of document is exactly like the sample batikLogo.svg (my example is shown below). My test stylesheet (seems ok to me?? or do I need additional processing-instructions/output method??) copy.xsl: ?xml version=1.0? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 !-- copy everything to output -- xsl:template match=/ xsl:copy-of select=./ /xsl:template /xsl:stylesheet Test pipelines: !-- this will fail UNTIL after you request successSVG -- !-- from then on this will succeed -- map:match pattern=failSVG map:generate src=test.xml / !-- copy input to output -- map:transform src=copy.xsl/ map:serialize type=svg2png/ /map:match !-- also fails everytime until passSVG is requested -- map:match pattern=failBatik map:generate src=batikLogo.svg / !-- copy input to output -- map:transform src=copy.xsl/ map:serialize type=svg2png/ /map:match map:match pattern=passSVG map:generate src=test.xml / map:serialize type=svg2png/ /map:match As I mention below it seems the error provided by SVGBuilder.endDocument(): setDocumentLocator was not called, URI resolution will not work is the likely cause of the problem. I just don't know to resolve it! Thanks for your help Steve Hi I switched this week from 2.0.4 to 2.1rc2 and svg2png is now throwing on my SVG documents with this error: DEBUG (2003-08-11) 23:36.50:858 [sitemap.generator.file] (/~sschwarz/assets/images/SwayBridge_93.png) PoolThread-3/FileGenerator: file resolved to file:/home/sschwarz/websites/agilitycourses/assets/images/src/SwayBridge.xml WARN(2003-08-11) 23:36.50:889 [sitemap.serializer.svg2png] (/~sschwarz/assets/images/SwayBridge_93.png) PoolThread-3/SVGBuilder: setDocumentLocator was not called, URI resolution will not work DEBUG (2003-08-11) 23:36.50:899 [sitemap.serializer.svg2png] (/~sschwarz/assets/images/SwayBridge_93.png) PoolThread-3/SVGSerializer: Got transcoder exception writing image, rethrowing nested exception org.apache.batik.transcoder.TranscoderException: null Enclosed Exception: null:-1 An I/O error occured while processing the URI '#slats' specified on the element use at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) at org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:232) at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:162) at org.apache.xml.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.java:222) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1274) I'm wondering specifically about: setDocumentLocator was not called, URI resolution will not work which might indicate why the only docs that fail are those that contain internal xlinks?? i.e. test.xml: ?xml version=1.0? svg width=352px height=352px viewBox=0 0 176 176 xmlns:xlink=http://www.w3.org/1999/xlink; defs g id=slats rect x=0 y=0 width=78 height=20 style=fill:white;/ line x1=0 y1=10 x2=78 y2=10 style=stroke-width:20;stroke-linecap:butt;stroke-dasharray:2,2/ /g g id=SwayBridge style=stroke:black; stroke-width:1.5; stroke-linecap:round rect x=0 y=0 width=45 height=20 style=fill:#ffcc33;/ use xlink:href=#slats transform=translate(45,0)/ rect x=123 y=0 width=45 height=20 style=fill:#ffcc33;/ /g /defs g transform=translate(4,78) g id=rotate transform=rotate(90,84,10) use xlink:href=#SwayBridge/ /g /g /svg Any help would be greatly appreciated. Thanks Steve _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Basic Modular Database Add Question
Hi I'm just not quite getting how to associate the posted form content to a modular database add action. So the action always sees nulls for all form fields when I submit. I've defined the modular action in my sitemap with the name insert My pipeline: map:match pattern=*-add map:act type=insert map:parameter name=descriptor value=etc/db_config.xml/ /map:act ...snipgenerate select using SQLTransformer of full table contents/snip /map:match My form is: form name=contact method=post enctype=multipart/form-data action=contact-add table align=center trtd title=Mr, Mrs, Miss, MmeHonorific:/tdtdinput type=text rows=1 cols=32 name=honorific/td/tr trtd title=First NameFirst Name*:/tdtdinput type=text rows=1 cols=32 name=firstName/td/tr trtd title=NicknameOther Name:/tdtdinput type=text rows=1 cols=32 name=otherName/td/tr trtd title=Last NameSurname*:/tdtdinput type=text rows=1 cols=32 name=surname/td/tr trtd title=Junior, Senior, II, IIILineage:/tdtdinput type=text rows=1 cols=32 name=lineage/td/tr trtd title=Primary email addressEmail*:/tdtdinput type=text rows=1 cols=32 name=email/td/tr trtd title=Personal websiteWebsite:/tdtdinput type=text rows=1 cols=32 name=website/td/tr trtd colspan=2*Required fields/td/tr trtd colspan=2 align=center height=40input type=submit value=Add Contact tabindex=1 class=input/td/tr /table /form So if I request http://localhost:8080/cocoon/contact-add I am served the page containing the form. I then fill in the form and submit it. In the sitemap log I get lines like: DEBUG (2003-08-08) 13:22.36:950 [sitemap.action.insert] (/cocoon/contact-add) Thread-6/DatabaseAction: Trying to set column contact.firstName from request-param using getAttribute method DEBUG (2003-08-08) 13:22.36:950 [sitemap.action.insert] (/cocoon/contact-add) Thread-6/DatabaseAction: Setting column contact.firstName [0] null for each entry in the db_config.xml. Seems like the action is correctly reading my config file but I'm not configured correctly to get the data out of the post. Obviously I'm missing a key concept... Any help would be appreciated. Steve _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Copy javascript maps
I have two javascript maps: var map1 = { x : y }; var map2 = { a : b }; I want to copy both maps into one single map. Does anybody have an idea how I can achieve this? Object properties in JavaScript can be treated just like arrays: script type=text/javascript onload=function(){ var map1 = { x : 1 }; var map2 = { a : 2 }; var newMap = new Object(); copyProp(newMap, map1); copyProp(newMap, map2); function copyProp(dest,src){ for (var i in src) dest[i] = src[i]; }; function dumpProp(obj){ var str =; for (var i in obj) str += obj[i]+ ; return str; }; alert(dumpProp(newMap)); } /script Hope this helps Steve _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Solution] Re: SimpleFormTransformer - invalid XML generated?
Christian, Thank you very much (especially for pushing me into 2.1). It took me a while to figure it out but the problem was my form: form name=contact method=post enctype=multipart/form-data action=contact-add If I remove the enctype attribute/value everything works correctly. This is really a great transformer; it sure doesn't seem to get much press but it does exactly what I need. Best Regards, Steve From: Christian Haul On 09.Aug.2003 -- 04:50 PM, Steve Schwarz wrote: Hi I'm using SimpleFormTransformer to process the results of FormValidatorAction and I am getting invalid xml generated after applying the transformation. It looks like when error elements are removed from within surrounding td elements I end up with an empty element td/ followed by a closing element /td. In 2.0.x there are a number of issues with this transformer. I believe all are solved in 2.1. Please upgrade and report back. (I believe the fixes are not in 2.0.5) _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Debugging Actions - redirecting stdio/action state
Hi I'm new to writing actions and am having trouble debugging an action I've written. Is there a way for Cocoon's error logger to capture and log error messages sent to stderr/stdout by actions within a pipeline? I'm invoking a JavaCC generated parser within an action I've written to convert a non-XML data to my XML format. The action works correctly the first time but always fails the second time on constructing my parser. I'm betting that the parser is spewing some error but I can't get at the error message. Can I configure Cocoon to help? (Otherwise I'll modifiy the generated code to log to my own file). Is it possible that the parser I'm creating within the action is still in existence on the second running of the action? Is there caching of action instances going on? I'm calling new to create the Parser instance within the action's act() so I assume that I'm getting a new Parser instance each time the action is invoked...(?). Thanks for your help Steve _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirecting uploaded file content into existing pipelines?
Hi I'm new to Cocoon and have read the two books; and the upload Wiki pages...but can't quite get my head around how to solve this problem (I'm using Cocoon 2.0 under 4.2 Tomcat) I'd like to allow users to: 1. Upload an xml file 2. Validate it via XSD 3. Save it into my directory tree 4. process it using a number of transforms 5. serialize the transformed doc to the uploading client So far I've got my config setup to handle uploads. I (think I) can write an Action that validates the xml to my XSDschema via Xerces and returns an error page if it fails. I can use the FileUploadAction from Cocoon Developer's Handbook to copy the file into my directory tree . I also have a pipeline defined for generating/transforming/serializing valid XML files when they are requested directly by a client from within my directory tree. What I can't figure out is how do I kick off my existing pipeline at the end of the two actions? This seems so basic but all the upload stuff I've seen doesn't re-SAX-ify the uploaded doc and process it (they all use parameters only of the request in the response to the client; not a transformation of the content of the actual file itself). Is there a generator that I can apply right after the copy action that will SAX-ify the just copied file so I can use standard pipeline transforms/serializers? Can I do something like use redirect after the actions and give it the directory/filename of where I moved the uploaded file in order to have the standard pipeline be applied? If someone has a pseudo pipeline for this I'd really appreciate it. Any help is greatly appreciated. Steve Schwarz _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]