Re: Define dynamically a parameter of a serializer
On Fri, 2004-02-27 at 16:47, Stefan Geelen wrote: Hi, I would like to dynamically define a parameter of a serializer, like: map:serializer logger=test.serializer.ml2pdf-website mime-type=application/pdf name=ml2pdf-webpages src=com.test.connector.cocoon.testSerializer systemidcontext://test/systemid /map:serializer I need to know the context or realPath of the cocoon environment so I do not need to define the parameter (systemid) hardcoded, like: systemidfile:/c:/cocoon/test/systemid Appareantly Cocoon does not see the context:/ here as a variable. How can this be solved ? You could code it in your serializer: context.getRealPath() or if you don´t have your context, ObjectModelHelper.getContext(objectModel).getRealPath() Hope this helps, Eduard Regards, Stefan _ MSN Search, for relevant search results! http://search.msn.be - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ||/\ Eduard Drenth |/ \[EMAIL PROTECTED] /\ / \ /| _ |\ | | | | | | | | \ \ \ \ \ \ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: within Flowscript: get servlet context root?
On Thu, 2004-02-12 at 20:21, Mark Lundquist wrote: Dear all, How can I get the pathname of the servlet context root directory in my flowscript? What I did (cocoon2.0.4) is write a tiny action which puts the servlet context in a sitemap parameter. So I can do in the sitemap: map:match pattern=** map:act type=context map:mount check-reload=yes src={context-path}/sitemap.xmap uri-prefix=/ /map:act /map:match If you want I can send you my code, builds as well for cocoon2.1.3 Eduard From the FOM API doc, I see how to get it from Cocoon.context, if this in in fact a context attribute. I'm assuming it is, but I don't know the attribute name. Please help remedy my ignorance, and if you can point me to a doc somewhere I can bookmark that would have told me this answer, I'd appreciate that as well! (it probably has other stuff that I may someday need to know). Thanks a lot, ~ml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eduard Drenth [EMAIL PROTECTED] home sweet home - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I make IE display html in auto encoding utf-8?
On Thu, 2004-02-12 at 09:26, [EMAIL PROTECTED] wrote: we have to setup the default encoding in our web server (apache) to be set the encoding of ie automaticly i dont know if this is the only somlution,but it's work --stavros On Wed, 11 Feb 2004, [gb2312] wrote: Hi,all: I want to use Chinese chacter in the page and don't want it to be encoded as someting like #8983. So I change configurations in web.xml: init-param param-namecontainer-encoding/param-name param-valueutf-8/param-value /init-param init-param param-nameform-encoding/param-name param-valueutf-8/param-value /init-param and I also change HTMLSerializer config in root sitemap. map:serializer logger=sitemap.serializer.html mime-type=text/html name=html pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer encodingutf-8/encoding /map:serializer Now I can see Chinese in the page,but IE still auto encode it with iso-8859-1, I must change the encoding to unicode manully.How can I make IE auto select encoding in unicode? For a version of mozilla and as far as I can remember also for IE adding the meta-tag to the HTML isn't enough. I posted a not on this in wiki a few months ago. The solution for me was: response.setHeader(Content-Type, text/html; charset=UTF-8); Hope this helps! Eduard the html generated list here: html head META http-equiv=Content-Type content=text/html; charset=utf-8 Thanks in advance. roy huang guangzhou guangdong China. [EMAIL PROTECTED] or [EMAIL PROTECTED] __ MSN Messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eduard Drenth [EMAIL PROTECTED] home sweet home - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reading binary stream into xsp page
On Thu, 2004-02-12 at 10:22, beyaNet Consultancy wrote: Eduard, I tried your recommendation and it worked partly but the output to thescreen is incorrect. I am getting #0;t#0;h#0;i#0;s#0; written tothe screen instead of plain text with out the #0; being written tothe screen as well. How do I deal with this? Perhaps there is some characterset problem? You could try: new String(text,ISO-8859-1) or whatever charset your getArtistPhoto1() returns And if the output streamwas an image or audio how would I deal with those outputs as well? forinstance if: 1. byte[] text = newArt.getArtistPhoto1(); allows me to doxsp:exprnew String(text)/xsp:expr in my xsp page, how would Ideal with: 2. byte[] image = newArt.getArtistPhoto1(); or 3. byte[] audio = newArt.getArtistPhoto1(); You cannot put binary data in an xsp:expr. You always get the image etc. in your webpage through an extra request from for example a img tag. You have to create a pipeline that delivers the binary data. If the binary data are static you can use a map:read. If the binary data are dynamically generated you may have to write your own reader or a serializer Eduard many thanks in advance On 12 Feb 2004, at 06:37, Eduard Drenth wrote: On Thu, 2004-02-12 at 01:48, beyaNet Consultancy wrote: Hi, I have the following code in my xsp page: byte[] binImg = newArt.getArtistPhoto1(); I now want to display this stream in the page like so: xsp:exprbinImg/xsp:expr If this is a textfile try: xsp:exprnew String(binImg)/xsp:expr but am getting, as expected, casting errors. What do i needto do todisplay the contents of this stream, which was a simple txt file readinto postgresql as a byte array? Any help with this issue will be mostappreciated. many thanks in advance -- Eduard Drenth [EMAIL PROTECTED] home sweet home - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eduard Drenth [EMAIL PROTECTED] home sweet home - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embed SVG-tags directly in html
On Thu, 2004-02-12 at 13:16, [EMAIL PROTECTED] wrote: Is the only way to embed SVG in html by using the embed Tag ?? You could also use an object tag: object name=plaatje SRC= width=315 height=207 type=image/svg+xml/object I would like to know if there is a way to directly use svg xmlns:svg=http://www.w3.org/2000/svg; width=1000 heigth=120 content of SVG image /svg in the body html tag ?? I don't think there is, but what you can do is serialize only the svg to the browser, if it has a plugin it will display the image: map:serialize type=svgxml/ Eduard thanks in advance, Robby Pelssers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eduard Drenth [EMAIL PROTECTED] home sweet home - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reading binary stream into xsp page
On Thu, 2004-02-12 at 01:48, beyaNet Consultancy wrote: Hi, I have the following code in my xsp page: byte[] binImg = newArt.getArtistPhoto1(); I now want to display this stream in the page like so: xsp:exprbinImg/xsp:expr If this is a textfile try: xsp:exprnew String(binImg)/xsp:expr but am getting, as expected, casting errors. What do i need to do todisplay the contents of this stream, which was a simple txt file readinto postgresql as a byte array? Any help with this issue will be mostappreciated. many thanks in advance -- Eduard Drenth [EMAIL PROTECTED] home sweet home - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Excel Spreadsheet Generator|Transformer
On Wed, 2004-02-11 at 18:16, Dave Kavanagh wrote: Whoops! I meant to reply to Daniel directly. FWIW, I could supply my transformer to the list (minus a project specific block of code). Anyone else need something like this? Yes, it would indeed be very usefull!! In our company excel wizzards make visual basic applications for ordering stuff, but the same stuff gets ordered by other means as well, so we want to transform all the different ordering info into a predefined XML and continue from there. When there is a decent excel generator I will consider using that, otherwise I might build one myself. We've found it quite usefull. It takes some config XML as input to tell it how to process the Excel file (it gets from a multipart upload). David Quoting Dave Kavanagh [EMAIL PROTECTED]: There wasn't when I looked, so I made the HSSFTransformer (that membership uses). David Quoting Daniel McOrmond [EMAIL PROTECTED]: Is there are Generator|Transformer that produces xml from an excel document? Perhaps something utilizing Jakarta POI-HSSF? -Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eduard Drenth [EMAIL PROTECTED] home sweet home - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sendmail logicsheet internationalization
On Wed, 2004-02-11 at 12:28, Philippe Guillard wrote: Hi, I've got a problem to internationalize my sendmail : I use a Woody form, then XSP logicsheet as in the sendmail sample, where i get the values entered by woody and add some text that i need to be internationalized to compose the body of the mail. I can't use i18n transformer as the mail seems to be sent during the XSP generation. Yes I think that you are right there. Consider using a mail transformer, I have build one that works nicely with different encodings, also there is a mailtransformer in 2.1.3. Then i planned to do some logic with if statements on the locale. Below is what i plan to do but i can't get the locale value...I'm thinking also about doing this in flow. Any suggestion or method is welcomed ! Phil -- xsp:logic // (THIS IS NOT CORRECT) getLocale(locale); if (locale = en_US) { String bodymessage = Message.in any language; } } else { String bodymessage = Message in English; } /xsp:logic sendmail:send-mail sendmail:bodyxsp:exprbodymessage/xsp:exprxsp-request:get-parameter name=This_coming_from_woody template//sendmail:body /sendmail:send-mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eduard Drenth [EMAIL PROTECTED] home sweet home - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URGENT: Cocoon+FO Project needs a new owner
On Wed, 2004-02-11 at 10:27, Matthias Schäfer wrote: Phil Blake wrote: Hi Everyone, I started a paid project for a friend and have been so snowed under with work that I can't complete it in a reasonable time. Anyone interested in a cocoon 2.1 FoxPro/ESQL/FO PDF publishing project, contact me asap for complete details. The project is 90% complete. It's a great job, and if you're interested it will most likely lead to other similar projects. Thanks for your time. Phil PS Good handle on FO and PDF essential. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hello Phil, currently I am working on a Project wich uses Cocoon to add PDF-Printing with FOP to a JSP-Application. Maybe I can help you. So please give me more Details... Matthias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hi Phil, I am working with SVG and FO in cocoon for 2 years, among other things I have written a FO serializer which can post process a PDF after it has been rendered by fop, for example using ghostscript. Also I have a transformer which translates any svg into XSL-FO. I don't have a lot of time, but if you have specific questions I can try to answer them. Eduard -- Eduard Drenth [EMAIL PROTECTED] home sweet home - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hugo Marcelino: Encoding links
On Mon, 2004-02-09 at 19:22, Hugo Marcelino wrote: Hi Users of cocoon: My name is Hugo Marcelino and a new problem came to me. Imagine this situation: -You want to define a link that has a reference like: a href=caixão offcourse this is impossible to get but if you encode your url you will get something like (1) a href=caix%E3o wich is the same. Only this one is encoded. Dear Hugo, First of all a quote from W3C: Although URIs do not contain non-ASCII values (see [URI], section 2.1) authors sometimes specify them in attribute values expecting URIs (i.e., defined with %URI; in the DTD). For instance, the following href value is illegal: A href=http://foo.org/Håkon;.../A We recommend that user agents adopt the following convention for handling non-ASCII characters in such cases: 1. Represent each character in UTF-8 (see [RFC2279]) as one or more bytes. 2. Escape these bytes with the URI escaping mechanism (i.e., by converting each byte to %HH, where HH is the hexadecimal notation of the byte value). This procedure results in a syntactically legal URI (as defined in [RFC1738], section 2.2 or [RFC2141], section 2) that is independent of the character encoding to which the HTML document carrying the URI may have been transcoded. Now my problem is that this is not happening. What i'm getting is : ( I use a simple xml and apply a xsltc transfomation.) .a href=caião wich you can see is not the same as (1). If you do an xslt transformation and add no xsl:output encoding=ascii or iso-8859-1 or / to your stylesheet, your xml will be UTF-8 encoded after transformation Hope this helps Eduard and as you can see the transformation was made incorrectly. After this i try to use the transformer type=encodeURL, after my xsltc transformer, but the error was the same and the url had the sessionid as was written in the documents. And i was very careful in the encoding because i'm using ISO-8859-1 everywere. Now my answer is: - Am i doing something wrong? Or this is something that we can't do dynamically. I'm using Cocoon 2.1.3 and running under Jetty and i attached an example in this mail. Thank you in Advance. test-iso.rar __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eduard Drenth [EMAIL PROTECTED] home sweet home - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]