[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: links don't work when IE transforms XSL document
Passin, Tom wrote:
Here are my results using your stylesheet -So far, the same results here. 2) In both IE6sp1 and Firefox 0.9.2 in Win2000 sp4, the internal linksYes, when I open the generated output file in the browser, the links work. It's only when I open the stylesheet directly in the browser (via <?xml-stylesheet PI) that they don't work... Have you tried this? Because if the links work for you, I can't understand why they don't work here: I also have IE6sp1 (on Win98, but can that make any difference?) BUT note that you won't get that result just loading the output into IEUsing xml:output method="html" doesn't seem to make any difference (see below) I suspect your problem is either the file extension or the MIME type the I want to use the embedded stylesheet PI. Here's the original stylesheet: http://users.telenet.be/cking/webstuff/xdoc/xdoc.xsl The stylesheet is meant to transform any xsl file, including itself (via the xml-stylesheet PI). Now what happens is: 1. in Mozilla (Firefox 0.9.3 and 1.0PR) the links work fine 2. in IE6, the links don't work ("Cannot find server or DNS Error") 3. if I use the the "MSXML-XSL Output IE" tool [1] to display the html output, then copy and paste it in a file "result.html" and open that in the browser, the page looks exactly the same, but now the links do work. So I tried to cut things down to the smallest stylesheet that still demonstrates the problem, I already posted that, but here's a slightly shorter version that uses xsl:output method="html": --- anchors.xsl --- <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="anchors.xsl"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes"/> <xsl:template match="/"> <html> <head> <title>anchors</title> <style type="text/css">div {padding-bottom: 500px;}</style> </head> <body> <div> <p>contents</p> <ul> <li><a href="#s1">Section 1</a></li> <li><a href="#s2">Section 2</a></li> <li><a href="#s3">Section 3</a></li> </ul> </div> <div><a id="s1"></a><h1>Section 1</h1></div> <div><a id="s2"></a><h1>Section 2</h1></div> <div><a id="s3"></a><h1>Section 3</h1></div> </body> </html> </xsl:template> </xsl:stylesheet> The links are broken (1) only in IE, (2) only when the <?xml-stylesheet PI is used (ie. client-side) *and* (3) only if an xsl file is used as input: if I send this file to IE: --- dummy.xml --- <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="anchors.xsl"?> <dummy/> the links work fine... but as soon as I just rename "dummy.xml" to "dummy.xsl" the links are broken again! Sorry for the long post, but this one is breaking my head, and I wanted to describe things as clearly as possible. Any feedback is greatly appreciated! Thanks, Anton [1] http://www.microsoft.com/downloads/details.aspx?FamilyId=D23C1D2C-1571-4D61-BDA8-ADF9F6849DF9&displaylang=en
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|