This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: question about javascript and XSL
- From: Simon Choy <Simon dot Choy at crystaldecisions dot com>
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 7 May 2002 11:38:01 -0700
- Subject: RE: [xsl] question about javascript and XSL
- Reply-to: xsl-list at lists dot mulberrytech dot com
This is true
my question is, how do i get around this?
i thought placing it with a CDATA would do the trick
but it didn't solve the error
-----Original Message-----
From: Nik Krimm [mailto:Nik.Krimm@emacdigital.com]
Sent: Tuesday, May 07, 2002 11:32 AM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] question about javascript and XSL
Simon:
The error you are getting ["A RunTime erro has occured. Do you wish to
Debug? Error: Expected ')'] is an IE client-side js error. It looks to me
like your tranformation is replacing the (1>1) with (1>1). You can view
the source in the browser window to see if this is true.
-----Original Message-----
From: Simon Choy [mailto:Simon.Choy@crystaldecisions.com]
Sent: Tuesday, May 07, 2002 1:06 PM
To: 'xsl-list@lists.mulberrytech.com'
Subject: RE: [xsl] question about javascript and XSL
<?xml version="1.0" encoding="ISO-8859-1" ?>
<html xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<script language="Javascript">
<![CDATA[
if ( 1 > 1 )
{
document.write("passed")
}
else
{
document.write("failed")
}
]]>
</script>
<body>
...
well this is an XSL file that's used to display information about an XML
file
please imaging there are xSL codes within there
I am sure that my XSL code isn't causing the problem
but the
if (1 > 1 ) part is
the error it is giving me is
"A RunTime erro has occured. Do you wish to Debug?
Error: Expected ')'
and if i debug, line 3 is the line just above
if (1 > 1)
if i replace
1 > 1
with
1 == 1
everything is fine
any insight?
ps. both ( 1 > 1 ) AND ( 1 < 1 ) don't work
-----Original Message-----
From: Greg Faron [mailto:gfaron@integretechpub.com]
Sent: Tuesday, May 07, 2002 10:51 AM
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] question about javascript and XSL
At 11:39 AM 5/7/2002, you wrote:
>I know this has been asked before, but i've searched through many postings
>and I still cannot find an answer to this
>
>The follow code looks syntatically correct
>however, the < is still giving me error!
>
>can anyone spot the reason??
>
><?xml version="1.0" encoding="ISO-8859-1"?>
You mention JavaScript in the subject line, but I don't see any of that
(or any XSL for that matter). If it's complaining on the line that you
posted, I would recommend that you ensure that there is NO whitespace
before the XML declaration.
If there's a complaint from an area where you do a common JavaScript
comparison (for example, "i < 100"), reverse the comparison ("100 >
i"). If that's not the problem, post more code.
Greg Faron
Integre Technical Publishing Co.
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
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list