Recently I've been exploring how to deal with the base64 encoded images in OpenOffice.org XML files when using an XSLT filter to export the file. I work for IBM developerWorks and I'd like to be able to export Writer documents to XML compliant with the developerWorks schema for subsequent conversion to HTML or PDF. But how to handle images?
In December I mentioned the idea of using a Java extension to handle images and I now think this is the right way to go. I've been able to use the xalan redirect:write extension to save individual images in a base64 encoded file. A combination of command line tools can then convert the base64 image to its original format. - sed strips off the XML header - base64 decodes the base64 data to binary - identify (from ImageMagick) figures out the image type (wmf, gif, jpg, etc) - some combination of convert, wmf2eps or wmf2svg converts the image to a web suitable form. Now, all of this stuff must already exist inside OpenOffice.org as it must exist for exporting XHTML. I'd like to propose that it be available to XSLT filters as an extension. At a minimum, I think the extension needs functions to be able to a) tell the stylesheet what the encoded image format is (wmf, png, gif, jpg, etc) b) save the image in its original format with a filename and location specified by the XSL stylesheet. c) optionally convert and/or scale the image to a desired type and size. Since the same is apparently done for the XHTML filter for draw:g elements, I'd also like access to similar functionality for these from within an XSL stylesheet. What do other think? How do I go about getting this on the list of things to do for OOo? -- Ian Shields <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
