473,796 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="Syst em.IO" %>
<%@ Import Namespace="Syst em.Xml" %>
<%@ Import Namespace="Syst em.Xml.XPath" %>
<%@ Import Namespace="Syst em.Xml.Xsl" %>

<script runat="server" >
void Page_Load(Objec t Sender, EventArgs E)
{
XslTransform xslDoc = new XslTransform();
StringBuilder sb = new StringBuilder(4 0000);
StringWriter sw = new StringWriter(sb );
lblMessage1.Tex t = sb.Capacity.ToS tring() + ' ' + sb.Length.ToStr ing();

try
{
XPathDocument xmlDoc = new
XPathDocument(S erver.MapPath("/GenDat/Moors.xml"));
xslDoc.Load(Ser ver.MapPath("/GenDat/GenDat.xsl"));
xslDoc.Transfor m(xmlDoc,null,s w);
lblMessage1.Tex t = lblMessage1.Tex t + ' ' + sb.Capacity.ToS tring() + '
' + sb.Length.ToStr ing();
}
catch(Exception ex)
{
lblMessage1.Tex t = ex.Message;
}
finally
{
sw.Close();
}

lblMessage2.Tex t = 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="Syst em.IO" %>
<%@ Import Namespace="Syst em.Xml" %>
<%@ Import Namespace="Syst em.Xml.XPath" %>
<%@ Import Namespace="Syst em.Xml.Xsl" %>

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

Nov 12 '05 #1
0 1224

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

Similar topics

8
12792
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
1535
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 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...
8
8233
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 always very short, like in range from 10 to 18 in my case. Maybe this method has no realization? P.S. To get a correct result I use transformation of byte to string and
2
5736
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 following is a diskette class (vb .net) that works find, in that I can validate a diskette is mounted, dismount it, lock it, unlock it, get diskette geometry, etc., all with a valid handle from CreateFile API! I can even position the file pointer,...
0
3715
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) : base(message){} public FtpException(string message, Exception innerException) : base(message,innerException){}
6
1883
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 server but not the reverse when the server just replies with a string. The client reports (last dll error) that "the server returned an invalid or unrecognized response".
5
3416
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 with moderate success using Saxon and <xsl:result-document>, but Saxon is throwing an error and I don't know how to resolve it. Maybe someone can offer some advice? This is a long question, for which I apologise... OS= Windows XP Pro, Saxon=8.8 XML...
3
2759
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" //TSPÎÊÌâµÄ½â·¨ #include<stdlib.h>
1
2938
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 exhausted (tried to allocate 3714000 bytes) in /opt/lampp/htdocs/tutorials/php-mysql-tutorial/admin/image-gallery/library/functions.php on line 104 Platform: Ubuntu 8.04 LST (where i make my programs, and test them before i upload them), Using XAMPP for...
0
9531
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10187
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7553
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5446
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5578
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.