[xsl] HTML page to connect the xml to xsl and svg

Subject: [xsl] HTML page to connect the xml to xsl and svg
From: "meidan" <asafmei@xxxxxxxxxxxx>
Date: Mon, 3 Nov 2003 11:22:50 +0200
I am trying to write an HTML page, which will connect XML file and XSL file.
Inside the stylesheet I have SVG code. I tried 2 kind of HTML pages. With
the first html page, there is no problem with the xml transformation, but no
svg shown on screen. With the second html page no problem with the xml
transformation and the SVG objects are rendered on the screen,
But I cant operate SVG events(onclick etc.) and SVG DOM manipulations
I guess I miss something at the processor definitions at the html page.
(I use IE5+ msxml3.0+ and svg3)
The first option for HTML page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<script language="JavaScript" type="text/javascript">
function transformandsvg(){
var xslt = new ActiveXObject("Msxml2.XSLTemplate.4.0");
var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0");
var xslProc;
xslDoc.async = false;
xslt.stylesheet = xslDoc;
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
xmlDoc.async = false;
xslProc = xslt.createProcessor();
xslProc.input = xmlDoc;
<body id="connect" onload="transformandsvg()">
The second option for HTML page (using asv3)
<?xml version="1.0"?>
  <html xmlns="http://www.w3.org/1999/xhtml";
      xmlns:asv="http://www.adobe.com/svg"; >
          <object id="asv"
          <?import namespace="asv" implementation="#asv"?>
     <script type="text/JavaScript">
         var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
      var xslDoc = new ActiveXObject("Microsoft.XMLDOM");
                  xmlDoc.async = xslDoc.async = false;
               var strSVG = new String(xmlDoc.transformNode(xslDoc));
With the second HTML file above the xsl transformations are ok, the svg
objects are rendered to the screen, but the SVG is static(cant make events
and DOM manipulations.Didnt find any solution so far.
Many thanks for any help!!!

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread