Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > SVG as image for a XHTML-element?

Reply
Thread Tools

SVG as image for a XHTML-element?

 
 
linuxadmin@yandex.ru
Guest
Posts: n/a
 
      01-14-2007
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!

 
Reply With Quote
 
 
 
 
Bjoern Hoehrmann
Guest
Posts: n/a
 
      01-15-2007
* http://www.velocityreviews.com/forums/(E-Mail 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.
--
Björn Höhrmann · (E-Mail Removed) · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Une_B=E9vue?=
Guest
Posts: n/a
 
      01-15-2007
<(E-Mail Removed)> wrote:

> 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/moz...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)


--
Artaban de Médée
 
Reply With Quote
 
VK
Guest
Posts: n/a
 
      01-15-2007
(E-Mail Removed) wrote:
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: svg-chart 1.1 SVG Charting Library Helmut Jarausch Python 0 05-20-2008 11:05 AM
svg to svg saving problem milof83 Java 1 08-18-2006 07:36 PM
[SVG] probleme dessin d'images SVG avec Batik Mardagg Java 0 05-12-2006 02:13 PM
[SVG] problem with SVG image drawing with Batik Library Mardagg Java 0 05-12-2006 02:12 PM
[SVG] using image-tag to integrate SVG in SVG Arne Nordmann XML 0 06-28-2004 01:16 PM



Advertisments