473,657 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2293

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
3173
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 running Tomcat 4.1.27 under Eclipse 2.1.0 using the Sysdeo Tomcat plugin using j2re1.4.1_02 under Windows 2000 SP4. I've digested this down to a small (albeit convoluted) sample that exhibits the behavior reliably on my development workstation.
7
6250
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 the XML to their html-equivilant <br/>. I use the XSL: <xsl:template name="break"> <xsl:param name="text" select="."/> <xsl:choose>
1
3103
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 Transformer convert that via XSLT to valid XSL-FO. So I define a SAXReader which fires the SAX Events for the Java Object. This works fine and the Transformation to PDF is ok. However, I have one object which contains an XHTML String and the tags
3
1425
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 when I try and add an entity. Here are my files... -----TEST.XML------ <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <!DOCTYPE document >
3
2392
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" href="D:\app\jboss-3.2.5\server\default\deploy\xifs.war\WEB-INF\classes\de\xifs\resource\xml\de\xifs\resource\xml\dunningaccountreport_de.xsl"?> <!DOCTYPE entities >
3
4901
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 in IE #3 two text boxes ==> not even a postbak in Firefox. The three problems I have could be simply reproduced creating a new webform and pasting the code below in the codebehind file. TextBox bx1;
1
3062
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 any suggestions, I'd be most appreciative. Site can be viewed here: http://johnbayne.com/hiclone1/2.html The problem I have is this: in the (usually abominable) IE 6, the page aligns pretty much how I want it. There's three different <div>...
6
2650
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 "database frontend" type of intranet application. The existing table-display code consists of a mountain of very clever but extremely brittle spaghetti-javascript, which I'm planning to replace with XSLT transformations. At present I'm still...
0
8413
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8740
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7352
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.