W3C home > Mailing lists > Public > public-html@w3.org > March 2008

SVG in text/html use cases

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 12 Mar 2008 21:42:06 +0100
To: "HTML WG" <public-html@w3.org>
Message-ID: <op.t7w7sghq64w2qv@annevk-t60.oslo.opera.com>

Below are some use cases for SVG in text/html from Erik Dahlström. He's  
one of Opera's SVG monkeys.. implementors and is also on the SVG WG. I  
reworded some of them in the process so you can blame me for typos. (FWIW,  
I agree with the use cases :-))

Use case #1
It makes it easier to write scripts that operate on the document as a  
whole, for example so that you don't have to worry about getElementById()  
being called in the right content document.

Use case #2
It makes it possible to have selfcontained SVG+HTML documents without the  
need for data: URIs. data: URIs are not sufficient as they can be limited  
in size, require additional processing, and will be in a separate frame  
(see also #1).

Use case #3
It would eliminate the need for using XHTML when using SVG. This is  
important as it lowers the bar for deploying SVG on the Web significantly.  
The different media type and well-formedness constraints are proving to be  

Use case #4
It makes it possible to do retained-mode graphics without using external  

Use case #5
It makes it easier to do interactive graphics than with using <canvas>.  
SVG uses the DOM so paths, shapes, etc. can have event listeners  
registered and can be moved/interacted with/etc. on their own.

Use case #6
It makes it possible to reference resources such as gradients, arbitrary  
clip-paths, symbols etc, from other SVG fragments in HTML. This makes  
documents more compact.

     <linearGradient id="somegradient" ...>
   more html
     <rect fill="url(#somegradient)" .../>

Anne van Kesteren
Received on Wednesday, 12 March 2008 20:41:47 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:31 UTC