Re: [Xsltforms-support] Output image/svg+xml
Brought to you by:
alain-couthures
From: Grégoire C. <gco...@gm...> - 2011-01-16 14:16:04
|
Hi, I think I understand what the "data:" scheme is about (never used it before). I thought the "ref" attribute was used to resolve an URI (just like with <output mediatype="image/jpeg">), but it seems that, in the case of "image/svg+xml", XSLTForms uses this attribute to get an «SVG instance». Am I right? If so, is there a way to display a non-embedded SVG file whose URL is computed by XForms? Thanks! Grégoire Le 16/01/2011 14:48, Grégoire COLBERT a écrit : > Hi Alain, > > I want to call a web-service that returns an SVG image. So I use : > > <xf:output > mediatype="image/svg+xml" > ref="concat('/services/charts/' , instance('test')/value)" > model="some-model" > /> > > XSLTForms generates something like this : > > data:image/svg+xml,/services/charts/310 > > and the browser complains about an empty document where the image should > appear : > > « > This page contains the following errors: > > error on line 1 at column 1: Document is empty > > Below is a rendering of the page up to the first error. > » > > When I use the same URL directly with a <img> tag, the image is ok > (obviously I test with a browser that accepts an SVG image in a <img> > tag, e.g. Firefox 4 or Chrome, but not Firefox 3). > > Is there an issue with the way XSLTForms displays SVG pictures? Or is > this a misunderstanding an my side? > > Thank you for your help! > > Grégoire |