Re: pass parameters to internal pipeline
What do you want to do with this parameter? The FileGenerator doesn't use any parameters. The TraxTransformer allows you to pass parameters to the stylesheet that can be accessed with xsl:param, but there is no similar function for a generic xml document. The FileGenerator simply loads the xml document and creates SAX events from it. Brian On Sunday, March 2, 2003, at 07:17 AM, I-Lin Kuo wrote: Is it possible to pass parameters to an internal pipeline? This doesn't work for me: map:match pattern=test/ParamToAgg.xml map:generate src=cocoon:/test/getParam.xml map:parameter name=paramTest value=a param value 9876/ /map:generate map:serialize type=xml/ /map:match map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl/ map:serialize type=xml/ /map:match P.S. Just to be sure that I haven't made any dumb mistakes, I've checked that I have a top-level xsl:param in my style sheet getParam.xsl which picks up the parameter from the following pipeline: map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl map:parameter name=paramTest value=1234/ /map:transform map:serialize type=xml/ /map:match I-Lin Kuo, Ann Arbor, MI Macromedia Certified ColdFusion 5.0 Advanced Developer Sun Certified Java 2 Programmer Ann Arbor Java Users Group (http://www.aajug.org) _ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to internal pipeline
Ok, I see what you are trying to do... Again though, the FileGenerator doesn't use any parameters that are passed to it. It is possible to extend FileGenerator and override the setup method to pass parameters to the source resolver. I believe this would provide the functionality you are looking for. Brian On Sunday, March 2, 2003, at 07:29 AM, Brian Johnson wrote: What do you want to do with this parameter? The FileGenerator doesn't use any parameters. The TraxTransformer allows you to pass parameters to the stylesheet that can be accessed with xsl:param, but there is no similar function for a generic xml document. The FileGenerator simply loads the xml document and creates SAX events from it. Brian On Sunday, March 2, 2003, at 07:17 AM, I-Lin Kuo wrote: Is it possible to pass parameters to an internal pipeline? This doesn't work for me: map:match pattern=test/ParamToAgg.xml map:generate src=cocoon:/test/getParam.xml map:parameter name=paramTest value=a param value 9876/ /map:generate map:serialize type=xml/ /map:match map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl/ map:serialize type=xml/ /map:match P.S. Just to be sure that I haven't made any dumb mistakes, I've checked that I have a top-level xsl:param in my style sheet getParam.xsl which picks up the parameter from the following pipeline: map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl map:parameter name=paramTest value=1234/ /map:transform map:serialize type=xml/ /map:match I-Lin Kuo, Ann Arbor, MI Macromedia Certified ColdFusion 5.0 Advanced Developer Sun Certified Java 2 Programmer Ann Arbor Java Users Group (http://www.aajug.org) _ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to internal pipeline
What do you want to do with this parameter? The FileGenerator doesn't use any parameters. The TraxTransformer allows you to pass parameters to the stylesheet that can be accessed with xsl:param, but there is no similar function for a generic xml document. I've got my first Cocoon app up and running, but it's structured very poorly and I'm exploring reuse possibilities of Cocoon. There's a search engine part of my code which generates the SQL to the database that I'd like to reuse. I'd like to process request parameters differently based on which part of the site the user comes from, and then pass the processed parameters to my search engine component. I can do this using a selector of course, but that requires me to duplicate code in each branch of the selector, and exposes the internal pipeline of the search engine. I'd like to keep the search engine related pipeline all in one place to keep changes synchronized. It also makes it easier for me to hand this off to someone else and say to use the search engine, all you have to do is pass these parameters to cocoon:searchengine.xml I-Lin Kuo, Ann Arbor, MI Macromedia Certified ColdFusion 5.0 Advanced Developer Sun Certified Java 2 Programmer Ann Arbor Java Users Group (http://www.aajug.org) _ 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]
Re: pass parameters to internal pipeline
Upon a little closer examination, it appears that passing parameters to the source resolver will only make them available in the objectModel of the sitemap you are calling. I don't know if that will help you or not. Outside of that, it doesn't appear that there is any other mechanism to pass information to a sitemap source that I can see... Brian On Sunday, March 2, 2003, at 07:46 AM, Brian Johnson wrote: Ok, I see what you are trying to do... Again though, the FileGenerator doesn't use any parameters that are passed to it. It is possible to extend FileGenerator and override the setup method to pass parameters to the source resolver. I believe this would provide the functionality you are looking for. Brian On Sunday, March 2, 2003, at 07:29 AM, Brian Johnson wrote: What do you want to do with this parameter? The FileGenerator doesn't use any parameters. The TraxTransformer allows you to pass parameters to the stylesheet that can be accessed with xsl:param, but there is no similar function for a generic xml document. The FileGenerator simply loads the xml document and creates SAX events from it. Brian On Sunday, March 2, 2003, at 07:17 AM, I-Lin Kuo wrote: Is it possible to pass parameters to an internal pipeline? This doesn't work for me: map:match pattern=test/ParamToAgg.xml map:generate src=cocoon:/test/getParam.xml map:parameter name=paramTest value=a param value 9876/ /map:generate map:serialize type=xml/ /map:match map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl/ map:serialize type=xml/ /map:match P.S. Just to be sure that I haven't made any dumb mistakes, I've checked that I have a top-level xsl:param in my style sheet getParam.xsl which picks up the parameter from the following pipeline: map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl map:parameter name=paramTest value=1234/ /map:transform map:serialize type=xml/ /map:match I-Lin Kuo, Ann Arbor, MI Macromedia Certified ColdFusion 5.0 Advanced Developer Sun Certified Java 2 Programmer Ann Arbor Java Users Group (http://www.aajug.org) _ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to internal pipeline
The FileGenerator doesn't use any parameters. Maybe the problem is that I'm passing to a FileGenerator. I'm going to try passing to an xsp instead... _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to internal pipeline
Unfortunately, as long as you are using the cocoon:// protocol, you are going to run into the same problem with passing parameters to the pipeline. Both generators use the resolver to retrieve a SitemapSource, which will place any parameters you pass to it into the objectModel. I think Marco's suggestion of using request parameters is the best way to go. Brian On Sunday, March 2, 2003, at 08:26 AM, I-Lin Kuo wrote: The FileGenerator doesn't use any parameters. Maybe the problem is that I'm passing to a FileGenerator. I'm going to try passing to an xsp instead... _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pass parameters to internal pipeline
Try this: map:match pattern=test/ParamToAgg.xml map:generate src=cocoon:/test/getParam.xml/paramTest=a param value 9876/ map:serialize type=xml/ /map:match map:match pattern=test/getParam.xml/*=* map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl map:parameter name={1} value={2}/ /map:transform map:serialize type=xml/ /map:match HTH, Alfred. -Original Message- From: I-Lin Kuo [mailto:[EMAIL PROTECTED] Sent: Sonntag, 2. März 2003 13:18 To: [EMAIL PROTECTED] Subject: pass parameters to internal pipeline Is it possible to pass parameters to an internal pipeline? This doesn't work for me: map:match pattern=test/ParamToAgg.xml map:generate src=cocoon:/test/getParam.xml map:parameter name=paramTest value=a param value 9876/ /map:generate map:serialize type=xml/ /map:match map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl/ map:serialize type=xml/ /map:match P.S. Just to be sure that I haven't made any dumb mistakes, I've checked that I have a top-level xsl:param in my style sheet getParam.xsl which picks up the parameter from the following pipeline: map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl map:parameter name=paramTest value=1234/ /map:transform map:serialize type=xml/ /map:match I-Lin Kuo, Ann Arbor, MI Macromedia Certified ColdFusion 5.0 Advanced Developer Sun Certified Java 2 Programmer Ann Arbor Java Users Group (http://www.aajug.org) _ 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] This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pass parameters to internal pipeline
Thanks. Both Alfred and Marco's suggestion worked. Although it's not as elegant as I'd like, at least I know it can do what I want. Placing the parameters into the request allowed me to bypass the fact that generators don't take parameters I-Lin Kuo, Ann Arbor, MI Original Message Follows From: Nathaniel Alfred [EMAIL PROTECTED] Try this: map:match pattern=test/ParamToAgg.xml map:generate src=cocoon:/test/getParam.xml/paramTest=a param value 9876/ map:serialize type=xml/ /map:match map:match pattern=test/getParam.xml/*=* map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl map:parameter name={1} value={2}/ /map:transform map:serialize type=xml/ /map:match HTH, Alfred. -Original Message- From: I-Lin Kuo [mailto:[EMAIL PROTECTED] Is it possible to pass parameters to an internal pipeline? This doesn't work for me: map:match pattern=test/ParamToAgg.xml map:generate src=cocoon:/test/getParam.xml map:parameter name=paramTest value=a param value 9876/ /map:generate map:serialize type=xml/ /map:match map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl/ map:serialize type=xml/ /map:match P.S. Just to be sure that I haven't made any dumb mistakes, I've checked that I have a top-level xsl:param in my style sheet getParam.xsl which picks up the parameter from the following pipeline: map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl map:parameter name=paramTest value=1234/ /map:transform map:serialize type=xml/ /map:match I-Lin Kuo, Ann Arbor, MI _ 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]