Question
I am interested in generating an SVG file from an XML data file using an XSL transform however,
the mime type is not set correctly ('text/html') when it is sent to the browser.
( I am using FCR 3.3 on OSX 10.6 with Apache 2.2 and viewing on Firefox 3.6)
In the sDep I set the wsdlMsgTOMIME
Code Block |
---|
<fmm:MethodReturnType wsdlMsgName="xslt_response" wsdlMsgTOMIME="image/svg+xml"/> |
and the WSDL output
Code Block |
---|
<wsdl:output> <mime:content type="image/svg+xml"/> </wsdl:output> |
Do I need to set the mime-type anywhere else? Are theere on certain output mime-types that are recognized?
Answer
I suppose you are using the Saxon xslt service? Then you have to set the media-type attribute on the output element of your stylesheet. That will overrule all the other declarations.
Code Block |
---|
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" media-type="image/svg+xml"/> .... |