SVG as image for a XHTML-element?

Discussion in 'XML' started by linuxadmin@yandex.ru, Jan 14, 2007.

  1. Guest

    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!
     
    , Jan 14, 2007
    #1
    1. Advertising

  2. * 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 · mailto: · 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/
     
    Bjoern Hoehrmann, Jan 15, 2007
    #2
    1. Advertising

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


    --
    Artaban de Médée
     
    =?ISO-8859-1?Q?Une_B=E9vue?=, Jan 15, 2007
    #3
  4. VK Guest

    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.
     
    VK, Jan 15, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arne Nordmann
    Replies:
    0
    Views:
    551
    Arne Nordmann
    Jun 28, 2004
  2. Mardagg
    Replies:
    0
    Views:
    836
    Mardagg
    May 12, 2006
  3. Mardagg
    Replies:
    0
    Views:
    692
    Mardagg
    May 12, 2006
  4. milof83

    svg to svg saving problem

    milof83, Aug 18, 2006, in forum: Java
    Replies:
    1
    Views:
    879
    Roland de Ruiter
    Aug 18, 2006
  5. Helmut Jarausch

    Re: svg-chart 1.1 SVG Charting Library

    Helmut Jarausch, May 20, 2008, in forum: Python
    Replies:
    0
    Views:
    492
    Helmut Jarausch
    May 20, 2008
Loading...

Share This Page