W3C home > Mailing lists > Public > www-svg@w3.org > June 2000

Re: dynamically create and insert SVG into an HTML page

From: Chris Lilley <chris@w3.org>
Date: Fri, 23 Jun 2000 15:18:07 +0200
Message-ID: <3953638F.15523A83@w3.org>
To: Justin Friedl <justin.friedl@aspentech.com>
CC: "'www-svg@w3.org'" <www-svg@w3.org>

Justin Friedl wrote:
> thanks, how? Because I can't figure out how to take dynamically created SVG
> and insert it into an <embed> tag in HTML.  I want to just take the unparsed
> SVG-XML data and insert somehow into an <embed> tag.  The only way I can
> figure out how to insert SVG is through a "src" attribute of <embed> which
> references a .svg file. 


> This is ok but does not solve the problem of
> dynamically creating an entirely new SVG-XML image on the client.

Also correct. It would be better to do it inline.

> Here's my scenario:
> XML is downloaded to the client(browser IE 5.0/5.5) 

presumably any XML browser ;-)

> along with several XSLT
> transformation stylesheets (for different views of the data). 

OK, any XML + XSL-T browser

>  On the client
> one stylesheet is applied(through javascript in an HTML page)

Where did the HTML page come from?

> to the XML
> data(using MSXML3).  The output of this is SVG-XML data.  The SVG-XML data
> is then displayed.  The user can click on different views in which case
> different XSLT stylesheets are applied to the original XML and new SVG-XML
> is output to be viewed.

OK. The weak link here is the traditional, not necessarily well-formed,
HTML. Using XML (for example, XHTML) you can then have the SVG as child
elements in a single XML parse tree. For that you need an XML browser that
can render SVG (for the graphics) and can render text using CSS or XSL FO
(for the text).

Received on Friday, 23 June 2000 09:18:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:29:12 UTC