Re: [xsl] Dynamic processing of xml file using xsl and javascript (200411/msg00765)

Subject: Re: [xsl] Dynamic processing of xml file using xsl and javascript (200411/msg00765)
From: "Alan Varga" <aevarga@xxxxxx>
Date: Mon, 31 Oct 2005 07:02:57 -0600
Manos,

I am still having trouble transforming my XML file with Sarissa.  To
simplify things, I stripped the HTML document of everything but the section
where I want the data to appear.  Here is newsarissatest.js:

---------------------------------------
var processor = new XSLTProcessor();
var xslDoc = Sarissa.getDomDocument("Band-Cadet.xsl");
processor.importStylesheet(xslDoc);
var xmlDoc = Sarissa.getDomDocument("calendar.xml");
var newDocument = processor.transformToDocument(xmlDoc);
alert(Sarissa.serialize(newDocument));
---------------------------------------

and here is band.htm:

---------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml";
  xml:lang="en">
<head>
<meta http-equiv="Content-Type"
  content="text/html; charset=utf-8" />
<link type="text/css"
      rel="stylesheet"
      media="screen, print"
      href="mmsbb3.css" />
<title></title>
</head>

<body>
<div id="calbody">
<script type="text/javascript"
        src="newsarissatest.js"></script>
</div>

</body>
</html>
---------------------------------------


Again, since I am a hobbyist, I didn't plan on getting deep into the DOM.  I
do have code other than Sarissa which works in IE and almost works in FF,
but since Sarissa seems to be widely accepted I wanted to use it because of
better support.

Thanks, Alan

Current Thread