This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question about javascript and XSL


[Simon Choy]
> Thank you for your reply
>
> but I am using IE6 and I have installed MSXML3 and it is runing int the
> replace mode
>

In that case, you need to use the correct namespace for xslt:

http://www.w3.org/1999/XSL/Transform

Actually, IE6 will be using msxml4, but that won't change anything here, I
don't think.

However, that is not your only problem.  The fragment you have shown has
nothing to do with xsl or xslt, since you do not use the "xsl" prefix in the
code and therefore nothing gets transformed.  The problem is something to do
with how Internet Explorer is getting the file, and how it interprets it.

I made a stand-alone xml file out of your example (either with the new or
old namespace).  When I simply opened it with Internet Explorer 6.0, the
file was simply displayed in IE's xml display format, as expected since it
is just an xml file.

However, when I loaded the file into my text editor, Editplus, and ask it to
display the file in a browser - it uses IE internally to do this - I got the
behavior you described - after I fixed up some problems in your code.  I do
not know how the editor invokes IE nor how it sends the file to it (I think
it uses a temporary file but don't know how in commands IE to open it).
However, the difference in behavior indicates to me that you are doing
something besides just opening your file by hand with a browser.

So there may possibly be an error in IE's handiling of the file here, but
there is no way to know without your fixing the errors and saying exactly
how you are processing the file.

The general rule is to get your javascript working right first, then carry
on from there.  In your case, your scripting syntax is neither VB nor
Javascript, and you have an open parenthesis without its matching close
parenthesis.  Javascript does not use the "then" keyword, and VB does not
use the curly brackets ({}).   Also you do not specify which scripting
language to use in the <script> element, and you should.

If you want to use an xml file that contains its own stylesheet, you need to
read up on how to do that.  If that's not what you want to do, you have to
decide what you want.  In any case, you have to get the HTML and scripting
code working right before you ever think of doing some kind of transform.

If you want to use xml data islands, that is a microsoft-specific thing that
is not correct xml (nor correct html, for that matter) and so this list is
the wrong place to ask questions on.

Tom P

> -----Original Message-----
> From: David Carlisle [mailto:davidc@nag.co.uk]
> Sent: Tuesday, May 07, 2002 11:02 AM
> To: xsl-list@lists.mulberrytech.com
> Subject: Re: [xsl] question about javascript and XSL
>
>
>
> > <html xmlns:xsl="http://www.w3.org/TR/WD-xsl";>
>                                        ^^^^^^^^
>
> This list is for XSL but your are using the entirely different language
> built into IE5. Your best course of action is to install MSXML3 or use IE6
> so that you can use XSLT.
>
> see http://www.netcrucible.com/xslt/msxml-faq.htm
>
> David
>
> _____________________________________________________________________
> This message has been checked for all known viruses by Star Internet
> delivered through the MessageLabs Virus Scanning Service. For further
> information visit http://www.star.net.uk/stats.asp or alternatively call
> Star Internet for details on the Virus Scanning Service.
>
>  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]