I18n
Hi all, I'm trying to figure out how to build an internationalised web site.I've read the documentation on Cocoon I18n and looked at the samples. I understand how its dictionary approach works for lables, messages and instructional copy, however I don't understand how I would use it if I have business entities. For example, let's say I want to model a person with the following XML: person dateOfBirthSome date/dateOfBirth passportNumber12345678/passportNumber name lang=enEnglish Name/name name lang=frFrench Name/name ... /person Keeping names in a dictionary separate of the record's context seems a bit awkward, plus some attributes, like DOB and passportNumber are not translatable. Any ideas? Thanks, -Alex __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free 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: I18n
Hi Konstantin, Thanks for your help -- it makes sense. On that note, do you happen to have any good patterns for modeling I18nised data in both database and XML? I understand, why you'd want to keep it in the DB, but I would also like to exchange my data with other applicatons via the XML. Thanks, -Alex __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free 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: == I18N question ==
Konstantin, Thanks for the link to the forest-dev thread. I've been going back and forth around the 1 vs. many files issue for a while now. I'm migrating my website from JSP to Cocoon and looking for a better approach to what I have at the moment. My website does not use a database -- it's a pretty simple site and I'm trying to keep it XML only. Because of this I have a number of business entities stored as XML records. For example: person id=1 sex=male dateOfBirth1923-08-09/dateOfBirth firstNameAlex/firstName lastNameRomayev/lastName ... /person. Currently I have a file per language, e.g., people_en.xml, people_ru.xml, etc. This causes data duplication (id, sex, dateOfBirth, etc) and synchronisation issues when non-translatable data changes -- basically the people in different files effectively become different entities and you have to work hard at keeping them the same. The option of referencing the translatable elements from the translation files seems really awkward you still have your business entity scatted across several files and it doesn't sound like translation of elements outside context is a very intuitive task. I'm leaning toward the third option, which is what Sylvain was suggesting, i.e: person id=1 sex=male dateOfBirth1923-08-09/dateOfBirth firstName lang=enAlex/firstName lastName lang=enRomayev/lastName firstName lang=frFrench Alex/firstName lastName lang=frFrench Romayev/lastName ... /person. However, it seems that it is not being favoured much by the community. Is there some other option that I'm missing? Also, you've mentioned that you had a different version of I18nTransformer -- would it be able to filter out language specific attributes? Thanks, -Alex __ 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]
RE: == I18N question ==
That's excellent! How would I get a copy of that? From: Alex Romayev [mailto:[EMAIL PROTECTED]] Konstantin, Thanks for the link to the forest-dev thread. I've been going back and forth around the 1 vs. many files issue for a while now. I'm migrating my website from JSP to Cocoon and looking for a better approach to what I have at the moment. My website does not use a database -- it's a pretty simple site and I'm trying to keep it XML only. Because of this I have a number of business entities stored as XML records. For example: person id=1 sex=male dateOfBirth1923-08-09/dateOfBirth firstNameAlex/firstName lastNameRomayev/lastName ... /person. Currently I have a file per language, e.g., people_en.xml, people_ru.xml, etc. This causes data duplication (id, sex, dateOfBirth, etc) and synchronisation issues when non-translatable data changes -- basically the people in different files effectively become different entities and you have to work hard at keeping them the same. Yup. The option of referencing the translatable elements from the translation files seems really awkward you still have your business entity scatted across several files and it doesn't sound like translation of elements outside context is a very intuitive task. Yup. I'm leaning toward the third option, which is what Sylvain was suggesting, i.e: person id=1 sex=male dateOfBirth1923-08-09/dateOfBirth firstName lang=enAlex/firstName lastName lang=enRomayev/lastName firstName lang=frFrench Alex/firstName lastName lang=frFrench Romayev/lastName ... /person. To be exact, he were suggesting: ... firstName xml:lang=enAlex/firstName lastName xml:lang=enRomayev/lastName ... However, it seems that it is not being favoured much by the community. Is there some other option that I'm missing? Also, you've mentioned that you had a different version of I18nTransformer -- would it be able to filter out language specific attributes? Yes, the new version have inline translation capabilities, e.g.: i18n:when locale=enOne/i18n:when i18n:when locale=ruoDIN/i18n:when etc. It already works and probably this week I'll perform some cleanup and will commit it (I need to synchronize it with the current CVS, cause my working version is rather old). Konstantin Thanks, -Alex __ 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]
Better way to aggregate?
I've been looking into the aggregation techniques and there seems to be two ways people go about doing it. I'm trying to understand the pros/cons of the two approaches. Approach 1: Aggregate HTML Each map:part calls a pipeline, which generates, transforms and serializes to HTML, e.g., map:generate src=header.xml/ map:transform src=header2html.xsl/ map:serialize/ Approach 2: Aggregate XML Each map:part calls a pipeline, which generates and serializes to XML, e.g., map:generate src=header.xml/ map:serialize type=xml/ Any ideas? Cheers, -Alex __ 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]
Re: Leftover tags from I18n
--- Joerg Heinicke [EMAIL PROTECTED] wrote: Alex Romayev wrote: exclude-result-prefixes in the same file as declares the prefix worked. A little explanation: Namespace prefix and namespace uri are two different things. You can declare xmlns:bla=http://apache.org/cocoon/i18n/2.0; and the i18n transformer should work nevertheless (I didn't tested it ;-) ). Furthermore you can mix the prefixes or add more prefixes with the same uri. If you tell the XSLT in one stylesheet to remove the namespace i18n prefix without telling it which namespace uri to remove (so without a bound namespace uri), it does not know what to do. Conclusion: If you bind the namespace http://apache.org/cocoon/i18n/2.0; to the namespace prefix i18n in the last stylesheet in pipe (even if you don't need it) a exclude-result-prefix should work too. I've tried that -- still doesn't work, only works as per your original suggestion, which was using the exclude in each stylesheet that outputs namespaced elements. So you would only need it in one stylesheet. You only may not copy elements or attributes with namespaces to the output - namespaces are copied independent of exclude-result-prefix. Regards, Joerg -- System Development VIRBUS AG Fon +49(0)341-979-7419 Fax +49(0)341-979-7409 [EMAIL PROTECTED] www.virbus.de - 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]
Encoding problem
Hello, I'm having what seems to be an encoding problem -- not sure it's related to Cocoon, but... ;) xsl:for-each select=//city-name a href=city-detail?city-name={.}xsl:value-of select=.//abr/ /xsl:for-each All my xml is UTF-8, it work in English, but not in Russian. Any ideas? Thanks, -Alex - 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: Pgination - Total # of pages
I've seen this happen when the last page has the maximum number of allowed records per page, but I haven't had a chance to confirm to report this as a bug. --- Richard [EMAIL PROTECTED] wrote: Hi Guys, Have anybody encountered this... The total attribute under the page:page element is giving me a wrong value. Its giving me 4 instead of 3. see xml... ?xml version=1.0 encoding=UTF-8 ? - document xmlns:xsp=http://apache.org/xsp; xmlns:xspdoc=http://apache.org/cocoon/XSPDoc/v1; xmlns:esql=http://apache.org/cocoon/SQL/v2; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:page=http://apache.org/cocoon/paginate/1.0; - header titleVoxsant's Employee Maintenance - Search Results/title /header - body - employeeresults - record id003/id firstnameGlenn/firstname lastnameDanzig/lastname /record - record id004/id firstnameTed/firstname lastnameNasmith/lastname /record /employeeresults /body - page:page current=1 total=4 current-uri=/cocoon/richard_webapps/results-employees(1).html clean-uri=/cocoon/richard_webapps/results-employees.html page:link type=next uri=/cocoon/richard_webapps/results-employees(2).html page=2 / /page:page /document 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]
Pagination: number of records
Hello, I'm using Paginator transformer and would like to be able to display something like: Viewing records 21-30 out of 53. Is it possible to get this information from the transformer - would that be an enhancement or am I just missing a way of doing this? Thanks, -alex - 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: Encoding problem
Let me be more specific and also simplify the example: Works: xsl:param name=city select='Delhi'/ ... a href=city-detail=$cityxsl:value-of select=$city//a After transformation I get: a href=city-detail=DelhiDelhi/a Does not work: xsl:param name=city select='Äåëè'/ ... a href=city-detail=$cityxsl:value-of select=$city//a After transformation I get: a href=city-detail=%D0%94%D0%B5%D0%BB%D0%B8Äåëè/a --- Alex Romayev [EMAIL PROTECTED] wrote: Hello, I'm having what seems to be an encoding problem -- not sure it's related to Cocoon, but... ;) xsl:for-each select=//city-name a href=city-detail?city-name={.}xsl:value-of select=.//abr/ /xsl:for-each All my xml is UTF-8, it work in English, but not in Russian. Any ideas? Thanks, -Alex - 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: Encoding problem
--- Barbara Post [EMAIL PROTECTED] wrote: maybe : a href=city-detail={$city}xsl:value-of select=$city//a Sorry, just a typo in my e-mail, I did actually use {$city}. try to use Russian-compatible output encoding rather than utf-8 ? The site is multi-lingual, so I have to use utf-8 - Original Message - From: Alex Romayev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 18, 2002 12:53 PM Subject: Re: Encoding problem Let me be more specific and also simplify the example: Works: xsl:param name=city select='Delhi'/ ... a href=city-detail=$cityxsl:value-of select=$city//a After transformation I get: a href=city-detail=DelhiDelhi/a Does not work: xsl:param name=city select='Äåëè'/ ... a href=city-detail=$cityxsl:value-of select=$city//a After transformation I get: a href=city-detail=%D0%94%D0%B5%D0%BB%D0%B8Äåëè/a --- Alex Romayev [EMAIL PROTECTED] wrote: Hello, I'm having what seems to be an encoding problem -- not sure it's related to Cocoon, but... ;) xsl:for-each select=//city-name a href=city-detail?city-name={.}xsl:value-of select=.//abr/ /xsl:for-each All my xml is UTF-8, it work in English, but not in Russian. Any ideas? Thanks, -Alex - 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] - 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: Encoding problem
--- Vadim Gritsenko [EMAIL PROTECTED] wrote: Alex Romayev wrote: Let me be more specific and also simplify the example: ... Does not work: xsl:param name=city select='Äåëè'/ Are these funny characters above in UTF-8? Does your XSL has encoding=UTF-8 on the top? Yes. Also, note that this only happens to the href attribute, the value of the a element comes out correctly. ... a href=city-detail=$cityxsl:value-of select=$city//a After transformation I get: a href=city-detail=%D0%94%D0%B5%D0%BB%D0%B8Äåëè/a What's serializer configuration? Does it have proper encoding set? I'm using the default, i.e., I haven't changed anything since installation. Vadim --- Alex Romayev [EMAIL PROTECTED] wrote: Hello, I'm having what seems to be an encoding problem -- not sure it's related to Cocoon, but... ;) xsl:for-each select=//city-name a href=city-detail?city-name={.}xsl:value-of select=.//abr/ /xsl:for-each All my xml is UTF-8, it work in English, but not in Russian. Any ideas? Thanks, -Alex - 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: Encoding problem
--- Vadim Gritsenko [EMAIL PROTECTED] wrote: Alex Romayev wrote: --- Vadim Gritsenko [EMAIL PROTECTED] wrote: Alex Romayev wrote: Let me be more specific and also simplify the example: ... Does not work: xsl:param name=city select='Äåëè'/ Are these funny characters above in UTF-8? Does your XSL has encoding=UTF-8 on the top? Yes. Also, note that this only happens to the href attribute, the value of the a element comes out correctly. Then what do you want? It works correctly. See http://www.w3.org/Addressing/rfc1738.txt Vadim Good point, I may have a problem in another stylesheet (part of the pipeline that responds to the url in question): This parameter is set by the href: xsl:param name=city/ This should match and does it correctly when 'Delhi' is passed, but does not match when I pass 'Äåëè': xsl:apply-templates select=//city[name=$city]/ -Alex ... a href=city-detail?city=$cityxsl:value-of select=$city//a After transformation I get: a href=city-detail?city=%D0%94%D0%B5%D0%BB%D0%B8Äåëè/a What's serializer configuration? Does it have proper encoding set? I'm using the default, i.e., I haven't changed anything since installation. Vadim --- Alex Romayev [EMAIL PROTECTED] wrote: Hello, I'm having what seems to be an encoding problem -- not sure it's related to Cocoon, but... ;) xsl:for-each select=//city-name a href=city-detail?city-name={.}xsl:value-of select=.//abr/ /xsl:for-each All my xml is UTF-8, it work in English, but not in Russian. Any ideas? Thanks, -Alex - 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: Encoding problem
--- Vadim Gritsenko [EMAIL PROTECTED] wrote: Alex Romayev wrote: --- Vadim Gritsenko [EMAIL PROTECTED] wrote: Alex Romayev wrote: --- Vadim Gritsenko [EMAIL PROTECTED] wrote: ... Good point, I may have a problem in another stylesheet (part of the pipeline that responds to the url in question): This parameter is set by the href: xsl:param name=city/ This should match and does it correctly when 'Delhi' is passed, but does not match when I pass 'Äåëè': xsl:apply-templates select=//city[name=$city]/ Check what encoding is used to decode URL. It should be container encoding, but you need UTF-8. I'm using tomcat4.0.4, do you know how to change it of the top of your head? I've not played with encoding of the URL itself, but about request parameters see below... PS In any case, non US-ASCII symbols in URL is not a good idea. What would be an alternative? Basically, I need to search agains an XML file, which has city as one of the elements, and return all records related to the sity. On the page, there is a list of 'favourite city' links. Also, I'm about to try recording information using Cocoon, so I haven't tried to use forms yet, but wouldn't I run into the same problem? Ok, UTF symbols should be fine in the forms (GET or POST) if you to: (1) Serialize HTML form as UTF-8 (or any other encoding), and (2) set request encoding: request.setEncoding(UTF-8) (or any other encoding, same as in (1)) *before* any access to the request parameters. This can be done from an action. Thanks, I'll try that. After that, request.getParameter() should work Ok, and if you to get request parameter in the sitemap and pass it to the XSLT, it also should work ok. BTW, this was already answered today. Sorry, I should have caught it;) Thanks for your help... Vadim Vadim -Alex ... - 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]
Source Writing Transformer: Adding namespaces
Hi, I'm using Source Writing Transformer to write XML to file. I need to add namespace declarations to the root node, does anyone know how to do this? Thanks, -Alex - 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: Source Writing Transformer: Adding namespaces
Not sure how I would do that, here is an example: What I would like to get is: news xmlns:pub=http://www.romayev.com/publication/1.0; item id=N100AE pub:publication pub:published-date2001-11-06/pub:published-date ... /pub:publication /item /news Here is the code I use for SourceWritingTransformer: source:write src=content/news.xml news xmlns:pub=http://www.romayev.com/publication/1.0; item id=N100AE pub:publication pub:published-date2001-11-06/pub:published-date ... /pub:publication /item /news /source:write --- funing [EMAIL PROTECTED] wrote: Can you use the insert tag? On Thu, 26 Sep 2002 02:17:56 -0700 (PDT) Alex Romayev [EMAIL PROTECTED] wrote: Hi, I'm using Source Writing Transformer to write XML to file. I need to add namespace declarations to the root node, does anyone know how to do this? Thanks, -Alex -- funing [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: global form-encoding setting
Try: map:action name=set-character-encoding src=org.apache.cocoon.acting.SetCharacterEncodingAction/ and map:act type=set-character-encoding map:parameter name=form-encoding value=KOI8-R/ /map:act --- yuryx [EMAIL PROTECTED] wrote: Hi folks! Is there a way to change default setting for form-encoding parameter? Now I have to use param1=xsp-request:parameter name=test form-encoding=KOI8-R/ for each parameter. Is there a way to set it somewhere in sitemap.xmap or in another place? -- Best regards, Yury. -- 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] - 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: Source Writing Transformer: Adding namespaces
I'm still struggling with this problem. Let me try to state it more clearly: I would like to write XML to a file. My XML contain namespaces. I declare the namespaces in the root element, just the way I would like it to be in the file and surround my XML with source:write tag. However, SourceWritingTransformer seems to be dropping the namespace declarations and writing everything else! Is this is a bug within the transformer or is there another way of getting the namespace declarations written out? I would appreciate any help. -Alex --- Alex Romayev [EMAIL PROTECTED] wrote: Not sure how I would do that, here is an example: What I would like to get is: news xmlns:pub=http://www.romayev.com/publication/1.0; item id=N100AE pub:publication pub:published-date2001-11-06/pub:published-date ... /pub:publication /item /news Here is the code I use for SourceWritingTransformer: source:write src=content/news.xml news xmlns:pub=http://www.romayev.com/publication/1.0; item id=N100AE pub:publication pub:published-date2001-11-06/pub:published-date ... /pub:publication /item /news /source:write --- funing [EMAIL PROTECTED] wrote: Can you use the insert tag? On Thu, 26 Sep 2002 02:17:56 -0700 (PDT) Alex Romayev [EMAIL PROTECTED] wrote: Hi, I'm using Source Writing Transformer to write XML to file. I need to add namespace declarations to the root node, does anyone know how to do this? Thanks, -Alex -- funing [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] - 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: Source Writing Transformer: Adding namespaces
--- Vadim Gritsenko [EMAIL PROTECTED] wrote: Alex Romayev wrote: I'm still struggling with this problem. Let me try to state it more clearly: I would like to write XML to a file. My XML contain namespaces. I declare the namespaces in the root element, just the way I would like it to be in the file and surround my XML with source:write tag. However, SourceWritingTransformer seems to be dropping the namespace declarations and writing everything else! Is this is a bug within the transformer or is there another way of getting the namespace declarations written out? Could be a bug. Try moving ns declaration into the root tag of the document you are writing, i.e. moving declaration inside the write tag. Vadim I have, still the same result... Any other ideas? Alex I would appreciate any help. -Alex --- Alex Romayev [EMAIL PROTECTED] wrote: Not sure how I would do that, here is an example: What I would like to get is: news xmlns:pub=http://www.romayev.com/publication/1.0; item id=N100AE pub:publication pub:published-date2001-11-06/pub:published-date ... /pub:publication /item /news Here is the code I use for SourceWritingTransformer: source:write src=content/news.xml news xmlns:pub=http://www.romayev.com/publication/1.0; item id=N100AE pub:publication pub:published-date2001-11-06/pub:published-date ... /pub:publication /item /news /source:write --- funing [EMAIL PROTECTED] wrote: Can you use the insert tag? On Thu, 26 Sep 2002 02:17:56 -0700 (PDT) Alex Romayev [EMAIL PROTECTED] wrote: Hi, I'm using Source Writing Transformer to write XML to file. I need to add namespace declarations to the root node, does anyone know how to do this? Thanks, -Alex -- funing [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]
SunShine-InsertTransformer: encoding problem
Hi, I'm trying my way around SunShine and running into 2 problems: 1) I have an existing XML file with UTF-8 encoding. I use InsertTransformer to add a new record. It does so correctly, but changes the file encoding to ISO-8859-1 and replaces all non-English text with #1057;s and alike. 2) I have namespace declarations at the root elemet of the file. After running it through the transformer, the namespace declarations disappear. Here is my sitemap: map:match pattern=admin/add-news map:act type=set-character-encoding map:parameter name=form-encoding value=UTF-8/ /map:act map:act type=sunShine-session/ map:generate src=resources/sunshine/admin/add-news-item.xml/ map:transform type=sunShine/ map:transform type=sunShineInsert/ map:serialize type=xml/ /map:match And add-news-item.xml: ?xml version=1.0 encoding=UTF-8? addnews xmlns:sunshine=http://cocoon.apache.org/sunshine/1.0; sunshine:insert sunshine:filecontent/news.xml/sunshine:file sunshine:path/news/sunshine:path sunshine:fragment item id=test titleHello1/title /item /sunshine:fragment sunshine:replaceitem[@id='test']/sunshine:replace /sunshine:insert /addnews Any ideas on what I'm doing wrong? Thanks, -Alex - 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: SunShine-InsertTransformer: encoding problem
Sorry the C is supposed to read as (I'm separating with spaces) # 1 0 5 7 ;, the browser displays it as a letter C. --- Alex Romayev [EMAIL PROTECTED] wrote: Hi, I'm trying my way around SunShine and running into 2 problems: 1) I have an existing XML file with UTF-8 encoding. I use InsertTransformer to add a new record. It does so correctly, but changes the file encoding to ISO-8859-1 and replaces all non-English text with Ñs and alike. 2) I have namespace declarations at the root elemet of the file. After running it through the transformer, the namespace declarations disappear. Here is my sitemap: map:match pattern=admin/add-news map:act type=set-character-encoding map:parameter name=form-encoding value=UTF-8/ /map:act map:act type=sunShine-session/ map:generate src=resources/sunshine/admin/add-news-item.xml/ map:transform type=sunShine/ map:transform type=sunShineInsert/ map:serialize type=xml/ /map:match And add-news-item.xml: ?xml version=1.0 encoding=UTF-8? addnews xmlns:sunshine=http://cocoon.apache.org/sunshine/1.0; sunshine:insert sunshine:filecontent/news.xml/sunshine:file sunshine:path/news/sunshine:path sunshine:fragment item id=test titleHello1/title /item /sunshine:fragment sunshine:replaceitem[@id='test']/sunshine:replace /sunshine:insert /addnews Any ideas on what I'm doing wrong? Thanks, -Alex - 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: SunShine-InsertTransformer: encoding problem
Sorry for the re-post, but there have been some mail problems on Friday when I posted it and I haven't heard from anyone since then. I'm still struggling with both problems, so any help would be greatly appreciated. Alex --- Alex Romayev [EMAIL PROTECTED] wrote: Sorry the C is supposed to read as (I'm separating with spaces) # 1 0 5 7 ;, the browser displays it as a letter C. --- Alex Romayev [EMAIL PROTECTED] wrote: Hi, I'm trying my way around SunShine and running into 2 problems: 1) I have an existing XML file with UTF-8 encoding. I use InsertTransformer to add a new record. It does so correctly, but changes the file encoding to ISO-8859-1 and replaces all non-English text with Ñs and alike. 2) I have namespace declarations at the root elemet of the file. After running it through the transformer, the namespace declarations disappear. Here is my sitemap: map:match pattern=admin/add-news map:act type=set-character-encoding map:parameter name=form-encoding value=UTF-8/ /map:act map:act type=sunShine-session/ map:generate src=resources/sunshine/admin/add-news-item.xml/ map:transform type=sunShine/ map:transform type=sunShineInsert/ map:serialize type=xml/ /map:match And add-news-item.xml: ?xml version=1.0 encoding=UTF-8? addnews xmlns:sunshine=http://cocoon.apache.org/sunshine/1.0; sunshine:insert sunshine:filecontent/news.xml/sunshine:file sunshine:path/news/sunshine:path sunshine:fragment item id=test titleHello1/title /item /sunshine:fragment sunshine:replaceitem[@id='test']/sunshine:replace /sunshine:insert /addnews Any ideas on what I'm doing wrong? Thanks, -Alex - 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: SunShine-InsertTransformer: encoding problem
--- Carsten Ziegeler [EMAIL PROTECTED] wrote: Alex Romayev wrote: Hi, I'm trying my way around SunShine and running into 2 problems: 1) I have an existing XML file with UTF-8 encoding. I use InsertTransformer to add a new record. It does so correctly, but changes the file encoding to ISO-8859-1 and replaces all non-English text with Qs and alike. This is currently hard coded into the transformer(!) which means you can't do anything against it... The InsertTransformer has been merged with the SourceWritingTransformer in 2.1-dev - the SourceWritingTransformer can be configured to what encoding should be used. I did a quick search for ISO-8859-1 in source files and nothing related to InsertTransformer came up. Is there a workaround you could suggest until 2.1 comes out? By the way, is there a rough timeline for this release? 2) I have namespace declarations at the root elemet of the file. After running it through the transformer, the namespace declarations disappear. ... And add-news-item.xml: ?xml version=1.0 encoding=UTF-8? addnews xmlns:sunshine=http://cocoon.apache.org/sunshine/1.0; sunshine:insert sunshine:filecontent/news.xml/sunshine:file sunshine:path/news/sunshine:path sunshine:fragment item id=test titleHello1/title /item /sunshine:fragment sunshine:replaceitem[@id='test']/sunshine:replace /sunshine:insert /addnews Any ideas on what I'm doing wrong? Which namespace information do you mean? The sunshine namespace in your add-news-item.xml or a namespace contained in your content/news.xml? The namespaces in content/news.xml. By the way, I've raised this problem with SourceWriting transformer as well and haven't seen it in the recent bug-list e-mail. I'm just thinking that if the two got merged, the problem might still be there. Similar question, would you suggest any workaround before 2.1 release comes out? Thanks for you help Carsten, -Alex Carsten - 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: SunShine-InsertTransformer: encoding problem
--- Carsten Ziegeler [EMAIL PROTECTED] wrote: Alex Romayev wrote: This is currently hard coded into the transformer(!) which means you can't do anything against it... The InsertTransformer has been merged with the SourceWritingTransformer in 2.1-dev - the SourceWritingTransformer can be configured to what encoding should be used. I did a quick search for ISO-8859-1 in source files and nothing related to InsertTransformer came up. Is there a workaround you could suggest until 2.1 comes out? By the way, is there a rough timeline for this release? It's not directly in the transformer. The transformer uses a component called ResourceConnector and this does the saving. The connector uses org.apache.cocoon.xml.XMLUtils.defaultSerializeToXMLFormat to serialize the XML and there you will find this setting. A rough time line for 2.1 is end of this year, I guess +/- 1 or 2 months... The namespaces in content/news.xml. By the way, I've raised this problem with SourceWriting transformer as well and haven't seen it in the recent bug-list e-mail. I'm just thinking that if the two got merged, the problem might still be there. Can you give a complete test case for this? (Sitemap snippet plus the two xml files) - If you can provide this I will try to find the bug as soon as I have time. Carsten Sure, here is the sitemap: map:match pattern=admin/add-news map:act type=sunShine-session/ map:generate src=resources/sunshine/admin/add-news-item.xml/ map:transform type=sunShine/ map:transform type=sunShineInsert/ map:serialize type=xml/ /map:match And I've attached the two files (slightly simplified). Cheers, -Alex - 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] ?xml version=1.0 encoding=UTF-8? addnews xmlns:sunshine=http://cocoon.apache.org/sunshine/1.0; xmlns:pub=http://www.romayev.com/publication/1.0; xmlns:i18n=http://apache.org/cocoon/i18n/2.0; sunshine:insert sunshine:filecontent/news.xml/sunshine:file sunshine:path/news/sunshine:path sunshine:fragment item id=test titleHello1/title pub:publication pub:publishedDate2002-12-01/pub:publishedDate /pub:publication /item /sunshine:fragment sunshine:replaceitem[@id='test']/sunshine:replace /sunshine:insert /addnews ?xml version=1.0 encoding=ISO-8859-1? news xmlns:pub=http://www.romayev.com/publication/1.0; item id=N100AE date2001-11-26/date title test /title description test description /description pub:publication pub:publishedDate2001-11-26/pub:publishedDate /pub:publication /item /news - 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]
i18n:when
Hello, Just wanted to follow through on the discussion from a couple of month back. There was a proposal that Konstantin was going to work on to implement i18:when tag as an alternative to using message files, so that you could have in the same file something like: page title i18:when locale='en'hello/i18n:when i18n:when locale='fr'bonjour/i18n:when /title /page Now here is my question (I'm making some assumptions here, so please correct me if I'm wrong): I18nTransformer is not cacheable, which generally is not a problem, since it is used as one of the last transformers in a pipeline, when most of the heavy-duty processing is already done. Now, this might not be true for i18n:when tag, which is most likely to be the first step in a pipeline and hence the rest of the pipleline is not going to get cached. Also note, that there is no reason why the result of i18n:when could not be cached. Is this concern valid or am I missing something? Cheers, -Alex - 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: SunShine-InsertTransformer: encoding
Hi Carsten, Thanks for the quick fix, do you mean SourceWritingTransformer or InsertTransformer? Cheers, -Alex -Original Message- From: Carsten Ziegeler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: SunShine-InsertTransformer: encoding problem Date: Fri, 11 Oct 2002 08:36:00 +0200 Hi Alex, I just checked in a fix for the namespace problem - now it works for me - could you please check - if everything is working for you, too. Thanks Carsten -Original Message- From: Alex Romayev [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 08, 2002 1:12 PM To: [EMAIL PROTECTED] Subject: RE: SunShine-InsertTransformer: encoding problem --- Carsten Ziegeler [EMAIL PROTECTED] wrote: Alex Romayev wrote: This is currently hard coded into the transformer(!) which means you can't do anything against it... The InsertTransformer has been merged with the SourceWritingTransformer in 2.1-dev - the SourceWritingTransformer can be configured to what encoding should be used. I did a quick search for ISO-8859-1 in source files and nothing related to InsertTransformer came up. Is there a workaround you could suggest until 2.1 comes out? By the way, is there a rough timeline for this release? It's not directly in the transformer. The transformer uses a component called ResourceConnector and this does the saving. The connector uses org.apache.cocoon.xml.XMLUtils.defaultSerializeToXMLFormat to serialize the XML and there you will find this setting. A rough time line for 2.1 is end of this year, I guess +/- 1 or 2 months... The namespaces in content/news.xml. By the way, I've raised this problem with SourceWriting transformer as well and haven't seen it in the recent bug-list e-mail. I'm just thinking that if the two got merged, the problem might still be there. Can you give a complete test case for this? (Sitemap snippet plus the two xml files) - If you can provide this I will try to find the bug as soon as I have time. Carsten Sure, here is the sitemap: map:match pattern=admin/add-news map:act type=sunShine-session/ map:generate src=resources/sunshine/admin/add-news-item.xml/ map:transform type=sunShine/ map:transform type=sunShineInsert/ map:serialize type=xml/ /map:match And I've attached the two files (slightly simplified). Cheers, -Alex - 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: SunShine-InsertTransformer: encoding
Hi Carsten, I've tested both encoding and namespaces and they worked fine. Thanks very much for the quick fixes. Now, a couple of problems: 1. The namespace declarations are generated at each individual element rather than the root node. Of course it still works, but add to the file size and makes it less readable. I know I'm being picky, but the size issue could become a factor for larger files. 2. This is a strange one. I have a transformer which I need to run on the files written by SourceWritingTransformer, which needs to parse a date element. This was working fine with the old SourceWritingTransformer (outside of the fact that I had to manually stick in the namespaces), but for some reason my date transformer is now choking on the produced files. My date formats are -MM-dd and it appears that it only reads a part of the string, e.g., 2001-11 and then choke. What fixes it sometimes is if I open the file in XMLSpy and pretty-print XML text. To be honest with you, I haven't really done any proper testing to be able to isolate the problem, but if you have any ideas, it would be greatly appreciated. Cheers, -Alex --- Alex Romayev [EMAIL PROTECTED] wrote: Hi Carsten, Thanks for the quick fix, do you mean SourceWritingTransformer or InsertTransformer? Cheers, -Alex -Original Message- From: Carsten Ziegeler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: SunShine-InsertTransformer: encoding problem Date: Fri, 11 Oct 2002 08:36:00 +0200 Hi Alex, I just checked in a fix for the namespace problem - now it works for me - could you please check - if everything is working for you, too. Thanks Carsten -Original Message- From: Alex Romayev [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 08, 2002 1:12 PM To: [EMAIL PROTECTED] Subject: RE: SunShine-InsertTransformer: encoding problem --- Carsten Ziegeler [EMAIL PROTECTED] wrote: Alex Romayev wrote: This is currently hard coded into the transformer(!) which means you can't do anything against it... The InsertTransformer has been merged with the SourceWritingTransformer in 2.1-dev - the SourceWritingTransformer can be configured to what encoding should be used. I did a quick search for ISO-8859-1 in source files and nothing related to InsertTransformer came up. Is there a workaround you could suggest until 2.1 comes out? By the way, is there a rough timeline for this release? It's not directly in the transformer. The transformer uses a component called ResourceConnector and this does the saving. The connector uses org.apache.cocoon.xml.XMLUtils.defaultSerializeToXMLFormat to serialize the XML and there you will find this setting. A rough time line for 2.1 is end of this year, I guess +/- 1 or 2 months... The namespaces in content/news.xml. By the way, I've raised this problem with SourceWriting transformer as well and haven't seen it in the recent bug-list e-mail. I'm just thinking that if the two got merged, the problem might still be there. Can you give a complete test case for this? (Sitemap snippet plus the two xml files) - If you can provide this I will try to find the bug as soon as I have time. Carsten Sure, here is the sitemap: map:match pattern=admin/add-news map:act type=sunShine-session/ map:generate src=resources/sunshine/admin/add-news-item.xml/ map:transform type=sunShine/ map:transform type=sunShineInsert/ map:serialize type=xml/ /map:match And I've attached the two files (slightly simplified). Cheers, -Alex - 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: Encoding problem with HTML-serializer and URLs
Try this in your sitemap: map:action name=set-character-encoding src=org.apache.cocoon.acting.SetCharacterEncodingAction/ and map:act type=set-character-encoding map:parameter name=form-encoding value=your-encoding/ /map:act --- Stefan Riegel [EMAIL PROTECTED] wrote: Hello, doing the following I do not get the expected results. The german umlaut with ISO-8859-1 converts magically to UTF-8. All encodings (html-/xml-serializers, xml-files, xsl-files) are set to ISO-8859-1 src.xml: html head ... a href=dest?selection=öö/ (ö = german umlaut for oe) ... /html Sitemap snippet: ... map:generate type=file src=src.xml / map:serialize type=html / ... Produced output: ... a href=dest?selection=%C3%B6ouml;/a ... If I click the link I see the same selection-string in the Browser URL. I did expect the destination dest restoring the same character with the same encoding. dest.xml ... dest Selection= /dest ... dest.xsl ... dest xsl:value-of select=dest / xsl:value-of select=$selection / /dest ... the sitemap ends with a xml-serializer Output -- destHi=an A with a tilde on top/dest This funny character is an ö (ouml;) in UTF-8. I did try some proposals like setting encoding in an action (request.setCharacterEncoding). Nothing works for me. Any ideas? I have to send selection-criteria for a database as URL-parameters. Regards Stefan -- Stefan Riegel TELIG GmbH Ziegelstraße 27 D-71063 Sindelfingen GERMANY Phone: +49-7031-79433-30 Fax:+49-7031-79433-43 Mobile: +49-174-4025031 - 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: SourceWritingTransformer.
From what I understand, yes. In 2.1 SourceWritingTransformer has been merged with ex-sunrise InsertTransformer. Alex --- ROSSEL Olivier [EMAIL PROTECTED] wrote: I use old-style SWT: source:write src=... tree-to-be-written ... /tree-to-be-written /source It seems that there is a newer syntax (with a very interesting source:insert !! ) but I can't get it to work in C2.0.3. It seems that the SWT I have still uses the old-style syntax. Is the new SWT only available in C2.1dev ? This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. - 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]
SessionTransformer: multiple select
Hello, I have a "multiple" select, which is being submitted by a form, so that my request string looks like: my-action?selectItem=1selectItem=2selectItem=3... Does anyone know how I could retrieve all of the "selectItem" request paramters? I've tried (just to see what happens): session:getxml context="request" path="/parameter/selectItem"/, and this just gets the first selectItem parameter (id=1). What I would like to get is: itemsitem id="1"/item id="2"/item id="3"//items Thanks,-Alex
RE: URL Rewriting
Have you looked at EncodeURLTransformer? -Alex -Original Message- From: Christoph Stocker [mailto:chris.stocker;gmx.at] Sent: Mon 10/21/2002 12:13 PM To: [EMAIL PROTECTED] Cc: Subject: URL Rewriting hi all! i use cocoon2.0.2, winxp and weblogic6.0sp2 i use cookies for session handling, but i dont want to do use cookies. i want to use url-rewriting in my cocoon-action. has anyone code examples how to do inside the action or links to pages who to use url-rewriting in cocoon-actions. now i use the session to put information between action and my website. can i use it also with url-rewriting? another question to weblogic: how do i turn on or off in my weblogic to use cookies for session handling or not. because in http://xml.apache.org/cocoon/developing/webapps/session.html http://xml.apache.org/cocoon/developing/webapps/session.html it says, Just refer to the documentation of your servlet engine on how to turn on cookies for session handling., but i can't find how in my weblogic. greetings, chris - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] application/ms-tnef- 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]
XML Forms without JavaBeans
Hello, I've looked through XMLForm documentation, but haven't really read it in detail yet. Quick question before I went off in the wrong direction. I would like to build forms which whould save information to XML files rather than the database. I would also like to use SourceWritingTransformer for that. Would XMLForms framework still be applicable, i.e. do I have to use JavaBeans or can a pipeline segment with SourceWritingTrasformer be plugged in? Thanks, -Alex
SessionTransformer: setting attributes
Hello, I'm using SessionTransformer and would like to set an attribute with the value of a request parameter. I understand, that if I were to set an element I would do something like: itemidsession:getxml context="request" path="/parameter/id"//id/item However, what I would like to do is: item id="the value of id request parameter"/ Does anyone know if this is possible, or if not, what are the typical workarounds? Thanks,-Alex
RE: SessionTransformer: multiple select
Thanks for the tip Ryan. I'm hoping to stick with SessionTransformer -- I would assume it should be possible, but haven't been able to find the correct usage in documentation. Any other ideas? -Original Message- From: Ryan Agler [mailto:ryanagler;hotmail.com] Sent: Mon 10/21/2002 1:42 PM To: [EMAIL PROTECTED] Cc: Subject: RE: SessionTransformer: multiple select Something like this should do the trick inside of an xsp. Be sure to declare the xsp-request logicsheet. items xsp:logic String[] selectItems = xsp-request:get-parameter-values name=selectItem as=array/; for(int i=0; i ![CDATA[]] selectItems.length; i++) { item xsp:attribute name=idxsp:exprselectItems[i]/xsp:expr/xsp:attribute /item } /xsp:logic /items -Original Message- From: Alex Romayev [mailto:aromay;sapient.com mailto:aromay;sapient.com ] Sent: Monday, October 21, 2002 5:57 AM To: [EMAIL PROTECTED] Subject: SessionTransformer: multiple select Hello, I have a multiple select, which is being submitted by a form, so that my request string looks like: my-action?selectItem=1selectItem=2selectItem=3... Does anyone know how I could retrieve all of the selectItem request paramters? I've tried (just to see what happens): session:getxml context=request path=/parameter/selectItem/, and this just gets the first selectItem parameter (id=1). What I would like to get is: items item id=1/ item id=2/ item id=3/ /items Thanks, -Alex - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] application/ms-tnef- 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: London Cocoon users
Hey guys, Sounds good. I'm working on the client site Monday-Thursday in Milton Keynes and in London (near Bank station) on Fridays. Cheers, -Alex On Thursday, Oct 24, 2002, at 12:59 Europe/London, Alex McLintock wrote: Hi folks, Are there any London based Cocoon users on this list who want to meet other Cocoon users - perhaps for a pub meeting? Great idea, count me in. regards Jeremy - 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 2.1 Authentication Samples
Hello, A number of people a couple of weeks ago had problems getting 1.2 dev authentication samples (as well as portal) to run. The issue was an IlligalState exception or something of that sort. Does anyone know if it's been fixed in the current CVS? Thanks, -Alex - 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]
SessionTransformer questions
Hello, I have a couple of questions on how to use SessionTransformer: 1. I have a multiple select, which is being submitted by a form, so that my request string looks like: my-action?selectItem=1selectItem=2selectItem=3... Does anyone know how I could retrieve all of the selectItem request paramters? I've tried (just to see what happens): session:getxml context=request path=/parameter/selectItem/, and this just gets the first selectItem parameter (id=1). What I would like to get is: items item id=1/ item id=2/ item id=3/ /items 2. I would like to set an attribute with the value of a request parameter. I understand, that if I were to set an element I would do something like: item idsession:getxml context=request path=/parameter/id//id /item However, what I would like to do is: item id=the value of id request parameter/ Does anyone know if this is possible, or if not, what are the typical workarounds? Thanks, -Alex - 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]
Developing Cacheable Components
Hello, I have a transformer which I would like to make Cacheable. I've noticed there have been some changes in 2.1 dev in how to make components Cacheable. Is there any documentation which explains how to do that? Thanks, -Alex - 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]
Authentication: redirect
Hello, I can't seem to figure out how to redirect back to a protected resource after the authentication. The sample only has one resource called protected. For example, I would like to protect anything that is under cocoon/admin/*. Let's say someone requests cocoon/admin/add-user resource. I've noticed that when the framework redirects to the login resource it adds the following to the url: resource=%2Fcocoon%2Fadmin%2Fadd-user. Is there a way to retrieve this in the sitemap, i.e., something like: map:redirect-to uri={request-param:resource}? Thanks, -Alex - 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]
java.lang.OutOfMemoryError
Hello, I've just changed the verstion of Tomcat from 4.04 to 4.1.12 with Cocoon 2.1 dev from a couple of weeks ago and now running into memory problems. The site now runs extremely slow (over 1 min for some pages) spits out: java.lang.OutOfMemoryError no stack trace available. I've looked around the mail archives and tried to follow various suggestions, however, still with no luck. Here is my environment: - Win2K - 96M RAM - Tomcat 4.1.12 - Cocoon 1.2 dev Here is what I've done so far: 1. When I start Windows the TaskManager shows about 60M of available memory. 2. I've added the following line to catalina.bat: set CATALINA_OPTS=-Xmx55m 3. I've changed cocoon.xconf store-janitor heapsize configuration to be equal to 55M (or 57671680): store-janitor logger=core.store.janitor !-- How much free memory shall be available in the jvm -- parameter name=freememory value=100/ !-- Indicates the limit of the jvm memory consumption. The default max heapsize for Sun's JVM is 64Mb -- parameter name=heapsize value=57671680/ !-- How often shall the cleanup thread check memory -- parameter name=cleanupthreadinterval value=10/ !-- Indicates the thread priority of the cleanup thread -- parameter name=threadpriority value=5/ !-- How much percent of the elements of each registered Store shall be removed when low on memory. Default 10% -- parameter name=percent_to_free value=10/ /store-janitor After I've made the changes, I don't seem to get the OutOfMemory exception anymore, but the site still runs extremely slow. The TaskManager shows CPU usage at 100%, which I suspect is due to memory to disk swaps. Do these numbers look right, have I missed anything, or is there anything else I could do? Any help would be really appreciated as the development is completely haulted by this! Thanks, -Alex - 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: java.lang.OutOfMemoryError
Sorry, it's 196M, not 96M. Still not much, but it had been sufficient enough untill I've upgraded Tomcat to 4.1.12! --- Hunsberger, Peter [EMAIL PROTECTED] wrote: After I've made the changes, I don't seem to get the OutOfMemory exception anymore, but the site still runs extremely slow. The TaskManager shows CPU usage at 100%, which I suspect is due to memory to disk swaps. Can't help you, but if it's swapping then almost certainly you won't peg CPU at 100% (unless you've got some kind of supernatural disk subsystem). If you really only have 96M of Ram on your box it's time to upgrade. That won't even support Win2K decently... I'd start at 512M and go up if you can afford it! - 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: java.lang.OutOfMemoryError
Which version of Tomcat are you running? It seems that it has to do with my upgrade, either the new version of Tomcat (4.1.12) requires all of a sudden requires a lot more memory (not very likely) or there is some incompatibility (shared libraries, version of Java, ...?). Has anyone else tried Tomcat 4.1.12 and the latest Cocoon 2.1 dev? Any issues with that? Any ideas, even half baked would help at the moment! Thanks, -Alex --- Kjetil Kjernsmo [EMAIL PROTECTED] wrote: On Friday 01 November 2002 16:32, Alex Romayev wrote: Sorry, it's 196M, not 96M. Still not much, but it had been sufficient enough untill I've upgraded Tomcat to 4.1.12! I run Cocoon on 98MB RAM, and that works fine... GNU/Linux is the OS, though. The startup is very slow, but serving pages works well. Not that I wouldn't like a bigger box, but it is what I've got... Best, Kjetil -- Kjetil Kjernsmo Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Homepage: http://www.kjetil.kjernsmo.net/ - 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: Authentication: redirect
I'm afraid this e-mail got missed over the weekend. Carsten or anyone else familiar with 2.1 authentication would you be able to help? Thanks, -Alex --- Alex Romayev [EMAIL PROTECTED] wrote: Hello, I can't seem to figure out how to redirect back to a protected resource after the authentication. The sample only has one resource called protected. For example, I would like to protect anything that is under cocoon/admin/*. Let's say someone requests cocoon/admin/add-user resource. I've noticed that when the framework redirects to the login resource it adds the following to the url: resource=%2Fcocoon%2Fadmin%2Fadd-user. Is there a way to retrieve this in the sitemap, i.e., something like: map:redirect-to uri={request-param:resource}? Thanks, -Alex - 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-users Digest 4 Nov 2002 20:21:42 -0000 Issue 1677
ATTACHMENT part 16 message/rfc822 Date: Mon, 04 Nov 2002 12:50:02 -0500 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Authentication: redirect I did a hack because as you say currently the examples only work for a particular url/file/resource. I actually pass the resource given to me and store it within the login page as a hidden field. When the user submits username, password/etc this will come along too. Then if authenticated i redirect to that resource using request:resource. This retrieves the resource parameter from the http request parameters object and off you go. My redirect looks like this, e.g. map:redirect-to url=cocoon:/?action={request:resource} I assume you mean request-param:resource... This then will work for any page in the site that you want protected. Note that I don't point to url's rather I have a single URL (the cocoon servlet and my app). cocoon:/ helps to establish that. I use action id's much like struts (I guess but the concept has been around much longer than struts.) pointing into metadata to help distinguish what page to show. But whether you use action id parameters or file url's this work. Actually I don't use an action id, but rather do my pattern matching in the sitemap. It appears that {request-param:resource} is giving my full url starting with /cocoon/... and hence, I cannot use cocoon:/. Is there any other way to call the resouce in the sitemap? Thanks, -Alex later, md Date: Mon, 4 Nov 2002 09:32:18 -0800 (PST) From: Alex Romayev [EMAIL PROTECTED] Subject: Re: Authentication: redirect To: [EMAIL PROTECTED] I'm afraid this e-mail got missed over the weekend. Carsten or anyone else familiar with 2.1 authentication would you be able to help? Thanks, -Alex --- Alex Romayev [EMAIL PROTECTED] wrote: Hello, I can't seem to figure out how to redirect back to a protected resource after the authentication. The sample only has one resource called protected. For example, I would like to protect anything that is under cocoon/admin/*. Let's say someone requests cocoon/admin/add-user resource. I've noticed that when the framework redirects to the login resource it adds the following to the url: resource=%2Fcocoon%2Fadmin%2Fadd-user. Is there a way to retrieve this in the sitemap, i.e., something like: map:redirect-to uri={request-param:resource}? Thanks, -Alex - 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]
Authenication FW: Protecting multiple resources
Hello, I'm still struggling with trying to protect multiple resources using authentication framework. I've modified the sitemap in the authentication-fw sample to use wildcard match (see the examples below), but either I'm not using it correctly, or there is a bug in the framework. !-- -- !-- Protected area -- !-- -- map:match pattern=* map:act type=auth-protect map:parameter name=handler value=demohandler/ map:generate src=docs/{1}.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 !-- = -- !-- Form target which performs auth service -- !-- = -- map:match pattern=do-login !-- try to login -- map:act type=auth-login map:parameter name=handler value=demohandler/ map:parameter name=parameter_name value={request-param:username}/ !-- ? -- !-- This is what I think it should be -- !-- ? -- map:redirect-to uri=context://{request-param:resource}/ /map:act !-- something was wrong, try it again -- map:redirect-to uri=login/ /map:match However, when I click on protected link, rather than being re-directed to http://localhost:8080/cocoon/samples/authentication-fw/protected I get a re-direct to http://localhost:8080/cocoon/samples/authentication-fw/do-login. Is this not how the resource parameter was intended to be used? Thanks, -Alex - 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: No more DTM IDs are available
Take a look at: http://www.mail-archive.com/cocoon-users;xml.apache.org/msg19907.html --- Peter Smink [EMAIL PROTECTED] wrote: during the execution of my xsp page with logicsheets I get the DTMException No more DTM IDs are available how can i prevent this error? Peter Smink Osirion b.v. - 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]
Authenication FW: Single sign-on to multiple handlers
Hello, I'm figuring out my way through the authentication and portal frameworks and ran into a problem of logging into multiple handlers. It seems that there is no single sign-on to all handlers facility provided by the framework. Here is a scenario. I have three roles of users in the application: guest, user, and admin. The guests are only allowed to view guest pages only, the users are allowed to view guest and user pages and administrators are can view all the pages. If I understand the framework design correctly, I need three handlers: 1. Guest pages handler -- generally I wouldn't need it, as the pages could be unprotected, but the portal framework requires it if I want to be able to change the content and the layout of the homepage based on user/role. 2. User pages handler. 3. Admin pages handler. Now, let's say the administrator comes into the guest pages. He now needs to log into the Guest pages handler. After some browsing around, the administrator now wants to make some changes and clicks on a link to the admin pages. This would now require logging into the Admin pages handler. This is where I'm stuck. Clearly we wouldn't want the administrator to have to log in twice. Has anyone encountered this situation? Is there a facility for doing that provided by the framework? Thanks, -Alex - 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]
Passing request parameters to coplets
Hello, Is it possible to pass request parameters to coplets? Thanks, -Alex - 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]
Out of memory error... cocoon bug?
Executive summary: I think Out of memory error is in fact a bug. Frequently it has nothing to do with your actual available memory. Blurb: I had this problem before (see the details below), and I searched the mailing lists and have been following it on the mailing lists for a while now, and every time it doesn't seem to be actually indicating insufficient memory. About a month ago I made a few changes, to my cocoon installation: - Changed version from 2.03 to 2.1 dev. - Changed Tomcat to 4.1.12 (Authentication and portal frameworks didn't work otherwise). I started to get Out of memory errors (with CPU running at 100% on a single request). I tried to get to the root of the problem, but didn't have enough time, so I hacked around and somehow by changing from using sitemap resources to pattern matching I managed to get rid of the problem. Anyway, I just wanted to get everyone's attention to this. If it is a bug, it looks to be one of those difficult to track... Cheers, -Alex - 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]
Augment Transformer does not ignore javascript
Hi, I've noticed that Augment Transformer (which is very useful), ignores absolute URLs, but not javascript. I'm trying to create a go back link and the transformer is appending my javascript:back() with the full path. Of cource I could create my own transformer to ignore javascript in addition to absolute URLs, but it seems like it would be a useful feature for others as well. Does it make sence? Cheers, -Alex - 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]
SessionTransformer - Getting request parametervalues
Hi, I'm looking for help in how to extract parameter values using SessionTransformer. My uri looks like this: myaction?item=1item=2item=3 The SessionTransformer generates the following path: parametervalues cinclude:parameters cinclude:parameter cinclude:nameitem/cinclude:name cinclude:value1/cinclude:value /cinclude:parameter /cinclude:parameters /parametervalues My goal is to turn this into the following xml: items item1/item item2/item item3/item /items Two questions: 1. SessionTransformer javadoc says: This output has the namespace of the CIncludeTransformer to use it as input for a cinclude:includexml command. I don't quite understand how I would make use of CIclude transformer. 2. I've tried doing the following: items xmlns:session=http://cocoon.apache.org/session/1.0; xmlns:cinclude=http://apache.org/cocoon/include/1.0; session:getxml xmlns:cinclude=http://apache.org/cocoon/include/1.0; context=request path=/parametervalues/cinclude:parameters/cinclude:parameter[cinclude:name='item']/cinclude:value/ /items So that I could later transform it to the xml I need, but I get the following error: Prefix must resolve to a namespace: cinclude Thanks, -Alex P.S. And the stack: org.apache.cocoon.ProcessingException: TransformerException: javax.xml.transform.TransformerException: Prefix must resolve to a namespace: cinclude: javax.xml.transform.TransformerException: Prefix must resolve to a namespace: cinclude at org.apache.cocoon.webapps.session.context.RequestSessionContext.streamXML(RequestSessionContext.java:635) at org.apache.cocoon.webapps.session.components.SessionManager.streamContextFragment(SessionManager.java:559) at org.apache.cocoon.webapps.session.transformation.SessionPreTransformer.startTransformingElement(SessionPreTransformer.java:191) at org.apache.cocoon.webapps.session.transformation.SessionPostTransformer.startTransformingElement(SessionPostTransformer.java:230) at org.apache.cocoon.transformation.AbstractSAXTransformer.startElement(AbstractSAXTransformer.java:333) at org.apache.cocoon.webapps.session.transformation.SessionPreTransformer.startElement(SessionPreTransformer.java:162) at org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:118) at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:454) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:217) at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:873) at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:590) at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:777) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1453) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169) at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:264) at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:215) at org.apache.excalibur.xmlizer.impl.TextXMLizer.toSAX(TextXMLizer.java:44) at org.apache.excalibur.xmlizer.impl.AbstractXMLizer.toSAX(AbstractXMLizer.java:102) at org.apache.excalibur.xmlizer.impl.XMLizerImpl.toSAX(XMLizerImpl.java:94) at org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.java:537) at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:140) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:273) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:149) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:166) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109) at
Re: SessionTransformer - Getting request parametervalues
Thanks Yves, however I'm not using xsp and according to Carsten from his earlier posting this functionality should work. Has anyone else used it? Thanks, -Alex --- Yves Vindevogel [EMAIL PROTECTED] wrote: I don't see the reason to use the SessionTransformer ... Use the XSP generator. This has the Request object. One of the tags in xsp-request is the URL, the querystring and all the parameters (see xml.apache.org/cocoon ... user guide ... xsp, bottom of the page, all the properties) You'll have everything you need there to write your code ... Hi, I'm looking for help in how to extract parameter values using SessionTransformer. My uri looks like this: myaction?item=1item=2item=3 My goal is to turn this into the following xml: items item1/item item2/item item3/item /items - 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]
Portal bug? - Using SessionTransformer inside coplets
I've run into a strange problem. It seems like using SessionTransormer inside a coplet results in java.lang.NullPointerException. Here is what I found: 1. If I run my coplet by invoking the coplet's uri directly everything works as expected. 2. If I invoke the coplet as part of a portal page using portal fw, it generates the exception. 3. I'm using session:getxml statements to get information from request context. If I replace these statements with dummy data and _not_ have any of the session statements (I still have SessionTransformer in my pipeline, even though it doesn't actually do anything), everything works fine. So it seems that for some reason using sesion:getxml from request context (or possibly other contexts -- I haven't tried) causes the excetion. Please help, as this is a critical piece of my work! Thanks, -Alex Here is the stack trace: ERROR (2003-01-22) 16:21.37:297 [core.portal-manager] (/cocoon/romayev/admin/write-result) Thread-8/CopletThread: Exception during processing of coplet: write-result org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.NullPointerException at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:380) at org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.java:532) at org.apache.cocoon.webapps.portal.components.CopletThread.run(CopletThread.java:218) at java.lang.Thread.run(Thread.java:484) - 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: Portal bug? - Using SessionTransformer inside coplets
Hi Matthew, I'm using cocoon:/ protocol. -Alex --- Matthew Langham [EMAIL PROTECTED] wrote: Which protocol are you using to call the coplets? a) cocoon:/ b) cocoon:raw:/ If you want to pass request parameters on to the coplet then you need to make sure you are using a). See also: http://marc.theaimsgroup.com/?l=xml-cocoon-usersw=2r=1s=cocoon%3Arawq=b Matthew -- Open Source Group Cocoon { Consulting, Training, Projects } = Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 Paderborn Tel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de - Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20 Weblogs: http://radio.weblogs.com/0103021/ http://www.oreillynet.com/weblogs/author/1014 = -Original Message- From: Alex Romayev [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 1:38 AM To: [EMAIL PROTECTED] Subject: Portal bug? - Using SessionTransformer inside coplets I've run into a strange problem. It seems like using SessionTransormer inside a coplet results in java.lang.NullPointerException. Here is what I found: 1. If I run my coplet by invoking the coplet's uri directly everything works as expected. 2. If I invoke the coplet as part of a portal page using portal fw, it generates the exception. 3. I'm using session:getxml statements to get information from request context. If I replace these statements with dummy data and _not_ have any of the session statements (I still have SessionTransformer in my pipeline, even though it doesn't actually do anything), everything works fine. So it seems that for some reason using sesion:getxml from request context (or possibly other contexts -- I haven't tried) causes the excetion. Please help, as this is a critical piece of my work! Thanks, -Alex Here is the stack trace: ERROR (2003-01-22) 16:21.37:297 [core.portal-manager] (/cocoon/romayev/admin/write-result) Thread-8/CopletThread: Exception during processing of coplet: write-result org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.NullPointerException at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.j ava:380) at org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment. java:532) at org.apache.cocoon.webapps.portal.components.CopletThread.run(CopletThread.ja va:218) at java.lang.Thread.run(Thread.java:484) - 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: Portal bug? - Using SessionTransformer inside coplets
) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:166) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:143) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:131) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:166) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:143) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308) at org.apache.cocoon.Cocoon.process(Cocoon.java:595) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1034) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:484) --- Carsten Ziegeler [EMAIL PROTECTED] wrote: Hi, did you test the latest cvs version, because line 380 in my source code cannot cause your problem? Carsten -Original Message- From: Alex
RE: Portal bug? - Using SessionTransformer inside coplets
I tried today's snapshot and got a java.lang.OutOfMemory exception. I believe someone else got it as well. I'll try again in a couple of days. Cheers, -Alex --- Carsten Ziegeler [EMAIL PROTECTED] wrote: Alex Romayev wrote: I'm using a version from a couple of months ago. I'll get the latest and try it again and let you know. Ok! While I have your attention, I've asked another question a couple of days ago about getting parameter values from the request. Could you take a look at it, I'm pasting it below: Clever! :) Hi, I'm looking for help in how to extract parameter values using SessionTransformer. My uri looks like this: myaction?item=1item=2item=3 The SessionTransformer generates the following path: parametervalues cinclude:parameters cinclude:parameter cinclude:nameitem/cinclude:name cinclude:value1/cinclude:value /cinclude:parameter /cinclude:parameters /parametervalues My goal is to turn this into the following xml: items item1/item item2/item item3/item /items Two questions: 1. SessionTransformer javadoc says: This output has the namespace of the CIncludeTransformer to use it as input for a cinclude:includexml command. I don't quite understand how I would make use of CIclude transformer. This is only handy *if* you need the cinclude transformer to include additional content. So it's not of use for you (in this context). 2. I've tried doing the following: items xmlns:session=http://cocoon.apache.org/session/1.0; xmlns:cinclude=http://apache.org/cocoon/include/1.0; session:getxml xmlns:cinclude=http://apache.org/cocoon/include/1.0; context=request path=/parametervalues/cinclude:parameters/cinclude:parameter[cinc lude:name='item']/cinclude:value/ /items So that I could later transform it to the xml I need, but I get the following error: Prefix must resolve to a namespace: cinclude You can make a session:getxml context=request path=// and you will see all the xml outputted by the request context. You can use session:getxml context=request path=/parametervalues/ and you get the parameters as described above. All your items will then have the cinclude namespace, you have to filter them in a stylesheet or custom component. HTH Carsten - 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]
SourceWritingTransformer: namespaces
Hi, I'm need to use a namespace insite source:replace tag, for example: source:insert xmlns:source=http://apache.org/cocoon/source/1.0; xmlns:myns=http://foo.org/myns; source:path//source:path source:replacemyns:item/source:replace source:fragment.../source:fragmen /source:insert When I run this, I get: javax.xml.transform.TransformerException: Prefix must resolve to a namespace: myns. Is it actually possible to use a namespace inside a replace tag? Thanks, -Alex - 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 hosting
Hi, I'm looking for a cheap hosting provider to host a low volume Cocoon site based on 2.1 dev code. Does anyone have any experience with the ones mentioned at the cocoon hosting page or any others? Since I'm using 2.1 dev version, I assume it is better if they are not running Cocoon, since it might conflict with mine, is this a good assumption? you can ignore this I've just tried deploying a my cocoon.war file at lunarpages.com, which twice brought their Resin server down (same file deploys fine on Tomcat by the way), which in turn resulted in me being kick out of their server... /you can ignore this Thanks, -Alex - 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]
Unable to run cocoon-2.1-dev on tomcat 4.1.18
Hello, I'm unable to run cocoon-2.1-dev on tomcat 4.1.18 -- it seems to be crashing tomcat without any error messages. Here is what I've done: -Downloaded and installed tomcat 4.1.18 -Started tomcat -- worked fine -Downloaded and built cocoon-2.1-dev with scratchpad and no blocks -Copied cocoon files into webapps/cocoon directory -Started tomcat -- it looks like tomcat tries to load cocoon and abruptly exits. There are no errors in tomcat log files. I've tried replacing xalan, xerces and xmlapis jars with those from cocoon in tomcat's common/endorsed directory, but that doesn't seem to make any difference. Has anyone seen this behaviour? Thanks, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unable to run cocoon2 on tomcat
Hi Kieran, This seems to be related to the problem I'm having, the the message: http://www.mail-archive.com/[EMAIL PROTECTED]/msg25061.html. By just doing simple comparison, I don't think it's tomcat versions, as you're using 4.0.1 and I've had problems with both 4.1.12 and 4.1.18. What is similar is that we both have win2k prof. and jdk 1.3. I'm going to try to migrate to jdk 1.4. I'll let you know if this helps. Cheers, -Alex b --- Kieran Kirwan [EMAIL PROTECTED] wrote: Dear All, i've installed- - jdk1.3.1_01 - jakarta-tomcat-4.0.1.exe ...and it's all running fine - i get the http://localhost:8080/index.html page no problem.however ...when i copy cocoon.war (extracted from cocoon-2.0.1-bin.zip) and try http://localhost:8080/cocoon/ all i get is the directory listing - i don't think the servlet container is compiling cocoon when i restart tomcat - all i'm getting is Starting service Tomcat-Standalone Apache Tomcat/4.0.1 Starting service Tomcat-Apache Apache Tomcat/4.0.1 can anybody help - i've got windows2000 professional if that helps - it all worked fine on my last machine. Thanks, - Kieran Kirwan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to run cocoon-2.1-dev on tomcat 4.1.18
Hi Richard, Thanks for you help. I've tried copying the libraries and I start using startup.bat, but this doesn't seem to be helping me. Do you have any other ideas? Thanks, -Alex --- Richard In Public [EMAIL PROTECTED] wrote: Hi Alex Are you running tomcat as a service? If so, try running it from the command line using the appropriate batch file (%CATALINA_HOME%\bin\startup.bat for windows). If this helps, see my earlier post on this subject: http://www.mail-archive.com/[EMAIL PROTECTED]/msg24914.html Regards, Richard - Original Message - From: Alex Romayev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 12:47 AM Subject: Unable to run cocoon-2.1-dev on tomcat 4.1.18 Hello, I'm unable to run cocoon-2.1-dev on tomcat 4.1.18 -- it seems to be crashing tomcat without any error messages. Here is what I've done: -Downloaded and installed tomcat 4.1.18 -Started tomcat -- worked fine -Downloaded and built cocoon-2.1-dev with scratchpad and no blocks -Copied cocoon files into webapps/cocoon directory -Started tomcat -- it looks like tomcat tries to load cocoon and abruptly exits. There are no errors in tomcat log files. I've tried replacing xalan, xerces and xmlapis jars with those from cocoon in tomcat's common/endorsed directory, but that doesn't seem to make any difference. Has anyone seen this behaviour? Thanks, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to run cocoon-2.1-dev on tomcat 4.1.18
I've changed my environment from jdk1.3 to 1.4.1 and everything worked! One thing I noticed thought that my jdk1.3 had xml libraries in it's endorsed directory... not sure if this was the issue. --- Richard In Public [EMAIL PROTECTED] wrote: Hi Alex Are you running tomcat as a service? If so, try running it from the command line using the appropriate batch file (%CATALINA_HOME%\bin\startup.bat for windows). If this helps, see my earlier post on this subject: http://www.mail-archive.com/[EMAIL PROTECTED]/msg24914.html Regards, Richard - Original Message - From: Alex Romayev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 12:47 AM Subject: Unable to run cocoon-2.1-dev on tomcat 4.1.18 Hello, I'm unable to run cocoon-2.1-dev on tomcat 4.1.18 -- it seems to be crashing tomcat without any error messages. Here is what I've done: -Downloaded and installed tomcat 4.1.18 -Started tomcat -- worked fine -Downloaded and built cocoon-2.1-dev with scratchpad and no blocks -Copied cocoon files into webapps/cocoon directory -Started tomcat -- it looks like tomcat tries to load cocoon and abruptly exits. There are no errors in tomcat log files. I've tried replacing xalan, xerces and xmlapis jars with those from cocoon in tomcat's common/endorsed directory, but that doesn't seem to make any difference. Has anyone seen this behaviour? Thanks, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with AuthenicationManager in 2.1 dev
Hi, I'm using the lastest build and having problems using authentication-fw. The error I'm getting is: Could not find component (role [org.apache.cocoon.webapps.authentication.components.AuthenticationManager]) Has anyone seen this? Have there been any changes lately that I likely to cause this error? Thanks, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Passing format to DateInputModule
Hi, It looks like DateInputModule has changed and doesn't accept format like it used to. Here is what I used to be able to do in cocoon.xconf: component-instance class=org.apache.cocoon.components.modules.input.DateInputModule logger=core.modules.input name=my-date format-MM-dd/format /component-instance However the input module now ignores the specified format. Also, is cocoon.xconf the only place where the format can be specified, is it possible to do it in the sitemap? Thanks, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
2.1 build fails
Hi I tried running today's build without any changes and got the following error: BUILD FAILED file:///C:/dev/xml-cocoon-2.1-dev/build.xml:610: IOException: java.io.FileNotFoundException: C:\dev\xml-cocoon-2.1-dev\b uild\webapp\samples\sitemap.xmap (The system cannot find the path specified) Cheers, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Very strange behaviour -- caching bug?
Hello, There is a very strange behaviour that my site exibits ever since I've upgraded my 2.1 dev code from what it was in Nov-Dec last year to the most current version (less than a week old). Here is what's going on. There is a portlet which is generated by calling another pipeline fragment matching a.resource. It looks like a.resource behaves correctly, however it seems that a.portlet, which uses a.resource as its input does not realize when a.resource's output changes and keeps working with the incorrect cached version. The following works correctly: http://localhost:8080/cocoon/a.resource?locale=en - displays output in English http://localhost:8080/cocoon/a.resource?locale=ru - displays output in Russian Still fine: http://localhost:8080/cocoon/a.portlet?locale=en - displays output in English PROBLEM: http://localhost:8080/cocoon/a.portlet?locale=ru - displays output in ENGLISH! If I touch a.xsl in the following pipeline, and hence, force the reload, everything works fine, however when I change locale, it's back to the behaviour I've just described. The following is a simplified pipeline: map:pipeline map:match *.portlet map:match a.portlet map:generate src=cocoon:/a.resource/ map:transform src=a.xsl/ map:serialize type=xml/ /map:match /map:match /map:pipeline map:pipeline map:match *.resource map:match a.resource map:generate src=a.xml/ map:act type=locale map:transform type=i18n map:parameter name=locale value={locale}/ /map:transform /map:act map:serialize type=xml/ /map:match /map:match /map:pipeline Cheers, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Very strange behaviour -- caching bug?
Hi Mark, Thanks for your help. I like your test case -- it simpler and cleaner. Do you (or anyone else) know how to submit this as a bug to make sure the developers know about it? Cheers, -Alex --- Mark H [EMAIL PROTECTED] wrote: I tried out a simpler form: (don't have the source code for your actions/stylesheets) map:components map:actions map:action name=request src=org.apache.cocoon.acting.RequestParamAction/ /map:actions /map:components map:pipelines map:pipeline map:match pattern=*.portlet map:match pattern=a.portlet map:generate src=cocoon:/a.resource/ map:serialize type=xml/ /map:match /map:match map:match pattern=*.resource map:match pattern=a.resource map:act type=request map:parameter name=parameters value=true/ map:generate src={locale}.xml/ map:serialize type=xml/ /map:act /map:match /map:match /map:pipeline /map:pipelines and got the same caching problem you got, can anybody try the above in v2.0.4 to see if it is a 2.1 bug? when I did the following it worked ok: map:match pattern=*.portlet map:match pattern=a.portlet map:act type=request map:parameter name=parameters value=true/ map:generate src={locale}.xml/ map:serialize type=xml/ /map:act /map:match /map:match It seems to be caching cocoon:/a.resource. I can't see exactly what it's doing because it's not generating any logs (it should log caching in sitemap.log). I'm also having problems with the latest CVS it seems to be in a state of flux. The only way to fix these problems is to go deep into the Cocoon's/Avalon/Excalibur source code and debug. -Original Message- From: Alex Romayev [mailto:[EMAIL PROTECTED] Sent: 03 March 2003 02:57PM To: [EMAIL PROTECTED] Subject: Very strange behaviour -- caching bug? Hello, There is a very strange behaviour that my site exibits ever since I've upgraded my 2.1 dev code from what it was in Nov-Dec last year to the most current version (less than a week old). Here is what's going on. There is a portlet which is generated by calling another pipeline fragment matching a.resource. It looks like a.resource behaves correctly, however it seems that a.portlet, which uses a.resource as its input does not realize when a.resource's output changes and keeps working with the incorrect cached version. The following works correctly: http://localhost:8080/cocoon/a.resource?locale=en - displays output in English http://localhost:8080/cocoon/a.resource?locale=ru - displays output in Russian Still fine: http://localhost:8080/cocoon/a.portlet?locale=en - displays output in English PROBLEM: http://localhost:8080/cocoon/a.portlet?locale=ru - displays output in ENGLISH! If I touch a.xsl in the following pipeline, and hence, force the reload, everything works fine, however when I change locale, it's back to the behaviour I've just described. The following is a simplified pipeline: map:pipeline map:match *.portlet map:match a.portlet map:generate src=cocoon:/a.resource/ map:transform src=a.xsl/ map:serialize type=xml/ /map:match /map:match /map:pipeline map:pipeline map:match *.resource map:match a.resource map:generate src=a.xml/ map:act type=locale map:transform type=i18n map:parameter name=locale value={locale}/ /map:transform /map:act map:serialize type=xml/ /map:match /map:match /map:pipeline Cheers, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Very strange behaviour -- caching bug?
Do you know the syntax for making a pipeline noncaching? --- Leszek Gawron [EMAIL PROTECTED] wrote: On pon, mar 03, 2003 at 10:01:03 -0800, Alex Romayev wrote: Hi Mark, Thanks for your help. I like your test case -- it simpler and cleaner. Do you (or anyone else) know how to submit this as a bug to make sure the developers know about it? I have encountered the same bug (I think) or very similar while working with aggregation (XSP + ESQL and static xml files. See my bug description at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16958 I have reported it long time ago but no action was taken. ouzo PS. a very temporary solution is to set your pipeline type to noncaching. Doesn't solve the problem but allows you to work further. -- __ | / \ |Leszek Gawron// \\ \_\\ //_/ [EMAIL PROTECTED] _\\()//_ .'/()\'. Phone: +48(600)341118 / // \\ \ \\ // recursive: adj; see recursive | \__/ | - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using parameterised URL in FileGenerator
Hi, I'm running into problems trying to use FileGenerator go get XML via a parameterised URL. The following is invalid XML: map:generate src=http://foo.com?param1=xparam2=yparam3=z/ and the following is not the right URL: map:generate src=http://foo.com?param1=xamp;param2=yamp;param3=z/ Any ideas? Thanks, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using parameterised URL in FileGenerator
It didn't come out quite clearly on the email, but the basic point is that if I use , it's not valid XML, and if I substitute it with amp; the URL is incorrect. --- Alex Romayev [EMAIL PROTECTED] wrote: Hi, I'm running into problems trying to use FileGenerator go get XML via a parameterised URL. The following is invalid XML: map:generate src=http://foo.com?param1=xparam2=yparam3=z/ and the following is not the right URL: map:generate src=http://foo.com?param1=xamp;param2=yamp;param3=z/ Any ideas? Thanks, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using parameterised URL in FileGenerator
Never mind, I had a space in my URL -- just like publicly talking to myself ;) --- Alex Romayev [EMAIL PROTECTED] wrote: It didn't come out quite clearly on the email, but the basic point is that if I use , it's not valid XML, and if I substitute it with amp; the URL is incorrect. --- Alex Romayev [EMAIL PROTECTED] wrote: Hi, I'm running into problems trying to use FileGenerator go get XML via a parameterised URL. The following is invalid XML: map:generate src=http://foo.com?param1=xparam2=yparam3=z/ and the following is not the right URL: map:generate src=http://foo.com?param1=xamp;param2=yamp;param3=z/ Any ideas? Thanks, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in converting umlaut characters..
Hi Jaya, Have you looked in Wiki (Cocoon documentation site), if not, try http://wiki.cocoondev.org/Search.jsp?query=encoding. Let me know if this doesn't help. Cheers, -Alex --- jaya [EMAIL PROTECTED] wrote: Hello, I am using Cocoon latest version. When I am generating a text file from XML document using XSL, I got the following problem in Cocoon. Müller is shown as Müller I have given the encoding in XML and XSL file properly and I have generated the same text file in the Command line using Xalan XSLT processor. I got the text Müller properly. I am not getting this while I am using Cocoon. Could U please tell me whether I have to give any settings in Cocoon for this Umlaut characters ? Expecting reply, Thanks a lot, Jaya - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon-2.1-dev build fails
Just a thought: 1. mail.jar has a different name, like mail-timestamp.jar -- then change jars.xml file to the right name. 2. mail.jar is not needed, remove it from jars.xml 3. mail.jar is somewhere else, put it into the lib directory. --- Bobby Mitchell [EMAIL PROTECTED] wrote: I'm trying to build Cocoon-2.1-dev from cvs today, 3/24/03 on RedHat 8.0, Tomcat-4.1.21. The build fails with this error: root/java/cocoon-2.1/tools/src/check-jars.xsl:89:36: Warning! File lib/optional/mail.jar is declared in lib/jars.xml, but doesn't appear in the lib/ directory. mail.jar is in the lib/optional directory. What can I do to make it work? -- 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Paginator Transformer
Hi, I'm having problems declaring Paginator in my sitemap, I suspect this has to do with the new build system. Here is what I have in the sitemap: map:transformer name=paginate src=org.apache.cocoon.transformation.pagination.Paginator/ This gives me: ERROR (2003-03-31) 10:44.11:673 [sitemap] (/cocoon/romayev/) Thread-7/ExtendedComponentSelector: Could not load class org.apache.cocoon.transformation.pagination.Paginator for component named 'paginate' at file:/C:/dev/jakarta-tomcat-4.1.18/webapps/cocoon/romayev/sitemap.xmap:17:101 java.lang.ClassNotFoundException: org.apache.cocoon.transformation.pagination.Paginator I noticed that in cocoon-scratchpad.jar the Paginator, as well as other classes are in: dest/org/apache/cocoon/transformation/pagination/Paginator.class -- notice the dest in the beginning. I've tried changing the sitemap to: map:transformer name=paginate src=dest.org.apache.cocoon.transformation.pagination.Paginator/ This does not produce the above error, but seems to be somehow ignoring the sitemap alltogether and displays a blank page. Any ideas? Cheers, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paginator Transformer
I'm using 2.1dev from yesterday. How would I fix the jar? --- Geoff Howard [EMAIL PROTECTED] wrote: Is this 2.1dev or 2.0.4? I seem to remember this problem from 2.1dev a month or so ago but it should now be fixed - if not, let me know. Your choices will be to update from cvs or to manually fix the jar. I'd recommend the first but I or someone else can help you with the second if need be. The classes must be in org/apache/ - dest was put in by mistake due to a misconfiguration of the build process. Geoff At 11:08 AM 3/31/2003, you wrote: Hi, I'm having problems declaring Paginator in my sitemap, I suspect this has to do with the new build system. Here is what I have in the sitemap: map:transformer name=paginate src=org.apache.cocoon.transformation.pagination.Paginator/ This gives me: ERROR (2003-03-31) 10:44.11:673 [sitemap] (/cocoon/romayev/) Thread-7/ExtendedComponentSelector: Could not load class org.apache.cocoon.transformation.pagination.Paginator for component named 'paginate' at file:/C:/dev/jakarta-tomcat-4.1.18/webapps/cocoon/romayev/sitemap.xmap:17:101 java.lang.ClassNotFoundException: org.apache.cocoon.transformation.pagination.Paginator I noticed that in cocoon-scratchpad.jar the Paginator, as well as other classes are in: dest/org/apache/cocoon/transformation/pagination/Paginator.class -- notice the dest in the beginning. I've tried changing the sitemap to: map:transformer name=paginate src=dest.org.apache.cocoon.transformation.pagination.Paginator/ This does not produce the above error, but seems to be somehow ignoring the sitemap alltogether and displays a blank page. Any ideas? Cheers, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paginator Transformer
OK, I fixed the jar and it worked, however, sounds like the build still needs to be fixed. Also, I've noticed that cocoon-scatchpad.jar does not get copied into the WEB-INF/lib directory. Thanks for your help, Geoff. --- Alex Romayev [EMAIL PROTECTED] wrote: I'm using 2.1dev from yesterday. How would I fix the jar? --- Geoff Howard [EMAIL PROTECTED] wrote: Is this 2.1dev or 2.0.4? I seem to remember this problem from 2.1dev a month or so ago but it should now be fixed - if not, let me know. Your choices will be to update from cvs or to manually fix the jar. I'd recommend the first but I or someone else can help you with the second if need be. The classes must be in org/apache/ - dest was put in by mistake due to a misconfiguration of the build process. Geoff At 11:08 AM 3/31/2003, you wrote: Hi, I'm having problems declaring Paginator in my sitemap, I suspect this has to do with the new build system. Here is what I have in the sitemap: map:transformer name=paginate src=org.apache.cocoon.transformation.pagination.Paginator/ This gives me: ERROR (2003-03-31) 10:44.11:673 [sitemap] (/cocoon/romayev/) Thread-7/ExtendedComponentSelector: Could not load class org.apache.cocoon.transformation.pagination.Paginator for component named 'paginate' at file:/C:/dev/jakarta-tomcat-4.1.18/webapps/cocoon/romayev/sitemap.xmap:17:101 java.lang.ClassNotFoundException: org.apache.cocoon.transformation.pagination.Paginator I noticed that in cocoon-scratchpad.jar the Paginator, as well as other classes are in: dest/org/apache/cocoon/transformation/pagination/Paginator.class -- notice the dest in the beginning. I've tried changing the sitemap to: map:transformer name=paginate src=dest.org.apache.cocoon.transformation.pagination.Paginator/ This does not produce the above error, but seems to be somehow ignoring the sitemap alltogether and displays a blank page. Any ideas? Cheers, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paginator Transformer
I'm using xml-cocoon2. --- Geoff Howard [EMAIL PROTECTED] wrote: I'll check on this tonight. Is there any chance that you're using an older checkout? What module name are you using? xml-cocoon2 or cocoon-2.1 ? The first is supposed to invisibly mirror the second (I think), but you never know. Geoff At 11:31 AM 3/31/2003, you wrote: OK, I fixed the jar and it worked, however, sounds like the build still needs to be fixed. Also, I've noticed that cocoon-scatchpad.jar does not get copied into the WEB-INF/lib directory. Thanks for your help, Geoff. --- Alex Romayev [EMAIL PROTECTED] wrote: I'm using 2.1dev from yesterday. How would I fix the jar? --- Geoff Howard [EMAIL PROTECTED] wrote: Is this 2.1dev or 2.0.4? I seem to remember this problem from 2.1dev a month or so ago but it should now be fixed - if not, let me know. Your choices will be to update from cvs or to manually fix the jar. I'd recommend the first but I or someone else can help you with the second if need be. The classes must be in org/apache/ - dest was put in by mistake due to a misconfiguration of the build process. Geoff At 11:08 AM 3/31/2003, you wrote: Hi, I'm having problems declaring Paginator in my sitemap, I suspect this has to do with the new build system. Here is what I have in the sitemap: map:transformer name=paginate src=org.apache.cocoon.transformation.pagination.Paginator/ This gives me: ERROR (2003-03-31) 10:44.11:673 [sitemap] (/cocoon/romayev/) Thread-7/ExtendedComponentSelector: Could not load class org.apache.cocoon.transformation.pagination.Paginator for component named 'paginate' at file:/C:/dev/jakarta-tomcat-4.1.18/webapps/cocoon/romayev/sitemap.xmap:17 :101 java.lang.ClassNotFoundException: org.apache.cocoon.transformation.pagination.Paginator I noticed that in cocoon-scratchpad.jar the Paginator, as well as other classes are in: dest/org/apache/cocoon/transformation/pagination/Paginator.class -- notice the dest in the beginning. I've tried changing the sitemap to: map:transformer name=paginate src=dest.org.apache.cocoon.transformation.pagination.Paginator/ This does not produce the above error, but seems to be somehow ignoring the sitemap alltogether and displays a blank page. Any ideas? Cheers, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2.1 dev - CVS whats the new steps to build
With the new build you need to edit build.properties file and comment out the following line like this: #exclude.scratchpad=true. Note, you can also create local.build.properties file and with the line about. This way you won't have to do it again. --- e nio [EMAIL PROTECTED] wrote: Hi I wanted to build 2.1dev with all the samples including the ones in the scratchpad. What is the command to build this now? I tried this and none of the samples were built, all I got was the Welcome to Cocoon, none of the samples dir and subdirs is on the war file created with this command: ./build.sh -Dinclude.webapp.libs=yes -Dinclude.webapp.samples=yes -Dexclude.webapp.documenation=yes -Dexclude.webapp.javadocs=yes -Dinclude.scratchpad=yes -Dinclude.webapp.scratchpadwar=yes -Dexclude.webapp.idldocs=yes war Thanks in advance __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2.1 dev - CVS whats the new steps to build
How recent is your source? Did you get it from xml-cocoon2 or from cocoon-2.1? --- e nio [EMAIL PROTECTED] wrote: This did not work either after I made the change you suggested. Is my options correct or am I missing an option? Btw, I have edited both the build.properties and local.build.properties just in case. enio --- Alex Romayev [EMAIL PROTECTED] wrote: With the new build you need to edit build.properties file and comment out the following line like this: #exclude.scratchpad=true. Note, you can also create local.build.properties file and with the line about. This way you won't have to do it again. --- e nio [EMAIL PROTECTED] wrote: Hi I wanted to build 2.1dev with all the samples including the ones in the scratchpad. What is the command to build this now? I tried this and none of the samples were built, all I got was the Welcome to Cocoon, none of the samples dir and subdirs is on the war file created with this command: ./build.sh -Dinclude.webapp.libs=yes -Dinclude.webapp.samples=yes -Dexclude.webapp.documenation=yes -Dexclude.webapp.javadocs=yes -Dinclude.scratchpad=yes -Dinclude.webapp.scratchpadwar=yes -Dexclude.webapp.idldocs=yes war Thanks in advance __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2.1 dev - CVS whats the new steps to build
I've run into the same problem I had run into today. You need to get it from cocoon-2.1, although xml-cocoon2 apparently should mirror it, there are differences. I just done a nice clean cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co cocoon-2.1 and everything worked. If you don't have broadband access take a look at the earlier messages or there should be instructions on wiki. --- e nio [EMAIL PROTECTED] wrote: This I downloaded today. I retrieved it from xml-cocoon2. I just looked at wincvs and it shows: cvs -z9 update -d -P -r HEAD xml-cocoon2 If I didnt do the download right, what should it have been? I think the instruction steps to download said xml-cocoon2 but perhaps those need updating. enio --- Alex Romayev [EMAIL PROTECTED] wrote: How recent is your source? Did you get it from xml-cocoon2 or from cocoon-2.1? --- e nio [EMAIL PROTECTED] wrote: This did not work either after I made the change you suggested. Is my options correct or am I missing an option? Btw, I have edited both the build.properties and local.build.properties just in case. enio --- Alex Romayev [EMAIL PROTECTED] wrote: With the new build you need to edit build.properties file and comment out the following line like this: #exclude.scratchpad=true. Note, you can also create local.build.properties file and with the line about. This way you won't have to do it again. --- e nio [EMAIL PROTECTED] wrote: Hi I wanted to build 2.1dev with all the samples including the ones in the scratchpad. What is the command to build this now? I tried this and none of the samples were built, all I got was the Welcome to Cocoon, none of the samples dir and subdirs is on the war file created with this command: ./build.sh -Dinclude.webapp.libs=yes -Dinclude.webapp.samples=yes -Dexclude.webapp.documenation=yes -Dexclude.webapp.javadocs=yes -Dinclude.scratchpad=yes -Dinclude.webapp.scratchpadwar=yes -Dexclude.webapp.idldocs=yes war Thanks in advance __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon 2.1 cache
In 2.1 you can do it in the sitemap Option1 -- at the individual pipeline level: map:pipeline type=noncaching ... Option 2 -- set the default in the pipes declaration map:pipes default=caching Cheers, -Alex --- zze-MORY Nicolas FTRD/DMI/REN [EMAIL PROTECTED] wrote: How can i turn off the cache under Cocoon 2.1 ? because : event-pipeline class=org.apache.cocoon.components.pipeline.NonCachingEventPipeline/ stream-pipeline class=org.apache.cocoon.components.pipeline.NonCachingStreamPipeline/ doesn't exist under Cocoon 2.1 Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: map:part- how to encode a URL source?
Colin, is a special character in XML and need to be escaped as amp; -Alex --- Colin W. Kingsbury [EMAIL PROTECTED] wrote: Here is what I wrote: map:part src=http://localhost:8080/bigServlet?k42id={1}container=page-body/ Here is what I get: org.xml.sax.SAXParseException: The reference to entity container must end with the ';' delimiter. snip How can I do this? I need to make calls to URLs with multiple paramters... Thanks in advance! -cwk. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Content formats
I haven't seen/used any standardised page layout formats. I'm using Cocoon's portal framework and I like/use their idea of spliting the page into independent coplets (sometimes known as portlets). I know it's not much, but it's a good start and I'm actually enjoying some nice benefits. What I've also done was to make heavy use of CSS2, so that the look and positioning of each coplet can be controlled externally. -Alex --- Tony Collen [EMAIL PROTECTED] wrote: On Thu, 3 Apr 2003, Ryan Hoegg wrote: snip/ What format do seasoned Cocoon people use to represent web content? That is, when the choice isn't made for them because of pre-existing content. XHTML, of course. At least, when I'm writing suff that will probably just go on the web. Either that, or I'll invent my own DTD on the fly. With respect to document-1.0, that's the format the current Cocoon documents are in right now. Tony -- Tony Collen ICQ: 12410567 -- Cocoon: Internet Glue (A Cocoon Weblog) http://manero.org/weblog/ -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Did Something happen to the sessiontransformer?
Session transformer's namespace has been changed to: http://apache.org/cocoon/session/1.0. So at the moment it's ignoring the old namespace. Would be nice for it to give you a warning, wouldn't it ;) -Alex --- JD Daniels [EMAIL PROTECTED] wrote: Whoops.. Cocoon2.1M2 - Original Message - From: JD Daniels [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 1:46 PM Subject: Did Something happen to the sessiontransformer? map:transformer name=session pool-grow=4 pool-max=32 pool-min=8 src=org.apache.cocoon.webapps.session.transformation.SessionTransformer/ map:match pattern=mgr-menu.xml map:generate src=context:/resources/docs/menus/menu.xml/ map:transform type=session/ map:serialize/ /map:match Completely ignores it.. no error logged anywhere, but This is what i get in my browser: firstname session:getxml context=authentication path=/authentication/data/firstname/ /firstname (The Authentication seems to be working normally.. ie, logging in and out) JD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: new namespaces in 2.1
FYI: There was apparently a discussion on the dev list: http://marc.theaimsgroup.com/?l=xml-cocoon-devm=105158638805039w=2 -Alex --- Stavros Kounis [EMAIL PROTECTED] wrote: hi people reading the last thread in this list about session transformer i have notice that some namespacer have change fro 2.0 to 2.1 some weeks ago i have get the same answer about i18n tranformation is it possilbe to announce somewere all namespace changes from 2.0 to 2.1 so people dont spend hours to find what happend when try to publish workining in 2.0 project using 2.1? ---stavros - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session ended - avoiding error pages?
Hi Derek, I assume you're using the session-fw. --- Derek Hohls [EMAIL PROTECTED] wrote: Hi Users need to logon to gain access to the 'protected area' of the site - however, it appears that after a certain time the session expires, and the access rights are revoked; after that any attempt to access any link in the protected sections results in a Cocoon error. Three questions: 1. How and whewre is the length of session set? The session timeout is set in your servlet engine's web.xml file. For Tomcat it is conf/web.xml: session-config session-timeout30/session-timeout /session-config 2. Is there any way of triggering, say, the display of a default (probably site index) page as soon as the session ends? As soon as the session expires, your protected resources will require authenitcation prior to accessing. In your handler you specify a redirect-to uri, usually it is your login page: handler name=some-name redirect-to uri=cocoon://login.html/ authentication uri=cocoon:raw:/authenticate/ ... 3. If a default (probably site index) page cannot be triggered automatically, how do I display such a page as soon as a user attempts to access any link from inside the protected section AFTER the session expires? I believe the answer is the same as #2. Cheers, -Alex Thanks. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. Mailscanner thanks transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using I18nTransformer without catalogue
Hi, Is is actually possible to use I18nTransformer without having to specify the catalogue-name and catalogue-location parameters? Why? Because I'm only using i18n:when and i18n:date tags. At the moment I'm having to create the dummy message files. Cheers, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: any way to match on http request type
Have you looked at the HeaderSelector? Miles Egan [EMAIL PROTECTED] wrote:Is there any way to match/select in the pipeline for the HTTP method used in the request? I'd like to write a pipeline for handling PUT requests. -- Miles Egan ATTACHMENT part 2 application/pgp-signature name=signature.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: any way to match on http request type
Sorry. You need the RequestMethodSelector. http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/selection/RequestMethodSelector.html --- Miles Egan [EMAIL PROTECTED] wrote: The problem is that I don't want to select on one of the headers, but the actual request method (GET/POST/PUT). On Mon, 2003-06-02 at 11:26, Alex Romayev wrote: Have you looked at the HeaderSelector? Miles Egan [EMAIL PROTECTED] wrote:Is there any way to match/select in the pipeline for the HTTP method used in the request? I'd like to write a pipeline for handling PUT requests. -- Miles Egan [EMAIL PROTECTED] ATTACHMENT part 2 application/pgp-signature name=signature.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using I18nTransformer without catalogue
--- Konstantin Piroumian [EMAIL PROTECTED] wrote: From: Alex Romayev [EMAIL PROTECTED] Hi, Is is actually possible to use I18nTransformer without having to specify the catalogue-name and catalogue-location parameters? AFAIK, not yet, because of this lines in I18nTransformer code: 893: public void configure(Configuration conf) throws ConfigurationException { 894:if (factory == null) { 895:throw new ConfigurationException(BundleFactory component is not found.); 896:} you can try to remove this check and add other checks to avoid NPE. Why? Because I'm only using i18n:when and i18n:date tags. At the moment I'm having to create the dummy message files. Yes, I see. If the above method works then please post a patch to Bugzilla. Will do. What's the process, do I patch entire file? -- I've never done this before. -Alex Regards, Konstantin Cheers, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: map:redirecto-to after map:transform/map:generate?
--- Geoff Howard [EMAIL PROTECTED] wrote: At 10:00 AM 6/3/2003, you wrote: ... map:generate src=.../ map:transform type=xslt src=.../ map:redirect-to uri=chunk_{1}/ map:redirect-to issues a client side redirect. under what circumstances would you want to do that along with an pipeline content? are you looking for something like map:call? or map:aggregate? Interesting, what is map:call? In my example, I need to do the following: 1. submit a form 2. perform transformations 3. write to a file (SourceWritingTransformer) 4. display a page (other than the page with the form)with updated content Can I use map:call for that? Also it is not possible to use map:read/ or map:generate/ after a transformation. Right, this is on purpose. If you need this, you should either use map:aggregate or xinclude or cinclude. I tried also to use a XSL that produces input to xinclude but xinclude can't wpork with cocoon:// URLs but needs a absolute path in the base-Attribute. So this also doesn't work. Try cinclude. Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: map:redirecto-to after map:transform/map:generate?
--- Geoff Howard [EMAIL PROTECTED] wrote: At 01:03 PM 6/3/2003, you wrote: so you'd do ... map:transform type=write-source/ map:transform src=that.xsl/ map:transform type=cinclude/ ... I know both xinclude (and cinclude) as well as xsl:document() should work, the problem is that the file to include is a relative URL to the Cocoon-context path. Something like work/test/index.html. When using document() it expects it to be somehow in the same dir as the stylesheet. With xinclude one has to set the xml:base base URL otherwise it cannot resolve a relatie URL. The question what is the base URL?? /cocoon/app or cocoon://app or context:/ or http://hardcodedsvr/cocoon/app? I'd like xinclude much more than document(). cinclude I don't know very well. what about cocoon:/ That's exactly my issue. The idea is to re-direct to a page, so including a file won't help: there is no file, instead there is a pipeline which generates the page. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: redirect at the end of a pipeline/match
Looks like flowmap would be the cleanest way of handling this, but it's still in development and not that well documented. --- Daniel McOrmond [EMAIL PROTECTED] wrote: I'm looking for a clean way to 'redirect' a user back to a page, at the end of a pipeline. map:match pattern='comment' map:generate src=xml/insert_comment.xml/ map:transform type=sql map:parameter name=use-connection value=myconnection/ map:transform map:serialize type=xml/ REDIRECT or something here/ /map:match map:redirect doesn't work because it skips the generate and transform. Browsing through the mail archive someone suggest's using a meta redirect tag in generated html. (http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=105464887116737w=2) This would work but it seems clunky.. There must be a cleaner way to accomplish this.? -Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using I18nTransformer without catalogue
--- Konstantin Piroumian [EMAIL PROTECTED] wrote: From: Alex Romayev [EMAIL PROTECTED] --- Konstantin Piroumian [EMAIL PROTECTED] wrote: From: Alex Romayev [EMAIL PROTECTED] Hi, Is is actually possible to use I18nTransformer without having to specify the catalogue-name and catalogue-location parameters? AFAIK, not yet, because of this lines in I18nTransformer code: 893: public void configure(Configuration conf) throws ConfigurationException { 894:if (factory == null) { 895:throw new ConfigurationException(BundleFactory component is not found.); 896:} you can try to remove this check and add other checks to avoid NPE. Finally got around to it. Unfortunately this did not work. It seems that it is still looking for the messages file as well as expects their declaration in the sitemap. Any other ideas? -Alex Why? Because I'm only using i18n:when and i18n:date tags. At the moment I'm having to create the dummy message files. Yes, I see. If the above method works then please post a patch to Bugzilla. Will do. What's the process, do I patch entire file? -- I've never done this before. It's quite simple. Make your modifications, then run this from your CVS root: cvs diff -u diff.txt then post this patch thru Bugzilla. Details can be found here: http://cocoon.apache.org/2.1/howto/howto-patch.html http://cocoon.apache.org/2.1/howto/howto-bugzilla.html -- Konstantin -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: public pages with the new portal framework?
I'm not sure about the new portal generator, but the old one requires authentication. I suspect that initially it was designed only to build portal pages, i.e., assuming there is an identifiable user and there are differences between what you show to different users. I also found the generator to be a good tool for building all pages, as it facilitates good modular design and a nice way of adding/removing functionality via portal configuration files, without having to touch the page code. I was hoping that the new portal will remove this constraint, but looks like it doesn't... Cheers, -Alex HI First of all I'm very impressed by the new portal framework. I would like to build a portal with both public and private part using the new portal generator. All samples I found, request an authentification before using the portal generator. When I try to use it without login with: map:match pattern=portal map:generate type=portal map:parameter name=portal-name value=portal / /map:generate map:transform src={global:skin}styles/header.xsl/ map:transform type=cinclude/ map:transform type=encodeURL/ map:serialize type=html/ /map:match I got an exception Original Exception: org.apache.avalon.framework.CascadingRuntimeException: Arg at org.apache.cocoon.portal.profile.impl.AuthenticationProfileManager.getPo rtalLayout(AuthenticationProfileManager.java:269) at org.apache.cocoon.portal.impl.PortalManagerImpl.showPortal(PortalManager Impl.java:111) at org.apache.cocoon.portal.generation.PortalGenerator.generate(PortalGener ator.java:90) ... Any ideas? Laurent Trillaud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: public pages with the new portal framework?
That's good new Carsten! I'll look forward to the new version. While on the topic, I have a few questions/thoughts about the framework in general -- I'm going to create a separate thread for these though. Cheers, -Alex --- Carsten Ziegeler [EMAIL PROTECTED] wrote: Alex Romayev wrote: I'm not sure about the new portal generator, but the old one requires authentication. I suspect that initially it was designed only to build portal pages, i.e., assuming there is an identifiable user and there are differences between what you show to different users. I also found the generator to be a good tool for building all pages, as it facilitates good modular design and a nice way of adding/removing functionality via portal configuration files, without having to touch the page code. I was hoping that the new portal will remove this constraint, but looks like it doesn't... The new portal removes this constraint, definitly. The new portal is assembled of many components; one of them is the profile manager: currently there are two profile managers: one using authentication and one not. The samples currently only use the authentication version and the other one is afaik not working at the moment :) But work is in progress, so expect a working non authentication version soon. Carsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
The new portal framework: questions and thoughts
I have been using portal-fw for a year now. Overall, Im very happy with it. It is well designed and contains all of the critical features you need to build a portal. Its been lacking some of the nice to have's, but Id rather have something to work with now and wait for the new features to come out. So Ive been looking forward to the enhancements. I have a few questions/wish list items (directed at Carsten): 1. Can you share with us the drivers for creating the new portal? - Why are you not extending the current portal-fw? - Is it going to be compatible with portal-fw? - What are the differences/new features in the new portal? 2. Layout I've noticed that you are changing the layout configuration, which is definitely a welcome change. The column layout worked fine, but was even behind WebLogic/WebSpere portals, which at least allow spanning columns. However, I find even the spanning design very limiting. I prefer to use CSS2 and take advantage of DIV tags, so that the coplets can be placed based on the absolute and relative positioning. For example, there is a place on my site where I would like the coplets to overlap, which is currently impossible. In general, I'd like to be able to leave hooks for the CSS classes. For example, I would like to be able to break down a page into areas. When a coplet is DIVed in such area, it is styled according to the area's rules. For example, all coplets in the related-links area have a light-gray background and Helvetica font (defined in a CSS stylesheet, but assigned by the portal config). A single coplet, however, should be able to override the style. 3. Application configuration I am probably misusing the portal, but in any case, this is what I do. I like to treat each page on the site as a portal page. Why? Well, I like to be very user-friendly, so that rather than letting the users customize the main page only, I want the to be able to do this on every page. Also, Id like to have site-editor coplets on every page, which allow editing page content. Clearly, these coplets should only be available to the site editors. So, here is my problem. For a page to be a portal page, it needs to have an application configuration in the sitemap. So if I have 200 pages, I need to have 200 page configurations in my sitemap, which is unwieldy. It would be great to be able to do one of the two: - Make application configuration work with patterns, just like the rest of the sitemap - Allow this to be externalized from the sitemap into another configuration file By the way, at the moment adding a new application configuration requires to bounce Tomcat, which is bad (every time I add a page, I have to restart!) Thoughts? Cheers, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]