[xsl] Writing XML to a new browser window

Subject: [xsl] Writing XML to a new browser window
From: jaustring <jaustring@xxxxxxxxxx>
Date: Fri, 2 Feb 2001 08:59:23 -0700
Hello,

I'm trying to open up a new window using javascript.  What I would like to
happen is that the current window's XML will be written to the new window
and a new XSL document will be applied to that XML.  I understand that I
need to have a content-type: text/xml somewhere to let the browser know that
I am sending it XML and not plain text but I'm unsure how to do that.  I've
tried using a document.write ('content-type: text/xml') statement in the
javascript but that doesn't seem to work. Can javascript even pass that kind
of information to a new window?  

here's most of my code in the javascript:

	var source = document.XMLDocument.documentElement;	     
	var srcwin =
window.open("about:blank","","menubar,height=800,width=600,resizable,scrollb
ars");
	srcwin.document.open ('content-type: text/xml');
	wintxt = "<?xml version=\"1.0\" ?>";
	wintxt += "\n<?xml:stylesheet TYPE=\"text/xsl\"
HREF=\"/newXSLsheet.xsl\"?>\n";
	wintxt += source.xml;
	srcwin.document.write(wintxt);

I don't want to use transformNode() because I want the ability to resort the
data using the features I've got set up in the new XSL document in the new
window.  Any ideas?

Thanks,
Jenn :)
jaustring@xxxxxxxxxx

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


Current Thread