|
Subject: Re: Problem in referencing DHTML 'document' object within <xsl :script> From: Behrouz.M-Rouhani@xxxxxxxx Date: Wed, 14 Apr 1999 16:44:48 +0000 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: Problem in referencing DHTML 'd, Guy_Murphy | Thread | RE: Problem in referencing DHTML 'd, Didier PH Martin |
| Re: Problem in referencing DHTML 'd, Guy_Murphy | Date | Re: XSL as a better XPointer, Chris Lilley |
| Month |