Captain Flanksteaks

Try this. IE7 adds line breaks to our customer's data files, drammatically changing their meaning. We'll probably have to rewrite the whole architecture:

docstyle.xsl

<xslTongue Tiedtylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xslSurpriseutput method="text" media-type="text" version="1.0"/>
<xsl:template match="/"><xsl:value-of select="a"/></xsl:template>
</xslTongue Tiedtylesheet>

doc.xml

< xml version="1.0" encoding="UTF-8" >
< xml-stylesheet type="text/xsl" href="docstyle.xsl" >
<a>Dear Microsoft, A comma separated file has a very different meaning if you add line breaks to it and that makes your IE 7 customers very sad.</a>

test.html

<html>
<head>
<title>Download Test</title>
<script language="JavaScript">
function saveFrameContents(fileName) {
var eIFRAME=document.getElementById("SaveFrame");
if (eIFRAME){
var eFrameDocument=eIFRAME.contentWindow.document;
eFrameDocument.execCommand('SaveAs', true, fileName);
}
}
</script>
</head>
<body>
<br/>
<h3>Test Download</h3>
<button name="test" onClick="javascriptTongue TiedaveFrameContents('doc.txt')">Save</button>
<br/>
<iframe id="SaveFrame" src="doc.xml" width="400" height="200"/>
<br/>
</body>
</html>


Re: Internet Explorer Web Development Bad IE7 Bug In XSLT - Try It

James Stauffer

What is the extension that you are using for the filename We were doing something very similar with a .csv extension, had trouble with KB 929863, tried a .txt extension, and got the same wrapped lines that you described. Can you switch to .csv Because of KB 929863 were are probably going to go from client-side XSL transforms to server-side XSL transforms.