SVG as image for a XHTML-element?

L

linuxadmin

hi!

i want to embed an svg image in a xhtml element
using css. it does not work in firefox 2 and other
modern browsers.


is this

a) because these browsers don't support the
newest standards yet,

or is it

b) because the standards forbid to do so at all?


if a) is correct, have you experience with current
alpha of firefox3? is that possible there?


thanks in advice!
 
B

Bjoern Hoehrmann

* (e-mail address removed) wrote in comp.text.xml:
i want to embed an svg image in a xhtml element
using css. it does not work in firefox 2 and other
modern browsers.

is this

a) because these browsers don't support the
newest standards yet,

Yes, you could say that.
if a) is correct, have you experience with current
alpha of firefox3? is that possible there?

Not at the moment.
 
?

=?ISO-8859-1?Q?Une_B=E9vue?=

i want to embed an svg image in a xhtml element
using css. it does not work in firefox 2 and other
modern browsers.

it's possible to embed an svg image inline of an xhtml file.

see
<http://www.yvon-thoraval.com/SVG/mozilla/inline/inline_1_portable.xhtml
this solution is the best if you want to manipulate the DOM tree of the
svg itself (otherwise you could embed the svg file as an object like :

<object data="your_svg_file.svg" blahblahblah>
[...]
</object>

)

see how it is done in the file
<http://wwww.yvon-thoraval.com/index.html>

for svg-dom manipulation have an eye to :

<http://www.yvon-thoraval.com/SVG/svg_dom2.xhtml>

works at least on firefox 2/MacOS X the latest
doesn't work with Opera (bugg report)
works partly with WebKit which has a repaint prob (bug report)
 
V

VK

i want to embed an svg image in a xhtml element
using css

Not sure what you mean by that: an SVG document is not a stylesheet, it
has its own set of elements and respectively its own set tags.
it does not work in firefox 2 and other
modern browsers.

However great Opera would be it is not of royal family to talk of it in
plural :)
Currently UAs with native SVG support are Firefox 1.5.x, Firefox 2.x
and Opera 8.2 or higher. Though if we count all Gecko-based browsers
then the number gets higher (Camino 1.x , SeaMonkey and Co)
a) because these browsers don't support the newest standards yet,
or is it>
b) because the standards forbid to do so at all?

Neither. It is because namespaces as such and respectively mixed
namespaces by W3C exist only in XHTML. HTML by W3C doesn't have
namespace: nor default nor null - it simply doesn't have such entity
just like emptyness doesn't have color.

And XHTML exists only if document served with proper Content-Type
where the recommended is application/xhtml+xml
If it is served with Content-Type text/html then for any browser it is
a HTML document no matter how many "powerful" pragma spells you have
placed before and in <html> tag

So make your server send it as application/xhtml+xml and enjoy wherever
supported.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top