handle-errors skipped after first transformation
Hello, Just wondering if this is a bug or I'm just missing something obvious: I have several places in my sitemap where there are multiple transformations taking place (generate--transform--transform--serialize), and have experienced random map:handle-errors behavior when exceptions would occur during the transformation process. I decided to do an experiment by modifying startElement in the LogTransformer to throw a SAXException after it was called a few times, and here is what I found: If a SAXException occurs in a transformer that is located DIRECTLY AFTER the generator (generate--transformThatThrowsException--transform--serialize), map:handle-errors works properly. However, if an exception occurs in a transformer that comes AFTER THE FIRST transformer in the sitemap (generate--transform--transformThatThrowsException--serialize), map:handle-errors doesn't seem to be getting called at all: only a blank html page gets returned to the client, even if I specify map:handle-errors to serialize the error as xml. This would also explain why map:handle-errors works properly for all of the single-transformation parts of my sitemap. I am using the interpreted sitemap with Cocoon 2.1-dev. Any thoughts? - 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]
putting a request param in session and using it in the sitemap
Hello, Here is the behavior i would like to achieve in the sitemap : A first access will be with an URL of that pattern : http://localhost/login?device={Voice, WAP or Web} Then the device parameter is not given anymore and of course, i need to remember it to choose the appropriate XSL... I did not find how to put a request parameter in a session and get it back latter from that session for use in the sitemap. Here is the best solution i could achieve after a whole day trying to fill in the blanks without success... map:match pattern=test/* map:match type=request-parameter pattern=device !-- how to create the session and put device in it ? -- map:redirect-to uri=cocoon:/good-test/{../1} / /map:match !-- how to extract the value from session rather than hard code a default value for the test ? -- map:redirect-to uri=cocoon:/good-test/{1} map:parameter name=device value=Web / /map:redirect-to /map:match map:match pattern=good-test/* map:generate src=test/{1}.xml / map:select type=request-parameter map:parameter name=parameter-name value=device / map:when test=Wap map:transform src=test/XML2WML.xsl / /map:when map:when test=Voix map:transform src=test/XML2VXML.xsl / /map:when map:otherwise map:transform src=test/XML2HTML.xsl / /map:otherwise /map:select map:serialize / /map:match I used a redirection because i could not even imagine doing this in one pipeline... Any help in that matter would be greatly appreciated :-) Yvan -- -- | Yvan Peter| phone (33) 3.20.43.32.64 | | CUEEP/Laboratoire TRIGONE | fax (33) 3.20.43.32.79 | | Bat. B6 | mail [EMAIL PROTECTED] | | Cite Scientifique || | 59655 Villeneuve d'Ascq Cedex || -- - 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: putting a request param in session and using it in the sitemap
Have you tried the SessionSelector: that is used as the Parameter selector to match against an arbitrary session attribute; More about Parameter Selector in: Parameter Selector: http://xml.apache.org/cocoon/userdocs/selectors/parameter-selector.html Antonio Gallardo El Jueves, 12 de Septiembre de 2002 00:39, Yvan Peter escribió: Hello, Here is the behavior i would like to achieve in the sitemap : A first access will be with an URL of that pattern : http://localhost/login?device={Voice, WAP or Web} Then the device parameter is not given anymore and of course, i need to remember it to choose the appropriate XSL... I did not find how to put a request parameter in a session and get it back latter from that session for use in the sitemap. Here is the best solution i could achieve after a whole day trying to fill in the blanks without success... map:match pattern=test/* map:match type=request-parameter pattern=device !-- how to create the session and put device in it ? -- map:redirect-to uri=cocoon:/good-test/{../1} / /map:match !-- how to extract the value from session rather than hard code a default value for the test ? -- map:redirect-to uri=cocoon:/good-test/{1} map:parameter name=device value=Web / /map:redirect-to /map:match map:match pattern=good-test/* map:generate src=test/{1}.xml / map:select type=request-parameter map:parameter name=parameter-name value=device / map:when test=Wap map:transform src=test/XML2WML.xsl / /map:when map:when test=Voix map:transform src=test/XML2VXML.xsl / /map:when map:otherwise map:transform src=test/XML2HTML.xsl / /map:otherwise /map:select map:serialize / /map:match I used a redirection because i could not even imagine doing this in one pipeline... Any help in that matter would be greatly appreciated :-) Yvan - 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: Sitemap Question
Hem, I guess you can write an Action that uses request parameters, formats them the way you want, and puts new parameters in the sitemap, with the name of your request parameters but new values... then write what next page wants to do... ? What's your need ? Babs - Original Message - From: Bobby Mitchell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 11, 2002 7:37 PM Subject: Sitemap Question Is there any way to rewrite the request parameters in the sitemap and then send them to the next page? -- Robert J. (Bobby) Mitchell Systems Administrator NASA Institute for Advanced Concepts 555A 14th St Atlanta, Ga. 30318 Phone: (404)347-9633 Fax: (404)347-9638 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cocoon and PDF/HTML-Layout Tools Integration (for expl. QuarkXPress,... etc.)
-Original Message- From: massimo [mailto:[EMAIL PROTECTED]] Subject: Cocoon and PDF/HTML-Layout Tools Integration (for expl. QuarkXPress,... etc.) Does someone have made already some experience whit the integration of PDF/HTML-Layout tools? or are there other possible ways to go? Hi Massimo. I've not used any visual XSLT design tools, though I've heard of them. But I have used an approach in Cocoon where your layout is done in html (using any html editor - we used DreamWeaver). In the template HTML, you add a few extra attributes to refer to the data (the content of the page), e.g. span template:for-each=breadcrumb. You can also use attribute-value-templates in your html, and variable-substitution in the text of the html, like this: table tr for-each=topic td{topic-name}/tdtd{topic-value}/td /tr /table You can use the HTMLGenerator to convert the HTML layout to XHTML, transform it into valid XSLT, and you have a XSLT stylesheet without too much XSLT, written in a generic HTML editor, with a few extra custom attributes etc (not usually a problem). Cheers! Con - 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]
[2.1 bug ?] duplication of input fields/parameters
I upgraded to latest CVS yesterday, jdk 1.3.1, (East Coast noon) but this did not solve the issue, do I have to submit to bugzilla ? : Log doesn't really help since there are nested actions... - I have a form validation with simple form transformer. When the form is correctly filled an emal is sent. I wrote a custom action to send this email. Sitemap parameters passed to the action are filled from http request. - Assuming form validation occurs once and succeds, scenario : I fill the to field, hit send and the email is sent along with files (the path of files is of hidden input fields). I click back on the browser (IE5.5), so that I see the form again. When I hit send, duplicate files are attached. the to field is duplicated too. (the form was cached by the browser). - After sending email, I write the url to the sending email form in the browser's address bar, same issue. EVEN WITH ANOTHER serialNumber request parameter, so that Cocoon regenerates a full html page. Sometimes I see duplicated fields in the html form, other times : when forcing reload with Control + F5, the code is ok but the parameters are sent duplicated. Pipeline below. I need the simple form transformer though. The xsl which generates the html form (sendlickeyform.xsl) has a main template, in which I define the empty input fields, or the http request filled ones. So it is rather simple... I attach it anyway. Maybe I am completely wrong ? Barbara !-- send license, req param : serialNumber -- map:match pattern=sendlicense map:act type=request map:parameter name=parameters value=true/ !-- authenticate as usual -- map:act type=auth-protect map:parameter name=handler value=baepp-handler/ !-- form has been submitted once so validate it -- map:act type=request-exists map:parameter name=parameters value=submittedOnce/ !-- form validation -- map:act type=form-validator map:parameter name=descriptor value=xml/sendlicense_desc.xml/ map:parameter name=validate-set value=default/ !-- ok so send mail -- map:act type=sendmail map:parameter name=smtpHost value=10.41.20.3/ map:parameter name=subject value={../../../subject}/ !-- to be changeable (port) -- map:parameter name=body value=http://localhost:9090/baepp/licensekeys/{../../../licensekey}/htmlbod y.html/ map:parameter name=emailTo value={../../../emailTo}/ map:parameter name=emailCc value={../../../emailCc}/ map:parameter name=emailFrom value={../../../emailFrom}/ map:parameter name=nameFrom value={../../../nameFrom}/ map:parameter name=dataSources value=http://localhost:9090/baepp/images/links.gif;http://localhost:9090/ba epp/images/leer.gif;http://localhost:9090/baepp/images/logo_www.gif/ map:parameter name=dsHeaders value=abc@abc;abd@abc;abe@abc/ map:parameter name=file value=http://localhost:9090/baepp/licensekeys/{../../../licensekey}/{../../ ../filename}.xml;http://localhost:9090/baepp/licensekeys/{../../../licenseke y}/{../../../filename}lt.pdf/ map:parameter name=fileName value={../../../filename}.xml;{../../../filename}lt.pdf/ map:redirect-to uri=menu/ /map:act map:redirect-to uri=error?code=422303/ /map:act !-- not ok : show input form -- map:aggregate element=page map:part element=license src=xmldb:tamino://i3in0/tamino/BAEPP/BAEPP/#License_Info[@serialNumber='{. ./../serialNumber}']/ map:part element=mlform src=cocoon://mlform/ map:part element=session src=xml/getxml.xml/ /map:aggregate map:transform type=session/ map:transform src=xsl/sendlickeyform.xsl map:parameter name=use-request-parameters value=true/ map:parameter name=taminoUri value=http://i3in0/tamino/BAEPP/BAEPP/ /map:transform map:transform type=simple-form/ map:serialize type=html/ /map:act !-- no form validation ever occured, show input form -- map:aggregate element=page map:part element=license src=xmldb:tamino://i3in0/tamino/BAEPP/BAEPP/#License_Info[@serialNumber='{. ./serialNumber}']/ map:part element=mlform src=cocoon://mlform/ !-- write license on disk -- map:part element=write src=cocoon://writelicense?serialNumber={../serialNumber}/ !-- write html body on disk -- map:part element=htmlbody src=cocoon://writehtmlbody?serialNumber={../serialNumber}/ map:part element=session src=xml/getxml.xml/ /map:aggregate map:transform type=session/ map:transform src=xsl/sendlickeyform.xsl map:parameter name=taminoUri value=http://i3in0/tamino/BAEPP/BAEPP/ map:parameter name=use-request-parameters value=true/ /map:transform map:transform type=simple-form/ map:serialize type=html/ map:transform src=xsl/copy.xsl/ map:serialize type=xml/ /map:act /map:act
Re: issues with javascript
Hi Manos and the others who replied :-) The javascript code should be written only if I have an error tag for a specific text input field. This error tag is produced by form validation. Then there is the classical code : !-- if error element -- error xsl:attribute name=name xsl:value-of select=../@Id/_xsl:value-of select=@Name//xsl:attribute xsl:attribute name=whenis-null/xsl:attribute font color=red [explicit error message] /font [and here I'd like to put my javascript but it fails executing] /error you see that the name of the input field is determined at xslt runtime... and that the whole code above is in a template matching a certain tag, which ../@Id and @Name attributes are used... So I cannot use onLoad method... Any other ideas ? Thanks a lot, Barbara - Original Message - From: Emmanuil Batsis (Manos) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 12, 2002 9:57 AM Subject: Re: issues with javascript Hi Barbara, Nothing to do with cocoon, but you are right; the document is not fully loaded and that's the problem. Try wrapping your code in a function and call it via the onload attribute of the body tag. BTW, you should be using DOM nowdays: script language=javascript function init() { document.getElementById('my_text').focus(); } /script /head body onload=init() Manos Barbara Post wrote: I know this is a bit offtopic but maybe it is due to cocoon ? I hope not ! I posted in javascript newsgroup too... I admit that javascript is not complicated but I often have troubles with it... I generate a page with xml and xsl : At a moment I have an input field, let's say my_text, in my_form form (no frames, one form in the body). So I have a template that writes the html code for the input field and right below the javascript tag to focus on it : script language=javascriptdocument.my_form.my_text.focus()/script IE 5.5 says that document.my_form.my_text is null or not an object. At the moment the browser displays this javascript tag, the html generation process hasn't produced the final /form tag. May this be an issue ? Any other ideas of what could be wrong ? Thanks, Barbara - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: issues with javascript
Barbara Post wrote: Hi Manos and the others who replied :-) The javascript code should be written only if I have an error tag for a specific text input field. This error tag is produced by form validation. Then there is the classical code : !-- if error element -- error xsl:attribute name=name xsl:value-of select=../@Id/_xsl:value-of select=@Name//xsl:attribute xsl:attribute name=whenis-null/xsl:attribute font color=red [explicit error message] /font [and here I'd like to put my javascript but it fails executing] /error you see that the name of the input field is determined at xslt runtime... and that the whole code above is in a template matching a certain tag, which .../@Id and @Name attributes are used... So I cannot use onLoad method... Any other ideas ? Sorry Barbara, I don't really get it and have too much in my poor brain right now. Um, you can make the content of the function conditional in your XSLT; meaning, just produce an empty function or the field name you desire. The body just calls the function but what the function does is another story. If you want to make the javascript *independent of the body tag*, just attach the function to the event in your javascript code instead: script language=javascript // this will trigger init when the document is loaded. window.onload = init; function init() { document.getElementById('my_text').focus(); } /script hth, Manos - 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: [2.1 bug ?] duplication of input fields/parameters
Log doesn't really help since there are nested actions... Hi Barabara: The bug in C2.1 lastest CVS is the nested actions! I have the same problem, I cannot use the tutorial (about database form-validation). This is a really hard problem. I send you some responses about the same problem: Gerhard wrote: Check: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9835 Please, confirm this bug, I hope someone will investigate this issue. This bug is the reason I can't switch to 2.1 (and still use 2.0.3). Also, Chris Haul wrote: Since this is not advocated officially, I respond off-list. 2.1 resources have a feature / bug, so they will *return* to the calling statement if no serializer is found. With this you can use resources very similar to action-sets, although you need to code the selector yourself. Opinions differ whether this is a feature that will stay or a bug that will be squashed, Since This discussion was end of spring, I hope it will stay :-) If it doesn't you'll have an easy migration back to working action-sets by changing a few tag names and removing the selector. But, I dont can find documentation about how to use map:resources :( Antonio Gallardo - 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: [2.1 bug ?] duplication of input fields/parameters
Hi Antonio, this bug says that nested actions don't execute... In my case the (nested) action that sends email buggy executes... ok it's known now. Will add a short note to the bug report. So let's hope someone has a clue soon... I absolutely cannot switch to 2.0.3 again because of several transformers I realized whe developping I had to use (ok I can add some of them to the jar, but I guess SourceWritingTransformer needs C 2.1, when one sees what it imports... no ?). Thanks for both relieving and worrying me... Barbara - Original Message - From: Antonio Gallardo Rivera [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 12, 2002 11:58 AM Subject: Re: [2.1 bug ?] duplication of input fields/parameters Log doesn't really help since there are nested actions... Hi Barabara: The bug in C2.1 lastest CVS is the nested actions! I have the same problem, I cannot use the tutorial (about database form-validation). This is a really hard problem. I send you some responses about the same problem: Gerhard wrote: Check: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9835 Please, confirm this bug, I hope someone will investigate this issue. This bug is the reason I can't switch to 2.1 (and still use 2.0.3). Also, Chris Haul wrote: Since this is not advocated officially, I respond off-list. 2.1 resources have a feature / bug, so they will *return* to the calling statement if no serializer is found. With this you can use resources very similar to action-sets, although you need to code the selector yourself. Opinions differ whether this is a feature that will stay or a bug that will be squashed, Since This discussion was end of spring, I hope it will stay :-) If it doesn't you'll have an easy migration back to working action-sets by changing a few tag names and removing the selector. But, I dont can find documentation about how to use map:resources :( Antonio Gallardo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: putting a request param in session and using it in the sitemap
Yvan Peter wrote: Hello, Here is the behavior i would like to achieve in the sitemap : A first access will be with an URL of that pattern : http://localhost/login?device={Voice, WAP or Web} Then the device parameter is not given anymore and of course, i need to remember it to choose the appropriate XSL... I did not find how to put a request parameter in a session and get it back latter from that session for use in the sitemap. Here is the best solution i could achieve after a whole day trying to fill in the blanks without success... map:match pattern=test/* map:match type=request-parameter pattern=device !-- how to create the session and put device in it ? -- map:redirect-to uri=cocoon:/good-test/{../1} / /map:match !-- how to extract the value from session rather than hard code a default value for the test ? -- map:redirect-to uri=cocoon:/good-test/{1} map:parameter name=device value=Web / /map:redirect-to /map:match map:match pattern=good-test/* map:generate src=test/{1}.xml / map:select type=request-parameter map:parameter name=parameter-name value=device / map:when test=Wap map:transform src=test/XML2WML.xsl / /map:when map:when test=Voix map:transform src=test/XML2VXML.xsl / /map:when map:otherwise map:transform src=test/XML2HTML.xsl / /map:otherwise /map:select map:serialize / /map:match I used a redirection because i could not even imagine doing this in one pipeline... Any help in that matter would be greatly appreciated :-) Yvan map:action name=req-params src=org.apache.cocoon.acting.RequestParameterExistsAction/ map:action name=session-propagator src=org.apache.cocoon.acting.SessionPropagatorAction/ map:act type=req-params map:parameter name=parameters value=device/ map:act type=session-propagator map:parameter name=device value={device}/ /map:act /map:act -- Robert J. (Bobby) Mitchell Systems Administrator NASA Institute for Advanced Concepts 555A 14th St Atlanta, Ga. 30318 Phone: (404)347-9633 Fax: (404)347-9638 - 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]
[offtopic] bugzilla and votes ?
Please can someone tell me how long I am given Y votes at Bugzilla? I mean : if I use all my votes to vote for bugs, would I recover voting rights ? I did not find this in the documentation... :-/ Thanks, or maybe I misunderstood ? a. every user is given Y votes for a T time, or b. every user is given Y votes per bug. Babs - 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]
Request paramteres in a xsl
Hi, I want to access a request parameter in a xsl. Therefore I use the code: xsl:value-of select=//RequestParameters/Parameter[@name='pName']/@value/ My request string is: http://localhost:8080/cocoon/dev/ownActionItems.htm?pName=Projekt2xpath=//p rojects/project[2]/actionItem Is this fundamentally the right way to access a request parameter? Do I have to add anything into the sitemap to get access to these parameters? My sitemap entry is the following: map:match pattern=dev/ownActionItems.htm map:match pattern=xpath type=request-parameter map:generate src=xmldb:xindice://localhost:4080/db/johannes3/#{1}/ map:transform src=dev/ownActionItems/ownActionItems.xsl/ map:serialize type=html/ /map:match map:generate src=xmldb:xindice://localhost:4080/db/johannes3// map:transform src=dev/ownActionItems/ownActionItems.xsl/ map:serialize type=html/ /map:match Regards, Johannes - 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: Request paramteres in a xsl
The best way (easier) is to use : xsl:param name=my_req_param / at the beginning of your xsl, then use it like a variable. And in the sitemap, add to the xslt map:transform ... : map:transform ... map:parameter name=use-request-parameters value=true/ /map:transform Babs - Original Message - From: Johannes Wechsler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 12, 2002 1:47 PM Subject: Request paramteres in a xsl Hi, I want to access a request parameter in a xsl. Therefore I use the code: xsl:value-of select=//RequestParameters/Parameter[@name='pName']/@value/ My request string is: http://localhost:8080/cocoon/dev/ownActionItems.htm?pName=Projekt2xpath=//p rojects/project[2]/actionItem Is this fundamentally the right way to access a request parameter? Do I have to add anything into the sitemap to get access to these parameters? My sitemap entry is the following: map:match pattern=dev/ownActionItems.htm map:match pattern=xpath type=request-parameter map:generate src=xmldb:xindice://localhost:4080/db/johannes3/#{1}/ map:transform src=dev/ownActionItems/ownActionItems.xsl/ map:serialize type=html/ /map:match map:generate src=xmldb:xindice://localhost:4080/db/johannes3// map:transform src=dev/ownActionItems/ownActionItems.xsl/ map:serialize type=html/ /map:match Regards, Johannes - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use Request-parameter Selector with the submit button
Hi all! I tried to resolve a problem about nested map:action-sets in C2.1. To try to work with a database actions and formvalidator. Given 2 submit buttons in a form: one for update and the second for delete: The name of the parameters will be: cocoon-action-Update cocoon-action-Delete How I can know in the sitemap what button was pressed? Regards, Antonio Gallardo - 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: How to use Request-parameter Selector with the submit button
Antonio Gallardo Rivera wrote: Hi all! I tried to resolve a problem about nested map:action-sets in C2.1. To try to work with a database actions and formvalidator. Given 2 submit buttons in a form: one for update and the second for delete: The name of the parameters will be: cocoon-action-Update cocoon-action-Delete How I can know in the sitemap what button was pressed? Couple of ways: 1: map:match type=request-parameter pattern=cocoon-action-Update !-- do something-- /map:match map:match type=request-parameter pattern=cocoon-action-Delete !-- do something-- /map:match 2: cocoon-action=Update or cocoon-action=Delete map:match type=request-parameter pattern=cocoon-action map:select type=request-parameter map:parameter name=parameter-name value=cocoon-action/ map:when test=Update !-- do something-- /map:when map:when test=Delete !-- do something-- /map:when /map:select /map:match Regards, Antonio Gallardo - 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] -- Robert J. (Bobby) Mitchell Systems Administrator NASA Institute for Advanced Concepts 555A 14th St Atlanta, Ga. 30318 Phone: (404)347-9633 Fax: (404)347-9638 - 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: (Related) XSP Bug: xsp:element used as root element
[I think this is more appropriate for cocoon-users. Also, don't post HTML messages to the list, please.] Sanne de Roever wrote: Hi, I've been using the xsp:element, and xsp:attribute tags with succes when creating svg. But now I would like to wrap the root element svg in such a tag, so I can adjust the width and height. The could/should be like this: ?xml version=1.0? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xsp:element name=svg xsp:attribute name=width500/xsp:attribute xsp:attribute name=height500/xsp:attribute svg xsp:attribute name=width500/xsp:attribute xsp:attribute name=height500/xsp:attribute ... Should work. Could this be a bug? I think XSP requires that the contents of xsp:page be single-rooted with a root element that is not in the xsp namespace (apart from xsp:logic and xsp:structure elements). This is because the output of the XSP generator must be a well-formed XML document that has the svg element as its root. Ugo -- Ugo Cei - Consorzio di Bioingegneria e Informatica Medica P.le Volontari del Sangue, 2 - 27100 Pavia - Italy Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is it a good idea to avoid the use of xsp ?
Hi! First, thanks for your very quick replies to my last question! After quite some time discussing and evaluating we made a decision in favor of cocoon as presentation framework. One major argument for cocoon and against struts was that in jsp a strict seperation of logic (Java code) and presentation is not always encouraged. Therewas also fear that the same issues might apply to xsp and therefore the decision was made to use cocoon but to avoid the use of xsp. I'm very new to cocoon and by now only have a very vague idea about xsp and issues that might arise using xsp. So what do you think ? Is it a bad idea to use cocoon but not use xsp ? Is it generally possible to compare jsp and xsp in that way? Or are these fears inappropiate? thanks, Gernot --DI Gernot Kollermailto:[EMAIL PROTECTED]phone:+43-676-340 55 52Do you Yahoo!? Yahoo! News - Today's headlines
Re: How to use Request-parameter Selector with the submitbutton
The submit button comes across just like text fields. Here is a sample login page and post page: ?xml version=1.0? !-- filename: login.xsp -- xsp:page xmlns:xsp=http://apache.org/xsp; html form method=post action=login.post Sometext:br/input type=text name=sometext/br/ input type=submit name=mysubmitbtn value=button1/ input type=submit name=mysubmitbtn value=button2/ /form /html /xsp:page ?xml version=1.0? !-- filename: login.post -- xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; html Sometext = xsp-request:get-parameter name=sometext/br/ Submit = xsp-request:get-parameter name=mysubmitbtn/br/ /html /xsp:page Tim Larson - 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: Is it a good idea to avoid the use of xsp ?
Hi Gernot - Whether one method is a better or worse idea than another is largely dependent on how you implement it. Yes, XSPs do somewhat violate Separation of Concerns. And yes, you can compare XSPs to JSPs in terms of pitfalls. The fact is, that there are some things you can only do with XSPs. My own personal preference is to first look at alternatives to XSPs (like using SQLTransformer instead of XSP + ESQL logicsheet). Then, if I do use an XSP, I try to use logicsheets wherever possible. If I have xsp:logic blocks, I keep them TO A MINIMUM. If have more than say 2 such blocks, I typically make my own logicsheet. The extra time it takes to do this is well worth the savings in administration later on. Bottom line: there is no right or wrong way in Cocoon. Pick you approach, especially if you are comfortable with it. Just develop your own best practices to help you code cleanly and in a way that can easily be maintained later on. Regards, Lajos -- galatea.com Cocoon training, consulting support Gernot Koller wrote: Hi! First, thanks for your very quick replies to my last question! After quite some time discussing and evaluating we made a decision in favor of cocoon as presentation framework. One major argument for cocoon and against struts was that in jsp a strict seperation of logic (Java code) and presentation is not always encouraged. There was also fear that the same issues might apply to xsp and therefore the decision was made to use cocoon but to avoid the use of xsp. I'm very new to cocoon and by now only have a very vague idea about xsp and issues that might arise using xsp. So what do you think ? Is it a bad idea to use cocoon but not use xsp ? Is it generally possible to compare jsp and xsp in that way? Or are these fears inappropiate? thanks, Gernot -- DI Gernot Koller mailto:[EMAIL PROTECTED] phone:+43-676-340 55 52 Do you Yahoo!? Yahoo! News http://news.yahoo.com/ - Today's headlines - 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: How to use Request-parameter Selector with the submit button
Thanks bobby, it works! Antonio El Jueves, 12 de Septiembre de 2002 06:40, Bobby Mitchell escribió: Antonio Gallardo Rivera wrote: Hi all! I tried to resolve a problem about nested map:action-sets in C2.1. To try to work with a database actions and formvalidator. Given 2 submit buttons in a form: one for update and the second for delete: The name of the parameters will be: cocoon-action-Update cocoon-action-Delete How I can know in the sitemap what button was pressed? Couple of ways: 1: map:match type=request-parameter pattern=cocoon-action-Update !-- do something-- /map:match map:match type=request-parameter pattern=cocoon-action-Delete !-- do something-- /map:match 2: cocoon-action=Update or cocoon-action=Delete map:match type=request-parameter pattern=cocoon-action map:select type=request-parameter map:parameter name=parameter-name value=cocoon-action/ map:when test=Update !-- do something-- /map:when map:when test=Delete !-- do something-- /map:when /map:select /map:match Regards, Antonio Gallardo - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
form validation
I just wonder whether I can do the following in my xsl : The field validation can trigger 2 types of errors : 1. the field is null - show message 1 2. the field is not null but has wrong regex syntx - show message 2. I just have troubles to find the documentation again... For now I have 2 error tags but both messages appear despite xsl:attribute name=whenis-null/xsl:attribute or xsl:attribute name=whenno-match/xsl:attribute... Thanks - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file-upload-overwrite permission
Niket Anand wrote: Hello All, I am able to upload any file to /WEB-INF/work/image-dir directory as specified in web.xml file. If I want to upload same file again, it saves to directory with 1_image.gif name(it saves with new file name by appending 1_ before actual file name). I donot want to save it with new name but I want it to overwrite the previous saved file. How can I do this? as in CocoonServlet.java, it restrict the permission as private static final boolean ALLOW_OVERWRITE = false; 1. Modify CocoonServlet to suit your needs, i.e. set ALLOW_OVERWRITE = true; 2. File a bug into BugZilla that this parameter is fixed. Hopefully, somebody will get onto this issue sometime. Vadim Please suggest any solution such that it can overwrite the file. Thanks, Niket - 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: xsp:element root element bug?
Sanne de Roever wrote: Hi, I've been using the xsp:element, and xsp:attribute tags with succes when creating svg. But now I would like to wrap the root element svg in such a tag, so I can adjust the width and height. The could/should be like this: ?xml version=1.0? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xsp:element name=svg Use svg here: svg xsp:attribute name=width500/xsp:attribute xsp:attribute name=height500/xsp:attribute xsp:element name=path xsp:attribute name=fillnone/xsp:attribute xsp:attribute name=dM 100,200 z/xsp:attribute /xsp:element xsp:element name=text xsp:attribute name=transformmatrix(1 0 0 1 0 26)/xsp:attribute Hello world /xsp:element /svg /xsp:page Vadim My own svg is more complex, but the bottom line is that using an xsp:element tag for a root element doesn't work. Could this be a bug? Regards, Sanne - 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: Need help with LuceneXMLIndexer
Ganael LAPLANCHE wrote: Hi ! I'd like to use this cocoon class to index XML pages... Where could I find examples of codes using this class ? Has anyone ever tried it ? See search demo in Cocoon samples webapp. Vadim Thank you, Gan. - 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: XSP output: disable-output-escaping?
gv wrote: Hi, From an XSP page, I am trying to output a Java variable that contains the XML result of an external script as XML, but my angle brackets are escaping to character entities. I have a Java String variable called 'scriptOutput'. It's filled with a string of XML that comes from an external script. My goal is have my XSP page output this String as XML. You will have to convert your Java String into SAX XML events. This is done by parsing this text by XML parser. Util logicsheet has a tag (IIRC, include-expr) which does exactly like this. Search archives for details, it was explained miriad of times. Vadim The results of my XSP looks something like this: page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; lt;cargt; lt;doorgt; lt;handle/gt; lt;/doorgt; lt;cargt; /page This is the result I want: page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; car door handle/ /door /car /page I tried fooling around with xsp:element, xsp:content, and xsp:expr with no luck. I guess I'm looking to do something similar to XSLT's 'disable-output-escaping'. Any ideas on if/how this can be done? Thanks, John - 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: Sending a parameter to Xerces (allow java char encodings, eg MacRoman )
Jesse Reynolds wrote: At 0:53 +1000 18/8/2002, Jesse Reynolds wrote: OK! I've finally gotten this thing working in Cocoon 2.0.3!!! Thanks for your assistance (and patience) Vadim. snip I have java-encodings working now for standard xml pages parsed by Cocoon, but alas XSP pages are not working. How can I find out what XML parser is being instantiated for XSP files? I've tried running unzip over all the .jar files in WEB-INF/lib of C2.0.3 but can't find any matches for the classes mentioned in the stacktrace near the error... See AbstractMarkupLanguage.java, generateCode() method. It instantiates XMLReader there. If it is possible, it should better use parser from component manager, and then your issue will be solved. ... Here is my test file testxsp.xml: ?xml version=1.0 encoding=MacRoman? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:util=http://apache.org/xsp/util/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=yes page titletest MacRoman encoding/title headingwelcome - jesse's cocoon test/heading paraOkey dokey, this is some normal text./para paraHere's some mac characters: ¥ * é ü /para /page /xsp:page The entry in my sitemap for it is as follows: map:pipeline ... map:match pattern=testxsp map:generate type=serverpages src=testxsp.xml/ map:transform src=jesse_default.xsl/ map:serialize/ /map:match The entire error message I receive is: Cocoon 2 - Internal server error type fatal message Stopping after fatal error: The encoding MacRoman is not supported. description org.apache.cocoon.ProcessingException: Stopping after fatal error: The encoding MacRoman is not supported.: org.xml.sax.SAXException: Stopping after fatal error: The encoding MacRoman is not supported. sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet stack-trace ... org.xml.sax.SAXException: Stopping after fatal error: The encoding MacRoman is not supported. at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1245) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:546) at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:314) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1097) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371) at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371) at org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.generateCode(LogicsheetCodeGenerator.java:173) at org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.generateCode(AbstractMarkupLanguage.java:390) Vadim ... request-uri /cocoon/jesse/testxsp path-info jesse/testxsp Thankyou! Jesse - 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: Need to build source to upgrade built-in logicsheet?
gv wrote: Hi, Do I need to download and build the entire Cocoon 2.0.4-dev from source to upgrade a built-in logicsheet? A newer version of util.xsl than in the 2.0.3 release would fix my problem. It'd be great if I could just download the newer util.xsl, put it somewhere, and have Cocoon recompile it. Since I don't see util.xsl anywhere in the binary distribution directories, I'm not sure if this is possible. It is inside cocoon.jar file. You put newer util logicsheet in: ...cocoon/WEB-INF/classes/org/apache/.../java/util.xsl It will override the one in cocoon.jar. Vadim Thanks, John - 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: Sending a parameter to Xerces (allow java char encodings, eg MacRoman )
At 10:22 -0400 12/9/2002, Vadim Gritsenko wrote: Jesse Reynolds wrote: At 0:53 +1000 18/8/2002, Jesse Reynolds wrote: OK! I've finally gotten this thing working in Cocoon 2.0.3!!! Thanks for your assistance (and patience) Vadim. snip I have java-encodings working now for standard xml pages parsed by Cocoon, but alas XSP pages are not working. How can I find out what XML parser is being instantiated for XSP files? I've tried running unzip over all the .jar files in WEB-INF/lib of C2.0.3 but can't find any matches for the classes mentioned in the stacktrace near the error... See AbstractMarkupLanguage.java, generateCode() method. It instantiates XMLReader there. If it is possible, it should better use parser from component manager, and then your issue will be solved. Great, thanks Vadim. When you say component manager, do you mean excalibur? Or what...? Thanks Jesse -- Jesse Reynolds - Virtual Artists Pty Ltd - http://www.va.com.au Email: jesse (at) va.com.au Website Development Phone: +61 (0)8 8223 2288 Web Email Hosting Web: http://jesse.va.com.au Streaming Media Hosting Telehousing / Colocation - 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: xsp:element root element bug?- solved! Thanks Vadim.
Hi Vadim, Thanks, that worked! A already had an alternate solution using a fake root element which was stripped by an xsl transformation. This is better though! Kind regards, Sanne - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 12, 2002 4:02 PM Subject: Re: xsp:element root element bug? Sanne de Roever wrote: Hi, I've been using the xsp:element, and xsp:attribute tags with succes when creating svg. But now I would like to wrap the root element svg in such a tag, so I can adjust the width and height. The could/should be like this: ?xml version=1.0? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xsp:element name=svg Use svg here: svg xsp:attribute name=width500/xsp:attribute xsp:attribute name=height500/xsp:attribute xsp:element name=path xsp:attribute name=fillnone/xsp:attribute xsp:attribute name=dM 100,200 z/xsp:attribute /xsp:element xsp:element name=text xsp:attribute name=transformmatrix(1 0 0 1 0 26)/xsp:attribute Hello world /xsp:element /svg /xsp:page Vadim My own svg is more complex, but the bottom line is that using an xsp:element tag for a root element doesn't work. Could this be a bug? Regards, Sanne - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSP Indentation and Whitespace
Martin Schimak wrote: Hi folks! I am relatively new to cocoon, but so far I am VERY IMPRESSED and I have a strong feeling that I will spend a considerable amount of forthcoming lifetime using/exploring/developing :-) However, on my exploring way, I encountered a small, but annoying issue, I could not solve myself so far... it's concerning whitespace: esql:execute-query esql:querySELECT template_id, name FROM template ORDER BY name/esql:query esql:results esql:row-results xsp:element name=option xsp:attribute name=value esql:get-string column=template_id/ /xsp:attribute esql:get-string column=name/ /xsp:element /esql:row-results /esql:results /esql:execute-query After processing this fragment, I would like to end up with something like option value=1Template1/option option value=2Template2/option but instead I end up with something like option value= 1Template1/option option value= 2Template2/option Of course, if I avoid indentation within the original xsp fragment like xsp:element name=optionxsp:attribute name=valueesql:get-string column=template_id//xsp:attributeesql:get-string column=name//xsp:element btw, you can use option here: optionxsp:attribute name=valueesql:get-string column=template_id//xsp:attributeesql:get-string column=name/option Vadim then I get what I want. But I get illegible xml quite soon... Of course, the preservation of the original indentation in some cases could be what the user actually wanted, therefore my question: Is there a way to tell cocoon/xsp-processing to change behaviour in this respect? Not a big problem, but I found no bigger problem so far :-) Martin. - 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: Is it a good idea to avoid the use of xsp ?
If you strictly enforce that your XSP pages don't contain Java code, and only use custom tags (Logicsheets) then you don't necessarily have a problem. Your efforts here should focus on creating a useful set of Logicsheets, but ones that have a declarative approach, rather than ending up with a series of procedural statements. The alternative approach is to rely more heavily on your pipeline components (Actions and Transformers). You're unlikely to use XSP pages here, but may have them in limited form, e.g. to parameterise your XML generation to add information from the request/session/etc. Often here the XML you're feeding into the pipeline provides cues to the downstream components. See the SQLTransformer for example. I think the best advice Iwould give at the moment is to choose ONE of these approaches rather than a mix-and-match situation. If you do then your application is partly specified in the sitemap (pipeline structures) and partly in XSP pages (XML + Logicsheets) which isn't nice for maintainance: everything isn't in a single place. The interesting aspect to all this is that if you look a bit closer they're actually equivalent: When an XSP page is transformed into Java code, Cocoon determines the correct logic sheet transform to apply for each of your tags. This is repeated until all thats left are XSP elements. At that point the final transformation is carried out to generate Java code. This is then compiled and execute. So you have a process which: determines the code required for this task, then executes it. When a Pipeline is triggered in the pipeline, Cocoon builds up the Pipeline components (perhaps affected by various Actions along the way). Once the pipeline is built its then executed. So a useful question to ask is: which approach give you the most flexibility? The advantages of putting things in the sitemap is that you're beginning to approach the "Holy Grail" of computing: component based development. Throw together a few pipeline components and you've got an application. Fantastic. But, personally (and this is probably Cocoon heresy!), I think that once you start introducing fairly specific Actions and Transformers -- i.e. ones that have limited reuse, or may be used only in one pipeline -- you're possibly going down the wrong path: there's little value in having these as components other than Java code, particularly because the sitemap gets so complicated that its difficult to see whats going on. So far I've tended to use the sitemap for only doing the association between requests/processing/response rather than defining the processing steps. I'd be interested in what others think. L. -Original Message-From: Gernot Koller [mailto:[EMAIL PROTECTED]]Sent: 12 September 2002 13:49To: [EMAIL PROTECTED]Subject: Is it a good idea to avoid the use of xsp ? Hi! First, thanks for your very quick replies to my last question! After quite some time discussing and evaluating we made a decision in favor of cocoon as presentation framework. One major argument for cocoon and against struts was that in jsp a strict seperation of logic (Java code) and presentation is not always encouraged. Therewas also fear that the same issues might apply to xsp and therefore the decision was made to use cocoon but to avoid the use of xsp. I'm very new to cocoon and by now only have a very vague idea about xsp and issues that might arise using xsp. So what do you think ? Is it a bad idea to use cocoon but not use xsp ? Is it generally possible to compare jsp and xsp in that way? Or are these fears inappropiate? thanks, Gernot --DI Gernot Kollermailto:[EMAIL PROTECTED]phone:+43-676-340 55 52 Do you Yahoo!?Yahoo! News - Today's headlines
Re: Arrgh, more XML/HTML problems now it's ''
Tim Cavanagh wrote: Hi Justin We too are having problems doing very much the same thing. We are having major problems with the serializer adding line breaks to list elements such as ulliblah/li/ul is being parsed out as: ul liblah/li /ul We are using a middleware product called the VCe that look at the output from a form and when it sees a line break it puts in a br / tag (among other things). This ends up with the following output ulbr / br / liblah/libr / br / /ulbr / And of course if the users edit this content again it goes into: ulbr /br / br /br / liblah/libr /br / br /br / /ulbr /br / The best solution for us is to somehow tell the serializer (html) not to format or add line breaks to list elements but how how that is the question??? Try adding indent element to serializer's configuration: map:serializer ... indentno/indent ... Vadim Regards Tim Cavanagh Here are some problems I've encountered so far. 1) users don't follow XML rules very well (goes along with point 1) 2) the HTMLSerializer changes the users data by turning br/ into br, etc 3) the XML Serializer changes the users data by turning textarea/textarea into textarea/, etc 4) bad user input will cause SAXExceptions if it's not enclosed in CDATA sections - 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: Sending a parameter to Xerces (allow java char encodings, eg MacRoman )
Jesse Reynolds wrote: At 10:22 -0400 12/9/2002, Vadim Gritsenko wrote: Jesse Reynolds wrote: At 0:53 +1000 18/8/2002, Jesse Reynolds wrote: OK! I've finally gotten this thing working in Cocoon 2.0.3!!! Thanks for your assistance (and patience) Vadim. snip I have java-encodings working now for standard xml pages parsed by Cocoon, but alas XSP pages are not working. How can I find out what XML parser is being instantiated for XSP files? I've tried running unzip over all the .jar files in WEB-INF/lib of C2.0.3 but can't find any matches for the classes mentioned in the stacktrace near the error... See AbstractMarkupLanguage.java, generateCode() method. It instantiates XMLReader there. If it is possible, it should better use parser from component manager, and then your issue will be solved. Great, thanks Vadim. When you say component manager, do you mean excalibur? Or what...? this.manager.lookup(Parser.ROLE) Vadim Thanks Jesse - 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]
PHP
Hi Has anyone build PHP generator ? I've never build Cocoon from source and I'm kind of scared to do that? Is there anyway I can incorporate PHP generator in cocoon.jar without building it from source? Also are there any sample for PHP in Cocoon SushilChat with friends online, try MSN Messenger: Click Here - Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
Re: Need help with XMLForm and Mod-db (Please disregard my earlierposts)
My solution is to change the code in DatabaseAction.java to remove the table_name. from the variable names. I made this change to test it and it works. I suppose I need to change the code in such a way to allow a user to supply a configuration directive such as append_table_namefalse/append_table_name. Is there any reason I should not do this or is there a better way? I'm cross-posting this to the dev list. Bobby Mitchell wrote: To start with, I apologize for posting so many different posts lately. I'm stuck and I'm not sure which way to go, but I have been working to find a solution. Please disregard the several earlier posts. I'm trying to use XMLForms and Mod-db actions together. My problem stems from the fact that mod-db uses request parameters from a key column to set the ?'s in the query and when setting the request parameters to the column values retrieved it sets them by appending table_name. to the column/req-param name. My request parameters and column names are the same. Assume my query is select ID, EMAIL from NIAC_MAILLIST where EMAIL=? Mod-db is now looking for a request parameter called NIAC_MAILLIST.EMAIL and if found it successfully grabs the data from the database. Otherwise it exits. If I append NIAC_MAILLIST.EMAIL=b@n to the query string mod-db works and creates the variables for the data, but XMLForm generates an Invalid data format error. I created a session attribute called NIAC_MAILLIST.EMAIL and am setting it to EMAIL. If mod-db would set the ? from the session attributes instead of request parameters I could set it that way. Otherwise I need to find a way to get mod-db to not append the table name to the front of the column. Any ideas? database.xml root connectionniac_db/connection table name=NIAC_MAILLIST alias=NIAC_MAILLIST keys key name=EMAIL type=string autoincrement=false /key /keys values value name=ID type=int/value value name=EMAIL type=string/value /values /table table-set name=MAILLIST-sel table name=NIAC_MAILLIST others-mode=session/ /table-set /root sitemap snippet where I declare the select action map:action name=mod-db-sel src=org.apache.cocoon.acting.modular.DatabaseSelectAction descriptordatabase.xml/descriptor throw-exceptiontrue/throw-exception /map:action pipeline where I'm trying to use it. map:pipeline !-- A non-trivial interactive example - Cocoon Usage Feedback Wizard -- map:match pattern=wizard* map:match type=request-parameter pattern=cocoon-xmlform-view map:select type=request-parameter map:parameter name=parameter-name value=cocoon-xmlform-view/ map:when test=registration !-- map:act type=request map:parameter name=parameters value=true/ -- map:act type=req-params map:parameter name=parameters value=EMAIL/ map:act type=session-propagator map:parameter name=NIAC_MAILLIST.EMAIL value={EMAIL}/ /map:act map:act type=mod-db-sel src=optional src map:parameter name=table-set value=MAILLIST-sel/ /map:act /map:act /map:when /map:select /map:match map:act type=WizardAction !-- XMLForm parameters for the AbstractXMLFormAction -- map:parameter name=xmlform-validator-schema-ns value=http://www.ascc.net/xml/schematron/ map:parameter name=xmlform-validator-schema value=schematron/wizard-xmlform-sch-report.xml/ map:parameter name=xmlform-id value=form-feedback/ map:parameter name=xmlform-scope value=session/ map:parameter name=xmlform-model value=niac.list.ListBean/ !-- Content transformation logic -- map:generate type=serverpages src=wizard/{page}.xsp/ map:transform type=xmlform label=debug, xml/ map:transform src=stylesheets/wizard2html.xsl / map:transform src=context://samples/stylesheets/xmlform/xmlform2html.xsl/ map:serialize type=xhtml/ /map:act /map:match /map:pipeline -- Robert J. (Bobby) Mitchell Systems Administrator NASA Institute for Advanced Concepts 555A 14th St Atlanta, Ga. 30318 Phone: (404)347-9633 Fax: (404)347-9638 - 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]
embedding xsp in an xml document
I'm trying to embed xsp in an xml document. A stylesheet extracts it so I can use it in a pipeline like this: map:match pattern=somepage.xsp map:generate src=somepage.xmap/ map:transform src=get.xsl map:parameter name=section value=xsp-section/ /map:transform map:serialize type=xml/ /map:match map:match pattern=somepage.xml map:generate src=cocoon:/somepage.xsp type=serverpages/ map:serialize type=xml/ /map:match Trouble is, when I make changes in the xsp code I have to save and refresh a random number of times to get the output to update with the changes. How can I get it to update on the first reload? Tim Larson - 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: PHP
I thought it was in there already though it requires a little work to get it running: http://xml.apache.org/cocoon/userdocs/generators/php-generator.html -Original Message- Hi Has anyone build PHP generator ? I've never build Cocoon from source and I'm kind of scared to do that? Is there anyway I can incorporate PHP generator in cocoon.jar without building it from source? Also are there any sample for PHP in Cocoon Sushil - 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]
my opinion on global-parameters
I really wonder why they're so buggy to use... I have to have ../../ }-like path to access them, and they seem not to be as path-logically accessible as the ordinary parameters, at least I have troubles with them. Just my two hot cents :-( I will have a look at the other solution (definition in web.xml of global stuff instead of the sitemap) :-/ Babs - 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: PHP
Hello, You might be trying Krysalis. It's pretty similar with Cocoon, but it's PHP based. http://www.interakt.ro/products/Krysalis/ Alexandru On Thu, 2002-09-12 at 18:06, Sushil Bhattarai wrote: Hi Has anyone build PHP generator ? I've never build Cocoon from source and I'm kind of scared to do that? Is there anyway I can incorporate PHP generator in cocoon.jar without building it from source? Also are there any sample for PHP in Cocoon Sushil __ Chat with friends online, try MSN Messenger: Click Here - Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: -- Alexandru COSTIN Chief Operating Officer http://www.interakt.ro/ +4021 411 2610 - 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]
PDF Double Dipping -- FOP bug?
I know the subject line is pretty stupid, but hell, its been a long day I have started to use Cocoon to generate HTML and PDF output from a database. It works great but I noticed that whenever I generate a PDF file the same query always get executed twice, while the equivalent HTML generation uses only one request. This is especially noticeable as one of my queries take a minute long. Cocoon also seem to reprocess the XML whenever I ask for the PDF transformation this is evident from the double spike in the processing power usage (I am running Windows 2000 and you can see the two hills prominently in the Task Manager) I am wondering if I am doing anything wrong, but I noticed that it seems to be doing the same thing even to the hello.pdf example on a fresh, plain installation of Tomcat/Cocoon. This leads me to wonder: is this a bug in FOP? Has anyone seen/solve this? Thanks in advance! Paul p.s. Tomcat 4.0.4, Cocoon 2.0.3, Windows 2000 Windows XP, JDK1.4 1.3.1
Re: Xindice inside Xsp
Hi fxp, In eXist source dist. you have a logicsheet based on XML-DB API to talk to XML-DB compliant databases. So you can use this logicsheet to connect to Xindice. Look at eXist-0.8.1/src/org/exist/xmldb.xsl Cheers, Daniel Fournier - 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]
[SUMMARY] How can I log in non-Cocoon Java classes?
More material for the (soon to be written) Cocoon hackers guide. :) Logging in non-Cocoon Java Classes -- This explaines how to implement Cocoon-style logging, in a Java class that is not inherited from a Cocoon or Avalon component class. The class is however used within a Cocoon application. A typical use for this might be in a Java Bean used in a Cocoon application. 1. The class must extend AbstractLogEnabled. 2. You must enable logging in the class by calling the enableLogging() method on the class. This requires that you have a Logger object to provide to enableLogging(). Generally you can get the Logger from a Cocoon component class. In my case I call enableLogging from a Cocoon action class, which extends AbstractXMLFormAction. The resulting code is as follows: 1. In the non-component class that needs to implement logging: You simply call the appropriate log method using the Logger provided by the getLogger() method, which is available from the parent class AbstractLogEnabled. import org.apache.avalon.framework.logger.AbstractLogEnabled; public class SomeClass extends AbstractLogEnabled { public void someMethod() { ... getLogger().debug( Hello, log. It worked! ); getLogger().info( Hello, log. Here is info ); getLogger().error( Hello, log. Here is an error ); //..etc. ... } } 2. In an Avalon component class, or a class that inherits from one: Call enableLogging(). Note that most of the Cocoon classes extend Avalon Component classes. ... SomeClass myClass = new SomeClass(); myClass.enableLogging( getLogger() ); myClass.someMethod(); // Writes some log messages ... Note that you must call enableLogging() before you call any methods that write log messages. It is not necessarily obvious when to call enableLogging() as the creation and initialization of many of your classes will be handled automatically by Avalon, one of the Cocoon sub-systems. To be absolutely sure that you are writing solid code, you'll need a basic understanding of the Avalon component life-cycle. This is a big subject and beyond the scope of this short paper. You can read more at: Avalon logkit, which is used by Cocoon: http://jakarta.apache.org/avalon/logkit/whitepaper.html Avalon component lifecycle: http://jakarta.apache.org/avalon/framework/reference-the-lifecycle.html If you're still curious, here is a link to an excellent white paper explaining development using avalon: http://jakarta.apache.org/avalon/developing/index.html ..and that's all there is to it. Many thanks to Marcus Crafter and Judith Andres for their help. Best wishes, Alan. - 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]