Re: XMLForm having - like cocoon-action-next (Device Independence?)
I have come to a conclusion that either there has to be way to submit an VXML page with field names like cocoon-xmlform-view (Is there any way? I could not find one) like this submit method=get next=wizard? namelist=cocoon-xmlform-view city propertyType rent cocoon-action-next/ (As I mention earlier VXML browser throws and ECMAScript exception cuz of - in the variable name) or we need to make changes in XMLForm so that it is in true practical sense Device Independent Form. By looking around the src I found out that Form.java of XMLForm uses some constants from Constants.java The following is the snippet of same: from Form.java snip-- public static String FORM_VIEW_PARAM = cocoon-xmlform-view; snip-- /** * filters custom request parameter * not refering to the model * * @todo implement default filtering * for standard Cocoon parameters * like cocoon-action[-suffix] * */ protected boolean filterRequestParameter( String name ) { // filter standard cocoon-* parameters if ( filterDefaultRequestParameter( name ) ) return true; // then consult with FormListeners Set ls = new HashSet(); ls.addAll( Collections.synchronizedSet ( formListeners_ ) ); Iterator iter = ls.iterator (); while (iter.hasNext()) { FormListener fl = (FormListener) iter.next(); // if any of the listeners wants this parameter filtered // then filter it (return true) if ( fl.filterRequestParameter( this, name ) ) return true; } // if none of the listeners wants this parameter filtered // then don't filter it return false; } /** * Filters the standard cocoon request parameters. * If default filtering needs to be different, * subclasses can override this method. * It is invoked before all listeners are asked to filter the parameter */ protected boolean filterDefaultRequestParameter( String paramName ) { if ( paramName.startsWith ( Constants.ACTION_PARAM_PREFIX ) || paramName.startsWith ( Constants.VIEW_PARAM ) ) return true; if ( paramName.equals ( FORM_VIEW_PARAM ) ) return true; else return false; } /** * Try to extract from the request * and return the current form view */ public String getFormView( Map objectModel ) { Request request =getRequest( objectModel ); return (String) getRequest( objectModel ).getParameter ( Form.FORM_VIEW_PARAM ); } *** from Constants.java snip-- /** * The request parameter name to request a specific view of a resource. * * FIXME(GP): Isn't this Servlet specific? */ String VIEW_PARAM = cocoon-view; /** * The request parameter name to trigger a specific action. * * FIXME(GP): Isn't this Servlet specific? */ String ACTION_PARAM = cocoon-action; /** * The request parameter prefix to trigger a specific action. * * FIXME(GP): Isn't this Servlet specific? */ String ACTION_PARAM_PREFIX = cocoon-action-; * So I am not sure if we need to fix this, if we need to do v have to change the constants?? Or is there any other solution to this? -Apurva --- apurva zaveri [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: I don't understand. Is the error produced on the client or the server? The error is produced in voiceXML browser [so client] The voiceXML browser expects this: submit method=get next=wizard? namelist=cocoon-xmlform-view city propertyType rent cocoon-action-next/ but it throws error cuz of cocoon-xmlform-view and is unable to execute the page. And on the server side cocoon expects to get cocoon-xmlform-view by http get method. Does this markup: var name=cocoon-action-next expr=Next/ get transformed by xslt into a javascript variable in the page sent to the client? No. Or is it part of the markup language of the page? Can you pass an array in the namelist? i.e., submit next=wizard? namelist=Vars['cocoon-xmlform-view'], etc. I havent tried this as I thought cocoons XMLForm would not accept it like this. Or am I confused? :) Sorry to be so thick; form elements commonly have characters like - and . in their names; must be some way to work this out... --Michael apurva zaveri [EMAIL PROTECTED]To: [EMAIL PROTECTED], m [EMAIL PROTECTED] cc
Re: XMLForm having - like cocoon-action-next
--- [EMAIL PROTECTED] wrote: I don't understand. Is the error produced on the client or the server? The error is produced in voiceXML browser [so client] The voiceXML browser expects this: submit method=get next=wizard? namelist=cocoon-xmlform-view city propertyType rent cocoon-action-next/ but it throws error cuz of cocoon-xmlform-view and is unable to execute the page. And on the server side cocoon expects to get cocoon-xmlform-view by http get method. Does this markup: var name=cocoon-action-next expr=Next/ get transformed by xslt into a javascript variable in the page sent to the client? No. Or is it part of the markup language of the page? Can you pass an array in the namelist? i.e., submit next=wizard? namelist=Vars['cocoon-xmlform-view'], etc. I havent tried this as I thought cocoons XMLForm would not accept it like this. Or am I confused? :) Sorry to be so thick; form elements commonly have characters like - and . in their names; must be some way to work this out... --Michael apurva zaveri [EMAIL PROTECTED]To: [EMAIL PROTECTED], m [EMAIL PROTECTED] cc: 10/19/02 10:21 PM Subject: Re: XMLForm having - like Please respond to cocoon-action-next cocoon-dev --- [EMAIL PROTECTED] wrote: sorry, that should be: documents.forms[0].elements['cocoon-xmlform-view'].value also, if you need these to be variable names, use an associative array: var Vars=new Array() Vars['cocoon-xmlform-view']=some view Vars['cocoon-action-prev']=some resource Vars['cocoon-action-next']=some resource then foo=cocoon-xmlform-view' view=Vars[foo] etc. oh nice. So the HTML problem is solved. But in VXML you submit the form like this submit next=wizard? namelist=city propertyType rent/ The above statement is not a problem. var name=cocoon-action-next expr=Next/!-- this vxml variable is actually an javascript variable generated at the backend -- submit next=wizard? namelist=cocoon-xmlform-view city propertyType rent cocoon-action-next/ !-- even if i had an array I would have to submit cocoon-xmlform-view variable. how? -- This gives an error. -Apurva You guys are having way too much fun... apurva zaveri [EMAIL PROTECTED]To: [EMAIL PROTECTED], m [EMAIL PROTECTED] cc: 10/19/02 08:00 PM Subject: XMLForm having - like cocoon-action-next Please respond to cocoon-dev XMLForm has form items named: cocoon-action-prev cocoon-action-next cocoon-xmlform-view all of them have - in it. Problem is javascript can not access such form items. i.e. you can not do documents.form.cocoon-xmlform-view.value or something like that. In HTML if you want to do this it will be an javascript error. [Although you may not run in a situation that demands to do that] But in VXML where all field in form are actually javascript variables you can not have a field/js-var called cocoon-action-next as in javascript you can not have a variable called cocoon-action-next. Accorgigly I suggest to change the nameing conventions of cocoon-action-prev cocoon-action-next cocoon-xmlform-view Or am I missing something? -Apurva __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site
in XML Output
How can I have the following in my xml output. word spelling=SPELL pronunciation=m#601;mba#618;/ This uses and xml serializer. The result i get is word spelling=SPELL pronunciation=mamp;#601;mbaamp;#618;/ __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ - 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]
cocoon-users@xml.apache.org
word spelling=SPELL pronunciation=m#601;mba#618;/ __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ - 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]
XMLForm having - like cocoon-action-next
XMLForm has form items named: cocoon-action-prev cocoon-action-next cocoon-xmlform-view all of them have - in it. Problem is javascript can not access such form items. i.e. you can not do documents.form.cocoon-xmlform-view.value or something like that. In HTML if you want to do this it will be an javascript error. [Although you may not run in a situation that demands to do that] But in VXML where all field in form are actually javascript variables you can not have a field/js-var called cocoon-action-next as in javascript you can not have a variable called cocoon-action-next. Accorgigly I suggest to change the nameing conventions of cocoon-action-prev cocoon-action-next cocoon-xmlform-view Or am I missing something? -Apurva __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ - 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: XMLForm having - like cocoon-action-next
--- [EMAIL PROTECTED] wrote: sorry, that should be: documents.forms[0].elements['cocoon-xmlform-view'].value also, if you need these to be variable names, use an associative array: var Vars=new Array() Vars['cocoon-xmlform-view']=some view Vars['cocoon-action-prev']=some resource Vars['cocoon-action-next']=some resource then foo=cocoon-xmlform-view' view=Vars[foo] etc. oh nice. So the HTML problem is solved. But in VXML you submit the form like this submit next=wizard? namelist=city propertyType rent/ The above statement is not a problem. var name=cocoon-action-next expr=Next/!-- this vxml variable is actually an javascript variable generated at the backend -- submit next=wizard? namelist=cocoon-xmlform-view city propertyType rent cocoon-action-next/ !-- even if i had an array I would have to submit cocoon-xmlform-view variable. how? -- This gives an error. -Apurva You guys are having way too much fun... apurva zaveri [EMAIL PROTECTED]To: [EMAIL PROTECTED], m [EMAIL PROTECTED] cc: 10/19/02 08:00 PM Subject: XMLForm having - like cocoon-action-next Please respond to cocoon-dev XMLForm has form items named: cocoon-action-prev cocoon-action-next cocoon-xmlform-view all of them have - in it. Problem is javascript can not access such form items. i.e. you can not do documents.form.cocoon-xmlform-view.value or something like that. In HTML if you want to do this it will be an javascript error. [Although you may not run in a situation that demands to do that] But in VXML where all field in form are actually javascript variables you can not have a field/js-var called cocoon-action-next as in javascript you can not have a variable called cocoon-action-next. Accorgigly I suggest to change the nameing conventions of cocoon-action-prev cocoon-action-next cocoon-xmlform-view Or am I missing something? -Apurva __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ - 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: XMLForm - VoiceXML
--- Ivelin Ivanov [EMAIL PROTECTED] wrote: elements in XMLForm do not have to start with /. It is just used for clarity in the examples. You can try just city. You are right trying just city works. So there is no problem. What are the limitations for names of VXML forms? / in a field is certainly a limitation in IBM voiceXML browser(as it gives a processing error). And IBM voiceXML browser v3.1 supports W3C's voiceXML 2.0 grammer format. I think it will also be a problem for Nuance voice browser and VoiceGenie's voice browser but I am not sure. I shall get back after finding more about it (if there are any other limitations). -Apurva - Original Message - From: apurva zaveri [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 13, 2002 9:08 PM Subject: XMLForm - VoiceXML This is a serious problem about the use of XMLForm in VoiceXML. While experimenting with XMLForm to generate VoiceXML this a problem that I faced. Since in XMLForm all the name of the fields begins with / in HTML select name=/city is not a problem while in VXML field name=/city is an error. What can be done? -Apurva Zaveri __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com - 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] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com - 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: XMLForm - VoiceXML
One more thing to mention. I am working on creating wizard2vxml.xsl and xmlform2vxml.xsl for VoiceXML 2.0 for XMLForm. Is it Necessary to have / in the field name (html input variable name) like : select name=/city this? Would this be fine? select name=city I am using bean not dom for XMLForm --- apurva zaveri [EMAIL PROTECTED] wrote: This is a serious problem about the use of XMLForm in VoiceXML. While experimenting with XMLForm to generate VoiceXML this a problem that I faced. Since in XMLForm all the name of the fields begins with / in HTML select name=/city is not a problem while in VXML field name=/city is an error. What can be done? -Apurva Zaveri __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com - 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] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com - 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]
XMLForm - VoiceXML
This is a serious problem about the use of XMLForm in VoiceXML. While experimenting with XMLForm to generate VoiceXML this a problem that I faced. Since in XMLForm all the name of the fields begins with / in HTML select name=/city is not a problem while in VXML field name=/city is an error. What can be done? -Apurva Zaveri __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com - 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]
Using XSLT
Using XSLT This is an XML file ?xml version=1.0? page content form input type=text name=userid prompt=Please say or enter your Agent I D / /form /content /page And this is the XSLT ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:cinclude=http://apache.org/cocoon/include/1.0; xsl:template match=input field name={@name} type=digits prompt={@prompt} promptxsl:value-of select=@prompt//prompt error clear namelist=xsl:value-of select=@name// !-- ofcourse this is wrong I want the value of {@name} in it How do I do it? -- Please try again. goto next=#login/ /error /field /xsl:template /xsl:stylesheet output: ?xml version=1.0 encoding=UTF-8 ? field prompt=Please say or enter your Agent I D type=digits name=userid promptPlease say or enter your Agent I D/prompt error clear namelist=/ Please try again. goto next=#login / /error /field Expected output [What I want is]: clear namelist=userid/ Please try again. I tried ![CDATA[ ]] unsucessfully, may be I dont know how to use it properly. Help. -Apurva __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com - 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: Using XSLT
Yeah that works. thanks. --- Yury Mikhienko [EMAIL PROTECTED] wrote: On Sat, 5 Oct 2002 17:26:10 -0700 (PDT) apurva zaveri [EMAIL PROTECTED] wrote: Using XSLT This is an XML file ?xml version=1.0? page content form input type=text name=userid prompt=Please say or enter your Agent I D / /form /content /page And this is the XSLT ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:cinclude=http://apache.org/cocoon/include/1.0; xsl:template match=input field name={@name} type=digits prompt={@prompt} promptxsl:value-of select=@prompt//prompt error clear namelist=xsl:value-of select=@name// !-- ofcourse this is wrong I want the value of {@name} in it How do I do it? -- Try clear namelist={@name}/ or clear xsl:attribute name=namelistxsl:value-of select=@name//xsl:attribute /clear Please try again. goto next=#login/ /error /field /xsl:template /xsl:stylesheet output: ?xml version=1.0 encoding=UTF-8 ? field prompt=Please say or enter your Agent I D type=digits name=userid promptPlease say or enter your Agent I D/prompt error clear namelist=/ Please try again. goto next=#login / /error /field Expected output [What I want is]: clear namelist=userid/ Please try again. I tried ![CDATA[ ]] unsucessfully, may be I dont know how to use it properly. Help. -Apurva __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com - 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] -- Best regards, Yury Mikhienko. IT engineer, ZAO Mobicom-Kavkaz - 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] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com - 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]
jndi, oracle, generator
hello, I have a wierd problem. I am almost about to kill myself for this. It would seem this has nothing to with cocoon but it has. String ln = jdbc/db; Hashtable env = new Hashtable (5); env.put (Context.INITIAL_CONTEXT_FACTORY, com.sun.jndi.fscontext.RefFSContextFactory); env.put (Context.PROVIDER_URL, file:/rertn/JNDI); ctx = new InitialContext(env); OracleOCIConnectionPool cpool = new OracleOCIConnectionPool(apurva,apffapz, jdbc:oracle:oci:@RERTNDB, null); ctx.unbind(ln); ctx.bind (ln,cpool); This is a snippet of code from a java file that i use to bind a OracleOCIConnectionPool obj with JNDI. In the same class i also do a look up like this: OracleOCIConnectionPool cpool = (OracleOCIConnectionPool) ctx.lookup (ln); OracleOCIConnection conn = (OracleOCIConnection) cpool.getConnection(); works fine. I used this lookup code from the cocoon generator for months not a problem. Everything worked fine. It is a windows 2000 server with oracle 9i DB. Tomcat,cocoon,oracle on the same server. I uninstalled oracle 9i and installed oracle 9i second release. Since orcale did not let me keep the same oracle instance name, I changed the instance name from rertn to rertndb. I made the obcious changes like env.put (Context.PROVIDER_URL, file:/rertndb/JNDI); in binding. I compiled the application and none of the generator works anymore. I almost got a stroke for a moment nothing in the application works. What is wierd is that the class file which does the binbing, as you know also has a look-up, the look-up for the obj works there and i can fire queries. So it seems there is nuthing wrong with the OCI driver. When i say the generator do not work means: it stops excecution at OracleOCIConnectionPool cpool = (OracleOCIConnectionPool) ctx.lookup (ln); throws no exception. I tried to do a look-up from an independent jsp page. No exception in caught but the page shows java.lang.UnsatisfiedLinkError: make_c_state error. (which is runtime i believe) HELP! -Apurva Zaveri __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com - 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: jndi, oracle, generator
opps! I made the obcious changes like env.put (Context.PROVIDER_URL, file:/rertndb/JNDI); in binding. read this in below as: I made the obvious changes like OracleOCIConnectionPool cpool = new OracleOCIConnectionPool(apurva,apffapz, jdbc:oracle:oci:@RERTNDB, null); it was RERTN before. --- apurva zaveri [EMAIL PROTECTED] wrote: hello, I have a wierd problem. I am almost about to kill myself for this. It would seem this has nothing to with cocoon but it has. String ln = jdbc/db; Hashtable env = new Hashtable (5); env.put (Context.INITIAL_CONTEXT_FACTORY, com.sun.jndi.fscontext.RefFSContextFactory); env.put (Context.PROVIDER_URL, file:/rertn/JNDI); ctx = new InitialContext(env); OracleOCIConnectionPool cpool = new OracleOCIConnectionPool(apurva,apffapz, jdbc:oracle:oci:@RERTNDB, null); ctx.unbind(ln); ctx.bind (ln,cpool); This is a snippet of code from a java file that i use to bind a OracleOCIConnectionPool obj with JNDI. In the same class i also do a look up like this: OracleOCIConnectionPool cpool = (OracleOCIConnectionPool) ctx.lookup (ln); OracleOCIConnection conn = (OracleOCIConnection) cpool.getConnection(); works fine. I used this lookup code from the cocoon generator for months not a problem. Everything worked fine. It is a windows 2000 server with oracle 9i DB. Tomcat,cocoon,oracle on the same server. I uninstalled oracle 9i and installed oracle 9i second release. Since orcale did not let me keep the same oracle instance name, I changed the instance name from rertn to rertndb. I made the obcious changes like env.put (Context.PROVIDER_URL, file:/rertndb/JNDI); in binding. I compiled the application and none of the generator works anymore. I almost got a stroke for a moment nothing in the application works. What is wierd is that the class file which does the binbing, as you know also has a look-up, the look-up for the obj works there and i can fire queries. So it seems there is nuthing wrong with the OCI driver. When i say the generator do not work means: it stops excecution at OracleOCIConnectionPool cpool = (OracleOCIConnectionPool) ctx.lookup (ln); throws no exception. I tried to do a look-up from an independent jsp page. No exception in caught but the page shows java.lang.UnsatisfiedLinkError: make_c_state error. (which is runtime i believe) HELP! -Apurva Zaveri __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com - 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] __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com - 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]
Redirect from sub-sitemap in authentication framework
Redirect from an sub-sitemap to the login page does not seem to be working in authentication framework. i.e If you have a protected page in subsitemap. The redirection in sub-sitemap (in case of not authenticated) is not able to go to login page (in sitemap) map:match pattern=protected map:act type=auth-protect map:parameter name=handler value=AuthHandler/ map:generate src=docs/protected.xml/ map:transform src=stylesheets/simple-page2html.xsl/ map:transform type=encodeURL/ map:serialize/ /map:act !-- something was wrong, redirect to login page -- map:redirect-to uri=../login/ !-- this does not work even cocoon:/login does not work -- /map:match It look for login in the current sitemap. But i fixed this problem this way: map:match pattern=login map:redirect-to uri=../login/ /map:match map:match pattern=protected map:act type=auth-protect map:parameter name=handler value=AuthHandler/ map:generate src=docs/protected.xml/ map:transform src=stylesheets/simple-page2html.xsl/ map:transform type=encodeURL/ map:serialize/ /map:act !-- something was wrong, redirect to login page -- map:redirect-to uri=login/ /map:match Obvioulsy this is not a right way. is it a bug or am i going wrong somewhere? -Apurva __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com - 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]
using seletor to test 2 or more request parameter
I have a selector in pipeline map:select type=request-parameter map:parameter name=parameter-name value=cocoon-xmlform-view/ map:when test=confirm map:redirect-to uri=PropForSale(1)/ /map:when /map:select This works just fine, but this tests only one request parameterif someone wants to test 2 or more parameter..how is that done? I also tried something like : map:select type=request-parameter map:parameter name=parameter-name value=cocoon-xmlform-view/ !--map:parameter name=parameter-name value=cocoon-action-next/ -- map:when test=confirm !-- like how to test 2 request parameter condition? -- map:select type=request-parameter map:parameter name=parameter-name value=cocoon-action-next/ map:when test=Next -- map:redirect-to uri=PropForSale(1)/ /map:when /map:select /map:when /map:select does not work. -Apurva Zaveri __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com - 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: CInclude bug???
Thats great Andy! Let us know when you submit the fix. Also is there a way one can find out every time a new fix or a patch is submitted??? I am still quite new to cocoon. -Apurva --- Andrew C. Oliver [EMAIL PROTECTED] wrote: Incorrect. This is a bug and the @select does work in Cocoon 2.1.x. I have a fix on my local drive but I haven't submitted it yet. Will do so very soon. -Andy Per Kreipke wrote: Apurva, to make the long story short: the output has the whole xml file after the section of the xml file i want to include. i.e cinclude:include src=../../commons/contents/ATTRIBUTES.xml select=data/AGE/* / outputs: ?xml version=1.0 encoding=UTF-8? age data age !-- this is what i want -- data !-- this is what i DONT want -- dt text dt age data age /data Am i doin something wrong or is it a bug?? Not a bug. CInclude does not support selecting just a portion of your XML model (and neither does XInclude). E.g. your @select above does nothing. To do what you want to do, just add a XSLT tranformer _after_ your CInclude, then in that XSLT logic either: - match the elements you want with identity templates, - or, create a generic identity template and use empty matchers for the elements you _don't_ want. XSLT makes a clean, generic filtering language. Note: Cocoon's FilterTransformer does something similar but in a very restricted way (it basically only is used for paging through data models). Per - 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] __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com - 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: CInclude bug???
One more wierd finding: This is another place where I am experimneting with CInclude. cinclude:include src=cocoon://commons/contents/emp_table.xml select=data/dept/* / the @select in this CInclude transformer works exactly the way it should. And it is no different from the previous case. The only difference is that the previous case had a fileGenerator with a static xml file (ATTRIBUTES.xml) wherease over here (emp_table.xml) is a cocoon pipeline that has a generator (not a fileGenerator like in previous case) but a ServletGenerator that generates xml from a database using an predefined SQL query. But why should that difference matter? @select in CInclude transformer does works corretly with a ServletGenerator behind it but if fileGenerator is behind it, it does not work. Is that the nature of the bug??? -Apurva --- apurva zaveri [EMAIL PROTECTED] wrote: Thats great Andy! Let us know when you submit the fix. Also is there a way one can find out every time a new fix or a patch is submitted??? I am still quite new to cocoon. -Apurva --- Andrew C. Oliver [EMAIL PROTECTED] wrote: Incorrect. This is a bug and the @select does work in Cocoon 2.1.x. I have a fix on my local drive but I haven't submitted it yet. Will do so very soon. -Andy Per Kreipke wrote: Apurva, to make the long story short: the output has the whole xml file after the section of the xml file i want to include. i.e cinclude:include src=../../commons/contents/ATTRIBUTES.xml select=data/AGE/* / outputs: ?xml version=1.0 encoding=UTF-8? age data age !-- this is what i want -- data !-- this is what i DONT want -- dt text dt age data age /data Am i doin something wrong or is it a bug?? Not a bug. CInclude does not support selecting just a portion of your XML model (and neither does XInclude). E.g. your @select above does nothing. To do what you want to do, just add a XSLT tranformer _after_ your CInclude, then in that XSLT logic either: - match the elements you want with identity templates, - or, create a generic identity template and use empty matchers for the elements you _don't_ want. XSLT makes a clean, generic filtering language. Note: Cocoon's FilterTransformer does something similar but in a very restricted way (it basically only is used for paging through data models). Per - 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] __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com - 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] __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com - 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]
CInclude bug???
I am trying to use XPointer like functionality with CInclude. I have a statement like ** cinclude:include src=../../commons/contents/ATTRIBUTES.xml select=data/AGE/* / ** in an xml file. This is the attribute file: ** ?xml version=1.0 ? data xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002; typeOwnership xf:selectOne ref=/typeOwnership xf:captionOwnership Type/xf:caption xf:item xf:caption/xf:caption xf:value/xf:value /xf:item xf:item xf:captionCo-operative Society/xf:caption xf:valueCo-operative Society/xf:value /xf:item xf:item xf:captionHome Owners Association/xf:caption xf:valueHome Owners Association/xf:value /xf:item xf:item xf:captionFreeHold/xf:caption xf:valueFreeHold/xf:value /xf:item xf:item xf:captionLeaseHold/xf:caption xf:valueLeaseHold/xf:value /xf:item /xf:selectOne /typeOwnership AGE xf:item xf:captionLeaseHold/xf:caption xf:valueLeaseHold/xf:value /xf:item /AGE /data ** But the output i get is ** ?xml version=1.0 encoding=UTF-8? data xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002; xmlns:xi=http://www.w3.org/2001/XInclude; xmlns:cinclude=http://apache.org/cocoon/include/1.0; some xf:item xf:captionLeaseHold/xf:caption xf:valueLeaseHold/xf:value /xf:item data typeOwnership xf:selectOne ref=/typeOwnership xf:captionOwnership Type/xf:caption xf:item xf:caption/ xf:value/ /xf:item xf:item xf:captionCo-operative Society/xf:caption xf:valueCo-operative Society/xf:value /xf:item xf:item xf:captionHome Owners Association/xf:caption xf:valueHome Owners Association/xf:value /xf:item xf:item xf:captionFreeHold/xf:caption xf:valueFreeHold/xf:value /xf:item xf:item xf:captionLeaseHold/xf:caption xf:valueLeaseHold/xf:value /xf:item /xf:selectOne /typeOwnership AGE xf:item xf:captionLeaseHold/xf:caption xf:valueLeaseHold/xf:value /xf:item /AGE /data !-- cinclude:include src=cocoon://commons/contents/ATTRIBUTES.xml select=data/*/-- !-- xi:include href=../../commons/contents/ATTRIBUTES.xml#xpointer(data/typeOwnership)/ -- here /some done !--cinclude:include src=cocoon:/pins.xml select=data/PIN/* / -- !--cinclude:include src=cocoon://commons/contents/ATTRIBUTES.xml select=data/AGE/* / -- !--xi:include href=/sell/search/pins.xml#xpointer(/data/PIN/*) xml:base=cocoon:/ -- /done /data ** So the output has what i want that is xf:item xf:captionLeaseHold/xf:caption xf:valueLeaseHold/xf:value /xf:item but after that it also include the whole attributes.xml file? is this a bug?? -Apurva __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com - 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: CInclude bug???
to make the long story short: the output has the whole xml file after the section of the xml file i want to include. i.e cinclude:include src=../../commons/contents/ATTRIBUTES.xml select=data/AGE/* / outputs: ?xml version=1.0 encoding=UTF-8? age data age !-- this is what i want -- data !-- this is what i DONT want -- dt text dt age data age /data Am i doin something wrong or is it a bug?? -Apurva __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com - 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]
Generator implements threadsafe???
does it makes sense implementing ThreadSafe to a custom generator ??? for example like this: public class MyGenerator extends CompeserGenerator implements ThreadSafe { } __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com - 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]
filter transformer with paginator??
Does it makes senese or is it even possible to use filter transformer with the paginator??? Would it improve performance? -Apurva __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com - 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 a jbean of an XMLFORM from a custom generator?
Great it works. Thanx Ivelin. I did something like this. Form myFormInstance = Form.lookup( objectModel, form-feedback1 ); UserBean1 jBean = (UserBean1) myFormInstance.getModel(); String sql_query_where_clause = where pro_city = ' + jBean.getCity() + '; I should have realized that same is also done in WizardAction. But now I have two concerns: 1) Both the XMLFORM and the custom generator works independently (each has its own pipeline). I need to have the XMLFORM pipeline : ** map:match pattern=wizard* 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-feedback1/ map:parameter name=xmlform-scope value=session/ map:parameter name=xmlform-model value=rertn_frontapp.UserBean1/ !-- Content transformation logic -- map:generate src=wizard/{page}.xml/ 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 ** and the custom generator pipeline : ** map:match pattern=PropForSale(*) map:generate type=PropForSale/ map:select type=browser !-- you could insert parameters here as well -- map:when test=explorer map:transform type=paginate src=../pagesheets/PropForSale_P.pagesheet map:parameter name=page value={1}/ /map:transform map:transform src=../stylesheets/html_test1.xsl/ map:serialize type=html / /map:when /map:select /map:match ** somehow mearged or something. Currently I fill up the form and when I am on the confirm.xml page I open a new window in browser such that it is same session and run the custom generator. The end results of the generator are as needed form input dependent(so it is good). But still it has to be in one pipeline like instead of end.xml the custom generator should be called. I also understand that I would have to call Form.remove( getObjectModel(), getFormId() ); in my generator instead of the wizardAction. Right?? 2) How would changing the xmlform-scope value from session to request have an effect over here?? Thanks you once again. -Apurva Zaveri --- Ivelin Ivanov [EMAIL PROTECTED] wrote: Form myFormInstance = Form.lookup( myformId, objectModel) - Original Message - From: apurva zaveri [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 01, 2002 11:44 AM Subject: How to use a jbean of an XMLFORM from a custom generator? Hello all, I have been succesfuly able to run the xmlform on cocoon 2.1. It is great. I want to know how to make use of the bean's get methods to access its values form a custom generator that extends ServletGenerator. I want to configure the sitemap such that both are in the same pipeline. like the user access the xmlform , the value from the bean are used by the generator (generating XML) and displayed (using xslt transformation) in the same pipeline as an output. I am not sure what I have to do for that. Please help. -Apurva Zaveri. __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com - 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] __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com - 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
How to use a jbean of an XMLFORM from a custom generator?
Hello all, I have been succesfuly able to run the xmlform on cocoon 2.1. It is great. I want to know how to make use of the bean's get methods to access its values form a custom generator that extends ServletGenerator. I want to configure the sitemap such that both are in the same pipeline. like the user access the xmlform , the value from the bean are used by the generator (generating XML) and displayed (using xslt transformation) in the same pipeline as an output. I am not sure what I have to do for that. Please help. -Apurva Zaveri. __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com - 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]
xmlform-custom generator
sub : Using XMLFORM's jbean get methods from a custom generator Hello all, May be I was not clear enough last time. I was able to succesfuly run the xmlform on cocoon 2.1. Refereing to the how-to-example, I understand that by the time the user reaches the confirm page all the values are already in the jbean. I want to know how to call the bean's get methods form a custom generator that extends ServletGenerator. I want to have the custom generator generate the results depending upon how the form is filled in by the user. I want to configure the sitemap such that both (xmlform and the custom generator) are in the same pipeline. For example, the user access the xmlform , the value from the bean are used by the generator (generating XML) and displayed (using xslt transformation) in the same pipeline as an output. I am not sure what I have to do for that. Please help. __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com - 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]