473,382 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Error in result of transformation when length > 16040 bytes

I have written an XSLT transformation on an ASP.NET page. The resulting HTML
is primarily a table of links. I have found that when the resulting HTML is
less than or equal to 16040 bytes, the output display is normal, but when the
resulting HTML exceeds 16040 bytes, the output does not display correctly.
When I look at View Source, I see that the final </html> tag gets moved to
another spot in the output, byte by byte as I increase the size, that is, at
16041 bytes, the final > gets moved, at 16042 bytes the final l> get moved,
etc. And as the output size increases, more and more of the "final"
characters get moved to another spot in the output.

Can anyone else replicate this problem?

I am running .NET Framework 1.1 and Windows XP Professional.

Here's the code I am running:

<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Xml.XPath" %>
<%@ Import Namespace="System.Xml.Xsl" %>

<script runat="server" >
void Page_Load(Object Sender, EventArgs E)
{
XslTransform xslDoc = new XslTransform();
StringBuilder sb = new StringBuilder(40000);
StringWriter sw = new StringWriter(sb);
lblMessage1.Text = sb.Capacity.ToString() + ' ' + sb.Length.ToString();

try
{
XPathDocument xmlDoc = new
XPathDocument(Server.MapPath("/GenDat/Moors.xml"));
xslDoc.Load(Server.MapPath("/GenDat/GenDat.xsl"));
xslDoc.Transform(xmlDoc,null,sw);
lblMessage1.Text = lblMessage1.Text + ' ' + sb.Capacity.ToString() + '
' + sb.Length.ToString();
}
catch(Exception ex)
{
lblMessage1.Text = ex.Message;
}
finally
{
sw.Close();
}

lblMessage2.Text = sb.ToString();
}
</script>

<html><body>
<asp:Label id="lblMessage1" runat="server" />
<asp:Label id="lblMessage2" runat="server" />
</body></html>

I have the same problem with the display of the output when I use the
following alternate code:

<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Xml.XPath" %>
<%@ Import Namespace="System.Xml.Xsl" %>

<html>
<body>
<asp:Xml id="xslTransform" runat="server"
DocumentSource="/Gendat/Moors.xml"
TransformSource="/Gendat/GenDat.xsl" />
</body>
</html>

Nov 12 '05 #1
0 1204

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Tjerk Wolterink | last post by:
Hello all, I've a problem: i've an xsl file that has a template that contains the following: <script type="text/javascript"> <!]>> </script>
3
by: Joseph A Romeo | last post by:
I have written an XSLT transformation on an ASP.NET page. The resulting HTML is primarily a table of links. I have found that when the resulting HTML is less than or equal to 16040 bytes, the...
8
by: Dmitri Shvetsov | last post by:
Hi All, Did somebody try to get the Hash code from byte array? The method exists, the program is compilable but...))) Try!-) Every time you can get the different code from the same array, and...
2
by: Schorschi | last post by:
Can't seemd to get ReadFile API to work! Returns invalid handle error? =========================================================================== Ok, the visual basic gurus, help! The...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
6
by: kikapu | last post by:
Hi to all, i have the following simple Socket Server code and a vb client that send to it some data using WinHttp. (very simple code, just open and send) The string is succesfully sent to the...
5
by: jhurrell | last post by:
I have been having some trouble getting my XSL style sheet to parse correctly. I have some XML outputted from an SQL-Server, that I then need to turn into multiple HTML files. This I have done...
3
by: Baby Lion | last post by:
hi,everyone , one Runtime error occur when running , maybe it's about assigning memory . I need your help , thanks. It's about the travelling sellman problem . //#include "stdafx.h" ...
1
by: RYKLOU | last post by:
I am kinda new to php, but i do know what i am doing kinda, but i came across this error when i am trying to upload a file to my website. Fatal error: Allowed memory size of 8388608 bytes...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.