ie9 fourth platform preview: copes great with SVG but not at all with SVG Web

7 views
Skip to first unread message

Michael Neutze

unread,
Aug 4, 2010, 6:15:03 PM8/4/10
to svg...@googlegroups.com
today the fourth platform preview of ie9 came out
http://blogs.msdn.com/b/ie/archive/2010/08/04/html5-modernized-fourth-ie9-platform-preview-available-for-developers.aspx

and I must confess that it renders a lot of SVG examples right out of
the box without any changes and exactly as intended. It's a huge
improvement over the previous previews.

you might try out these links

Atlas for the European Election 2009 in Germany
http://vis.uell.net/euw/09/atlas.xhtml

Voronoi Price Kaleidoscope (consumer price index, basket of goods)
http://www.destatis.de/Voronoi/PriceKaleidoscope.svg

Personal Inflation Calculator
http://j.mp/9FlI8o (some limitations in functionality)


Unfortunately SVG Web isn't ready to cope with the existence of native
SVG support in ie9 as you can see in the following examples

http://www.staratlas.com/
http://vis.uell.net/nrw/10/atlas.html
http://www.destatis.de/bevoelkerungspyramide/

I will try to get attention and thus hopefully volunteers to tackle
this problem during my SVGopen 2010 talk in Paris/France at the end of
this month. The preliminary version of the paper is already up:

http://www.svgopen.org/2010/papers/15-SVG_in_Internet_Explorer/

Michael

linux4me

unread,
Aug 4, 2010, 6:56:18 PM8/4/10
to SVG Web
On Aug 4, 3:15 pm, Michael Neutze <mneu...@gmail.com> wrote:
> Unfortunately SVG Web isn't ready to cope with the existence of native
> SVG support in ie9 as you can see in the following examples
> Michael

Is it just a matter of your sample HTML comment not distinguishing
between versions of IE and not allowing IE9 to run the svgs natively?
If so, I would be glad to provide the info here on how to do so on
Linux/PHP servers if that would help.

Bruce Duncan

unread,
Aug 4, 2010, 7:00:20 PM8/4/10
to svg...@googlegroups.com
Its a matter of changing svg.js, mainly. It has detection routines that
will need to be updated to recognize IE9 and its capabilities. All the
IE specific HTC things may well be unnecessary now, as well. So its
mainly JS stuff, really. Rick/Brad, please correct me if I'm misinformed.

I'd love to help get it working on IE9. Michael, I can also provide an
example or two if you need it in your paper for another business
application of SVG, since my company does business intelligence
dashboarding using SVG and SVGWeb.

bruce

jmarranz

unread,
Aug 5, 2010, 3:15:46 AM8/5/10
to SVG Web
I have some experience with IE 9 and SVG because of the support of IE
9 in ItsNat. At last IE 9 is a real W3C browser, that is, DOM Level 2
and DOM Events are supported. I think a complete review of how is IE
detected and avoiding IE specific code for IE 9 would be enough (ok
some adjusting may be needed for IE 9).

Bruce Duncan

unread,
Aug 5, 2010, 11:45:02 AM8/5/10
to svg...@googlegroups.com
I spent some time on IE9 last night. I've gotten both the native and
flash renderers at least displaying the SVG when using an object tag,
but there are still a number of problems still left to work through and
I haven't tried the other methods of delivering the SVG other than
object. I have to put this down for the moment, but I hope I'll get
back to it soon. If any of the other devs are going to be trying to
jump into IE9 support work, please let me know and I'll send you my
current svg.js, debug prints and all :)

bruce

Michael Neutze

unread,
Aug 5, 2010, 12:38:11 PM8/5/10
to svg...@googlegroups.com
I think -- from a non-programmer's view -- there shouldn't be many
changes, because removing SVG Web is enough to make an example graphic
work in ie9:

Here's an animated population pyramid with the SVG Web dracolisk release

http://vis.uell.net/pyramids/12te/

1) take out svg.js

2) change the onload event from

<body onsvgload="init()">

to

<body onload="init()">

3) remove the SVG Web special script tag

<script type="image/svg+xml">

4) if you rely on the namespace variable, define it

svgns="http://www.w3.org/2000/svg"

GO!

http://vis.uell.net/pyramids/12te/ie9.html

Works perfectly on ie9pre4

there are a few issues when changing the age-groups (the sliding
mechanism is a bit off coordinate wise) and the bars don't form a
contiguous surface (probably due to shape-rendering or anti-aliasing)
but other then that the original code just works and it took me just
seconds.

Michael

> --
> You received this message because you are subscribed to the Google Groups
> "SVG Web" group.
> To post to this group, send email to svg...@googlegroups.com.
> To unsubscribe from this group, send email to
> svg-web+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/svg-web?hl=en.
>
>

Michael Neutze

unread,
Aug 5, 2010, 1:01:26 PM8/5/10
to svg...@googlegroups.com
here is another one, my latest mapping example

with the SVG Web dracolisk release

http://vis.uell.net/nrw/10/atlas.html

now just without SVG Web (forgot it had 2 svg instances)
and it works perfectly in ie9 pre4:

http://vis.uell.net/nrw/10/ie9.html

... but nowhere else!

I had to remove documentFragment and suspend/redraw (didn't examine
further) but other than that didn't need to change a thing.

Michael

jmarranz

unread,
Aug 5, 2010, 4:27:34 PM8/5/10
to SVG Web
Impressive examples Michael :)

but IE 9 versions do not work in other browsers with native SVG
support and I know why:

SVG markup embedded on X/HTML and served with MIME text/html is not
processed (reflected in DOM and rendered) as SVG markup, browsers like
FireFox, Opera and WebKits see inline SVG markup as unknown HTML
elements (in spite of SVG namespace declaration). This is not a bug,
is normal and this problem does not exist (that is SVG markup is
correctly interpreted) if MIME is application/xhtml+xml.

The reason is simple, with MIME text/html initial markup (including
strict XHTML markup) is understood like pure HTML, no namespaces!

If you explicitly create new elements with createElementNS and specify
the namespace and insert them, these new elements will be managed
correctly according to the namespace.

Then the solution is reinsert the inline markup loaded with the
correct namespace, this is not straightforward because in the original
markup char case is lost, attributes like preserveAspectRatio are
reflected as preserveaspectratio, elements like linearGradient are
LINEARGRADIENT and prefixes (in elements and attributes) are ignored
because they are part of the attribute and element names.

The surprise is the former is not applied in IE9, IE 9 seems to
understand SVG embedded markup correctly with MIME text/html.

This example of SVG inline in XHTML and MIME text/html works in any
browser with native SVG support including IE 9

http://www.innowhere.com:8080/itsnat/feashow_servlet?itsnat_doc_name=feashow.main&feature=feashow.core.otherns.svgInHTMLMime.ex

The explanation is here:

http://www.innowhere.com:8080/itsnat/feashow_servlet?itsnat_doc_name=feashow.main&feature=feashow.core.otherns.svgInHTMLMime.doc

As this explanation says reinsertion of markup was inspired on:

http://intertwingly.net/blog/2006/12/05/HOWTO-Embed-MathML-and-SVG-into-HTML4

The problem of the previous approach is that client JS code must know
about SVG elements and attributes to correctly reinsert the inline
markup, the approach of ItsNat is different because I follow a server-
centric approach, in server SVG DOM is correct and with auxiliary
attributes I tell to a simple namespace-agnostic JS script how to
reinsert elements and attributes, this server-centric approach does
not need specific namespace knowledge, for instance embedded MathML
(FireFox have some support of MathML) will work with no problem in
spite of ItsNat (server side) has no clue about MathML (not really
needed).

Reinsertion is not needed in IE 9 (as discovered by Michael) but it
also works.


On Aug 5, 7:01 pm, Michael Neutze <mneu...@gmail.com> wrote:
> here is another one, my latest mapping example
> with the SVG Web dracolisk release
>
> http://vis.uell.net/nrw/10/atlas.html
>
> now just without SVG Web (forgot it had 2 svg instances)
> and it works perfectly in ie9 pre4:
>
> http://vis.uell.net/nrw/10/ie9.html
>
> ... but nowhere else!
>
> I had to remove documentFragment and suspend/redraw (didn't examine
> further) but other than that didn't need to change a thing.
>
> Michael
>
> On 5 August 2010 18:38, Michael Neutze <mneu...@gmail.com> wrote:
>
> > I think -- from a non-programmer's view -- there shouldn't be many
> > changes, because removing SVG Web is enough to make an example graphic
> > work in ie9:
>
> > Here's an animated population pyramid with the SVG Web dracolisk release
>
> >http://vis.uell.net/pyramids/12te/
>
> > 1) take out svg.js
>
> > 2) change the onload event from
>
> >   <body onsvgload="init()">
>
> > to
>
> >   <body onload="init()">
>
> > 3) remove the SVG Web special script tag
>
> >   <script type="image/svg+xml">
>
> > 4) if you rely on the namespace variable, define it
>
> >   svgns="http://www.w3.org/2000/svg"
>
> > GO!
>
> >http://vis.uell.net/pyramids/12te/ie9.html
>
> > Works perfectly on ie9pre4
>
> > there are a few issues when changing the age-groups (the sliding
> > mechanism is a bit off coordinate wise) and the bars don't form a
> > contiguous surface (probably due to shape-rendering or anti-aliasing)
> > but other then that the original code just works and it took me just
> > seconds.
>
> > Michael
>

Bradley Neuberg

unread,
Aug 8, 2010, 6:19:41 AM8/8/10
to svg...@googlegroups.com
For IE 9 we can branch towards the native support. It should be relatively straightforward. The only area where there could be some issues is some of the patching we have to do for native browsers in order to support some of the peculiarities of the SVG Web API; that could be straightforward but it could also be an issue.
Reply all
Reply to author
Forward
0 new messages