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

Re: links don't work when IE transforms local XSL doc

Subject: Re: links don't work when IE transforms local XSL document
From: Anton Triest <anton@xxxxxxxx>
Date: Fri, 01 Oct 2004 23:18:31 +0200
anton triest
Hi Tom,

What do you mean by "broken"? Do you mean that the page looks right but
nothing happens when you click on one of the links? Or does the page
not look as expected?


The page looks right, and when I hover the links, the status bar shows the correct URL
(file:///C:/.../anchors.xsl#s2) but when I click on one of the links, IE shows its errorpage
"The page cannot be displayed" with error msg "Cannot find server or DNS Error"


It sounds like IE gets confused when you try to load an xsl document as
the xml source. Perhaps IE is trying to be too smart for its own good,
and makes a guess about what you want, which unfortunately is a wrong
guess. Or perhaps IE has a bug that is preventing the links from being
interpreted as hyperlinks when it transforms a file with the .xsl
extension. You didn't say if you were loading the file from the file
system or through a web server, and it might even be that you would get
different results in the two cases.


!! Now there's a new element, and it becomes even stranger to me... I was pretty sure
that I had tested both cases, but now I see that the error only occurs if I load the xsl
from the local filesystem. So you're right: different results in the two cases.


I have put a testcase online so everyone who wants can try it out
(same stylesheet I already posted earlier):

http://users.telenet.be/cking/webstuff/test/anchors/anchors.xsl
http://users.telenet.be/cking/webstuff/test/anchors/test.xml
http://users.telenet.be/cking/webstuff/test/anchors/test.xsl

If you open these links in IE, the anchors work. But if you download the files and display
the local copies in IE, they are broken (except for test.xml: that one works, although
it's exactly the same file as test.xsl, only the name is different). Apart from the broken
links, the pages look perfectly correct (CSS styles included).


If it is an IE bug, there could be an easy workaround, although you
would have to try it out to make sure it works with IE. Use a dummy
file for your source, as in your cut-down example above. In the root
(and only) element, include the url of the file you actually want to
transform (like the stylesheet). Get that document using document(),and
transform that instead of the dummy source document.


Yeah I guess I could do that but in this particular case it doesn't help much; the whole point
of my xdoc experiment is to be able to just open a stylesheet in a browser to view it with its
documentation.. Well, it's not that important, I just wanted to find out what happens, and why,
and it seems more and more obvious that this is a bug in IE. Another reason to "get Firefox"?
(I really like Firefox, it's my default browser for quite some time already)


Alternatively, use the dummy source file without the url of the real
target, and feed the url in as a parameter, then get the document using
document() and transform it as above.


How can I pass parameters in IE (or in Moz, for that matter)? I always thought that's not possible..

I admit this is a bit strange, but if you actually are dealing with an
IE bug, it might work, and it wouldn't be very hard to implement.

Cheers,

Tom P

Thanx,
Anton

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.