RE: xsl vs cocoon
Othman, Try the following: map:match pattern=xsl-from-x map:generate type=serverpages src=get-xsl-from-param-x.xsp/ map:transform src=strip-root.xsl/ map:serialize type=xml/ /map:match map:match pattern=main map:generate src=b.xml/ map:transform src=cocoon:/xsl-from-x/ map:serialize type=xml/ /map:match get-xsl-from-param-x.xsp will be close to: xsp:page . root util:include-expr util:exprxsp:exprrequest.getParameter(x)/xsp:expr/util:expr /util:include-expr /root /xsp:page Vadim -Original Message- From: Othman Haddad [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 3:52 AM To: [EMAIL PROTECTED] Subject: RE: xsl vs cocoon ok, imagine i have an xsp page witch contains a input file field named x. i want that the content of the field x will be a stylesheet which will be applied on a fixed file b.xml. so how can you do that ? can you give an example ? thanks. PS:sorry fot HTML e-mails,i'm using IncrediMail which can't deliver other thing than HTML! ... - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: xsl vs cocoon
ok, imagine i have an xsp page witch contains a input file field named "x". i want that the content of the field "x" will be a stylesheet which will be applied on a fixed file "b.xml". so how can you do that ? can you give an example ? thanks. PS:sorry fot HTML e-mails,i'm using IncrediMail which can't deliver other thing than HTML! ---Message original--- De : [EMAIL PROTECTED] Date : mercredi 10 juillet 2002 21:40:56 A : [EMAIL PROTECTED] Sujet : Re: Réf. : RE: xsl vs cocoon Othman Haddad wrote: it's partially true, because right now (which is a pitty) there's no sitemap element that can get a parameter value (which is sometimes very important)...There is a RequestParamAction and a RequestParameterExistsAction,and various components can take a UseRequestParameter parameter(os similar). Or did you have a different meaning for "parameter"in mind?J.Pietschmann-Please check that your question has not already been answered in theFAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlTo unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]. IncrediMail - La messagerie électronique a enfin évolué - Cliquer ici
RE: xsl vs cocoon
Sure. The sitemap.xmap file makes a mapping between URLs received from client side to a Cocoon pipeline. A pipeline is a chain of java components that create or modify a XML flux. For a given URL, Cocoon parses the sitemap.xmap, gets the corresponding pipeline description, creates the corresponding chain of java components and launches the first components (it is called a generator because it is the one which creates the XML flux, and sends it to the next component). There is no problem if you want to specify several XSLT components inside your pipeline. Advanced feature: When describing a pipeline in sitemap.xmap, you can also make a component conditionnal depending on (for example) a request parameter value in the HTTP request, or may be the speed of the wind (yes Cocoon is marvellous :-) - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Réf. : RE: xsl vs cocoon
hi, i agree with olivier,.. , you can also make a component conditionnal depending on (for example) a request parameter value inthe HTTP request it's partially true, because right now (which is a pitty) there's no sitemap element that can get a parameter value (which is sometimes very important)... regards othman ---Message original--- De : [EMAIL PROTECTED] Date : mercredi 10 juillet 2002 10:38:03 A : '[EMAIL PROTECTED]' Sujet : RE: xsl vs cocoon Sure.The sitemap.xmap file makes a mapping between URLsreceived from client side to a Cocoon "pipeline".A pipeline is a chain of java componentsthat create or modify a XML flux.For a given URL, Cocoon parses the sitemap.xmap, getsthe corresponding pipeline description, creates the corresponding chain of java components and launches the first components (it is called a generatorbecause it is the one which creates the XML flux,and sends it to the next component).There is no problem if you want to specifyseveral XSLT components inside your pipeline.Advanced feature:When describing a pipeline in sitemap.xmap, you can also make a component conditionnal depending on (for example) a request parameter value inthe HTTP request, or may be the speed of the wind(yes Cocoon is marvellous :-)-Please check that your question has not already been answered in theFAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlTo unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]. IncrediMail - La messagerie électronique a enfin évolué - Cliquer ici
Re: Réf. : RE: xsl vs cocoon
Okay, what is a sitemap? --st. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Réf. : RE: xsl vs cocoon
it's partially true, because right now (which is a pitty) there's no sitemap element that can get a parameter value (which is sometimes very important)... Can't you use an action to set a value for a sitemap variable, then use that variable inside you component description? hi, i agree with olivier,.. , you can also make a component conditionnal depending on (for example) a request parameter value in the HTTP request it's partially true, because right now (which is a pitty) there's no sitemap element that can get a parameter value (which is sometimes very important)... regards othman ---Message original--- De : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Date : mercredi 10 juillet 2002 10:38:03 A : '[EMAIL PROTECTED]' mailto:[EMAIL PROTECTED] Sujet : RE: xsl vs cocoon Sure. The sitemap.xmap file makes a mapping between URLs received from client side to a Cocoon pipeline. A pipeline is a chain of java components that create or modify a XML flux. For a given URL, Cocoon parses the sitemap.xmap, gets the corresponding pipeline description, creates the corresponding chain of java components and launches the first components (it is called a generator because it is the one which creates the XML flux, and sends it to the next component). There is no problem if you want to specify several XSLT components inside your pipeline. Advanced feature: When describing a pipeline in sitemap.xmap, you can also make a component conditionnal depending on (for example) a request parameter value in the HTTP request, or may be the speed of the wind (yes Cocoon is marvellous :-) - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] . http://www.incredimail.com/redir.asp?ad_id=312lang=12 IncrediMail - La messagerie électronique a enfin évolué - http://www.incredimail.com/redir.asp?ad_id=312lang=12 Cliquer ici ATT574260.gif Description: GIF image - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Réf. : RE: xsl vs cocoon
What's a sitemap? Well, as I said before, it is the file (called sitemap.xmap) which maps URLs to cocoon behaviour. Each time a URL request is sent to Cocoon, the sitemap resolver parses the whole file sitemap.xmap (==the sitemap), tries to find which map:match elements match the current URL. It then parses (only) what is inside those map:match, and for each compoment declaration read, it creates the java component that corresponds. For example, for URL: http://localhost:8080/cocoon/toto.html the URL that Cocoon receives is toto.html (the servlet container handled the first part). So the sitemap resolver will read the sitemap.xmap file and try to find all goods map:match. For example map:match pattern=toto.html.../map:match will be ok for the sitemap resolver, and it will read what's inside this tag. Lets' say that: map:match pattern=toto.html map:generate type=file src=docs/toto.xml/ map:transform type=xslt src=stylesheets/toto2html.xsl/ map:serialize type=html/ /map:match The sitemap resolver will read that, and create a generator, a XSLT transformer and a HTML serializer, link them one after the other, and launch the pipeline. The generator make a XML flux from a file which is located at docs/toto.xml, then the flux goes through a XML tranformer, which makes a xslt transformation using the stylesheet available at stylesheets/toto2html.xsl, then the resulting flux is sent to a serializing component, which transforms the input flux into a html flux. Then Cocoon send the resulting (html) stream to the client side. Basically, this is the idea behind a sitemap file. Why is it so nice? Because the sitemap file can be much more complex. For example, another possibility could have been: map:match pattern=toto.* map:generate type=file src=docs/toto.xml/ map:transform type=xslt src=stylesheets/toto2{1}.xsl/ map:serialize type={1}/ /map:match Exactly the same but we use a wildcard for URL matching. So the same sitemap text will handle toto.html, toto.csv ... Note: The {1} is similar to stuff in regexp, it corresponds to the text matched by the first wildcard in the matching expression. Quite nice, isn't it? And this is only the beginning. FYI, the sitemap file is parsed linearly, the sitemap resolver tries to get into _every_ map:match it can (it does only if the matching pattern is OK for the current URL), and the sitemap resolving stops as soon as a map:serialize is met successfully. May be you do not understand this paragraph now, but keep it in mind for the future. Understanding Cocoon means that you understand the process of sitemap resolution. The other part of the knowledge is to know what components exist. Note: I left some specific cases, for comprehension. Feel free to ask on the list. We all began wondering what's a sitemap :-) - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Réf. : RE: Réf. : RE: xsl vs cocoon
With 2.1-dev the RequestParameterInputModule can be used to to get the value of a field in an xsp and select apipeline in function of it ,but not before!!! do you have any other key to do that? ---Message original--- De : [EMAIL PROTECTED] Date : mercredi 10 juillet 2002 10:52:33 A : '[EMAIL PROTECTED]' Sujet : RE: Réf. : RE: xsl vs cocoon it's partially true, because right now (which is a pitty) there's nositemap element that can get a parameter value (which is sometimes veryimportant)... Can't you use an action to set a value for a sitemap variable, then use thatvariable inside you component description?hi,i agree with olivier,.., you can also make a component conditionnal depending on (for example) a request parameter value inthe HTTP requestit's partially true, because right now (which is a pitty) there's no sitemapelement that can get a parameter value (which is sometimes veryimportant)... regardsothman---Message original---De : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Date : mercredi 10 juillet 2002 10:38:03A : '[EMAIL PROTECTED]' mailto:[EMAIL PROTECTED] Sujet : RE: xsl vs cocoonSure.The sitemap.xmap file makes a mapping between URLsreceived from client side to a Cocoon "pipeline".A pipeline is a chain of java componentsthat create or modify a XML flux.For a given URL, Cocoon parses the sitemap.xmap, getsthe corresponding pipeline description, creates the corresponding chain of java components and launches the first components (it is called a generatorbecause it is the one which creates the XML flux,and sends it to the next component).There is no problem if you want to specifyseveral XSLT components inside your pipeline.Advanced feature:When describing a pipeline in sitemap.xmap, you can also make a component conditionnal depending on (for example) a request parameter value inthe HTTP request, or may be the speed of the wind(yes Cocoon is marvellous :-)-Please check that your question has not already been answered in theFAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlhttp://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] .http://www.incredimail.com/redir.asp?ad_id=312lang=12 IncrediMail - Lamessagerie électronique a enfin évolué -http://www.incredimail.com/redir.asp?ad_id=312lang=12 Cliquer ici IncrediMail - La messagerie électronique a enfin évolué - Cliquer ici
RE: Réf. : RE: Réf. : RE: xsl vs cocoon
I am not sure to understand what you want to do exactly. -Message d'origine- De: Othman Haddad [mailto:[EMAIL PROTECTED]] Date: mercredi 10 juillet 2002 11:15 À: [EMAIL PROTECTED] Objet: Réf. : RE: Réf. : RE: xsl vs cocoon With 2.1-dev the RequestParameterInputModule can be used to to get the value of a field in an xsp and select a pipeline in function of it ,but not before!!! do you have any other key to do that? ---Message original--- De : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Date : mercredi 10 juillet 2002 10:52:33 A : '[EMAIL PROTECTED]' mailto:[EMAIL PROTECTED] Sujet : RE: Réf. : RE: xsl vs cocoon it's partially true, because right now (which is a pitty) there's no sitemap element that can get a parameter value (which is sometimes very important)... Can't you use an action to set a value for a sitemap variable, then use that variable inside you component description? hi, i agree with olivier,.. , you can also make a component conditionnal depending on (for example) a request parameter value in the HTTP request it's partially true, because right now (which is a pitty) there's no sitemap element that can get a parameter value (which is sometimes very important)... regards othman ---Message original--- De : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Date : mercredi 10 juillet 2002 10:38:03 A : ' [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ' mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sujet : RE: xsl vs cocoon Sure. The sitemap.xmap file makes a mapping between URLs received from client side to a Cocoon pipeline. A pipeline is a chain of java components that create or modify a XML flux. For a given URL, Cocoon parses the sitemap.xmap, gets the corresponding pipeline description, creates the corresponding chain of java components and launches the first components (it is called a generator because it is the one which creates the XML flux, and sends it to the next component). There is no problem if you want to specify several XSLT components inside your pipeline. Advanced feature: When describing a pipeline in sitemap.xmap, you can also make a component conditionnal depending on (for example) a request parameter value in the HTTP request, or may be the speed of the wind (yes Cocoon is marvellous :-) - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html http://xml.apache.org/cocoon/faq/index.html http://xml.apache.org/cocoon/faq/index.html http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] . http://www.incredimail.com/redir.asp?ad_id=312 http://www.incredimail.com/redir.asp?ad_id=312lang=12 lang=12 IncrediMail - La messagerie électronique a enfin évolué - http://www.incredimail.com/redir.asp?ad_id=312 http://www.incredimail.com/redir.asp?ad_id=312lang=12 lang=12 Cliquer ici http://www.incredimail.com/redir.asp?ad_id=312lang=12 IncrediMail - La messagerie électronique a enfin évolué - http://www.incredimail.com/redir.asp?ad_id=312lang=12 Cliquer ici ATT575595.gif Description: GIF image - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Réf. : RE: Réf. : RE: Réf. : RE: xsl vs cocoon
let say: i've an xsp which contains a file input: "x", the value of "x" represent xslt file which i want to apply on a "z.xml" file. any idea in cocoon2.02 to do that? ---Message original--- De : [EMAIL PROTECTED] Date : mercredi 10 juillet 2002 11:19:14 A : '[EMAIL PROTECTED]' Sujet : RE: Réf. : RE: Réf. : RE: xsl vs cocoon I am not sure to understand what you want to do exactly.-Message d'origine-De: Othman Haddad [mailto:[EMAIL PROTECTED]]Date: mercredi 10 juillet 2002 11:15À: [EMAIL PROTECTED]Objet: Réf. : RE: Réf. : RE: xsl vs cocoonWith 2.1-dev the RequestParameterInputModule can be used to to get the valueof a field in an xsp and select a pipeline in function of it ,but notbefore!!!do you have any other key to do that?---Message original---De : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Date : mercredi 10 juillet 2002 10:52:33A : '[EMAIL PROTECTED]' mailto:[EMAIL PROTECTED] Sujet : RE: Réf. : RE: xsl vs cocoon it's partially true, because right now (which is a pitty) there's nositemap element that can get a parameter value (which is sometimes veryimportant)... Can't you use an action to set a value for a sitemap variable, then use thatvariable inside you component description?hi,i agree with olivier,.., you can also make a component conditionnal depending on (for example) a request parameter value inthe HTTP requestit's partially true, because right now (which is a pitty) there's no sitemapelement that can get a parameter value (which is sometimes veryimportant)... regardsothman---Message original---De : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Date : mercredi 10 juillet 2002 10:38:03A : ' [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ' mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sujet : RE: xsl vs cocoonSure.The sitemap.xmap file makes a mapping between URLsreceived from client side to a Cocoon "pipeline".A pipeline is a chain of java componentsthat create or modify a XML flux.For a given URL, Cocoon parses the sitemap.xmap, getsthe corresponding pipeline description, creates the corresponding chain of java components and launches the first components (it is called a generatorbecause it is the one which creates the XML flux,and sends it to the next component).There is no problem if you want to specifyseveral XSLT components inside your pipeline.Advanced feature:When describing a pipeline in sitemap.xmap, you can also make a component conditionnal depending on (for example) a request parameter value inthe HTTP request, or may be the speed of the wind(yes Cocoon is marvellous :-)-Please check that your question has not already been answered in theFAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlhttp://xml.apache.org/cocoon/faq/index.html http://xml.apache.org/cocoon/faq/index.htmlhttp://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED] . http://www.incredimail.com/redir.asp?ad_id=312http://www.incredimail.com/redir.asp?ad_id=312lang=12 lang=12IncrediMail - Lamessagerie électronique a enfin évolué - http://www.incredimail.com/redir.asp?ad_id=312http://www.incredimail.com/redir.asp?ad_id=312lang=12 lang=12 Cliquerici http://www.incredimail.com/redir.asp?ad_id=312lang=12 IncrediMail - Lamessagerie électronique a enfin évolué -http://www.incredimail.com/redir.asp?ad_id=312lang=12 Cliquer ici IncrediMail - La messagerie électronique a enfin évolué - Cliquer ici
Re: Réf. : RE: xsl vs cocoon
Othman Haddad wrote: it's partially true, because right now (which is a pitty) there's no sitemap element that can get a parameter value (which is sometimes very important)... There is a RequestParamAction and a RequestParameterExistsAction, and various components can take a UseRequestParameter parameter (os similar). Or did you have a different meaning for parameter in mind? J.Pietschmann - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]