On Thu, 25 Jan 2007 02:05:47 +0100, ddailey <[EMAIL PROTECTED]>  
wrote:

> Aaron Gray wrote:
>
>> This brings up the issue of embed .v. object .v. frames .v. iframes I  
>> would appreciate some pointers and advice here.
>
> I'll go ahead and make a stab at an answer. If I misstate or neglect  
> anything,  I'll hope others will jump in and correct me.
...
> <object> works quite nicely and simply in FF and Opera, though.

I like <object> more than <embed> since it has more predictible results.  
You are less likely to run into trouble if you use <object> in FF/Opera,  
with the drawback that it might not work in IE/ASV.

...
> a) <image src="doc.svg"> is likely not ever to support scripting, even  
> once individual browsers come to support that file type.

It seems likely that scripting will be disabled for <html:img> if it  
supports svg in the future yes.

> b) the inline approach to SVG has been experimented with a good deal and  
> is likely to become much more convenient in future browsers (right now  
> IE seems to be the obstacle). The link I mentioned earlier  
> http://wiki.svg.org/Inline_SVG  seems as consise and accurate as on this  
> subject as any, though I seem to recall that Andreas Neumann had some  
> pretty extensive stuff on this at his wonderful  
> http://www.carto.net/papers/svg/samples/ site -- I can't seem to locate  
> it quickly though.

I agree it's convinient, let's hope to see more content like that in the  
future.

> c) there is a <foreignObject> tag in SVG1.1 (see  
> http://www.w3.org/TR/SVG/extend.html#ForeignObjectElement) . It appears  
> to have the purpose of allowing the embedding of XHTML (and other XML  
> content) directly into SVG, I suppose somewhat like Microsoft XML data  
> islands in HTML. I haven't seen any working demos of it, and the example  
> code in the W3C specs is something I've not been able to make work in  
> any browser (I'm hoping somebody can set me straight here.)

I recently tried a FF3.0 nightly that had some support for foreignObject.
Opera 9 has some support, but it's limited to external content (via  
xlink:href) at the moment.

Here's an example that works in Opera 9:
<svg xmlns="http://www.w3.org/2000/svg";  
xmlns:xlink="http://www.w3.org/1999/xlink";  id="svg-root" width="800"  
height="600">
        <foreignObject id="foo" width="800" height="600"  
xlink:href="http://www.opera.com/"/>
        <defs>
                <linearGradient id="gradient">
                        <stop stop-color="yellow" offset="0"/>
                        <stop stop-color="red" offset="1"/>
                </linearGradient>
        </defs>
        <text fill="url(#gradient)" fill-opacity="0.5" transform="rotate(-45 
700  
100)" font-size="100" pointer-events="none" font-family="sans-serif">SVG  
on top</text>
</svg>

And here's an example that works in FF3.0:
<svg xmlns="http://www.w3.org/2000/svg";  
xmlns:xlink="http://www.w3.org/1999/xlink";  id="svg-root" width="800"  
height="600">
        <foreignObject width="800" height="600">
                <html xmlns="http://www.w3.org/1999/xhtml";>
                        <body bgcolor="beige" style="font-size:48px">
                                <p>This is XHTML</p>
                                <p>Click to <a 
href="http://www.mozilla.org/";>visit Mozilla.org</a></p>
                                <p>This is XHTML</p>
                                <p>This is XHTML</p>
                                <p>This is XHTML</p>
                        </body>
                </html>
        </foreignObject>                
        <defs>
                <linearGradient id="gradient">
                        <stop stop-color="yellow" offset="0"/>
                        <stop stop-color="red" offset="1"/>
                </linearGradient>
        </defs>
        <text fill="url(#gradient)" fill-opacity="0.5" transform="rotate(-45 
700  
100)" font-size="100" pointer-events="none" font-family="sans-serif">SVG  
on top</text>
</svg>

I hope the foreignObject support in all browsers improves so that it  
becomes possible to use in the future.

Cheers
/Erik

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


-----
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:
    mailto:[EMAIL PROTECTED] 
    mailto:[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