David Dailey schrieb am 16.04.2011 17:11:
> Hmmm.. Sujana's suggestion doesn't do it for my Safari:  (5.04, windows)
> The following works in FF4, Chrome and IE9:
> <!DOCTYPE HTML>
> <html>
> <body>
> 
> <svg width="400" height="400" xmlns="http://www.w3.org/2000/svg";>
> <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="green"
> />
> </svg>
> </body>
> </html>
> 
> Notes:
> 1,  the doctype is needed, as I understand it, to get IE9 out of quirks
> mode.
> 2. The simpler xmlns= rather than xmlns:svg seems to work
> 
> 3. adding xmlns:xlink="http://www.w3.org/1999/xlink"; as per Sujana's
> suggestion doesn't do anything in my six browsers (the five mentioned, plus
> ASV).
> 
> 4. I didn't expect ASV to do it. All tricks I've ever seen for doing SVG
> inline in HTML within ASV are terribly idiosyncratic and would (I think) be
> hopeless in other browsers.
> 
>  
> 
> I can't seem to get Safari or Opera to render the SVG in this manner. So
> some questions:
> 1.      What does the spec say about this?

xhtml supports mixing of html+svg content. This works crossbrowser (all,
but ie6-8 does not even render the page if served as xml+xhtml, which is
required for real xhtml rendering)
see: http://caniuse.com/#search=xhtml

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC
    "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
    "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd";>
<html
        xmlns="http://www.w3.org/1999/xhtml";
        xmlns:svg="http://www.w3.org/2000/svg";
        xml:lang="en">
        <head>
                <title>title</title>
        </head>
        <body>
                <svg:svg xmlns:svg="http://www.w3.org/2000/svg"; width="25" 
height="11">
                        <svg:polyline points="0,10 4,05 8,10" />
                        <svg:polyline points="0,05 4,00 8,05" />
                </svg:svg>
        </body>
</html>

> 2.      Which spec (HTML or SVG) would address the issue?

> 3.      Is there another trick of some sort for getting Opera and Safari to
> play this game?

You can (and should?) make it XHTML.

Your approach is html5. This works only with html5 parser. See support here:

http://caniuse.com/#search=parser

-- 
best regards
Holger



------------------------------------

-----
To unsubscribe send a message to: [email protected]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to