RE: How to insert SVG's to a website?

The Adobe SVG Viewer works in most of the major browsers-Microsoft IE and
Netscape Navigator 4.x and above. With IE 5.5 you can actually put your SVG
inline with your HTML. See "svg_ie55.zip" under
http://groups.yahoo.com/group/svg-developers/files/  for details.

With the Adobe SVG Viewer, you can use the embed tag or an object tag. As
far as I know, the <embed> tag is not in any W3C standard, but if you want
plugins to work with legacy browsers (some of which did not properly support
W3C standards -- blame them, not the plugin providers), Adobe has found that
the <embed> tag is the practical (albeit, non-sanctioned) way to go.

If files must validate as XHTML and nothing works with the plugin except the
<embed> tag, then you might be able to achieve validation by adding the
definition of an <embed> element with those attributes that you happen to
use by defining the <embed> tag in the "internal DTD subset". (See the XML
1.0 spec for details.) Something like:

<?xml-version ... ?>
<!DOCTYPE html .... [
<!ELEMENT embed EMPTY>
<!ATTLIST embed
     src CDATA #IMPLIED >
]>
<html>...</html>

In effect, this bit of trickery allows you to validate everything else in
the file correctly and lets the <embed> tag get treated as if it were valid.

...............................
Michael Bierman
Senior Product Manager, SVG Product Marketing
mbierman@adobe.com    http://www.adobe.com/svg

Adobe Systems - "Inspiration becomes reality."
345 Park Avenue
San Jose, California 95110




> -----Original Message-----
> From: www-svg-request@w3.org [mailto:www-svg-request@w3.org]On Behalf Of
> Dave J Woolley
> Sent: Tuesday, March 27, 2001 3:06 AM
> To: www-svg@w3.org
> Subject: RE: How to insert SVG's to a website?
>
>
> > From:	Matthias Zumstein [SMTP:newzumstein@gmx.de]
> >
> > is the only way to insert a SVG to a website linking the SVG-file with
> > <EMBED>? Because I want to generate dynamically a website with
> SVG-buttons
> > inside
> > it. Is it possible to insert the SVG-source code in the website so that
> > the
> > browser show it correct?
> [DJW:]
> Embed is a proprietory element. I would hope, in the longer term,
> that you could directly include SVG in an XML namespace within an
> XHTML document, link to it with A elements, include it as an image with
> img elements or include it with fallback to alternative formats
> using object elements.
>
> The current situation depends on the browser, because SVG is not
> properly implemented in any commercial browser.  You didn't say
> which browser or which SVG implementation.  I believe that Amaya
> will handle it as an XML namespace, using its native viewer.
>
> Looking at the conformance tests, there appears to be no option
> that uses SVG images embedded in HTML, so I suspect that there
> is no reliable standards compliant way of doing it with current
> big 2 browsers and beta viewers.  (Frames is the nearest option.)
>
> I suspect, unless this is for a closed community, you should be
> using object to allow a non-SVG fallback.
> --
> --------------------------- DISCLAIMER ---------------------------------
> Any views expressed in this message are those of the individual sender,
> except where the sender specifically states them to be the views of BTS.
>
> >
>

Received on Tuesday, 27 March 2001 11:20:08 UTC