473,396 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

FireFox Problem

I have some doubts regarding XML and XSL transfornation using
javascript.Hope SomeOne will help me for solving this problem.

Actually i Created a javascript for transforming XML and XSL. i made
a new class in the javascript and i added the object of that
particular class and a namespace into the processor by using the
method processor.addObject(object,namespace) . It works fine in
Internet Explorer. So that i could call a function of that object in
my xsl file xpath. the code for Internet Explorer is given below for
reference.

My problem is that when i come to FireFox or any Mozilla Browser, i am
not able to add an object into the XSLT processor of mozilla. So i
cant call any external functions inside my xsl file xpath. Could
anyone please help for doing the same. or any other techniques for
calling an external function in the xpath of the xsl file.(for
mozilla).
I will be very grateful to you.

Javascript for Internet Explorer :

/* xml-xsl-transformation-IE.js */

/
*---------------------------------------------------------------------------------
*/

function MyClass()
{
this.multiply=multiplyNow;

function multiplyNow(val1,val2)
{
var val3=val1*val2;
return val3;
}
}
function parseFiles()
{
try
{
var elemTbl=document.getElementById("tblId");
var xmlIE=new ActiveXObject("Microsoft.XMLDOM");
var xslIE=new ActiveXObject("MSXML.FreeThreadedDOMDocument");

//Load the Script Synchronous with the page
xmlIE.async = false;
xmlIE.load("xml_js.xml");

xslIE.async = false;
xslIE.load("xsl_js.xsl");

var FnObj=new MyClass();
var xslTemplate=new ActiveXObject("Msxml2.XSLTemplate");
xslTemplate.stylesheet=xslIE;
var Processor=xslTemplate.createProcessor;

Processor.input=xmlIE;
Processor.addObject(FnObj, "urn:my-java-function" );

Processor.transform();
//var docIE=xmlIE.transformNode(xslIE);
elemTbl.innerHTML=Processor.output;
}
catch(f){alert(f.message)}
}
/
*---------------------------------------------------------------------------------
*/

Thanking You

Shidhin.C.R
Jun 27 '08 #1
1 1793
This is a good place to start for how to do XSLT in FireFox

http://developer.mozilla.org/en/docs.../XSLT_Bindings

Also, AKAIK, XSLT in FireFox does not allow you to create extension
functions (in JavaScript).

Justin Johansson

sh*******@gmail.com wrote:
I have some doubts regarding XML and XSL transfornation using
javascript.Hope SomeOne will help me for solving this problem.

Actually i Created a javascript for transforming XML and XSL. i made
a new class in the javascript and i added the object of that
particular class and a namespace into the processor by using the
method processor.addObject(object,namespace) . It works fine in
Internet Explorer. So that i could call a function of that object in
my xsl file xpath. the code for Internet Explorer is given below for
reference.

My problem is that when i come to FireFox or any Mozilla Browser, i am
not able to add an object into the XSLT processor of mozilla. So i
cant call any external functions inside my xsl file xpath. Could
anyone please help for doing the same. or any other techniques for
calling an external function in the xpath of the xsl file.(for
mozilla).
I will be very grateful to you.

Javascript for Internet Explorer :
<cut/>

Thanking You

Shidhin.C.R
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Geoff | last post by:
When trying to focus a field in Firefox, I get the following error: Error: " nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame ::...
12
by: Howard Kaikow | last post by:
Yesterday, I decided to try Firefox. I've encountered a behavior that is either a bug in Firefox or a bug in my Javascript code. I'll try to explain the problem, hoping that this newsgroup can...
3
by: TJS | last post by:
I am finding that the serverside requiredvalidator doesn't fire in the firefox browser, and user request proceeds through to my updateProfile method. Validation is working correctly in the IE...
6
by: Mark Olbert | last post by:
The doPostBack javascript functioning is not submitting the page when called by linkbuttons (or an autopostback checkbox, for that matter). I'm aware of a problem with Netscape browsers and the...
4
by: dsimmons | last post by:
On my website http://seasidequilters.blogspot.com/ I'm having a problem that someone thinks might be associated with Firefox browsers. I'm hoping to find someone in this forum that might be...
4
by: petermichaux | last post by:
Hi, I'm hoping for a reason I'm wrong or an alternate solution... I'd like to be able to dynamically include some javascript files. This is like scriptaculous.js library but their solution is...
13
by: Giggle Girl | last post by:
Hi there, I am having a problem with the behavior of Firefox, where lefthand column content is not resized properly after it is "collapsed" and then "re-expanded". An online demo is available...
11
by: minnesotti | last post by:
Hi there, I subscribed to a photographic pictures-hosting website which is heavy on JavaScript. My preferred latest browser Mozilla Firefox does not work with it -- no pictures are displayed and...
7
by: Carlos Mendonça | last post by:
Has anyone managed to get ClickOnce to work with Firefox? It seems to me that it still has the same issues VS 2K5 had. I appreciate any comments or tips.
3
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.