AnsweredAssumed Answered

One-to-many custom transformations?

Question asked by ftoth on Sep 10, 2007
Hi,

I've been working through some custom transformation issues.
Alfresco is working well for this to a point, but I'm looking for advice
on some of my issues.

Right now, I've got a custom transformation pipeline in the works
that does the following:

1. Transform incoming MS Word to OpenDocument (an out-of-the-box
Alfresco transformation). So "article.doc" becomes "article.odt"

2. Using a custom transformation, convert the OpenDocument output
to customized XML for use on our web site. This is done with fake
mime types and an external custom transformer. Now "article.odt"
becomes "article.xml" (though with a fake mime type).

Note that the fake mime types are necessary, since Alfresco's
transformation mechanism is totally based on mime types. I have to
register a fake mime type, then declare that my custom transformer
will produce the fake mime type.

So here's where it gets interesting. My documents (simple news articles)
also contain an image. I'd like to run another custom transformation
and extract that image.

I believe that this is simple enough with another fake mime type and
another custom transformer. So in another transformation, "article.odt"
now becomes "article.jpg".

But what if I have more than one image? Transforms are by their nature
one to one, right? I have one input file and I get one output file. But
what I really need is:

input: article.odt
output: article_image1.jpg, article_image2.jpg, etc.

So how can I solve this? Perhaps I can't use the transformation mechanism
at all? But it's so close to giving me what I need, I can't imagine what
other Alfresco mechanism would be appropriate.

How would others solve this problem?

Many thanks,

Fred

Outcomes