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

Problem in referencing DHTML 'document' object within <xsl:s

Subject: Problem in referencing DHTML 'document' object within <xsl:script>
From: "Amit Rekhi" <amitr@xxxxxxxxxxxxx>
Date: Wed, 14 Apr 1999 15:19:58 +0530
dhtml document.title
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


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-2011 All Rights Reserved.