Problems with XML/XSL Transformation Object

N

N. Demos

Hello,
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top