Re: Image in an XML
Priska.Steiner wrote: Hello I'm working with FOP 20.3. As input I have a xml-stream and a xsl-File. Now I would like to have an image in my xml, not in the xsl. The image comes from a database. Is there any possibility to do that, without writing the image in a file ? How have I to encode it, for Fop ? What you could do - I successfully did that for a customer - is: embed the image in the XML file - base64 encoded. Then write an extension function for Xalan that decodes the image and creates a temp file containing the image. This has worked nicely for me - I used this method with exported Domino databases in XML format. Hope this helps, Arnd Beissner -- Cappelino Informationstechnologie GmbH Arnd Beißner Bahnhofstr. 3, 71063 Sindelfingen, Germany Email: [EMAIL PROTECTED] Phone: +49-7031-463458 Mobile: +49-173-3016917 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Image in an XML
I'd implement a custom protocol handler in a way that you can access your images in the database using a URL that could look like this: myimages://mydatabase/id (where id might be the primary key to the image). This way you don't have to encode anything because you're getting a binary stream directly from the blob in the database. And you're not bound to XML. Every Java application (ex. a Servlet or a JSP) can refer to this kind of URL once it is implemented and registered. I've already written a couple of protocol handlers and I'm very happy with the results. A good tutorial on Protocol Handlers can be found here. http://developer.java.sun.com/developer/onlineTraining/protocolhandlers/ I'm working with FOP 20.3. As input I have a xml-stream and a xsl-File. Now I would like to have an image in my xml, not in the xsl. The image comes from a database. Is there any possibility to do that, without writing the image in a file ? How have I to encode it, for Fop ? Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Tel. +41 41 317 2020 - Fax +41 41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Image Extraction From xml using xsl-fo????
You wrote: fo:external-graphic src=file:{@src}/ It should be fo:external-graphic src=url('file:{@src}')/ instead. (That's what the spec says, I'm not sure FOP supports that syntax) Max. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Image Extraction From xml using xsl-fo????
that is,my xml tagged like img src=abcd.gif/ what should be my xsl-fo code so that I can get abcd.gif in pdf. i don't want again to write fo:block fo:external-graphic src=file:abcd.gif/ /fo:block in my xsl file. instead i want to use xsl:template match=img xsl:template match=img fo:block fo:external-graphic src=file:{@src}/ /fo:block /xsl:template Jarno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Image Extraction From xml using xsl-fo????
sir, thanx a lot for ur kind help. regards rajiv --- [EMAIL PROTECTED] wrote: that is,my xml tagged like img src=abcd.gif/ what should be my xsl-fo code so that I can get abcd.gif in pdf. i don't want again to write fo:block fo:external-graphic src=file:abcd.gif/ /fo:block in my xsl file. instead i want to use xsl:template match=img xsl:template match=img fo:block fo:external-graphic src=file:{@src}/ /fo:block /xsl:template Jarno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]