[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Problem in referencing DHTML 'document' object within <x

Subject: RE: Problem in referencing DHTML 'document' object within <xsl:script>
From: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
Date: Wed, 14 Apr 1999 14:40:22 -0400
dhtml object
Hi Behouz,

It won't work, the XSL script host won't instanciate the object that way.

regards
Didier PH Martin
mailto:martind@xxxxxxxxxxxxx
http://www.netfolder.com 

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of
Behrouz.M-Rouhani@xxxxxxxx
Sent: Wednesday, April 14, 1999 12:45 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: Problem in referencing DHTML 'document' object within
<xsl:script>


Have you tried to comment out the script part of your XSl file (see below)?

<xsl:script language="JScript">
<xsl:comment>
----Your script code --------
</xsl:cmment>
</xsl:scrip>

IE5 doesn't process inline scripts without hooking them within comment
elements (even <xsl:CDATA> cannot solve the problem)

Behrouz






"Amit Rekhi" <amitr@xxxxxxxxxxxxx> on 14/04/99 10:49:58

Please respond to xsl-list@xxxxxxxxxxxxxxxx

To:   "xsl list" <xsl-list@xxxxxxxxxxxxxxxx>
cc:    (bcc: Behrouz M-Rouhani/UK/Indus/GB)
Subject:  Problem in referencing DHTML 'document' object within
      <xsl:script>




Hello,
ENVIRONMENT
- Browser :- MS IE5
- DOM Implementation :- Specific to IE5
- DHTML Object Model :- Specific to IE5
PROBLEM STATEMENT
I am trying to use the 'document' object exposed by
IE5 DHTML Object Model within an <xsl:script> which
is called from an XSL template as follows :-
.
.
1.<?xml version="1.0"?>
2.<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
3. <xsl:script language="JScript">
4.  function WriteDocTitle()
5.  {
6.    document.title = "Document Title";
7.  }
8. </xsl:script>
9. <xsl:template match="/">
10.   <HTML>
11.     <HEAD>
12.       <xsl:eval language="JScript">WriteDocTitle()</xsl:eval>
13.     </HEAD>
14.   </HTML>
15. </xsl:template>
16.</xsl:stylesheet>
But on processing the above XSL stylesheet
IE5 gives me the following error message:
"Microsoft JScript runtime error
'document' is undefined line = 7, col = 3
(line is offset from the tag).
Error returned from property or method call."
QUESTIONS
* What change do I need to make to the above
XSL fragment so that the 'document' element
could be recognised?
* Does the 'document' element stand for the
<HTML> element at LineNumber = 10. (see above)?
If not what does the 'document' element stand for
in the context of the above XSL stylesheet?
* What do I need to do to access the <HTML> element at
LineNumber = 10 (see above) within the WriteDocTitle() function
(at LineNumber = 4)?
Thanks in advance for any replies,
AMIT



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list







 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.