473,387 Members | 1,485 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,387 software developers and data experts.

Problems with XSL/XML Transform Object in Firefox

I'm having problems with a custom JS object (XMLLoadObject) I designed
to load XML and XSL files, perform an XSL transform with them and embed
the resultant HTML fragment into the host HTML document. I designed this
object so that I could generate and embed HTML fragments from more than
one XML/XSL source into a single HTML document. This is done by
instantiating an XMLLoadObject with an XML filename, an XSL filename,
and the ID of the HTML element as arguments. Once the object is created,
XSL Parameters can be assigned to the transformation with a member
function. Finally the documents are loaded and transformed with call to
the member function xmlLoad(). A distinct object must be instantiated
for each transform. The object assigns closured member functions as
event handlers to give access to the object's XML Document and XSL
Document objects (member data).

In the specific HTML page in which I'm having the problem
(schedule.html), two distinct XML sources are loaded and transformed
with two respective and distinct XSL stylesheets. One generates a simple
menu of links. The second generates a list of class dates and times
sorted by date and course number.

When testing locally, the code worked great in MSIE. Both HTML fragments
(menu and course list) were loaded, transformed and embeded correctly in
the page. However, in Firefox (1.0.4) and Netscape (7.2) they did not
render correctly. In these browsers, the menu was not displayed, while
the course list was displayed twice (once incorrectly and below that
correctly). The incorrect display looked like a concantination of all
the text nodes in the Courses XML file. I believe the problem is in the
custom javascript load object or my usage Mozilla's implementation of
XML/XSL transformations, because if I comment out the Load Object code
of one, the remaining HTML fragment renders correctly.

When I tested remotely nothing rendered correctly in Firefox or
Netscape, even if one load object was commented out. The URL to an index
page of all the files is below. If anyone could take a look at this and
give me some hints, or ideas as to what's going wrong, I'd appreciate it.

Thanks and Regards,
N. Demos

Index of all files here: http://ndemos.home.att.net/

Notes: To view it all in action open 'schedule.html'.
The code for 'XMLLoadObject' (the XML Load Object) is located in
XMLLoad.js.

--
Change "seven" to a digit to email me.
Jul 23 '05 #1
2 2266

Nevermind, I figured out the problem. I didn't use the new operator when
instantiating the XMLLoadObjects.

N.Demos

N. Demos wrote:
I'm having problems with a custom JS object (XMLLoadObject) I designed
to load XML and XSL files, perform an XSL transform with them and embed
the resultant HTML fragment into the host HTML document. I designed this
object so that I could generate and embed HTML fragments from more than
one XML/XSL source into a single HTML document. This is done by
instantiating an XMLLoadObject with an XML filename, an XSL filename,
and the ID of the HTML element as arguments. Once the object is created,
XSL Parameters can be assigned to the transformation with a member
function. Finally the documents are loaded and transformed with call to
the member function xmlLoad(). A distinct object must be instantiated
for each transform. The object assigns closured member functions as
event handlers to give access to the object's XML Document and XSL
Document objects (member data).

In the specific HTML page in which I'm having the problem
(schedule.html), two distinct XML sources are loaded and transformed
with two respective and distinct XSL stylesheets. One generates a simple
menu of links. The second generates a list of class dates and times
sorted by date and course number.

When testing locally, the code worked great in MSIE. Both HTML fragments
(menu and course list) were loaded, transformed and embeded correctly in
the page. However, in Firefox (1.0.4) and Netscape (7.2) they did not
render correctly. In these browsers, the menu was not displayed, while
the course list was displayed twice (once incorrectly and below that
correctly). The incorrect display looked like a concantination of all
the text nodes in the Courses XML file. I believe the problem is in the
custom javascript load object or my usage Mozilla's implementation of
XML/XSL transformations, because if I comment out the Load Object code
of one, the remaining HTML fragment renders correctly.

When I tested remotely nothing rendered correctly in Firefox or
Netscape, even if one load object was commented out. The URL to an index
page of all the files is below. If anyone could take a look at this and
give me some hints, or ideas as to what's going wrong, I'd appreciate it.

Thanks and Regards,
N. Demos

Index of all files here: http://ndemos.home.att.net/

Notes: To view it all in action open 'schedule.html'.
The code for 'XMLLoadObject' (the XML Load Object) is located in
XMLLoad.js.

--
Change "seven" to a digit to email me.
Jul 23 '05 #2
Nevermind, I figured out the problem. I didn't use the new operator when
instantiating the XMLLoadObjects.

N.Demos
--
Change "seven" to a digit to email me.
Jul 23 '05 #3

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

Similar topics

3
by: Alan Krueger | last post by:
Greetings, I've been able to cache Transformer objects in a Tomcat-based servlet application to avoid unnecessary Transformer rebuilding, except for certain ones on certain machines. I'm...
7
by: Jesper Stocholm | last post by:
I have som XML that link to an XSL-file to enable on-the-fly HTML-generation by e.g. IE or FireFox. The transformation actually works like a charm, but I have problems with changing line breaks in...
1
by: Jens Mueller | last post by:
Hi there, this is a Java-XML Question, so I am not sure whether this is the right place, haven't found anything better .... I try to convert a Java object to XML via SAX and let the FOP...
3
by: annoyed tuna | last post by:
I was wondering if someone could help me out. I'm trying to perform an XSL transformation on an XML document that uses entities. While I can do XSLT on a file without entities, it all falls apart...
3
by: Ali Sahin | last post by:
Hi there, I'd like to transform a XML-File to PDF. The XML-File ist build like followed: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml-stylesheet type="text/xsl"...
3
by: dpomt | last post by:
I am facing some issues with the webforms DefaultButton functionality: #1 One text box ==> hitting enter works in IE but not in Firefox (1.5) #2 One text box and req. field validator ==> problem...
1
by: supergrover1981 | last post by:
Gidday gang, I've been teaching myself CSS over the past 2 days and for the most part I thought I had it all working. All the problems I've had have been in IE...until now. If anyone could offer...
6
by: Pete Verdon | last post by:
Summary: Can I do an XSLT transform, in the client, of a tree of nodes taken from the displayed page DOM in IE? This works in Firefox. Hi, I'm just starting the process of rewriting part of a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.