On 02.09.2004 15:41, Gerald Aichholzer wrote:

How would I convert an image in wordML to a jpeg or gif via Cocoon?

So far I have only found this .net solution by Oleg Tkachenko:
"In WordML images are embedded into document (Base64 encoded). So when
producing HTML, images have to be decoded and serialized out as external
files to link from the generated HTML. This cannot be done in pure XSLT 1.0.
But it's piece of cake using extensions, e.g. take a look at my sample
implementation for .NET:
http://www.tkachenko.com/blog/archives/000195.html";



Hi Lincoln,

here are some ideas which came just to my minds:

- convert your WordML to HTML with links for images
  (similar to the following):

  <html>
    ...
    <img src="http://localhost:8888/getimg.html?imgno=nn"/>
    ...
  </html>

- getimg.html is a pipeline which returns the nn'th image
  from the WordML document (of course you need some method
  to specify the WordML document, too).

  Because this is base64 encoded you need to decode it.
  I don't know if this will be possible using XSLT only,
  because also in the sample provided by you an external
  function is used.


Just some basic thougts, no working solution ;)

That's exactly what FragmentExtractorTransformer and FragmentExtractorGenerator are doing. The are in the Batik block though these both components can be used without Batik itself. Instead of using a Batik serializer you need to to something with your Base64 to decode it. I'm not aware of a component doing this.


Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to