This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Dial-up performance issue?
- To: <xsl-list at mulberrytech dot com>
- Subject: RE: Dial-up performance issue?
- From: "Chris Bayes" <Chris at Bayes dot co dot uk>
- Date: Mon, 7 Aug 2000 23:42:49 +0100
- Reply-To: xsl-list at mulberrytech dot com
I think that you can doubleclick on the ! in the status bar to get a
description of the error. It is a long time since I used a browser without
some sort of debugger installed.
Ciao Chris
XML/XSL Portal
http://www.bayes.co.uk/xml
>-----Original Message-----
>From: owner-xsl-list@mulberrytech.com
>[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Doug Howell
>Sent: 07 August 2000 22:27
>To: XSL-List@mulberrytech.com
>Subject: Dial-up performance issue?
>
>
>I've got an HTML page that loads XML and XSL docs and displays the
>transformation results. It works perfectly at home (running on my
>local hard
>disk), and there are no errors. However, when I upload it to the server at
>work and run it over the dial-up connection, the XML docs don't load, and
>the status bar says "error on page."
>
>I'm wondering if any of you have any experience with what might be the
>problem. Do I need to introduce some time delays? If so, where in the
>script, and how much time?
>
>Thanks for any help you can offer,
>Doug
>
>Here's the HTML page source code [I've only included the loading functions:
>preparePage(),
>loadXSLCategories(), loadXSLAlpha(), loadAndTransformCategories(),
>loadAndTransformAlpha()]:
>
><script language="JScript">
><!--
>// global variables to hold references to objects
>var gobjResults;
>var gobjXML;
>var gobjXSL;
>
>//********************************
>
>function preparePage() {
> window.status = "Loading XML...";
> // get the reference to the results DIV element
> gobjResults = document.all['divResults'];
> // get the reference to the XML document parser
> gobjXML = document.all['XMLDocument'];
> // get the reference to the XSL stylesheet parser
> gobjXSL = document.all['XSLDocument'];
> // load the XML document and check for errors
> gobjXML.load('openaccess.xml');
> if (gobjXML.parseError.errorCode != 0) {
> // error found so show error message and stop
> gobjResults.innerHTML = showError(gobjXML);
> return false;
> }
> // all OK, so do default transformation
> loadAndTransformCategories();
>} // end of preparePage()
>
>//********************************
>
>function loadXSLCategories() {
> // load the XSL categories stylesheet and check for errors
> gobjXSL.load('openaccess-c.xsl');
> if (gobjXSL.parseError.errorCode != 0) {
> // error found so show error message and stop
> gobjResults.innerHTML = showError(gobjXSL);
> return false;
> }
> // all OK, so return true
> return true;
>} // end of loadXSLCategories()
>
>//********************************
>
>function loadXSLAlpha() {
> // load the XSL alpha stylesheet and check for errors
> gobjXSL.load('openaccess-a.xsl');
> if (gobjXSL.parseError.errorCode != 0) {
> // error found so show error message and stop
> gobjResults.innerHTML = showError(gobjXSL);
> return false;
> }
> // all OK, so return true
> return true;
>} // end of loadXSLAlpha()
>
>//********************************
>
>function showError(objDocument) {
> // create the error message
> var strError = new String;
> strError = 'Invalid XML file !<BR />'
> + 'File URL: ' + objDocument.parseError.url + '<BR/>'
> + 'Line No.: ' + objDocument.parseError.line + '<BR/>'
> + 'Character: ' + objDocument.parseError.linepos + '<BR/>'
> + 'File Position: ' + objDocument.parseError.filepos + '<BR/>'
> + 'Source Text: ' + objDocument.parseError.srcText + '<BR/>'
> + 'Error Code: ' + objDocument.parseError.errorCode + '<BR/>'
> + 'Description: ' + objDocument.parseError.reason
> return strError;
>} // end of showError()
>
>//********************************
>
>function loadAndTransformCategories() {
> window.status = "Loading XML...";
> loadXSLCategories();
> // perform the transformation
> strResult = gobjXML.transformNode(gobjXSL);
> // and update the contents of the DIV element
> gobjResults.innerHTML = strResult;
> // hide the List by Alphabet and Expand All buttons
> // and show the List by Categories one
> window.document.all["expandAllButton"].className = "showElement";
> window.document.all["listAlphaButton"].className = "showElement";
> window.document.all["listCategoriesButton"].className = "hideElement";
> //show appropriate directions
> window.document.all["directions"].innerHTML = "<p>The following Internet
>sites are open to all Borders home office employees. Click on a category
>heading to view/hide sites in that category. Click Expand All to expand all
>category headings. To list sites alphabetically, click List by
>Alphabet.</p>";
> window.status = "";
>} // end of loadAndTransformCategories()
>
>//********************************
>
>function loadAndTransformAlpha()
>
> window.status = "Loading XML...";
> loadXSLAlpha(); //load the alpha stylesheet
> // perform the transformation
> strResult = gobjXML.transformNode(gobjXSL);
> // and update the contents of the DIV element
> gobjResults.innerHTML = strResult;
> // hide the List by Alphabet and Expand All buttons
> // and show the List by Categories one
> window.document.all["expandAllButton"].className = "hideElement";
> window.document.all["collapseAllButton"].className = "hideElement";
> window.document.all["listAlphaButton"].className = "hideElement";
> window.document.all["listCategoriesButton"].className = "showElement";
> //show appropriate directions
> window.document.all["directions"].innerHTML = "<p>The following Internet
>sites are open to all Borders home office employees. To list sites by
>category, click List by Category.</p>";
> window.status = "";
>} // end of loadAndTransformAlpha()
>
>
></script>
>
></head>
>
><body onload="if (preparePage()) loadAndTransformCategories()">
><h1>Open Access Internet Sites</h1>
><div id="directions"><p>The following Internet sites are open to all
>home office employees. Click on a category heading to view/hide sites in
>that category. Click Expand All to expand all category headings. To list
>sites alphabetically, click List by Alphabet.</p></div>
>
><form>
><span id="expandAllButton" class="showElement"><button style="font-size:
>.5em" onclick="expandAll()">Expand All</button></span>
><span id="collapseAllButton" class="hideElement"><button style="font-size:
>.5em" onclick="collapseAll()">Collapse All</button></span>
><span id="listAlphaButton" class="showElement"><button style="font-size:
>.5em" onclick="loadAndTransformAlpha()">List by Alphabet</button></span>
><span id="listCategoriesButton" class="hideElement"><button
>style="font-size: .5em" onclick="loadAndTransformCategories()">List by
>Category</button></span>
></form>
>
><object id="XMLDocument" width="0" height="0"
> classid="clsid:f5078f32-c551-11d3-89b9-0000f81fe221">
> <param name="async" value="false">
> <param name="validateOnParse" value="false">
></object>
>
><object id="XSLDocument" width="0" height="0"
> classid="clsid:f5078f32-c551-11d3-89b9-0000f81fe221">
> <param name="async" value="false">
> <param name="validateOnParse" value="false">
></object>
>
><!-- to insert the results of parsing the object model -->
><div id="expandIndex" class="saveHistory">
><div id="divResults" class="sitelist"></div>
></div>
><hr width="100%" align="right" color="#CC9900" size="1">
>
></div>
>
>
>Doug Howell
>Tech Writer
>734.747.7471 or 477.2857
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list