Is FileGenerator doing URL encoding?
Hello !! I'm using cocoon 2.0.4 to develop a prototype of a small webapp which has Tamino XML Server as data repository. Tamino allows me to pass a HTTP xquery (using x-machine) to the database.. like this http://databasehost/tamino/databasename/col?_xquery=input()/* So .. with cocoon i'm doing a pipeline which passes a xquery to tamino ... like this .. http://localhost:8080/cocoon/db_xquery=col/input()/* and the pipeline is .. map:match pattern=db_*=*/** map:generate src=http://databasehost/tamino/databasename/{2}?_{1}={3}/ map:transform src=stylesheets/tamino-result.xslt/ map:serialize type=xml/ /map:match So until now everything is fine ... BUT imagine i want a query like this .. http://localhost:8080/cocoon/db_xquery=col/input()/root[@id = 'something'] (NOTICE THE WHITESPACE between @id and = and 'something' ... i don´t really need the whitespace but imagine i DO need it ..) Cocoon does not encode the URL on the FileGenerator ... so it passes an not-encoded URL String to tamino, which tamino refuses because it isn't encoded (it has whitespaces and not %20's) Or is the problem with the Matcher not encoding the parameter ?? Is this reported somehere ? Any help please ? Thanks ! [--] Rui Pedro Leal [--] [EMAIL PROTECTED] [--] [EMAIL PROTECTED] [--] ICQ: 318173 - 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 and Tamino ??
Hello ! I'm considering using Tamino XML Database on a project. and i've been evaluating XMLStarterKit I know i have a couple of possibilities when trying to execute a query: - a pipeline with a generator pointing to a tamino URL, which returns a XML result, on which i can apply a stylesheet and clean it ! - use a tamino generator i've found in the mailing list archives (by Mitch christensen, thanks .. might by useful !) My question is .. Is there any logicsheet or taglib which integrates Tamino with XSP ? .. I started to make one, but i don´t like to re-invent the wheel, if you know what i mean! :) I don´t want to waste time in XML:DB right now, because tamino XML:DB plugin isn´t fully compliant yet ! Any suggestions anyone ? Thank in advance !! [--] Rui Pedro Leal [--] [EMAIL PROTECTED] [--] [EMAIL PROTECTED] [--] ICQ: 318173 - 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]
Concept problem using modular actions ..
Hi ALL! I've been working and testing cocoon for about 3 weeks ... after some simple examples i started some more complex stuff .. Right now i´m trying to understand the proper way to work with modular actions .. so imagine this ... One table, SIGLAS, is the main information table, it consists of 5 columns ID, SIGLA, DOM_REF, DESC_REF, QUEM_REF. There are also 3 tables, SIGLAS_DOMINIOS, SIGLAS_DESCRICOES, SIGLAS_QUEM, with the following columns ID, NAME. The columns DOM_REF, DESC_REF, QUEM_REF hold a foreign key to the 3 tables mentioned before (to the column ID of course). So my descriptor file is something like .. sigla connectionpersonnel/connection table name=SIGLAS_DOMINIOS keys key name=ID type=int autoincrement=true mode name=auto type=autoincr/ /key /keys values value name=NOME type=string/ /values /table table name=SIGLAS_DESCRICOES keys key name=ID type=int autoincrement=true mode name=auto type=autoincr/ /key /keys values value name=DESCRICAO type=string/ /values /table table name=SIGLAS_QUEM keys key name=ID type=int autoincrement=true mode name=auto type=autoincr/ /key /keys values value name=NOME type=string/ /values /table table name=SIGLAS keys key name=ID type=int autoincrement=true mode name=auto type=autoincr/ /key /keys values value name=NOME type=string/ value name=DOM_REF type=int mode name=request parameter=SIGLAS_DOMINIOS.ID type=request/ mode name=attribute parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_D OMINIOS.ID[0] type=attrib/ /value value name=DESC_REF type=int mode name=request parameter=SIGLAS_DESCRICOES.ID type=request/ mode name=attribute parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_D ESCRICOES.ID[0] type=attrib/ /value value name=QUEM_REF type=int mode name=request parameter=SIGLAS_QUEM.ID type=request/ mode name=attribute parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_Q UEM.ID[0] type=attrib/ /value /values /table table-set name=all-dominios table name=SIGLAS_DOMINIOS/ /table-set table-set name=all-descricoes table name=SIGLAS_DESCRICOES/ /table-set table-set name=all-quem table name=SIGLAS_QUEM/ /table-set table-set name=add-siglas table name=SIGLAS others-mode=attrib/ /table-set And my problem is something like this .. i've got a ADD_PAGE in which you can add stuff on the main table, but you can also add of refer stuff from the other tables (through a SELECT field) SIGLAS_DOMINIOS, SIGLAS_DESCRICOES, SIGLAS_QUEM. I've got only one action on the page and my execution should be something like this .. - if its a new SIGLAS_DOMINIO value then add it .. - if its a new SIGLAS_DESCRICOES value then add it .. - if its a new SIGLAS_QUEM value then add it .. - at last add to the SIGLAS table considering the new or existing ID's from the other tables. Ok, so i'm trying to do it all in a action set .. like this .. (Only a part of sitemap ) --- sitemap --- map:action-sets map:action-set name=addSigla map:act type=req-params map:parameter name=parameters value=add-sigla SIGLAS_DOMINIOS.NOME/ map:act type=siglaAdd map:parameter name=table-set value=all-dominios/ /map:act /map:act map:act type=req-params map:parameter name=parameters value=add-sigla SIGLAS_DESCRICOES.DESCRICAO/ map:act type=siglaAdd map:parameter name=table-set value=all-descricoes/ /map:act /map:act map:act type=req-params map:parameter name=parameters value=add-sigla SIGLAS_QUEM.NOME/ map:act type=siglaAdd map:parameter name=table-set value=all-quem/ /map:act /map:act map:act type=siglaAdd map:parameter name=table-set value=add-siglas/ /map:act /map:action-set /map:action-sets map:pipelines map:pipeline map:match pattern=processa-siglas map:act set=addSigla map:generate src=documents/list-siglas.xsp type=serverpages/ map:transform src=stylesheets/simple.xsl/ map:serialize/ /map:act /map:match --- sitemap --- So my BIG problem is how to do this? Must i declare a table-set for each operation combination ? (like DOM as foreign key but DESC has not, and so on ..) If i use a mode like attrib, i'm using it for all the foreign keys .. i want to get the ID by a request attribute only on from the tables i inserted before. The ones i selected (not added) are just on the request parameter ! How can i do this in ONE request ? Is there any ConvertAllRequestParametersToRequestAttributes action ? I've come to the conclusion it is faster to write some logic on a couple of XSP's than to use the actions this way. Thanks in advance to any help ! (Hit me if i'm saying something really stupid :) .. and sorry about the typos .. ) [--] Rui Pedro Leal [--] [EMAIL PROTECTED] [--] [EMAIL PROTECTED] [--] ICQ: 318173 - Please check that your
Re: Concept problem using modular actions ..
First of all .. thanks for the help ! I've been a complete cocoon fan for 3 weeks now .. I've converted most of my team to it ! :) There has been a problem using nested actions in an action-set in 2.1 and most likely treeprocessor in 2.0.x. .. Ok .. i´ve been using 2.0.3 .. it seems the stable one ! :) .. Btw is there some list of 2.0.3 bugs or problems ? Must i declare a table-set for each operation combination ? (like DOM as foreign key but DESC has not, and so on ..) This or a cocoon-action-* parameter for every combination. Personally, I'd prefer not to use an action-set but code the selection logic myself. .. you mean declaring it on the pipeline and not on a action-set ? You sure want to do form-validation (XMLForms or other), don't you. That or the RequestParameterExistsAction would come in handy here. I see that you already use the latter. Yes .. that was the plan ! :) If i use a mode like attrib, i'm using it for all the foreign keys .. i You don't have to. You can change the mode-name for every attribute and every mode-type. The mode-type can be specified through the table-set. In addition there's the all mode-type that would be used regardless of the requested mode-type (if the requested type wasn't found before). Ok, i got this, but my problem comes from the fact i've got 3 foreign keys that sometimes get their value from a request parameter and sometimes from a request attribute (from the add action on table which is referenced) .. Can i specify something like this ? .. the mode name and mode type of the request attribute is diferent on each foreign key .. table name=SIGLAS keys ... /key /keys values value name=NOME type=string/ value name=DOM_REF type=int mode name=attribute-dom parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_D OMINIOS.ID[0] type=attrib-dom/ mode name=request parameter=SIGLAS_DOMINIOS.ID type=all/ /value value name=DESC_REF type=int mode name=attribute-desc parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_D ESCRICOES.ID[0] type=attrib-desc/ mode name=request parameter=SIGLAS_DESCRICOES.ID type=all/ /value value name=QUEM_REF type=int mode name=attribute-quem parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_Q UEM.ID[0] type=attrib-quem/ mode name=request parameter=SIGLAS_QUEM.ID type=all/ /value /values /table So .. how do i use this ? In a table-set like this ? table-set name=all-siglas table name=SIGLAS others-mode=MODE NAME HERE ? /table /table But in this solution i can only use the mode i specify on others-mode ! .. I need diferent values .. one for each foreign key! Can something like this work ? table-set name=all-siglas table name=SIGLAS mode name=something type=something/ ... /table /table want to get the ID by a request attribute only on from the tables i inserted before. The ones i selected (not added) are just on the request parameter ! CVS 2.1 has a ChainMetaModule that allows to specify a preference list of InputModules. The first one returning a value != null is used. I'm currently working on something in that area. Once that is finished, 2.0.4-CVS will get updated. In the mean time, it should be safe to copy it together with the AbstractMetaModule from 2.1 to 2.0.4, rebuild, and add it to cocoon.xconf if you need it fast. YES! .. my main problem is the != null ... specifying a foreign key from a request attribute returns null if the attribute doesn´t exists. I will check this ChainMetaModule .. Btw can you recommed a cocoon CVS version stable to run on a production server ? Is there any ConvertAllRequestParametersToRequestAttributes action ? I believe so. If not, it's no big deal writing it yourself. The ChainMetaModule from 2.1 is another solution. Ok .. if everything else fails, i will convert all the request parameter to attributes ! I've come to the conclusion it is faster to write some logic on a couple of XSP's than to use the actions this way. If you don't mind to mix concerns, that is. The problem with your scenario is that you want everything to happen in one invocation of the actions. Yes .. in fact i'm using an real application as an example .. I have some FORMS that need to perform a lot of operations on diferent tables. It's not well-formed from a design point of view but it helps the user-interaction. Thanks again for the help .. [--] Rui Pedro Leal [--] [EMAIL PROTECTED] [--] [EMAIL PROTECTED] [--] ICQ: 318173 - 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 in XSL and Caching problem!
- Original Message - From: Tuomo Lesonen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 10, 2002 3:52 PM Subject: XSP in XSL and Caching problem! I'm using 2.1-DEV, and one file in my application is a XSL page which generates XSP for the serverpagesGenerator. The problem here is, that no changes are committed to the browser result! Only removing the work-dir and restarting tomcat helps. And after one reload of that page it's still the same. I've changed all the pipelines to noncaching, and everything is set to false that seems like a caching instruction. I've tryed IE6, and NN7, no difference. Help, please! -Tuomo Hello ! I´m having the same problem here ... My setup is Tomcat 4.1.12 Cocoon 2.0.3 JDK 1.4.0 I've been extending some examples like the bonebreaker site (http://www.cocooncenter.de/cc/documents/resources/navigation/index.html) just to avaliate Cocoon for some internal company work, and i must say the reload/refresh problem is screwing my devel process. (in this particular case, if some info on toc.xml is modified, tomcat work dir must be cleaned and the server restarted). Might this be a tomcat-cocoon right/wrong version problem ? Any help? :) Thanks in advance... [--] Rui Pedro Leal [--] [EMAIL PROTECTED] [--] [EMAIL PROTECTED] [--] ICQ: 318173 - 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]