RE: [xsl] Filtering XML with XSL

Subject: RE: [xsl] Filtering XML with XSL
From: "Sam Awad" <sammy_awad@xxxxxxxxx>
Date: Sun, 9 Feb 2003 11:15:09 -0700

No, That's not what I meant. I test the xsl sheet using a stand alone xml
file as well. But the filter javascript only works when I remove the entries
to load the xsl file from the document object and load it from a file
located on the file system instead like this (same thing for the xml file):

function filter(userFirstName){

		var s = new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
//		var x = document.XMLDocument;
		var x = "./EmployeeAD.xml";

//		if (x == null){
//			x = navigator.XMLDocument;
//			s.loadXML(navigator.XSLDocument.xml);
//		}else{
//			s.loadXML(document.XSLDocument.xml);
		var tem = new ActiveXObject("MSXML2.XSLTemplate");
		tem.stylesheet = s;
		var proc = tem.createProcessor();
		proc.addParameter("userFirstName", userFirstName);
		proc.input = x;
		var str = proc.output;

		var newDoc ="text/html");
		navigator.XMLDocument = x;
		navigator.XSLDocument = s;


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Charles White
Sent: Friday, February 07, 2003 9:53 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Filtering XML with XSL

> Chuck and Steve: Thanks for all your help. It definitely helped taken out
> the exception handlers to debug. I am using the same script that Chuck was
> using but unfortunately it does not work for me.
> Not sure why the jscript cannot use the properties from the document or
> navigator objects.
> I can only get it to work (see below) if I have static .xml and .xsl files
> (like your .asp script Steve); but that is not accomplishing client-side
> filtering at all and it adds more maintenance work. Such is life.

Are you saying that the script works okay if you are using a standalone,
static XML file with a PI pointing to the stylesheet? This is how I tested
it, and it worked okay. The fact you're running through Active Directory may
be the reason for your problems, but it sounds like your the document is
loading okay at first.

> Next, I'll try to run it on a machine with msxml ver 4  and see if that
> helps. If anyone has any ideas I'll try them.

Well, if you do that, be sure you call the correct objects for MSXML 4:


Chuck White
Author, Mastering XSLT, Sybex Books

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread