You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Bruno Aranda <br...@gmail.com> on 2005/06/12 21:17:39 UTC
SVG Image component
Hi,
For my project I need a component (graphicSVG) to embed SVG images to
a page and with the possibility to raster images to common formats
(PNG,JPG, etc) if the browser is not able to render SVG.
The component renderer will use the tag 'embed' to include the SVG
file and, if the attribute 'rasterize' is set to true it will use the
Batik SVG Toolkit from Apache to raster the image. If someone is
interested in the component or want to do some feedback, please do so.
Once finished, if there is interest in it I will put this component in
the sandbox or, if myfaces commiters consider it, it will go to the
myfaces components...
Best regards,
Bruno
Re: SVG Image component
Posted by Bruno Aranda <br...@gmail.com>.
I see you have some experience in this issue, and I remember your
problems with MathML.
The component I have in mind would be embeded to the page using the
OBJECT tag (and inside this tag, an EMBED tag for browsers that do not
understand the OBJECT tag), something like this:
<object data="test.svg" width="500" height="500" type="image/svg+xml">
<embed src="test.svg" width="500" height="500" type="image/svg+xml" />
</object>
Till now, I tested this situation using f:verbatim tags, and
everything works ok in IE or Firefox (with the adobe SVG plugin) and
in Firefox Deer Park Alpha 1, which has native SVG support.
The component would have the option to be 'rasterized' to PNG/JPG and
rendered with IMG tags, as a standard image, using the batik
libraries.
I've only tested that everything is shown ok in these browsers, as
this is what I need for my project. Your experience here can be very
helpful, but what I would do now is to implement the component and let
the community give some feedback...
Best regards,
Bruno
2005/6/12, Hendrik Neumann <he...@web.de>:
> Hi Bruno,
>
> I'm not a MyFaces-Developer but the component you describe sounds extremly
> interesting. I have currently big problems to get MathML to work with JSF
> because JSF creates invalid code due to the xhtml-DTD. But if you want to get
> these interesting XHTML-Extensions like SVG, MathML or X3D to work you'll
> need code that as is 100% valid and you have to set the mime-type of your
> html-page to "application/xhtml+xml". This mime type causes the browsers to
> do a VERY heavy-handed xhtml-validation. As I said before this is in
> combination with the invalid-source-generation of JSF a very bad
> circumstance.
>
> Have you already come across this validity-problems? What is the current
> status of your component? Have you found a "work-around"?
>
> Greetings,
> Hendrik
>
Re: SVG Image component
Posted by Hendrik Neumann <he...@web.de>.
Hi Bruno,
I'm not a MyFaces-Developer but the component you describe sounds extremly
interesting. I have currently big problems to get MathML to work with JSF
because JSF creates invalid code due to the xhtml-DTD. But if you want to get
these interesting XHTML-Extensions like SVG, MathML or X3D to work you'll
need code that as is 100% valid and you have to set the mime-type of your
html-page to "application/xhtml+xml". This mime type causes the browsers to
do a VERY heavy-handed xhtml-validation. As I said before this is in
combination with the invalid-source-generation of JSF a very bad
circumstance.
Have you already come across this validity-problems? What is the current
status of your component? Have you found a "work-around"?
Greetings,
Hendrik