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

links don't work when IE transforms XSL document

Subject: links don't work when IE transforms XSL document
From: Anton Triest <anton@xxxxxxxx>
Date: Thu, 30 Sep 2004 10:30:50 +0200
internet links dont work
Hello everybody,

I want to create a html document (client-side transformation) with internal hyperlinks
(links to anchors within the document). This is my stylesheet (anchors.xsl):

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="anchors.xsl"?>
<xsl:stylesheet version="1.0"
   <xsl:output method="xml" encoding="utf-8" indent="yes"
       doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
   <xsl:template match="/">
       <html lang="en" xml:lang="en">
               <style type="text/css">
                   div { padding-bottom: 800px; }
                       <li><a href="#s1">Section 1</a></li>
                       <li><a href="#s2">Section 2</a></li>
                       <li><a href="#s3">Section 3</a></li>
               <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>

Against any input file, this should display a file with 3 hyperlinks (a href) to their appropriate
anchor (a id). This all works well... except when I use an xsl stylesheet as input file: in IE,
the links don't work (clicking them results in "Cannot find server or DNS Error").

I tried using '<a name=' instead of '<a id=', and also tried putting something inside the anchor
element (<a id="s1">&#160;</a>), but it doesn't help.

Is this a bug in IE or MSXML? (I'm using IE 6.0.2800.1106, MSXML 4.20.9818.0). In Mozilla it
works as expected. And when I generate a html file with Saxon, the resulting file works, also in IE.

If anybody wonders why I want to use an xsl as input: the above code is a simplified example,
for a similar problem occuring here: http://users.telenet.be/cking/webstuff/xdoc/xdoc.xsl


Current Thread


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.
First Name
Last Name
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.