Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8684035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:11:52+00:00 2026-06-12T22:11:52+00:00

Attempting to add parameters to an xsl template, for use in a navigation menu.

  • 0

Attempting to add parameters to an xsl template, for use in a navigation menu.

Trying to figure out how to use the output that IXSLProcessor leaves me with.

I have the following code that works perfectly for Firefox

var xslStylesheet;
    var xsltProcessor = new XSLTProcessor();
    var myDOM;
    var xmlDoc;
    var myXMLHTTPRequest = new XMLHttpRequest();
    myXMLHTTPRequest.open("GET", "client.xsl", false);
    myXMLHTTPRequest.send(null);

    xslStylesheet = myXMLHTTPRequest.responseXML;
    xsltProcessor.importStylesheet(xslStylesheet);

    // load the xml file
    myXMLHTTPRequest = new XMLHttpRequest();
    myXMLHTTPRequest.open("GET", "client.xml", false);
    myXMLHTTPRequest.send(null);
    xmlDoc = myXMLHTTPRequest.responseXML;

    // set the parameter using the parameter passed to the outputgroup function
    xsltProcessor.setParameter(null, "cid", client);
    xsltProcessor.setParameter(null, "browser", "other");
    var fragment = xsltProcessor.transformToFragment(xmlDoc,document);
    document.getElementById("scriptHook").innerHTML = "";
    document.getElementById("maincontent").replaceChild(fragment, document.getElementById("scriptHook"));
    scroll(0,0);

This is the code I have (mostly pilfered from msdn)

var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
var xsldoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
var xslproc;
xsldoc.async = false;
xsldoc.load("client.xsl");
if (xsldoc.parseError.errorCode != 0) {
   var myErr = xsldoc.parseError;
   WScript.Echo("You have error " + myErr.reason);
} else {
   xslt.stylesheet = xsldoc;
   var xmldoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
   xmldoc.async = false;
   xmldoc.load("client.xml");
   if (xmldoc.parseError.errorCode != 0) {
      var myErr = xmldoc.parseError;
      WScript.Echo("You have error " + myErr.reason);
   } else {
      xslproc = xslt.createProcessor();
      xslproc.input = xmldoc;
      xslproc.addParameter("cid", client);
      xslproc.addParameter("browser", "ie");
      xslproc.transform();

      //somehow convert xslproc.output to object that can be used in replaceChild

      document.getElementById("scriptHook").innerHTML = "";
      document.getElementById("maincontent").replaceChild(xslproc.output, document.getElementById("scriptHook"));

     }
}

Any and all help is appreciated, cheers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:11:53+00:00Added an answer on June 12, 2026 at 10:11 pm

    With Mozilla you can exchange nodes between XSLT and DOM but with IE you need to take the XSLT transformation result as a string and feed that to IE’s HTML parser; so for your sample I think you want

    document.getElementById("scriptHook").outerHTML = xslproc.output;
    

    which will replace the scriptHook element with the result of the transformation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to add a function that will create a csv for download
I'm attempting to add a bookmarklet to my wop website. The issue is that
I'm attempting to add a cmake build system to an old fortran code that
I'm attempting to add a custom dialog box to my current GUI that can
In a previous question , I was trying to figure out the right strategy
I am attempting add a tableadapter to a stored procedure in my SQL Server
I am attempting add some tests to an existing QT GUI application using QTest.
I'm attempting to add a legend to a graph, and I want to append
I am attempting to add an update method to the Symbol class. class SymbolUpdate(s:
I am attempting to add a simple toolstrip however I can't get it to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.