Hi,
I've got a XML database with images of various sorts of mime-types (jpeg, gif, png, etc) stored in text() nodes as Base64. I have a trivial Base64Serializer that reconstitutes them on the way out. However, I think I'm stuck with a mime-type problem. It seems I have to have a separately instantiated Serializer for each possible mime-type:
<map:select type="mimeSelector"> <map:when test="image/png"> <map:serialize type="base64" mime-type="image/png" /> </map:when> ...etc...
I find this verbose, and annoying to maintain if someone saves an image with a new mime-type.
The Serializer interface has a getMimeType() method which allows a Serializer to declare its mime-type, but only at setup() time (correct me if I'm wrong?). I need to declare the mime-type later; the first setElement() should tell me the mime-type, as I can retrieve it from the attributes. I'd even appreciate being able to set the mime-type as late as the endDocument(), which is where I decode and serialize the data out to this.output().
Am I missing something in my reading of the Serializer cycle? Is there another way to set the outgoing ContentType (directly on the Response, if I can get it?), or will the pipeline override it anyway?
Thanks.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]