RE: Giving up! Cocoon too big, slow and confusing
Anthony Aldridge wrote: Hurrah! You're a brick! Like 'another brick in the wall'? Hmm, I already knew this, because many people called me this in the past 30 years (because of my last name, you can figure it out yourself why). Sorry, but my english is not good enough to figure out what you exactly mean by this. Can you enlighten me? PS: I hope it's a compliment! Thanks 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]
RE: Giving up! Cocoon too big, slow and confusing
According to Babylon (usefull windows dictionnary wich work with onscreen OCR) : Brick = Chic type (mmm, something like cool guy) -Message d'origine- De: Carsten Ziegeler [mailto:[EMAIL PROTECTED]] Date: lundi 1 juillet 2002 08:52 À: [EMAIL PROTECTED] Objet: RE: Giving up! Cocoon too big, slow and confusing Anthony Aldridge wrote: Hurrah! You're a brick! Like 'another brick in the wall'? Hmm, I already knew this, because many people called me this in the past 30 years (because of my last name, you can figure it out yourself why). Sorry, but my english is not good enough to figure out what you exactly mean by this. Can you enlighten me? PS: I hope it's a compliment! Thanks 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: Redirect to referrer
Thanks (again) for the reply...it's taught me some new things that might come in handy later on. But in the short-term this doesn't solve the problem - when re-directing it means that all the values in my Request object are lost, so when I use xsp-request:get-parameter in my XSP page I don't get any data. Unless there is a magic tag to include them in the re-direction, I will have to go along with your original suggestion Regards Chris -=-=-= -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED]] Sent: 28 June 2002 18:10 To: [EMAIL PROTECTED] Subject: Re: Redirect to referrer On 28.Jun.2002 -- 05:58 PM, Shaw, Chris wrote: PS - I'm surprised there isn't a simpler solution to do this, when it must be a fairly common thing. How about this one, then? map:match pattern=store map:act type=persist-action map:match type=referer-match pattern=** map:redirect-to uri={1}/ /map:match /map:act /map:match Or, using HEAD: map:match pattern=store map:act type=persist-action map:redirect-to uri={header:referer}/ /map:act /map:match Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - 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] Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither be binding nor construed as constituting a commitment by the ECB except where provided for in a written agreement. This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised disclosure, use or dissemination, either in whole or in part, is prohibited. If you have received this e-mail in error, please notify the sender immediately via e-mail and delete this e-mail from your system. - 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: strange database problem
On 30.Jun.2002 -- 01:26 PM, Peter Royal wrote: On Sunday 30 June 2002 01:24 pm, Leszek Gawron wrote: com.inzoom.adojni.ComException: Current provider does not support returning multiple recordsets from a single execution. in ADODB.Recordset code=0 Type=1 First I thought that it's something wrong with msde provider or jdbc driver but getting back to 2002.04.21 dev snapshot makes the error disappear. The esql logicsheet is now using JDBC features that your driver does not support. Since multiple important DBMSs have problems with checking for multiple result sets, it has been disabled by default for the current CVS version. It can be re-enabled by using esql:allow-multiple-resultsyes/esql:allow-multiple-results Option to esql:connection/. Please try again with a snap shot newer than 2002-06-28 Chris. Please follow up summarizing your problem and which suggested solution / information worked for you. Add SUMMARY: to the subject line. This will make FAQ generation and searching the list easier. In addition, it makes helping you more fun. Thank you. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - 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]
soap call problems
Hi, I'm running cocoon 2.0.2 under tomcat 4.0.4b2. I've created the example web service under .NET, TempConvert1. I can call this with no problems from VB using the MSSOAP object. I'm trying to call it using the xsp soap taglib and I get the following error: org.apache.cocoon.ProcessingException: Error invoking remote service: java.lang.IllegalArgumentException: port out range:-1: java.lang.IllegalArgumentException: port out range:-1 I can call other web services from cocoon with no dramas. My soap call looks like this: search-results soap:call url=http://147.76.204.58/TempConvert1/Service1.asmx; xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance; xmlns:xsd=http://www.w3.org/1999/XMLSchema; ns1:ConvertTemperature xmlns:ns1=urn:Service1 dFahrenheit xsi:type=xsd:string100/dFahrenheit /ns1:ConvertTemperature /soap:call /search-results NB. To those familiar with TempConvert1, I've changed the type of dFarenheit from double to string. Anybody got any ideas? Chris. - 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: Giving up! Cocoon too big, slow and confusing
thusly spake David Crossley: It amazes me that people have the time to compose email to the mailing list to tell us that they are too busy, and then have the hide to tell us that documentation is poor. Writing can be fast but submission + acceptance + check-in is not so straightforward. how about a model more like some kind of production line ? If someone volunteered to accept (and critique) (and organise) small submissions of a page or two, then non-core people could take some notes whilst teach themselves things, and so ease that learning curve for the next person. email: [EMAIL PROTECTED] These minidocs could be folded into the mainline docs, or turned into FAQ items, or How-To's, or whatever. I think that this decision, i.e. where to file new minidocs, should be the decision of a core doc person. it is not up to _me_ to decide whether the thing I'm writing a FAQ or a How-To, because (a) I don't have the big picture, and (b) the doc base already is sprawling and needs reorganisation, starting with the top-level menus... IMHO. very simply, I could email this minidoc coördinator asking if (s)he has Doc X, for example Directing servlet output into a Cocoon pipeline using Tomcat 4.x Filters. If such a minidoc does not yet exist, then I whip it up; if it does already exist, the minidoc coördinator emails it to me for my additions / comments. there could be a web page of existing minidoc titles. call it Pending Cocoon Documentation Fragments (WIP). this is where that PHP doc system (that someone provided a pointer to) seems to excel. man pages that can be annotated by the community. (hey won't someone implement this in Cocoon ? ;-) then there should also be a person to periodically incorporate the annotations into the main text. hth, fred -- fbaube @ welho.com + 358 41 536 8192 - 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]
Problems with Database Tutorial
I'm using Cocoon 2.1-dev, IBM JDK 1.3, running on RedHat 7.2, and using Sybase 11.9.2. I can't add or update users in the DB. I can only delete them. I tried this with both Sybase and Hsqldb and the results are the same. While using Sybase I had to remove the esql:parameter begin and end tags in order to actually edit the entry, otherwise I get an sql error stating that SELECT name, department_id FROM employee WHERE id = ? is an error. The id is being passed as a ? so it causes an error. When using Hsqldb I made no changes to the code. Has anyone ever seen this before? Where do I look in the log files for debug info, such as tracking what is taking place behind the scenes? Are there debug parameters that I can pass to Cocoon and receive more debug info. I'm new to Cocoon, but from what I see so far I like it. I have been somewhat at a loss when reading through the docs and I certainly understand the comments on the list regarding documentation. My wish list: A debug feature that outlines each move Cocoon makes, so I can trace what my code is producing and more importantly where it fails. -- Robert J. (Bobby) Mitchell Systems Administrator NASA Institute for Advanced Concepts 555A 14th St Atlanta, Ga. 30318 Phone: (404)347-9633 Fax: (404)347-9638 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Security in cocoon.xconf?
Title: Security in cocoon.xconf? I have setup database connection in cocoon.xconf but the username and password are required in cocoon.xconf. How secure if cocoon.xconf? Will crashes or any tricks expose this information to the clients or other servlets? If so, any measure that I can take to hide such information? I am using cocoon 2.0.1. Alban This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.
Re: IMPORTANT: Major Bug in XMLDBSource
At 21:49 28/06/02, Alfredas Chmieliauskas wrote: this bug relates to every cocoon and xindice versions available, thus it definately concerns you, if you're using xmldb and accessing it through XMLDBSource (xmldb: pseudo-protocol). [memory leak description removed] Thanks very much for spotting that. It seems to coincide with my experiences of running out of memory when making lots of Cocoon-XIndice calls. I am about to go on holiday but if you can't find anyone to fix this in the next couple of weeks please email me and I will see what I can do. What you seem to be proposing is a Connection Pool for XMLDB in the same way as we have connection pools for database connections. That can't be too hard can it?:-) Alex McLintock Openweb Analysts Ltd, London: Software For Complex Websites http://www.OWAL.co.uk/ Free Consultancy for London Companies thinking of Open Source Software. - 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: Unexpected behavior with imported stylesheets
Hello, Shoot me if I'm wrong. This is to do with the Source (?) class isn't it ? It has a lastModified(...) function. Source is created for the importing stylesheet, and lastModified of course returns the last modified of the importing file. It would have to open the file, *parse* it and recursively traverse through it's import and include tags to find the imported files ( and their imported files :) opening and parsing all them as well, get _their_ last modifieds and keep track of the most recent one out of that lot. It is a pain to touch every single xsl that imports another one, but the above approach, if implemented in the raw way described above, would cause a lot of thrashing around ! I suppose this a better question for the dev list, but would their be an easy way to monitor a list of files for their last modifieds ? ( Like JBoss does ) That might make a better solution available. Jason. -Original Message- From: Peter Royal [mailto:[EMAIL PROTECTED]] Sent: Friday, 28 June 2002 12:41 PM To: [EMAIL PROTECTED] Subject: Re: Unexpected behavior with imported stylesheets On Thursday 27 June 2002 09:14 pm, Phil wrote: There was a thread about this some time back and I believe that it's on a to-do list somewhere. Is anyone at apache able to confirm this? Your 'touch' workaround is the only solution that I know of at this time. Anyone have any advances on this? You are correct. There was a thread, its on a TODO, but nothing yet. -pete -- peter royal - [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: Giving up! Cocoon too big, slow and confusing
From: Per Kreipke [mailto:[EMAIL PROTECTED]] Stop suggesting that the people who are complaining contribute = I don't have a beef with the people exhorting people to contribute, but there is a chicken and egg problem of getting to the point where 1) it's worth my time to learn it 2) what I contribute is worthwhile to others. The gist of the first 10 replies to John's original post was for people like him to write the missing docs. He was talking about _starting up_ with the project and you're asking him to write documentation already? He barely got it running and much less committed to using it. We're really talking about getting people committed enough to contribute. They won't do the second without the first. And there are 1000's of other open source projects looking for contributions as well. Are we supposed to contribute to all of them to use them? I don't mind people not writing a full FAQ, but sometimes just asking for a _question_ (without them supplying the corresponding answer) would result in a very good FAQ document IMHO. J. PS, sorry for having only just caught up with this thread - I'm only subscribed to user at work. === Information in this email and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this email. Experian Limited (registration number 653331). Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF - 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-caching for SVG's
I think you got drown'd in a thread war, sorry :) You don't say what version of Cocoon you are using or what browser you are targeting. The way around this (for the latest cvs version of Cocoon) is to wrap anything you don't want caching in a map:pipeline type=noncaching/ pipeline. Give it a try, it works for me ;) J. PS, if you reply to replies would you mind trimming excess off :) From: Spectron International, Inc. [mailto:[EMAIL PROTECTED]] Ok, if nobody knows, how about telling me in where in the CVS repository (class name) could it be? Faw From: Spectron International, Inc. [EMAIL PROTECTED] Does anyone knows how do the EXPIRES works in cocoon-2.1? Faw From: Spectron International, Inc. [EMAIL PROTECTED] Any answer to this? From: Spectron International, Inc. [EMAIL PROTECTED] Found that EXPIRES was added to HEAD in this message: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102343531609919w=2 Now, what do I have to add to the sitemap to make it work? Faw From: Geoff Howard [EMAIL PROTECTED] I think that browsers are more aggressive caching images than html. The assumption seems to be that images do not change as often. That's not authoritative, just my theory from experience trying to do things like what you're doing. The good news is that browsers should respect a last-modified http header, and/or an expires header set in the past. Probably the second is more important. What I don't know is if cocoon has currently working functionality to set those headers. I remember a past discussion where I thought this was in the process of being fixed. Geoff Howard From: Spectron International, Inc. [mailto:[EMAIL PROTECTED]] I asked this before but I didn't got a definite answer so I'll ask this another way. I'm creating SVGs using information retrieved from a database that can change at any time. I don't want the SVG's cached anywhere. Right now when I click on a link that will display an SVG it works, but if I click 'Back' and then click on the same link again it changes the page contents but not the SVG, I have to click on 'Refresh' to update the graph. Is there a way to refresh the SVG as well? === Information in this email and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this email. Experian Limited (registration number 653331). Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF - 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]
DatabaseAuthenticatorAction
Hi guys A question about the DatabaseAuthenticatorAction action. It works and all so I'm not worried about configuring anything. It's more to do with getting error messages back from it. If I use the FormValidatorAction then I can parse the feedback in XSP using the form-validator logicsheet. Is there any similar way of parsing the feedback if I use the DatabaseAuthenticatorAction? It's all very well telling a user that a required field is null but I want to tell that same user that the username/password combination is invalid. TIA. Chris - 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]
DTD comments in xinclude/cinclude transformer output
Hi, using the cinclude or the xinclude transformer i get everytime the comments from the source documents DTD included. This results in ca. 114 kB extra with the DocBook DTD. Although I've not tried to reproduce bug #5973 and http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102507582917917w=2 this may be similar problems. The testcase: tomcat 4.0.4 (was also with 4.0.1) cocoon 2.0.3 from cvs (ca. 23.05.2002)+ saxon/xerces Directory structure: cocoon/ mount/ dtdcomments/ sitemap.xmap test.xml test2.xml test3.xml dtd/ (directory with DocBook DTD whitin) TIA, Sven. ?xml version=1.0 encoding=ISO-8859-1? map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; !-- === Components -- map:components map:generators default=file/ map:transformers default=xslt / map:readers default=resource/ map:serializers default=html/ map:selectors default=browser/ map:matchers default=wildcard/ /map:components !-- === Pipelines = -- map:pipelines !-- === test = -- map:pipeline !-- Here i get the expected result -- map:match pattern=testcase1.xml map:generate src=test.xml/ map:serialize type=xml/ /map:match !-- Here i have the comments from within the dtd -- map:match pattern=testcase2.xml map:generate src=test2.xml/ map:transform type=xinclude/ map:serialize type=xml/ /map:match !-- Here i have also the comments from within the dtd -- map:match pattern=testcase3.xml map:generate src=test3.xml/ map:transform type=cinclude/ map:serialize type=xml/ /map:match /map:pipeline /map:pipelines /map:sitemap !-- end of file -- ?xml version=1.0 encoding=UTF-8? !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN dtd/docbookx.dtd article titleA stupid example/title paraThis is only a test file./para /article ?xml version=1.0 encoding=UTF-8? xi:include xmlns:xi=http://www.w3.org/2001/XInclude; href=test.xml / ?xml version=1.0 encoding=UTF-8? ci:include xmlns:ci=http://apache.org/cocoon/include/1.0; src=test.xml / - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to remove the DTD wriiten at the top ?
Hi, this seems to be some sort of Bug #5973. I've a similar problem using the xinclude and the cinclude transformer. I will send an extra email for this. Sebastien SACARD wrote: Vadim Gritsenko wrote: From: Sebastien SACARD [mailto:[EMAIL PROTECTED]] [snip] map:serializers default=html map:serializer name=html mime-type=text/html; charset ISO-8859-1 src=org.apache.cocoon.serialization.HTMLSerializer encodingISO-8859-1/encoding doctype-public-//W3C//DTD HTML 4.0 Transitional//EN /doctype-public doctype-systemhttp://www.w3.org/TR/REC-html40/loose.dtd/doctype-syste m omit-xml-declarationtrue/omit-xml-declaration indent1/indent /map:serializer [snip] !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN http://www.w3.org/TR/REC-html40/loose.dtd; !-- Extensible HTML version 1.0 Transitional DTD This is the same as HTML 4.0 Transitional except for [snipped] This are all comments from the DTD and its entities? Right? Ciao Sven. - 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]
[RT] List Codex (was Re: Giving up! Cocoon too big, slow andconfusing)
Christian Haul wrote: I have one very simple request for all users of this list: Please follow up to an answer you've received by summarizing the thread, ideally adding SUMMARY to the subject. Yes! This is an excellent idea. In fact this is part of listserver etiquette. In the early days of mail listservers, this used to happen all the time. It makes the list much more productive. First of all, *YOU* are the only person on earth that can judge if the help was correct, helpful, and on target. _You_ know best how to describe _your_ problem, and _you_ can judge which information _you_ got is the key. Of course _we_ need to take the time not only to throw pieces of information at you but _explain_ and give pointers. The effect would be that these summaries can easily be searched and used for building docs, at least FAQs. It doesn't take much time and it is only fair enough if you 'pay' for the help you got. And it makes answering questions much more fun if it is followed up with a positive feedback. This codex cannot be enforced, but I for my part tend to ignore questions from those that never follow up. Me too. After we have discussed this thread a bit, then we can add a section to the cocoon/mail-lists.html doc. Does anyone know a good link that we can add about general mail list etiquette. --David Oh, for this to work, make sure that your mail user agent keeps the In-Reply-To: header so it threads well. As a side node, sun-managers works like this (only that replies are allowed only directly to the initial individual, not the list) and it works well. Chris. - 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 xternal parametrization
Hello, Is it possible to externally parametrize sitemap ? Problem is : there is external (to cocoon application) storage of xml and non-xml data located in same filesystem. Currently it's referenced in sitemap by specifying relative path (from sitemap.xmap file to storage) and the references are quite numerous. So it is not flexible in case the storage location changes. The final goal is to customize application settings without interfering the sitemap.xmap file, changing one line in some other file (xml/property/any other). So, is there a way to specify parameter to sitemap externally to use it like {1} or {STORAGE_PATH}etc. Via properties of cocoon , via sitemap/xconf file details? Thank You in advance - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to remove namespace declarations and prefixes?
I have to use a lot of namespaces and I want to remove them at the last transformation step. I found several solutions but none of them works for me: exclude-result-prefixes (in the stylesheet) [http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=100101165325379w=2] omit-xml-declaration (in the sitemap) [http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=100084611731795w=2] exclude-prefixes (in the stylesheet) http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=101912408904652w=2 I use Cocoon2.1dev from last week, JDK_1.3.03 and Tomcat_4.01. Regards, Reinhard - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to remove namespace declarations and prefixes?
Thank you for this solution. - Do you know if this influences the performance? - Is there a special reason why exclude-result-prefixes doesn't work or is it a bug? Regards, Reinhard -Original Message- From: Manos Batsis [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 12:45 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: How to remove namespace declarations and prefixes? Piece of cake. A stylesheet which does exactly that would is ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes/ xsl:template match=* !-- remove element prefix (if any) -- xsl:element name={local-name()} !-- process attributes -- xsl:for-each select=@* !-- remove attribute prefix (if any) -- xsl:attribute name={local-name()} xsl:value-of select=./ /xsl:attribute /xsl:for-each xsl:apply-templates/ /xsl:element /xsl:template /xsl:stylesheet However, adding another step in your pipeline may not be the best solution. You might want to modify your existing last stylesheet to remove prefixes using the local-name() function as above. Hope this helps, Manos - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DatabaseAuthenticatorAction
Hi You can use both the formval and the dbauth action. if you get no error from the formvalidator action but null from the dbauth action, the supplied username and password is invalid. greetings mike - Original Message - From: Chris [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 01, 2002 10:59 AM Subject: DatabaseAuthenticatorAction Hi guys A question about the DatabaseAuthenticatorAction action. It works and all so I'm not worried about configuring anything. It's more to do with getting error messages back from it. If I use the FormValidatorAction then I can parse the feedback in XSP using the form-validator logicsheet. Is there any similar way of parsing the feedback if I use the DatabaseAuthenticatorAction? It's all very well telling a user that a required field is null but I want to tell that same user that the username/password combination is invalid. TIA. Chris - 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: How to remove namespace declarations and prefixes?
From: Reinhard Poetz [mailto:[EMAIL PROTECTED]] Thank you for this solution. - Do you know if this influences the performance? Reinhard, *anything* influences performance. The professor at the course I follow, presented this issue very simply as In software design, you always give some to take some. - Is there a special reason why exclude-result-prefixes doesn't work or is it a bug? Are you using it correctly? For example, if you know your XSLT will *only* process either XSD or XHTML documents, you can do the same with ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:xht=http://www.w3.org/1999/xhtml; exclude-result-prefixes=xs xht xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes/ xsl:template match=*|@* xsl:copy xsl:apply-templates/ /xsl:copy /xsl:template /xsl:stylesheet Note that you have to declare ALL the namespaces you wish to filter out by associate them with a namespace prefix(duh); then put a space separated list of ALL prefixes as the value of the exclude-result-prefixes attribute. The only case this doesn't work is when you don't know the namespaces you may encounter. Cheers, Manos Regards, Reinhard -Original Message- From: Manos Batsis [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 12:45 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: How to remove namespace declarations and prefixes? Piece of cake. A stylesheet which does exactly that would is ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes/ xsl:template match=* !-- remove element prefix (if any) -- xsl:element name={local-name()} !-- process attributes -- xsl:for-each select=@* !-- remove attribute prefix (if any) -- xsl:attribute name={local-name()} xsl:value-of select=./ /xsl:attribute /xsl:for-each xsl:apply-templates/ /xsl:element /xsl:template /xsl:stylesheet However, adding another step in your pipeline may not be the best solution. You might want to modify your existing last stylesheet to remove prefixes using the local-name() function as above. Hope this helps, Manos - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
[doc] FAQ, mod-rewrite, comments needed
Luca Morandinin recently updated the FAQ for Configuring Cocoon's Environment. The content for the second part of his FAQ on mod-rewrite ( How can I reach my Cocoon app from an URI other than your- server/cocoon/my-app? ) follows. My question is at the end of the faq-content block. faq-content This entry was tested under: Windows NT 4.0 + Apache 1.3.14 + Tomcat 3.2 + Cocoon 2.0b1. It is Apache-specific. The idea is just to redirect a portion of the desired URI (bar) to the one within the cocoon context (cocoon/bar). Apache has an handy feature called mod_rewrite that does just this: URI rewriting. (See the URL Rewriting Guide in the Apache user's guide for details). First of all, you should instruct Apache to load the mod_rewrite. Add (on a Windows system) to httpd.conf the following line: LoadModule rewrite_module modules/ApacheModuleRewrite.dll (By the way it's quite likely that this line is already on the httpd.conf. You just have to uncomment it). Add this line to httpd.conf in order to activate mod_rewrite: RewriteEngine On It is highly recommended to use the logging option of mod_rewrite, in order to check the correctness of the URI rewriting. Just add these lines to the httpd.conf: RewriteLog C:/logs/rewrite.log RewriteLogLevel 9 The first line tells Apache to put the URI rewriting log in the c:\logs\rewrite.log file (which happens to be on a Windows system, of course). The second one tells Apache to record everything mod_rewrite does. If you don't want to log anything, just set RewriteLogLevel to 0. Now, it's time to do the URI rewriting trick. RewriteRule bar/(.*) /cocoon/bar/$1 [PT] This line instructs Apache to redirect everything under bar to cocoon/foo and to pass it on for other processing ([PT] option), like mod_alias. Just restart Apache and point your browser to: your-server:8080/bar/something It should work just fine. Note: The RewriteRule may not work in all cases (notably under Slackware Linux with Apache 1.3), if so, try replacing it with: RewriteRule ^/Foo /cocoon/Foo/ [R] RewriteRule ^/Foo(.*) /cocoon/Foo$1 [R] /faq-content Liam Morley had the following comment: In my experience, session support is lost when you use mod_rewrite because the cookie path for the Cocoon session is /cocoon. Because the browser sees the path differently, the session cookie is not granted access, and sessions don't work. I got around this by renaming Cocoon to ROOT, I imagine setting the default docBase would have the same effect. Would anyone else care to comment on Liam's comment? If not, I'll go ahead and incorporate Liam's comment into the FAQ. Thanks, Liam, for sending your feedback to Luca and me. Thanks. Diana - 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: basic start
From: Diego Lluna [mailto:[EMAIL PROTECTED]] hi, i've been trying to test the simplest xsp pages from a local site. ... since i copied the example from existing ones, i suspect i have some kind of config problem, maybe in the sitemap.xmap anybody can help? i'm providing more info: the .xsp file: ?xml version=1.0? ?cocoon-process type=xsp? ?cocoon-process type=xslt? ?xml-stylesheet href=stylesheets/default.xsl type=text/xsl ? This syntax is not supported in C2. You'd better start with C2 original samples: there is a lot of XSP pages. Take a look at your COCOON-WEBAPP/docs/samples/xsp/'. Konstantin xsp:page language=java xmlns:xsp=http://www.apache.org/1999/XSP/Core; xsp:logic static private int counter=0; private synchronized int count(){ return counter++; } /xsp:logic page para me han llamado xsp:exprcount()/xsp:expr veces /para /page /xsp:page i'm running cocoon 2.0.1 on apache 4.0.3 sincere thanks, Diego - 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: How to remove namespace declarations and prefixes?
-Original Message- From: Manos Batsis [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 1:21 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: How to remove namespace declarations and prefixes? - Do you know if this influences the performance? Reinhard, *anything* influences performance. The professor at the course I follow, presented this issue very simply as In software design, you always give some to take some. That's absoluty clear - may I have to pose the question more correctly: Is there a difference in performance - your solution compared to a working exclude-result-prefixes-attribute? - Is there a special reason why exclude-result-prefixes doesn't work or is it a bug? Are you using it correctly? For example, if you know your XSLT will *only* process either XSD or XHTML documents, you can do the same with ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:xht=http://www.w3.org/1999/xhtml; exclude-result-prefixes=xs xht xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes/ xsl:template match=*|@* xsl:copy xsl:apply-templates/ /xsl:copy /xsl:template /xsl:stylesheet Note that you have to declare ALL the namespaces you wish to filter out by associate them with a namespace prefix(duh); then put a space separated list of ALL prefixes as the value of the exclude-result-prefixes attribute. The only case this doesn't work is when you don't know the namespaces you may encounter. Did you try it with Cocoon? If yes, which version do you use? My stylesheet: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:f=http://www.poetz.cc/forms; xmlns:l=http://www.poetz.cc/linking; xmlns:cinclude=http://apache.org/cocoon/include/1.0; xmlns:dc=http://purl.org/dc/elements/1.1/; xmlns:rss=http://purl.org/rss/1.0/; xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; exclude-result-prefixes=f ... Regards, Reinhard - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to remove namespace declarations and prefixes?
From: Reinhard Poetz [mailto:[EMAIL PROTECTED]] Is there a difference in performance - your solution compared to a working exclude-result-prefixes-attribute? Depends on whether you want to add a new stylesheet or modify the existing one (if any). While on the second choice (using xsl:element with local-name() in all templates that handle elements and attributes) performance should not change notisably; essentially this and exclude-result-prefixes do the same thing. Did you try it with Cocoon? If yes, which version do you use? Nope I haven't. My stylesheet: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:f=http://www.poetz.cc/forms; xmlns:l=http://www.poetz.cc/linking; xmlns:cinclude=http://apache.org/cocoon/include/1.0; xmlns:dc=http://purl.org/dc/elements/1.1/; xmlns:rss=http://purl.org/rss/1.0/; xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; exclude-result-prefixes=f Yes, the above will only remove namespace prefixes bound to http://www.poetz.cc/forms To filter all prefixes out modify the exclude-result-prefixes attribute to exclude-result-prefixes=f l cinclude dc rss rdf Hth, Manos - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No-caching for SVG's
I'm using 2.1dev (HEAD?) and the browser is IE and/or Netscape. I'm already using the map:pipeline type=noncaching/. This works for the page but not the SVG inside the page. Right now when I click on a link that will display an SVG it works, but if I click 'Back' and then click on the same link again it changes the page contents but not the SVG, I have to click on 'Refresh' to update the graph. Is there a way to refresh the SVG as well? I read here, that if I sent an 'Expires' or 'Last modified' header to the browser, the graph wouldn't be cached by the browser, and that HEAD had the 'Expires' changes. I just want to know how to use Expires or what should I do to add headers to the response in Cocoon. Should I make a new serializet, can I use an action? Faw - Original Message - From: Morrison, John [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 01, 2002 4:50 AM Subject: RE: No-caching for SVG's I think you got drown'd in a thread war, sorry :) You don't say what version of Cocoon you are using or what browser you are targeting. The way around this (for the latest cvs version of Cocoon) is to wrap anything you don't want caching in a map:pipeline type=noncaching/ pipeline. Give it a try, it works for me ;) J. PS, if you reply to replies would you mind trimming excess off :) - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SUMMARY: Re: cocoon xternal parametrization
Unfortunately it's not applicable to c2.0.1 I am using (for stability reasons). Christian Haul wrote: On 01.Jul.2002 -- 02:16 PM, KOZLOV Roman wrote: Hello, Is it possible to externally parametrize sitemap ? Problem is : there is external (to cocoon application) storage of xml and non-xml data located in same filesystem. Currently it's referenced in sitemap by specifying relative path (from sitemap.xmap file to storage) and the references are quite numerous. So it is not flexible in case the storage location changes. The final goal is to customize application settings without interfering the sitemap.xmap file, changing one line in some other file (xml/property/any other). So, is there a way to specify parameter to sitemap externally to use it like {1} or {STORAGE_PATH}etc. Via properties of cocoon , via sitemap/xconf file details? In CVS HEAD there's support for using InputModules directly from sitemap(*) using a rather similar syntax {module-name:parameter} You could now implement a component implementing the o.a.c.c.modules.InputModule interface to access these parameters. This interface is very simple and implementing it should be trivial. (*) only with the interpreted sitemap aka treeprocessor In 2.0.[23] InputModules exists in the scratchpad area, but the sitemap syntax mentioned is not available. Chris. Please follow up summarizing your problem and which suggested solution / information worked for you. Add SUMMARY: to the subject line. This will make FAQ generation and searching the list easier. In addition, it makes helping you more fun. Thank you. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - 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: soap call problems
From: Chris Warr [mailto:[EMAIL PROTECTED]] Hi, I'm running cocoon 2.0.2 under tomcat 4.0.4b2. I've created the example web service under .NET, TempConvert1. I can call this with no problems from VB using the MSSOAP object. I'm trying to call it using the xsp soap taglib and I get the following error: org.apache.cocoon.ProcessingException: Error invoking remote service: java.lang.IllegalArgumentException: port out range:-1: java.lang.IllegalArgumentException: port out range:-1 Looks like '-1' is the default port number. Try specifying port number: soap:call url=http://147.76.204.58:80/TempConvert1/Service1.asmx; Vadim I can call other web services from cocoon with no dramas. My soap call looks like this: search-results soap:call url=http://147.76.204.58/TempConvert1/Service1.asmx; xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance; xmlns:xsd=http://www.w3.org/1999/XMLSchema; ns1:ConvertTemperature xmlns:ns1=urn:Service1 dFahrenheit xsi:type=xsd:string100/dFahrenheit /ns1:ConvertTemperature /soap:call /search-results NB. To those familiar with TempConvert1, I've changed the type of dFarenheit from double to string. Anybody got any ideas? Chris. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to remove namespace declarations and prefixes?
From: Manos Batsis [mailto:[EMAIL PROTECTED]] From: Reinhard Poetz [mailto:[EMAIL PROTECTED]] Is there a difference in performance - your solution compared to a working exclude-result-prefixes-attribute? Depends on whether you want to add a new stylesheet or modify the existing one (if any). While on the second choice (using xsl:element with local-name() in all templates that handle elements and attributes) performance should not change notisably; essentially this and exclude-result-prefixes do the same thing. Did you try it with Cocoon? If yes, which version do you use? Nope I haven't. It seems to me that this is a bug in cocoon. My stylesheet: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:f=http://www.poetz.cc/forms; xmlns:l=http://www.poetz.cc/linking; xmlns:cinclude=http://apache.org/cocoon/include/1.0; xmlns:dc=http://purl.org/dc/elements/1.1/; xmlns:rss=http://purl.org/rss/1.0/; xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; exclude-result-prefixes=f Yes, the above will only remove namespace prefixes bound to http://www.poetz.cc/forms To filter all prefixes out modify the exclude-result-prefixes attribute to ATM it doesn't remove the namespace. I'll report the bug to bugzilla. Thanks for your help. Reinhard - 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: Security in cocoon.xconf?
Move cocoon.xconf to WEB-INF/cocoon.xconf, as in latest Cocoon versions. This is a bit more secure location then before. Vadim -Original Message- From: Tsui, Alban [mailto:[EMAIL PROTECTED]] Sent: Friday, June 28, 2002 10:32 AM To: [EMAIL PROTECTED] Subject: Security in cocoon.xconf? I have setup database connection in cocoon.xconf but the username and password are required in cocoon.xconf. How secure if cocoon.xconf? Will crashes or any tricks expose this information to the clients or other servlets? If so, any measure that I can take to hide such information? I am using cocoon 2.0.1. Alban This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. - 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 xternal parametrization
On Monday, July 1, 2002, at 06:16 AM, KOZLOV Roman wrote: Problem is : there is external (to cocoon application) storage of xml and non-xml data located in same filesystem. Currently it's referenced in sitemap by specifying relative path (from sitemap.xmap file to storage) and the references are quite numerous. So it is not flexible in case the storage location changes. The final goal is to customize application settings without interfering the sitemap.xmap file, changing one line in some other file (xml/property/any other). So, is there a way to specify parameter to sitemap externally to use it like {1} or {STORAGE_PATH}etc. Via properties of cocoon , via sitemap/xconf file details? Can you set these parameters as filter tokens in ANT and include them (via filtering=on) into your files within a build target? This isn't dynamic, of course, but it's quite useful. If so, check out the build.xml file for examples. Diana - 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: [USER POLL] New cocoon-docs mailing list?
+1 from me. Maybe some more users (me included) will get some more focus on docs. I have some texts laying around I need to finish to be useful. Bert At 14:09 28/06/2002 +0200, you wrote: The Cocoon documentation project has started with the great help of Diana Shannon, and is gaining good momentum and interest :-) In case you don't already know, on the dev list we have decided that a cocoon-docs mailing list could help this subproject and facilitate contributors. We are *seriously* committed to Cocoon, and to the *best* documentation it can have. *** Users, do you think it's time for a cocoon-docs list? *** -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) - - 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: Problems with Database Tutorial
On 28.Jun.2002 -- 09:19 AM, Bobby Mitchell wrote: I'm using Cocoon 2.1-dev, IBM JDK 1.3, running on RedHat 7.2, and using Sybase 11.9.2. I can't add or update users in the DB. I can only delete them. I tried this with both Sybase and Hsqldb and the results are the same. AFAIK there's a pending bug that the treeprocssor (which interpretes the sitemap for 2.1-dev per default) does not allow to nest actions in an action-set. Hence using db-add inside form-val does not work with that release and the tutorial is broken. With 2.0.2 and 2.0.3 (not released, yet, available from CVS, branch cocoon_2_0_3_branch) it should work. While using Sybase I had to remove the esql:parameter begin and end tags in order to actually edit the entry, otherwise I get an sql error stating that SELECT name, department_id FROM employee WHERE id = ? is an error. The id is being passed as a ? so it causes an error. When using Hsqldb I made no changes to the code. This is standard JDBC syntax for a prepared statement that takes parameters. Maybe the original error message provides more information? Has anyone ever seen this before? Where do I look in the log files for debug info, such as tracking what is taking place behind the scenes? Are there debug parameters that I can pass to Cocoon and receive more debug info. That is spread among several files. Most interesting are probably core.log and sitemap.log. This can be configured in logkit.xconf. My wish list: A debug feature that outlines each move Cocoon makes, so I can trace what my code is producing and more importantly where it fails. The java code produced from an XSP is located $TOMCAT/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/path/relative/to/context/name_xsp.java It often helps a lot to have a look at it. Chris. Please follow up summarizing your problem and which suggested solution / information worked for you. Add SUMMARY: to the subject line. This will make FAQ generation and searching the list easier. In addition, it makes helping you more fun. Thank you. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - 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]
writing servlet output to disk
Hi, I used the coccon command line application for a while, and I just migrated to the servlet version with Tomcat. I'd like both to write the result of a pipeline to disk AND to the standart output (in the servlet case, the Response object). I don't need to do both in the same time. for example, a call to : /cocoon/index800.html has to write the result on the browser and /coccon/index800HD.html has to write the same output in a file on /WEB-INF/docs/index800HD.html. Is this something common and easy to do ? - 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: writing servlet output to disk
Hi !! I reuse the Webapp sample protected area. Once the identification done, I arrived on the protected page. But how could I do to go into another page without quiting the protected zone. I mean : if there is a link on my protected page how could I do to stay in a protected state ? At the moment, as I go to another page, the data transmit by the session (session:get-attribute name=id/) are unavailable... Thanks, Nicolas !! - 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: Form Validator
Thanks for the tips Dave. I have the DBAuthenticator working. But I still can't get the session validator and form validator to work. Could you please post an example of the XML file you use in your Form or Session validators? I'm trying to be really simple right now with mine: ?xml version=1.0? root parameter name=user_name type=string nullable=no/ /root Here is an exerpt of my sitemap. I took the FormValidator off the do_login.xsp to get the DBAuth working. !-- unprotected login page -- map:match pattern=login.xsp map:generate type=serverpages src=logic/login.xsp/ map:transform src=../stylesheets/site_format.xsl/ map:transform src=stylesheets/login.xsl/ map:serialize/ /map:match !-- | The page do_login does not actually exist this is just a dummy | target for the login auth to take place at. -- map:match pattern=do_login.xsp !-- now try to log in -- map:act type=db-authenticator map:parameter name=descriptor value=context://house_bills/descriptors/auth.xml/ !-- now go to protected area -- map:redirect-to uri=index.xsp/ /map:act !-- something was wrong, try it again -- map:redirect-to uri=login.xsp/ /map:match !-- | Just like with do_login.xsp there is no logout.xsp page. It is | just a dummy target which kills the user's session. -- map:match pattern=logout.xsp map:act type=session-invalidator map:redirect-to uri=login.xsp/ /map:act /map:match !-- the whole site requires a login so we do special excludes -- map:match pattern=*.xsp map:act type=session-validator map:parameter name=descriptor value=context://house_bills/descriptors/params.xml/ map:parameter name=validate value=user_name/ !-- Now generate the page -- map:generate type=serverpages src=logic/{1}.xsp/ map:transform src=../stylesheets/site_format.xsl/ map:transform src=stylesheets/{1}.xsl/ map:serialize/ !-- End generated page -- /map:act !-- something was wrong, redirect to login page -- map:redirect-to uri=login.xsp/ /map:match - Original Message - From: Dave Covert [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 30, 2002 10:54 PM Subject: Re: Form Validator Eric- I have a simple authentication running with mySql. The db-authenticator is missing from the pipeline given. form-validator is only validating that the values in your form meet the constraints in params.xml. db-authenticator will check the database table against what the user typed in. The corresponding pipeline in my sub-site is: map:match pattern=do-login !-- first validate whether submitted values are ok -- map:act type=form-validator map:parameter name=descriptor value=context://wbs/descriptors/params.xml/ map:parameter name=validate value=user_id/ !-- now try to log in -- map:act type=db-authenticator map:parameter name=descriptor value=context://wbs/descriptors/auth.xml/ !-- now go to protected area -- map:redirect-to uri=protected/ /map:act /map:act !-- something was wrong, try it again -- map:redirect-to uri=login/ /map:match (Yes, it was shamelessly stolen from the example.) The auth.xml I use looks like this: ?xml version=1.0 encoding=UTF-8? auth-descriptor connectionwbs/connection table name=tbl_users select dbcol=user_id request-param=user_id to-session=user_id/ select dbcol=user_password request-param=user_password to-session=user_password/ select dbcol=user_permission to-session=user_permission type=string/ /table /auth-descriptor An item of note: the names for the id password MUST match in login.xsp (request name - html form), in params.xml (name=), and auth.xml (request-param=). The dbcol in auth.xml is the column name in your table - user_name from your table def. If the request name in login.xsp (from the html form) is not the same as in params.xml (in your case user_id) that may be why the form is not validated - sending you back to login. Then, assuming other pipes will be 'protected' you need to wrap each one. Such as: map:match pattern=*-meter.html* map:act type=session-validator map:parameter name=descriptor value=context://wbs//descriptors/params.xml/ map:parameter name=validate value=user_id, user_password/
RE: How to remove namespace declarations and prefixes?
Hi Richard, I also had this same problem. I did some reading, and according to Michael Kay's XSLT Programmer's Reference: The xsl:exclude-result-prefixes and exclude-result-prefixes attributes apply only to namespace nodes copied from the stylesheet using literal result elements. They do not affect namespace nodes copied from the source document using xsl:copy or xsl:copy-of: there is no way of suppressing these. Unfortunately, since xslt's will often have a catch-all template matcher to copy elements it doesn't transform, this comes up quite a bit. So... what I ended up doing was extending the HTMLSerializer (or whatever serializer you're using for your pipelines), and overriding the startPrefixMapping and endPrefixMapping methods to do nothing, effectively removing all namespaces from my HTML. This also had the added benefit of having no performance penalties (and theoretically, a ever-so-slight speedup since we no longer process namespaces in our serializer). You could make this more general, and use the serializer's configuration to declare which namespaces you want to exclude, but excluding all worked well for us, especially since we were outputting HTML. Hope that helps! Harry -Original Message- From: Reinhard Poetz [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 7:53 AM To: [EMAIL PROTECTED] Subject: RE: How to remove namespace declarations and prefixes? From: Manos Batsis [mailto:[EMAIL PROTECTED]] From: Reinhard Poetz [mailto:[EMAIL PROTECTED]] Is there a difference in performance - your solution compared to a working exclude-result-prefixes-attribute? Depends on whether you want to add a new stylesheet or modify the existing one (if any). While on the second choice (using xsl:element with local-name() in all templates that handle elements and attributes) performance should not change notisably; essentially this and exclude-result-prefixes do the same thing. Did you try it with Cocoon? If yes, which version do you use? Nope I haven't. It seems to me that this is a bug in cocoon. My stylesheet: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:f=http://www.poetz.cc/forms; xmlns:l=http://www.poetz.cc/linking; xmlns:cinclude=http://apache.org/cocoon/include/1.0; xmlns:dc=http://purl.org/dc/elements/1.1/; xmlns:rss=http://purl.org/rss/1.0/; xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; exclude-result-prefixes=f Yes, the above will only remove namespace prefixes bound to http://www.poetz.cc/forms To filter all prefixes out modify the exclude-result-prefixes attribute to ATM it doesn't remove the namespace. I'll report the bug to bugzilla. Thanks for your help. Reinhard - 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]
[Summary] How to remove namespace declarations and prefixes?
Thank you Harry and Manos! I want to provide a summary of this thread - maybe this could be included into some docs. Problem: ... I use namespaces and I want to remove them in my result xml ... (original mail: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102551958020786w=2) Solutions, which NOT work: ** exclude-result-prefixes (in the stylesheet) [http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=100101165325379w=2] omit-xml-declaration (in the sitemap) [http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=100084611731795w=2] exclude-prefixes (in the stylesheet) http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=101912408904652w=2 Solutions, which WORK: ** 1.) Harry Lai: -- Kay's XSLT Programmer's Reference: The xsl:exclude-result-prefixes and exclude-result-prefixes attributes apply only to namespace nodes copied from the stylesheet using literal result elements. They do not affect namespace nodes copied from the source document using xsl:copy or xsl:copy-of: there is no way of suppressing these. Unfortunately, since xslt's will often have a catch-all template matcher to copy elements it doesn't transform, this comes up quite a bit. So... what I ended up doing was extending the HTMLSerializer (or whatever serializer you're using for your pipelines), and overriding the startPrefixMapping and endPrefixMapping methods to do nothing, effectively removing all namespaces from my HTML. This also had the added benefit of having no performance penalties (and theoretically, a ever-so-slight speedup since we no longer process namespaces in our serializer). You could make this more general, and use the serializer's configuration to declare which namespaces you want to exclude, but excluding all worked well for us, especially since we were outputting HTML. (complete mail: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102553525402606w=2) 2.) Manos Batsis: - ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes/ xsl:template match=* !-- remove element prefix (if any) -- xsl:element name={local-name()} !-- process attributes -- xsl:for-each select=@* !-- remove attribute prefix (if any) -- xsl:attribute name={local-name()} xsl:value-of select=./ /xsl:attribute /xsl:for-each xsl:apply-templates/ /xsl:element /xsl:template /xsl:stylesheet (complete mail: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102552029221254w=2) Regards, Reinhard - 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: [Summary] How to remove namespace declarations and prefixes?
Reinhard, good job, this [Summary] method could kickstart a sprawling FAQ archive :) Many thanks, - Luca Morandini GIS Consultant [EMAIL PROTECTED] http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Reinhard Poetz [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 5:15 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [Summary] How to remove namespace declarations and prefixes? Thank you Harry and Manos! I want to provide a summary of this thread - maybe this could be included into some docs. Problem: ... I use namespaces and I want to remove them in my result xml ... (original mail: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102551958020786w=2) Solutions, which NOT work: ** exclude-result-prefixes (in the stylesheet) [http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=100101165325379w=2] omit-xml-declaration (in the sitemap) [http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=100084611731795w=2] exclude-prefixes (in the stylesheet) http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=101912408904652w=2 Solutions, which WORK: ** 1.) Harry Lai: -- Kay's XSLT Programmer's Reference: The xsl:exclude-result-prefixes and exclude-result-prefixes attributes apply only to namespace nodes copied from the stylesheet using literal result elements. They do not affect namespace nodes copied from the source document using xsl:copy or xsl:copy-of: there is no way of suppressing these. Unfortunately, since xslt's will often have a catch-all template matcher to copy elements it doesn't transform, this comes up quite a bit. So... what I ended up doing was extending the HTMLSerializer (or whatever serializer you're using for your pipelines), and overriding the startPrefixMapping and endPrefixMapping methods to do nothing, effectively removing all namespaces from my HTML. This also had the added benefit of having no performance penalties (and theoretically, a ever-so-slight speedup since we no longer process namespaces in our serializer). You could make this more general, and use the serializer's configuration to declare which namespaces you want to exclude, but excluding all worked well for us, especially since we were outputting HTML. (complete mail: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102553525402606w=2) 2.) Manos Batsis: - ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes/ xsl:template match=* !-- remove element prefix (if any) -- xsl:element name={local-name()} !-- process attributes -- xsl:for-each select=@* !-- remove attribute prefix (if any) -- xsl:attribute name={local-name()} xsl:value-of select=./ /xsl:attribute /xsl:for-each xsl:apply-templates/ /xsl:element /xsl:template /xsl:stylesheet (complete mail: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102552029221254w=2) Regards, Reinhard - 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]
sitemap.xmap could not be found. (possible context problem)
Hi list, I updated my Cocoon Installation to a fresh cvs checkout (1.7.2002) and now I get the following error: sitemap.xmap could not be found. (possible context problem) I deleted all temporary container files, I used cocoon.xconf and the sitemap.xmap from the cvs version, I just put my pipelines in the sitemap. I run this with Websphere 3.5.5. What's wrong? Cheers, Michael Full stack: org.apache.excalibur.source.SourceNotFoundException: sitemap.xmap could not be found. (possible context problem) at org.apache.avalon.framework.CascadingException.init(CascadingException .java:43) at org.apache.excalibur.source.SourceException.init(SourceException.java: 44) at org.apache.excalibur.source.SourceNotFoundException.init(SourceNotFoun dException.java:28) at org.apache.cocoon.components.source.impl.ContextSourceFactory.getSource( ContextSourceFactory.java:147) at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceRes olverImpl.java:270) at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonCom ponentManager.java:403) at org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnv ironment.java:431) at org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnv ironment.java:421) at org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(T reeProcessor.java:399) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro cessor.java:321) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro cessor.java:309) at org.apache.cocoon.Cocoon.process(Cocoon.java:585) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletMan ager.java:626) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLife cycleServlet.java:160) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleSe rvlet.java:287) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifec ycleServlet.java:105) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.jav a:360) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(Servle tManager.java:775) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletM anager.java:701) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispat ch(WebAppRequestDispatcher.java:478) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppReq uestDispatcher.java:234) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequ estDispatcher.java:138) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvo ker.java:77) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(Cach edInvocation.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(Servlet RequestProcessor.java:155) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEList ener.java:300) at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.ru n(SQEventListenerImp.java:230) at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEv entListenerImp.java:104) at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent (SQEventSource.java:212) at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$Sele ctRunnable.notifyService(SQWrapperEventSource.java:353) at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$Sele ctRunnable.run(SQWrapperEventSource.java:220) at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable .run(OutOfProcThread.java:248) at java.lang.Thread.run(Thread.java:481) - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sitemap.xmap could not be found. (possible context problem)
Make sure that you don't have two excalibur-jars in your lib-directory. Regards, Reinhard -Original Message- From: Michael Zehrer [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 5:54 PM To: Cocoon-Users (E-Mail) Subject: sitemap.xmap could not be found. (possible context problem) Hi list, I updated my Cocoon Installation to a fresh cvs checkout (1.7.2002) and now I get the following error: sitemap.xmap could not be found. (possible context problem) I deleted all temporary container files, I used cocoon.xconf and the sitemap.xmap from the cvs version, I just put my pipelines in the sitemap. I run this with Websphere 3.5.5. What's wrong? Cheers, Michael Full stack: org.apache.excalibur.source.SourceNotFoundException: sitemap.xmap could not be found. (possible context problem) at org.apache.avalon.framework.CascadingException.init(CascadingException .java:43) at org.apache.excalibur.source.SourceException.init(SourceException.java: 44) at org.apache.excalibur.source.SourceNotFoundException.init(SourceNotFoun dException.java:28) at org.apache.cocoon.components.source.impl.ContextSourceFactory.getSource( ContextSourceFactory.java:147) at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceRes olverImpl.java:270) at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonCom ponentManager.java:403) at org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnv ironment.java:431) at org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnv ironment.java:421) at org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(T reeProcessor.java:399) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro cessor.java:321) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro cessor.java:309) at org.apache.cocoon.Cocoon.process(Cocoon.java:585) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletMan ager.java:626) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLife cycleServlet.java:160) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleSe rvlet.java:287) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifec ycleServlet.java:105) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.jav a:360) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(Servle tManager.java:775) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletM anager.java:701) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispat ch(WebAppRequestDispatcher.java:478) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppReq uestDispatcher.java:234) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequ estDispatcher.java:138) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvo ker.java:77) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(Cach edInvocation.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(Servlet RequestProcessor.java:155) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEList ener.java:300) at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.ru n(SQEventListenerImp.java:230) at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEv entListenerImp.java:104) at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent (SQEventSource.java:212) at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$Sele ctRunnable.notifyService(SQWrapperEventSource.java:353) at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$Sele ctRunnable.run(SQWrapperEventSource.java:220) at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable .run(OutOfProcThread.java:248) at java.lang.Thread.run(Thread.java:481) - 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
Re: [Summary] How to remove namespace declarations and prefixes?
On Monday, July 1, 2002, at 11:15 AM, Reinhard Poetz wrote: Thank you Harry and Manos! I want to provide a summary of this thread - maybe this could be included into some docs. Ok, sounds like an FAQ that points to a new Snippet (i.e. content below too long for basic FAQ). We need four doc patches: 1. patch for FAQ: src/documentation/xdocs/faq/faq-xslt.xml (add question then short answer with link to Snippet) 2. patch for a new snippet file, i.e. src/documentation/xdocs/snippet/snippet-remove-namespaces.xml (with content and snippets below) 3. patch for src/documentation/xdocs/snippet/book.xml (side menu link to Snippet) 4. patch for src/documentation/xdocs/snippet/index.xml (title and link to snippet) Any takers? -- Diana Problem: ... I use namespaces and I want to remove them in my result xml ... (original mail: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102551958020786w=2) Solutions, which NOT work: ** exclude-result-prefixes (in the stylesheet) [http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=100101165325379w=2] omit-xml-declaration (in the sitemap) [http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=100084611731795w=2] exclude-prefixes (in the stylesheet) http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=101912408904652w=2 Solutions, which WORK: ** 1.) Harry Lai: -- Kay's XSLT Programmer's Reference: The xsl:exclude-result-prefixes and exclude-result-prefixes attributes apply only to namespace nodes copied from the stylesheet using literal result elements. They do not affect namespace nodes copied from the source document using xsl:copy or xsl:copy-of: there is no way of suppressing these. Unfortunately, since xslt's will often have a catch-all template matcher to copy elements it doesn't transform, this comes up quite a bit. So... what I ended up doing was extending the HTMLSerializer (or whatever serializer you're using for your pipelines), and overriding the startPrefixMapping and endPrefixMapping methods to do nothing, effectively removing all namespaces from my HTML. This also had the added benefit of having no performance penalties (and theoretically, a ever-so-slight speedup since we no longer process namespaces in our serializer). You could make this more general, and use the serializer's configuration to declare which namespaces you want to exclude, but excluding all worked well for us, especially since we were outputting HTML. (complete mail: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102553525402606w=2) 2.) Manos Batsis: - ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes/ xsl:template match=* !-- remove element prefix (if any) -- xsl:element name={local-name()} !-- process attributes -- xsl:for-each select=@* !-- remove attribute prefix (if any) -- xsl:attribute name={local-name()} xsl:value-of select=./ /xsl:attribute /xsl:for-each xsl:apply-templates/ /xsl:element /xsl:template /xsl:stylesheet (complete mail: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102552029221254w=2) Regards, Reinhard - 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: sitemap.xmap could not be found. (possible context problem)
No, There is just one: avalon-excalibur-20020627.jar -Ursprüngliche Nachricht- Von: Reinhard Poetz [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 1. Juli 2002 18:12 An: [EMAIL PROTECTED] Betreff: RE: sitemap.xmap could not be found. (possible context problem) Make sure that you don't have two excalibur-jars in your lib-directory. Regards, Reinhard -Original Message- From: Michael Zehrer [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 5:54 PM To: Cocoon-Users (E-Mail) Subject: sitemap.xmap could not be found. (possible context problem) Hi list, I updated my Cocoon Installation to a fresh cvs checkout (1.7.2002) and now I get the following error: sitemap.xmap could not be found. (possible context problem) I deleted all temporary container files, I used cocoon.xconf and the sitemap.xmap from the cvs version, I just put my pipelines in the sitemap. I run this with Websphere 3.5.5. What's wrong? Cheers, Michael Full stack: org.apache.excalibur.source.SourceNotFoundException: sitemap.xmap could not be found. (possible context problem) at org.apache.avalon.framework.CascadingException.init(CascadingException .java:43) at org.apache.excalibur.source.SourceException.init(SourceException.java: 44) at org.apache.excalibur.source.SourceNotFoundException.init(SourceNotFoun dException.java:28) at org.apache.cocoon.components.source.impl.ContextSourceFactory.getSource( ContextSourceFactory.java:147) at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceRes olverImpl.java:270) at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonCom ponentManager.java:403) at org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnv ironment.java:431) at org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnv ironment.java:421) at org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(T reeProcessor.java:399) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro cessor.java:321) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro cessor.java:309) at org.apache.cocoon.Cocoon.process(Cocoon.java:585) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletMan ager.java:626) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLife cycleServlet.java:160) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleSe rvlet.java:287) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifec ycleServlet.java:105) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.jav a:360) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(Servle tManager.java:775) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletM anager.java:701) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispat ch(WebAppRequestDispatcher.java:478) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppReq uestDispatcher.java:234) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequ estDispatcher.java:138) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvo ker.java:77) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(Cach edInvocation.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(Servlet RequestProcessor.java:155) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEList ener.java:300) at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.ru n(SQEventListenerImp.java:230) at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEv entListenerImp.java:104) at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent (SQEventSource.java:212) at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$Sele ctRunnable.notifyService(SQWrapperEventSource.java:353) at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$Sele ctRunnable.run(SQWrapperEventSource.java:220) at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable .run(OutOfProcThread.java:248) at java.lang.Thread.run(Thread.java:481) - 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:
RE: FileWritingTransformer
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] I'm sorry if this is not the place to ask such a thing, but would it be possible for someone to send me a copy of FileWritingTransformer.java so that I may use it in my project. I can't seem to find it anywhere!! Searched the repository and a few sites and simply could not find it. Any help would be greatly appreciated. I just need a transformer that is able to take in parameters and based on them write a file to disk and then send the file data to standard output also. Cocoon 2.0.3 version: http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/scratchpad/src/org/apa che/cocoon/transformation/Attic/SourceWritingTransformer.java?rev=1.3co ntent-type=text/vnd.viewcvs-markup Cocoon 2.1 version: http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon /transformation/SourceWritingTransformer.java?rev=1.6content-type=text/ vnd.viewcvs-markup Vadim Thanks in advance, Gerardo - 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: Multiple conditions in an XSP if statement
I'm very very new to XML, and enjoying it thoroughly, but I have to admit that I find the amp;amp; encoding for a logical-and in Java to be extremely nasty looking. It really obfuscates the intended meaning of the statement, requiring the reader to view the Java-code contained within a little more indirectly. I have to think 'amp;amp;' looks like two ampersands, which would read as 'AND'. Maybe you get used to this, but it does begin to spoil the syntax of the underlying programming language. I'll now truly reveal my ignorance. Is it not possible to define an ENTITY such that can be used legally? Perhaps not, since it cannot end with the semi-colon. But I can't help but think there MUST be someway to preserve the notational syntax of the Java code. Needless to say, ![CDATA[]] leaves me breathless. --- Bob Beth, Thanks for the reply. I just found the answer after a search on goggle: http://lists.w3.org/Archives/Public/www-xpath-comments/1999JulSep/0032.h tml Either: if( xsp-session:get-attribute name=state/ == null amp;amp; xsp-request:get-parameter name=state/ == null ) Or: if( xsp-session:get-attribute name=state/ == null ![CDATA[]] xsp-request:get-parameter name=state/ == null ) works fine. When I tried putting ![CDATA[ ...if statement with tags... ]] it failed with the following error: org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling form_xsp: ERROR 1 (D:\apps\Tomcat 4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www/ eval/logic\form_xsp.java): ... - 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]
[doc] Request feedback on Draft: Parameter Selector user doc
Title: [doc] Request feedback on Draft: Parameter Selector user doc Hi all, Below is a draft of a document on the ParameterSelector for possible inclusion in the userdocs/Selectors section. I thought I'd post it here to get some feedback first. Could you please give it a quick review for: accuracy/correctness, understandability (esp to a newbie), additional info to add ?? Thanks a bunch, Beth Parameter Selector applies to: cocoon 2.0.2, ?? DOES THIS APPLY TO OTHER VERSIONS OF COCOON ALSO?? Name: Parameter Selector Class: org.apache.cocoon.selection.ParameterSelector Cacheable: CAN SOMEONE ANSWER THIS, OR IS IT NONAPPLICABLE?? This Selector matches a string, in the Parameters object passed to the selector, against a specified Cocoon internal parameter. It performs a case-sensitive string comparison between the value of the 'parameter-selector-test' parameter and the value of the 'test' attribute of the map:when ... element. This internal parameter could be: -- A sitemap parameter from the map:match portion of the pipeline -- A sitemap parameter set by an action Reasons to use ParameterSelector - One purpose of this selector is to select between different pipeline configurations based on sitemap parameters set by an action. This would allow the action to control the logic required to set one or more parameters, which can then be used by this selector to control pipeline processing. Thus, complex decision-making logic can be contained in actions, while the sitemap simply uses the results of the actions (the parameters) to determine pipeline processing. Parameter Selector can also be used to select on the value of 'keys' (such as {1} or {../2} ) from the wildcard matcher. Information in the URI, such as part of a filename, can then be used to determine pipeline processing. Examples Add the component to your sitemap.xmap: ~~~ map:components ... map:selectors ... map:selector name=parameter logger=sitemap.selector.parameter src="org.apache.cocoon.selection.ParameterSelector/ ... ~~ Use a parameter set by an action: Assume there is an action (named MyAction) that sets a parameter (named MyRegion) to several possible values. map:match pattern="*.xml" map:act type="MyAction" map:generate src="{1}.xml"/ map:select type="parameter" map:parameter name=parameter-selector-test value={MyRegion}/ !-- executes iff the value of MyRegion equals "United States" (without quotes) -- map:when test="United States" map:transform src="stylesheets/us.xsl"/ /map:when map:when test="South_America" map:transform src="stylesheets/southamerica.xsl"/ /map:when map:when test="Europe" map:transform src="stylesheets/europe.xsl"/ /map:when map:otherwise map:transform src="all_others.xsl" /map:otherwise /map:select /map:act map:serialize/ /map:match ~~ Use values from the URI: ~~ map:pipeline map:match pattern="**/*/myfile.xml" !-- {1}/{2}/myfile.xml -- !-- Use ParameterSelector -- map:select type=parameter map:parameter name=parameter-selector-test value={2}/ !-- executes iff the value of {2} equals "basic" (without quotes); the requested URI could be **/basic/myfile.xml -- map:when test=basic map:generate src="{1}/myfile.xml"/ map:transform src="stylesheets/basic.xsl map:parameter name=use-request-parameters value=true/ map:parameter name=resource value={2}.html/ /map:transform map:serialize/ /map:when map:when test=aggregate map:aggregate element=site map:part src="cocoon:/{1}/sidebar-{1}/{2}.xml/ map:part src="cocoon:/body-{1}/{2}.xsp/ /map:aggregate map:transform src="stylesheets/aggregate2xhtml.xsl/ map:serialize/ /map:when map:otherwise map:redirect-to uri="other_URI"/ /map:otherwise /map:select /map:match ... ~~~
[Q] How to create a cached XML object in memory...
OVERVIEW: = Cocoon uses Configurations from Avalon to abstract keeping common config information in XML form and easily using and caching it in memory. However, it doesn't quite serve my purposes (I think) because it actually converts the XML into its internal format and doesn't allow XPath queries against it. I'm beginning to suspect that there is no such object in C2 but rather caching is a component service provided by another component. However, I wish there already was some example of, say, a URLSource that was being cached in a simple way that I could retrieve it on demand. Specifically, each request will cause an XPath query against the XML and portions of those results will be propagated to the sitemap. E.g. this will all be handled by an Action. REQUIREMENTS: = I have some information in an XML file which is common to the entire web app (file is not tiny). For speed, I was thinking of storing it in a servlet context attribute so that it was accessible everywhere. I want to be able to execute XPath queries against it. Some of the attributes in the file need to be propa The XML file may be changed and should be reloaded. Among other things, I will want to stream the XPath results into the SAX stream (much like ReadDOMTransformer). SOLUTIONS: == 1. Use Configurations. - can be cached, etc. - doesn't allow XPath queries 2. Use URLSource and add caching (note to self: check if it already is). - how to add caching to an action (note to self: look at all the actions, again) 3. ?? Thanks in advance for any pointers, feedback. Per Kreipke - 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: soap call problems
I've done further experimenting and worked out I need to pass the method in ie. soap:call url=http://147.76.204.58:80/TempConvert1/Service1.asmx; method=http://Walkthrough/XmlWebServices/ConvertTemperature; xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance; xmlns:xsd=http://www.w3.org/1999/XMLSchema; So I can get my cocoon client to talk to the service. However there are two problems. 1) The value I pass in does not appear in the service method 2) A SOAP packet comes back from the service with a 200 OK, and it looks okay (except the calculation is incorrect due to 1) , but still cocoon hangs, as if it is still waiting for a response. Chris. -Original Message- From: Chris Warr [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 2 July 2002 9:55 To: [EMAIL PROTECTED] Subject: RE: soap call problems Thanks Vadim, that was a bit obvious wasn't it :) It trys to talk to the service now but I get an error. I could only find it by doing a net trace ie. cocoon didn't pick it up? 'Server did not recognise the value of HTTP Header SOAPAction' Chris. -Original Message- From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] Sent: Monday, 1 July 2002 22:52 To: [EMAIL PROTECTED] Subject: RE: soap call problems From: Chris Warr [mailto:[EMAIL PROTECTED]] Hi, I'm running cocoon 2.0.2 under tomcat 4.0.4b2. I've created the example web service under .NET, TempConvert1. I can call this with no problems from VB using the MSSOAP object. I'm trying to call it using the xsp soap taglib and I get the following error: org.apache.cocoon.ProcessingException: Error invoking remote service: java.lang.IllegalArgumentException: port out range:-1: java.lang.IllegalArgumentException: port out range:-1 Looks like '-1' is the default port number. Try specifying port number: soap:call url=http://147.76.204.58:80/TempConvert1/Service1.asmx; Vadim I can call other web services from cocoon with no dramas. My soap call looks like this: search-results soap:call url=http://147.76.204.58/TempConvert1/Service1.asmx; xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance; xmlns:xsd=http://www.w3.org/1999/XMLSchema; ns1:ConvertTemperature xmlns:ns1=urn:Service1 dFahrenheit xsi:type=xsd:string100/dFahrenheit /ns1:ConvertTemperature /soap:call /search-results NB. To those familiar with TempConvert1, I've changed the type of dFarenheit from double to string. Anybody got any ideas? Chris. - 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]