Re: Configuration oddity
Peter Flynn wrote: Luca Morandini wrote: Peter Flynn wrote: Whereabouts in the pipeline is that /cocoon veing inserted, and why? I've clearly misunderstood something vital here, but I can't see what. Just one question: do you use Apache HTTPd's mod_proxy or mod_rewrite as a front-ent to Tomcat ? Both are loaded, and AFAIK the proxy is used only once in httpd.conf, and rewrite not at all: VirtualHost *:80 ServerAdmin webmas...@ucc.ie DocumentRoot /var/www/xml ProxyPreserveHost On ProxyPass / ajp://localhost:8009/cocoon/ ProxyPassReverse / ajp://localhost:8009/cocoon/ ServerName publish.ucc.ie ErrorLog logs/publish.ucc.ie-error_log CustomLog logs/publish.ucc.ie-access_log common /VirtualHost Well, you're using mod_proxy_ajp, not mod_proxy, right ? I have no experience in it, but it may require a different setting [1]. Anyway, may you try with an internal redirect instead ? map:match pattern= map:redirect-to uri=cocoon:/index/ /map:match Regards, [1] http://lenya.apache.org/docu20/tutorials/proxy/modproxyajp.html Luca Morandini www.lucamorandini.it - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
RE: generate pdf from xml with embedded image?
Peter: Did you write a preprocessor in cocoon? Where can i find more info on that? Meanwhile i tried another approach: xsl:variable name=image-base64 select=.//IMAGE/ fo:external-graphic src=url('data:image/gif;base64,{$image-base64}') height=3cm width=3cm / But now i get an error in html instead of an pdf file: java.lang.NullPointerException: Cocoon stacktrace[hide] java.lang.NullPointerException cocoon://fop_post/xsl - 4:14 Exception in StreamGenerator.generate() cocoon://fop_post/xsl - 4:14 [TransformerException] context://fop_post/sitemap.xmap - 11:32 map:serialize type=xml context://fop_post/sitemap.xmap - 7:33 map:generate type=stream context://fop_post/sitemap.xmap - 44:37 map:serialize type=fo2pdf context://fop_post/sitemap.xmap - 43:42 map:transform context://fop_post/sitemap.xmap - 32:38 map:generate context://sitemap.xmap - 1034:92 map:mount Maybe i should try to show the base64 as text in the pdf first to see if it still there. -Oorspronkelijk bericht- Van: Peter Flynn [mailto:pfl...@ucc.ie] Verzonden: donderdag 18 december 2008 10:24 Aan: users@cocoon.apache.org Onderwerp: Re: generate pdf from xml with embedded image? Ken Starks wrote: [...] I did have a few images that were stored also in a database, but I would pre-process them in a seperate stage, generating a local copy, and populating a table of the database with the path. This was a batch process, not an interactive one, and it used python rather than cocoon. (Actually, it could do a minor amount of image-processing as well, such as cropping, changing contrast, creating thumbnails, changing to a different format, Etc and used Image magick as well as python). I do something very similar, taking in Word XML documents. The preprocessor extracts any encoded image data, converts them back to image format, creates thumbnails and web-res versions, and adds details of them to an XML file in their directory, rather than using a database. The XSL[T] processes then reference them externally as images, which is probably faster than doing database extraction and image conversion in real time. I suppose it depends on the amount of storage you have, and how important it is to you to store your images on a database. In this case there are typically only a handful of images, so a database would be overkill: YMMV. ///Peter - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: generate pdf from xml with embedded image?
Marten van der Honing wrote: Peter: Did you write a preprocessor in cocoon? Where can i find more info on that? Meanwhile i tried another approach: xsl:variable name=image-base64 select=.//IMAGE/ You might try xsl:variable name=image-base64 select=string(.//IMAGE)/ just to be sure. fo:external-graphic src=url('data:image/gif;base64,{$image-base64}') height=3cm width=3cm / But now i get an error in html instead of an pdf file: java.lang.NullPointerException: Cocoon stacktrace[hide] java.lang.NullPointerException cocoon://fop_post/xsl - 4:14 Exception in StreamGenerator.generate() cocoon://fop_post/xsl - 4:14 [TransformerException] context://fop_post/sitemap.xmap - 11:32 map:serialize type=xml context://fop_post/sitemap.xmap - 7:33 map:generate type=stream context://fop_post/sitemap.xmap - 44:37 map:serialize type=fo2pdf context://fop_post/sitemap.xmap - 43:42 map:transform context://fop_post/sitemap.xmap - 32:38 map:generate context://sitemap.xmap - 1034:92 map:mount Can you post parts of the actual Java stack trace? Joerg Maybe i should try to show the base64 as text in the pdf first to see if it still there. -Oorspronkelijk bericht- Van: Peter Flynn [mailto:pfl...@ucc.ie] Verzonden: donderdag 18 december 2008 10:24 Aan: users@cocoon.apache.org Onderwerp: Re: generate pdf from xml with embedded image? Ken Starks wrote: [...] I did have a few images that were stored also in a database, but I would pre-process them in a seperate stage, generating a local copy, and populating a table of the database with the path. This was a batch process, not an interactive one, and it used python rather than cocoon. (Actually, it could do a minor amount of image-processing as well, such as cropping, changing contrast, creating thumbnails, changing to a different format, Etc and used Image magick as well as python). I do something very similar, taking in Word XML documents. The preprocessor extracts any encoded image data, converts them back to image format, creates thumbnails and web-res versions, and adds details of them to an XML file in their directory, rather than using a database. The XSL[T] processes then reference them externally as images, which is probably faster than doing database extraction and image conversion in real time. I suppose it depends on the amount of storage you have, and how important it is to you to store your images on a database. In this case there are typically only a handful of images, so a database would be overkill: YMMV. ///Peter - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: FW: Problem with large xml using aggregate
Kothapalli, Rajani K wrote: We have a pipeline that looks like: map:pipeline map:match pattern=*/*.testcontent map:aggregate element=wrapper map:part src=cocoon:/{1}/x/ map:part src=cocoon:/{1}/y/ map:part src=cocoon:/{1}/z/ map:part src=cocoon:/{1}/xx/ map:part src=cocoon:/{1}/xy/ /map:aggregate map:transform src=x.xsl type=xslt-saxon8/ map:transform src=y.xsl type=xslt-saxon8/ map:transform src=z.xsl type=xslt-saxon8/ map:serialize type=xml/ /map:match /map:pipeline One of the request produces large xml What size are we talking about? and if I run it in its own generator, the xml comes up fine. However, if it is a part of the aggregate it is clobbering the xml and then xslt Parser is chocking on it. Even without any xslt parsing, I can see that the xml is clobbered. How do the sub pipelines look like? Are there components of yours or is it just a plain file generator? Error message says; Invalid Qname Using cocoon-2.1.8 I played with outputbuffersize for pipelines JVM_OPTS CATALINA_OPTS Cocoon servlet file-upload-size in web.xml Cocoon.xconf I would not expect any of those to help. Joerg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: How to set the language for a date?
Smigge wrote: Isn't there a simple way of just changing the locale - even only within one xslt? As you can see there is no standardized way of handling dates locale-aware in XSLT. I really recommend to do this using i18n functionality of Cocoon. Joerg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
RE: generate pdf from xml with embedded image?
With xsl:value-of select=$image-base64 / i get the base64 content as tekst inside the pdf. But with fo:external-graphic src=url('data:image/gif;base64,{$image-base64}') height=3cm width=3cm / i still get no visible image :-( The error i got before was due to an mistake i made in another part of my xsl stylesheet. -Oorspronkelijk bericht- Van: Joerg Heinicke [mailto:joerg.heini...@gmx.de] Verzonden: dinsdag 23 december 2008 20:39 Aan: users@cocoon.apache.org Onderwerp: Re: generate pdf from xml with embedded image? Marten van der Honing wrote: Peter: Did you write a preprocessor in cocoon? Where can i find more info on that? Meanwhile i tried another approach: xsl:variable name=image-base64 select=.//IMAGE/ You might try xsl:variable name=image-base64 select=string(.//IMAGE)/ just to be sure. fo:external-graphic src=url('data:image/gif;base64,{$image-base64}') height=3cm width=3cm / But now i get an error in html instead of an pdf file: java.lang.NullPointerException: Cocoon stacktrace[hide] java.lang.NullPointerException cocoon://fop_post/xsl - 4:14 Exception in StreamGenerator.generate() cocoon://fop_post/xsl - 4:14 [TransformerException] context://fop_post/sitemap.xmap - 11:32 map:serialize type=xml context://fop_post/sitemap.xmap - 7:33 map:generate type=stream context://fop_post/sitemap.xmap - 44:37 map:serialize type=fo2pdf context://fop_post/sitemap.xmap - 43:42 map:transform context://fop_post/sitemap.xmap - 32:38 map:generate context://sitemap.xmap - 1034:92 map:mount Can you post parts of the actual Java stack trace? Joerg Maybe i should try to show the base64 as text in the pdf first to see if it still there. -Oorspronkelijk bericht- Van: Peter Flynn [mailto:pfl...@ucc.ie] Verzonden: donderdag 18 december 2008 10:24 Aan: users@cocoon.apache.org Onderwerp: Re: generate pdf from xml with embedded image? Ken Starks wrote: [...] I did have a few images that were stored also in a database, but I would pre-process them in a seperate stage, generating a local copy, and populating a table of the database with the path. This was a batch process, not an interactive one, and it used python rather than cocoon. (Actually, it could do a minor amount of image-processing as well, such as cropping, changing contrast, creating thumbnails, changing to a different format, Etc and used Image magick as well as python). I do something very similar, taking in Word XML documents. The preprocessor extracts any encoded image data, converts them back to image format, creates thumbnails and web-res versions, and adds details of them to an XML file in their directory, rather than using a database. The XSL[T] processes then reference them externally as images, which is probably faster than doing database extraction and image conversion in real time. I suppose it depends on the amount of storage you have, and how important it is to you to store your images on a database. In this case there are typically only a handful of images, so a database would be overkill: YMMV. ///Peter - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
RE: generate pdf from xml with embedded image?
Now i tried: fo:external-graphic src=url('data:image/gif;base64,R0lGODlhMAAzALMAAMe8UuTZWggCDq2lQzAAYCQASJSP NBUAK/zQ4VRUEiQiDvje nLyYtXx4JU8/TgAAACH5BAkAAA8ALAAwADMAAAT/8ElJqr0z63072VRxCCR5 FBioEeLhjm6BVhlxKGVenpb62LqgQEb7uRyM5KBhaDgVON5nUyA5BkqD1pmIzh4i BGLBLG+fihNqdXCIGcym3NnoSgUMsXa/PduJGWEIDHyFTQkJLhUCb4aGdWmAEgd5 CAOOe3UJQyiMY46XfJBqUzJiAJhbXQI8badaoZijgAR4enuxhzhDFiSVoZfBsKqR M1VuCADAxCYdI2ILy8LCDVBSLLaWwFwmXz82vwPB07F1rGs2yMoGl5DnRRSUY+L0 9faH72DIDPRNUPka5GmzR1CcAUTvbIgJQI8brykZ5EUrSNGfAiIKoPVDKGWDgnAU /wcoq4fmRMYFEy9xhBcozwJlI0eKpAdT5EFrBTSKfAIwIMiaMWeKG+lPQMZkRFcd YDlBIoCaM4GKBKpL4zqOazY4jfp0KkypNhu4eTmV51KIEV12lQr069OuXrveZMV0 ktq3ePPq3bu26FkQTvkKHvz0ZiS0Te8SXow3gNm6DwLnDfCWMmPLqKrRRSzh4xjK oPmGxoy58dy/WhU/DaCFwYLSjWMDsOw3q88xs3OjUmDg82jdoYGfhixxtEpbL1fn /j3aL2TPr5cv2TXmNXPg0pUSdxmg++wlmwSM7T4atPfQtTlHznP+u+Yb45crZz7A Durb1slPZzWCO/n/AHa3H+4PIHgWIADviYBcgAwypJ16xf2HIE42nJRfgwK+tx0C AV7ixSJjXdhgfWncl5Zv+iXYy3gYeqciYK6JyNqH34iH4ogPcmALgyTms0hvMkr4 YkAsdqgZLcfcCGCP3kxQC3stHkkDiEqSN2FPEhTgRosCfvgBlUECkOOJQf43gJcU 1FKklUfaZheHXGoIzyIGSjimkye1aMA/BNYARJFikiCJkze4duBBOzTpJDYfRben oHUBIYQOiqj3TS1CdLSCDSNMGoOiHEhqgqahyvCCCKgSAdmmpqZqaZoWyCBrCj74 WYGqtS7qQQ+5hsrrBhEAADs=') / Also no image is displayed. Is this possible with cocoon? I am afraid i do have to write images temporary to the filesystem :-( -Oorspronkelijk bericht- Van: Marten van der Honing [mailto:mvdhon...@noeska.com] Verzonden: dinsdag 23 december 2008 21:02 Aan: users@cocoon.apache.org Onderwerp: RE: generate pdf from xml with embedded image? With xsl:value-of select=$image-base64 / i get the base64 content as tekst inside the pdf. But with fo:external-graphic src=url('data:image/gif;base64,{$image-base64}') height=3cm width=3cm / i still get no visible image :-( The error i got before was due to an mistake i made in another part of my xsl stylesheet. -Oorspronkelijk bericht- Van: Joerg Heinicke [mailto:joerg.heini...@gmx.de] Verzonden: dinsdag 23 december 2008 20:39 Aan: users@cocoon.apache.org Onderwerp: Re: generate pdf from xml with embedded image? Marten van der Honing wrote: Peter: Did you write a preprocessor in cocoon? Where can i find more info on that? Meanwhile i tried another approach: xsl:variable name=image-base64 select=.//IMAGE/ You might try xsl:variable name=image-base64 select=string(.//IMAGE)/ just to be sure. fo:external-graphic src=url('data:image/gif;base64,{$image-base64}') height=3cm width=3cm / But now i get an error in html instead of an pdf file: java.lang.NullPointerException: Cocoon stacktrace[hide] java.lang.NullPointerException cocoon://fop_post/xsl - 4:14 Exception in StreamGenerator.generate() cocoon://fop_post/xsl - 4:14 [TransformerException] context://fop_post/sitemap.xmap - 11:32 map:serialize type=xml context://fop_post/sitemap.xmap - 7:33 map:generate type=stream context://fop_post/sitemap.xmap - 44:37 map:serialize type=fo2pdf context://fop_post/sitemap.xmap - 43:42 map:transform context://fop_post/sitemap.xmap - 32:38 map:generate context://sitemap.xmap - 1034:92 map:mount Can you post parts of the actual Java stack trace? Joerg Maybe i should try to show the base64 as text in the pdf first to see if it still there. -Oorspronkelijk bericht- Van: Peter Flynn [mailto:pfl...@ucc.ie] Verzonden: donderdag 18 december 2008 10:24 Aan: users@cocoon.apache.org Onderwerp: Re: generate pdf from xml with embedded image? Ken Starks wrote: [...] I did have a few images that were stored also in a database, but I would pre-process them in a seperate stage, generating a local copy, and populating a table of the database with the path. This was a batch process, not an interactive one, and it used python rather than cocoon. (Actually, it could do a minor amount of image-processing as well, such as cropping, changing contrast, creating thumbnails, changing to a different format, Etc and used Image magick as well as python). I do something very similar, taking in Word XML documents. The preprocessor extracts any encoded image data, converts them back to image format, creates thumbnails and web-res versions, and adds details of them to an XML file in their directory, rather than using a database. The XSL[T] processes then reference them externally as images, which is probably faster than doing database extraction and image conversion in real time. I suppose it depends on the amount of storage you have, and how important it is to you to store your images on a database. In this case there are typically only a handful of images, so a database would be overkill: YMMV. ///Peter - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: