This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Writing XML to a new browser window


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@micron.com

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]