Re: Using a Proxy Server for Cocoon
http://wiki.apache.org/cocoon/ApacheModProxy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Appending URI prefix in cocoon.2.1.7
[EMAIL PROTECTED] wrote: Hi All, I am trying to add a static name other than the war name in the URI. It should be as follows:- http://server-name:port-number/webapp-name/customer-name And the above should be there always whenever the new request is been served. [...] I recently had a similar problem and found this[1] wiki page. It might be not exactly what you are looking for but may give you an idea how to workaround. [1]http://wiki.apache.org/cocoon/VirtualHostingHostMatcher?highlight=%28hostmatcher%29 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML-Serializer encoding
christian bindeballe wrote: [...] That's right. My mistake. I merely deducted the encoding from some characters used inside the text of the feeds as for example 8221; which are clearly non-Latin-1 characters. Since both feeds have ISO-8859-1 in their response headers it means that these feeds are either malformatted or malencoded. Don't mix characterset and character encoding. 8221 is decimal notation of unicode character U+201D. iso-8859-1 or utf-8 are just character encodings. Encoding and formatting of both your sources is ok, but selection of iso-8859-1 is a poor choice regarding readability. [...] Do you mean I should register the serializer used with both the parameter charset and the element encoding corresponding (having the same value)? The first one goes into HTTP response header and is needed by any browser to recognize the character encoding of the following content. You may run your own test by just omitting it and checking HTTP response header of your output. The second one is telling the serializer which character encoding to use for the output. [...] I used both xml and html (to see, if there is any difference in the output, but there is none). In the Userdocs it says that you shouldnt't And after serializing, are you still having 8221 in the output or is it converted to double-upper-nine quotation mark? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML-Serializer encoding
christian bindeballe wrote: [...] I figured last night that what was causing my funny output was not the character set nor the encoding, but the way my XSL handled the feeds. That's the reason why I recommended you omitting the transformation step and to watch what's happening. map:match pattern=netzpolitik map:generate src=http://www.netzpolitik.org/feed/ map:serialize/ /map:match [...] my problems. Thanks for pointing out these specific details about Unicode and UTF-8, I appreciate it a lot and am very glad I learned something again :) Again, thank you for your time and effort. Suppose you are speaking German? Then maybe you'd like to subscribe to de.comm.infosystems.www.authoring.misc where there are discussed any aspects of (X)HTML. Also http://de.wikipedia.org/wiki/UTF-8 and http://de.wikipedia.org/wiki/Unicode are good references in German. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML-Serializer encoding
christian bindeballe wrote: [...] [quote] Since the servlet specification requires that the ISO-8859-1 encoding is used (by default), you should never change this value unless you have a buggy servlet container.[/quote] Citation without sources? Where did you get that nonsense from? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML-Serializer encoding
christian bindeballe wrote: [...] also, Marc Portier wrote: (see this thread, message-ID [EMAIL PROTECTED]) never change your container-encoding unless you have a servlet container of which you can specify the used encoding applied in decoding of url's and request parameters [...] Hi Christian, what I've been writing about is not container-encoding. I was writing about character encoding of the documents and about HTTP response header. And to make even more confusion, there is also form-encoding, url-encoding, document-encoding, transmission encoding, ... As you are going to supply something for web browsers through HTTP, the browsers will need something like Content-Type: text/html;charset=utf-8 in the HTTP response header. And this is given by the *second* line in following serializer configuration: map:serializer name=xhtml mime-type=test/html; charset=utf-8 logger=sitemap.serializer.xhtml pool-grow=2 pool-max=64 pool-min=2 src=org.apache.cocoon.components.serializers.XHTMLSerializer encodingUTF-8/encoding indentno/indent /map:serializer Best way to test is from a very minimalistic sample application with just this serializer configuration and a short pipeline with only map:sitemap map:components map:serializers default=xml map:serializer name=xhtml mime-type=test/html; charset=utf-8 logger=sitemap.serializer.xhtml pool-grow=2 pool-max=64 pool-min=2 src=org.apache.cocoon.components.serializers.XHTMLSerializer encodingUTF-8/encoding indentno/indent /map:serializer /map:serializers /map:components map:pipelines map:pipeline map:match pattern=netzpolitik map:generate src=http://www.netzpolitik.org/feed/ map:serialize/ /map:match /map:pipeline /map:pipelines /map:sitemap Try this sample and play with mime-type and encoding and watch your output. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to run two cocoons in a tomcat
Johnson wrote: Hi! I want to run two cocoons in a tomcat, how to set it. Best Regards johnson According to http://wiki.apache.org/cocoon/CocoonEasyInstallation you could just configure them in server.xml like Engine defaultHost=localhost name=Catalina [...] Host appBase=../SomeDir1 name=cocoon1 Logger className=org.apache.catalina.logger.FileLogger prefix=cocoon_log. suffix=.txt timestamp=true/ /Host Host appBase=../SomeDir2 name=cocoon2 Logger className=org.apache.catalina.logger.FileLogger prefix=cocoon_log. suffix=.txt timestamp=true/ /Host [...] /Engine then install them in their folders SomeDir1 resp SomeDir2 $tomcat-hoome SomeDir1 SomeDir2 and don't forget to rename them ROOT, so that you have: $tomcat-hoome SomeDir1/ROOT/ SomeDir2/ROOT/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML-Serializer encoding
christian b wrote: [...] these are the feed-adresses that I want to incorporate. both don't have an encoding set (do RSS-feeds have to have that?) but they clearly contain UTF-8 encoded characters. http://www.industrial-technology-and-witchcraft.de/index.php/ITW/itw-rss20/ http://www.netzpolitik.org/feed/ Hi Christian, Have a look at the HTTP response headers[1] of those feeds. The netzpolitik feed's header clearly states it's iso-8859-1. Recoding will be automagically done on generating xml from that source. When you try with the following snippet in your pipeline, your output will have a parsing error[2] but its source code will be strictly according to encoding settings of your serializer map:match pattern=netzpolitik map:generate src=http://www.netzpolitik.org/feed/ map:serialize/ /map:match In case of http://www.netzpolitik.org/feed/ you go in with iso-8859-1 and come out with utf-8 (if you didn't change the settings of your xml-serializer). You will also have to make sure that character encoding of your output encodingUTF-8/encoding is in accordance with encoding information sent with e.g. mime-type=application/xhtml+xml; charset=utf-8 by your serializer in HTTP response header. The following is an example xhtml serializer config having both these informations. map:serializer name=xhtml mime-type=application/xhtml+xml; charset=utf-8 logger=sitemap.serializer.xhtml pool-grow=2 pool-max=64 pool-min=2 src=org.apache.cocoon.components.serializers.XHTMLSerializer encodingUTF-8/encoding indentno/indent /map:serializer What generator have you been using for your works. Maybe I didn't fully understand your problem ... [1]http://livehttpheaders.mozdev.org/ for Firefox/Mozilla users [2] XML Parsing Error: not well-formed Location: http://bodo:8080/netzpolitik Line Number 27, Column 17: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML-Serializer encoding
christian b wrote: [...] these are the feed-adresses that I want to incorporate. both don't have an encoding set (do RSS-feeds have to have that?) but they clearly contain UTF-8 encoded characters. http://www.industrial-technology-and-witchcraft.de/index.php/ITW/itw-rss20/ http://www.netzpolitik.org/feed/ Hi Christian, Have a look at the HTTP response headers[1] of those feeds. The netzpolitik feed's header clearly states it's iso-8859-1. Recoding will be automagically done on generating xml from that source. When you try with the following snippet in your pipeline, your output will have a parsing error[2] but its source code will be strictly according to encoding settings of your serializer map:match pattern=netzpolitik map:generate src=http://www.netzpolitik.org/feed/ map:serialize/ /map:match In case of http://www.netzpolitik.org/feed/ you go in with iso-8859-1 and come out with utf-8 (if you didn't change the settings of your xml-serializer). You will also have to make sure that character encoding of your output encodingUTF-8/encoding is in accordance with encoding information sent with e.g. mime-type=application/xhtml+xml; charset=utf-8 by your serializer in HTTP response header. The following is an example xhtml serializer config having both these informations. map:serializer name=xhtml mime-type=application/xhtml+xml; charset=utf-8 logger=sitemap.serializer.xhtml pool-grow=2 pool-max=64 pool-min=2 src=org.apache.cocoon.components.serializers.XHTMLSerializer encodingUTF-8/encoding indentno/indent /map:serializer What generator have you been using for your works. Maybe I didn't fully understand your problem ... [1]http://livehttpheaders.mozdev.org/ for Firefox/Mozilla users [2] XML Parsing Error: not well-formed Location: http://localhost:8080/netzpolitik Line Number 27, Column 17: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: namespaces and xpath directory generator
Markus Vaterlaus wrote: Hi all, just figured out, that the xpath directory generator needs additional parameters if it has to deal with namespaces: Does this mean we no longer need to use *[local-name()='something' expressions in the xpath parameter like given below? map:generate type=xpathdirectory src=./ map:parameter name=xpath value=/*[local-name()='html']/*[local-name()='head']/*[local-name()='title']/ map:parameter name=xmlFiles value=\.*/ map:parameter name=depth value=999/ map:parameter name=exclude value=img|logics|sitemap.xmap|.*~/ /map:generate Just found it described in the API docs http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/generation/XPathDirectoryGenerator.html (with a typo on mapping.proeprties). [...] However, can't figure out, if there is any additional documentation about mapping.properties or its syntax. Anybody any clues? Guess it's a plain text file with one namespace per line and the syntax like in your example. But the API-doc lists it without quotation marks. Which one is correct? prefix=namespace-uri or prefix=namespace-uri Did you find out the location where to place the text file mapping.properties? Should it be in the same directory like sitemap:xmap? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Render pdf byte stream on the browser
[EMAIL PROTECTED] wrote: want to create any intermediate files. Is it possible to display the PDF directly on the browser? If yes, then can some one point how can this be achieved in Cocoon? There are good examples http://www.inetsolutions.de/cocoon/samples/blocks/itext/welcome http://www.inetsolutions.de/cocoon/samples/blocks/fop/welcome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making Cocoon the default
Peter Flynn wrote: The FAQ about making Cocoon the default app doesn't seem to have a look at http://wiki.apache.org/cocoon/CocoonEasyInstallation If you don't want to default http://cocoon:8080/ then simply replace $tomcat_home/webapps/ROOT/ and rename your new default webapp to become ROOT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDF output format
dcausevi wrote: I have set include.block.fop=true (include.block.batik=true is set too) in the local.build.properties, then I rebuilt cocoon but I am still getting an error message No pipeline matched request:samples/blocks/fop/pdf for the PDF I guess you were trying to view http://cocoon:8080/samples/blocks/fop/misc/minimal.pdf output format... What else do I have to do in order to enable PDF output format? From a clean installed Cocoon 2.1.8 it WFM out of the box, without ever touching local.build.properties. But I am getting problems with http://cocoon:8080/samples/blocks/fop/misc/svgtest.pdf only showing an error message as shown in http://home.arcor.de/edwinkapauni/svgtest_pdf.html whereas the xsl-fo sample http://cocoon:8080/samples/blocks/fop/misc/svgtest.fo.xml gets easily rendered by Firefox as shown here http://home.arcor.de/edwinkapauni/xsl-fo_rendered.png. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]