It’s just data

Inline SVG in MSIE

inline SVG flag demo

Same source works on MSIE 7.0/with Silverlight on WinXP, Firefox 2.0.0.3 on Ubuntu, and Opera 9.20 also on Ubuntu.


Also works in Webkit nightlies, but fails in Safari 2.04 with Silverlight plugin.

Posted by d.w. at

Ok, so maybe some good will come of SilverLight after all?

Posted by Bob Aman at

Also works in Webkit nightlies,

That should simply be the native SVG showing through.

but fails in Safari 2.04 with Silverlight plugin.

At the moment, the conversion is only attempted on browsers that support the proprietary attachEvent method, and do not support the standard createElementNS method, thus:

// if it looks like IE, trigger conversion on document load
if (window.attachEvent && !document.createElementNS) {
  window.attachEvent("onload", convertSvgToSilverlight);
}

Possibly, something like this could be used to trigger the conversion on Safari, but it would probably be best if this were limited to certain versions of WebKit.

Posted by Sam Ruby at

Inline SVG in MSIE . Sam Ruby has a neat proof of concept that converts inline SVG (currently only the path element) to the Silverlight equivalent. -->...

Excerpt from Simon Willison's Weblog at

I am probably late to the party but why does IE7 continue to pop up the File Download dialog citing “Unknown File Type” when I try to navigate to your post?

Posted by Dilip at

why does IE7 continue to pop up the File Download dialog citing “Unknown File Type” when I try to navigate to your post?

No clue.  Works for me.

Posted by Sam Ruby at

[from jbnewland] Sam Ruby: Inline SVG in MSIE

Sam Ruby has already hacked together some Javascript to convert inline SVG to Silverlight objects. What was that about Microsoft “rebooting the web” again?...

Excerpt from del.icio.us/network/coty at

Weird!  The File Download dialog pops up only if I try to right click on the heading of your post from within Google Reader and try opening it in another tab.  If I just browse to your blog home page directly ([link]) and either click on a post directly or else copy short cut, paste it in another tab, it works just fine.

Posted by Dilip at

Ah!

(I couldn’t post this comment right away because your comment spam tracker thinks I am in a comment-bombarding spree)

Looks like Google Reader has the link to your post without the ‘www’ in front of intertwingly.net.

Why does that throw off IE? (Firefox seems to be perfectly fine with it)

Posted by Dilip at

Using Silverlight to fix IE

Sam Ruby has kindly started to play with getting SVG support in IE 7 via the Silverlight runtime. I am hopeful that we can do some other fixits, such as implementing Canvas on top of Silverlight (instead of explorercanvas which uses VML). Can we...

Excerpt from techno.blog("Dion") at

Dilip, it seems to be Sams use of an application/xhtml+xml content type for his post that causes the download dialog to popup in IE.

Posted by Björn at

Appendum to my comment above: Interestingly, the server redirected me to [link] when pasting [link] into IEs location bar. Navigating to the www. subdomain through whatever means makes the post links work indeed. At this point in time I like to name the server setup messed up - especially as I cannot open any direct links to Sam’s posts from (web) external sources in IE without seeing the download dialog :]

Posted by Björn at

Sam, have you considered using client-side XSLT at all for transforming SVG to XAML?

Considering how varied a SVG element’s content can be I think the freedom <xsl:apply-templates/> offers could be worthwhile.

Here’s an example of what I’m talking 'bout [link]

The downside is that I couldn’t find a suitable way to make IE-only client-side xslt files (so I cheated with a user-agent sniffing PHP script).  The upside is that if another javascript kills your page in IE this code would have already been executed.

Posted by Josh Peters at

Simon Willison : Inline SVG in MSIE - Inline SVG in MSIE. Sam Ruby has a neat proof of concept that converts inline SVG (currently only the path element) to the Silverlight equivalent....

Excerpt from HotLinks - Level 1 at

Cool stuff.  One typo though:  “Sivlerlight”

Posted by Jeff Schiller at

One typo though:  “Sivlerlight”

Fixed.  Thanks!

Posted by Sam Ruby at

Sam Ruby: Inline SVG in IE

Thanks, Sam for kicking this off - I knew it was just a matter of time before someone would do a proof-of-concept, but the week of MIX07 was earlier than I expected! One suggestion: If you’re going to use simple IE detection, then why not use...

Excerpt from Something Witty Goes Here at

Sam,

I think you need to look at conditional comments again - all browsers except IE treat it as one big comment and ignore the script.  Only IE would include the script (exactly what you want).

Or did I miss something?

Jeff

Posted by Jeff Schiller at

While this seems like an amazingly cool hack, wouldn’t it be easier to get IE support for inline SVG, starting with the Adobe SVGViewer plugin?

Google turns up several discussions on this topic (e.g. this one). Surely, one of these recipes could be adapted much more easily to work in a cross-platform-compatible fashion. And you’d get a rather complete SVG implementation for your efforts.

Posted by Jacques Distler at

At this point in time I like to name the server setup messed up

Björn, the mapping of intertwingly.net to wwww.intertwingly.net is handled for me by my hosting provider, and I’m unclear of the mechanics behind how it works.  Eventually I will look into it.

I think you need to look at conditional comments again - all browsers except IE treat it as one big comment and ignore the script.  Only IE would include the script (exactly what you want).

Jeff, you are correct.  Now onto my next issue.  I’m a big believer in Unobtrusive Javascript.  I’m willing to do a limited amount of browser specific hijinks within my scripts, but would like to keep my pages uncluttered.

wouldn’t it be easier to get IE support for inline SVG, starting with the Adobe SVGViewer plugin?

Jacques, this is every bit as much about being a learning exercise for me as it is about achieving a specific task.  Meanwhile, ASV is being EOL'ed, and the number of IE users who will be predisposed to already have Silverlight installed is likely to be on a upwards trajectory for the foreseeable future.

Posted by Sam Ruby at


Now onto my next issue.  I’m a big believer in Unobtrusive Javascript.  I’m willing to do a limited amount of browser specific hijinks within my scripts, but would like to keep my pages uncluttered.

Sure.  I guess I’m more into preventing a file fetch request, parsing pages of JavaScript statements (your script is only going to grow in length...) and  executing a few if statements if they don’t need to.  But to each his own style... :)

Posted by Jeff Schiller at

[link] [more]...

Excerpt from reddit.com: programming - newest submissions at

Jacques, this is every bit as much about being a learning exercise for me as it is about achieving a specific task.

It’s not the destination; it’s the journey. I know. This seems like a great way to learn about SilverLight.

But the prospects for being able to realistically map SVG (even the subset of SVG you happen to use) to XAML seem a bit dubious.

Meanwhile, ASV is being EOL’ed,

Very unfortunate. But there are promising alternatives, like the Renesis plugin.

the number of IE users who will be predisposed to already have Silverlight installed is likely to be on a upwards trajectory for the foreseeable future.

Right now, the number who have either plugin installed is indistinguishable from zero. But you are probably right about the future ...

Posted by Jacques Distler at

Sam Ruby: Inline SVG in MSIE

[link]...

Excerpt from del.icio.us/tag/svg at

I’m a big believer in Unobtrusive Javascript.  I’m willing to do a limited amount of browser specific hijinks within my scripts, but would like to keep my pages uncluttered.

There is a different type of IE conditional comments that works in script files.  [link]

Posted by Mark at

Inline SVG in IE using Silverlight

That made my day: Silverlight makes it possible to render SVG in Internet Explorer. Through the fact that XAML and SVG are identical in many areas this is possible quite easy. We, the qooxdoo developers, don’t rely on the inline feature of Sam...

Excerpt from Sebastian at

SVG Please?

I recently stumbled over a little piece of information that, while quite stale, still seems widely underreported in the places I hang out. Adobe announced some time last fall that its SVG Viewer is dead and gone as of January 1, 2008. Is anyone...

Excerpt from Webdesign (css, grafica e altro) at

SVG Please?

I recently stumbled over a little piece of information that, while quite stale, still seems widely underreported in the places I hang out. Adobe announced some time last fall that its SVG Viewer is dead and gone as of January 1, 2008. Is anyone...

Excerpt from Dave Shea's mezzoblue at

Silverlight Samples

... [more]

Trackback from Scott Hanselman's Computer Zen

at

Silverlight Samples

There’s a lot of Silverlight in the air right now. I haven’t seen the 'net abuzz like this since FutureSplash Animator . ;) I’ve been collecting links to samples out there. Since Silverlight is all text (XAML, JS, etc) there’s a whole world of...

Excerpt from Scott Hanselman's Computer Zen at

Silverlight Samples

... [more]

Trackback from Scott Hanselman's Computer Zen

at

Very interesting, but it is sad that one has to be limited by Microsoft in the use of SVG. I think we should continue to use the full SVG 1.2 implementation as per specification. If Microsoft doesn’t want to play ball, then IE users will be limited by immature and non-compatible technologies.

These type of posts is what Microsoft wants to see. Us changing our way of work to become slaves to their technologies. It’s a pitty and I don’t think we should play the game. Feature for feature there is currently no browser that comes close to Opera. I’ll rather tell my visitors to download it. It’s not much smaller than Adobe SVG viewer.

Regards,
Jacobus

Posted by Jacobus at

Silverlight Browser on CodePlex

Last week Ernie Booth announced a SilverlightBrowser plugin for Reflector . The plugin allows you to... [more]

Trackback from TestDriven.NET by Jamie Cansdale

at

Instead of
  embed.type = “application/ag-plugin”;

SVG2SL.js should read
  embed.type = “application/x-silverlight”;

I’m experimenting ([link]) with stuff like this as well. What you did provided me with some great clues. Thanks and keep up the good work!

Posted by Toine de Greef at

Update on Cat in JavaScript (and the lack-of native SVG support in IE 7.0)

The current Cat in JavaScript, with enhancements and improved portability provided by Takashi Yamamiya , is at [link] . I am considering extending this implementation with graphics. I think it would make the...

Excerpt from cdiggins.com at

iPhone on Silverlight Promo Video?On the Silverlight promo video did

iPhone on Silverlight Promo Video? On the Silverlight promo video did anyone notice one of the actors using a device that looks for all the world like an Apple iPhone?   Talking of the iPhone. Since its OS is based on a slimmed down...

Excerpt from Developer News at

Dynamics Developer Sessions - All 3 Screencasts cont…!The next screencast

Dynamics Developer Sessions - All 3 Screencasts cont…! The next screencast we have is “Build A VE Mashup with Microsoft Dynamics NAV 5.0″: Technorati tags: Microsoft Dynamics, Nav 5.0, Virtual Earth, Visual Studio 2008, ASP.NET...

Excerpt from Developer News at

Silverlight Browser on CodePlexLast week Ernie Booth announced a SilverlightBrowser

Silverlight Browser on CodePlex Last week Ernie Booth announced a SilverlightBrowser plugin for Reflector. The plugin allows you to browse web pages that contain Silverlight elements and display their constituent Javascript, XAML and assembly files....

Excerpt from Developer News at

Silverlight Browser on CodePlexLast week Ernie Booth announced a SilverlightBrowser

Silverlight Browser on CodePlex Last week Ernie Booth announced a SilverlightBrowser plugin for Reflector. The plugin allows you to browse web pages that contain Silverlight elements and display their constituent Javascript, XAML and assembly files....

Excerpt from Developer News at

Telerik ships Sitefinity CMS v3.1 Telerik has unveiled version 3.1

Telerik ships Sitefinity CMS v3.1 Telerik has unveiled version 3.1 of Sitefinity CMS for construction and management of web sites. Coming hot on the heels of version 3.0, Sitefinity v3.1 provides integrated search engine, forums module, updated RSS...

Excerpt from Developer News at

Which method from Silverlight can be used to replace the SVG’s getURL(url, callback)???
Iam calling this method from a .js file and expecting the response from the server to be routed to the method specified in the callback after the url request is processed. I couldnt find any information with respect to Silverlight with similar process?

Posted by Suman at

Answer by Pete Kirkham for Scripting SVG

1/ probably never - if IE wanted to add it, then I would have though it would have done so by now; but there are workarounds using SilverLight and Gecko to provide rendering. On the other hand, there are cross-browser graphics APIs available. I’ve...

Excerpt from Scripting SVG - Stack Overflow at

Answer by David Schmitt for Is it possible to render image with html?

You can use inline SVG . See this article for mozilla and this one for IE ....

Excerpt from Is it possible to render image with html? - Stack Overflow at

Answer by Pete Kirkham for Scripting SVG

1/ probably never - if IE wanted to add it, then I would have though it would have done so by now; but there are workarounds using SilverLight and Gecko to provide rendering. On the other hand, there are cross-browser graphics APIs available. I’ve...

Excerpt from Scripting SVG - Stack Overflow at

Answer by Jon Galloway for Completely embedding a Silverlight Application in an HTML Page?

For what you’re trying to do, it sounds like you might want to look at Sam Ruby’s SVG with XAML fallback , which displays SVG in browsers which support it, and renders via Silverlight in IE. You can inline XAML like this (source: MSDN ): Display...

Excerpt from Completely embedding a Silverlight Application in an HTML Page? - Stack Overflow at

By: aranwe

SVG in IE (via Silverlight and XSLT): Inline SVG in MSIE SVG to Silverlight Workbench SVG on IE via Silverlight Revisited...

Excerpt from Comments on: SVG Is The Future Of Application Development at

Great to see different efforts (using Flash, VML, etc.) pushing SVG forward. :-)

@Josh Peters

The downside is that I couldn’t find a suitable way to make IE-only client-side xslt files

Not quite “IE-only” but Microsoft-only (more information/examples available [1]):

<xsl:if test="system-property('xsl:vendor')='Microsoft'">
  [...]
</xsl:if>

[1] [link]

Posted by Helder Magalhães at

Your demo doesn’t work in IE for me.  It gets me this error:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Mon, 11 Jan 2010 18:38:44 UTC

Message: Object required
Line: 27
Char: 5
Code: 0
URI: [link]

Posted by Paul Tessman at

Add your comment