Is there any way to give xsl in C# a hint as to how large the resulting document will be so that it preallocates more efficiently?

Is there any way to give xsl in C# a hint as to how large the resulting 
document will be so that it preallocates more efficiently? 


0
11/1/2007 10:45:28 PM
dotnet.xml 7266 articles. 0 followers. Follow

3 Replies
669 Views

Similar Articles

[PageSpeed] 33

DR wrote:
> Is there any way to give xsl in C# a hint as to how large the resulting 
> document will be so that it preallocates more efficiently? 

C# uses System.Xml.XslCompiledTransform with .NET 2.0 or later and 
System.Xml.Xsl.XslTransform in .NET 1.x. I don't know of any settings or 
properties or methods to define (or hint at) the size of the result 
documents.
Why do you think it is necessary with managed code?
Are there other XSLT processor APIs where you can define or hint at the 
size of the result document?


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
11/2/2007 12:19:57 PM
DR wrote:
> Is there any way to give xsl in C# a hint as to how large the resulting 
> document will be so that it preallocates more efficiently? 

Preallocate yourself in C# code.


-- 
Oleg Tkachenko [XML MVP, MCPD]
http://www.tkachenko.com/blog | http://www.XmlLab.Net
0
some2113 (163)
11/4/2007 9:40:10 AM
no i just dotn want any xsl transformation to EVER do more then one memory 
allocation, for this to be possible the xsl api should have some way i can 
specify the max target document size after transformation

"Martin Honnen" <mahotrash@yahoo.de> wrote in message 
news:ef$J2qUHIHA.4592@TK2MSFTNGP02.phx.gbl...
> DR wrote:
>> Is there any way to give xsl in C# a hint as to how large the resulting 
>> document will be so that it preallocates more efficiently?
>
> C# uses System.Xml.XslCompiledTransform with .NET 2.0 or later and 
> System.Xml.Xsl.XslTransform in .NET 1.x. I don't know of any settings or 
> properties or methods to define (or hint at) the size of the result 
> documents.
> Why do you think it is necessary with managed code?
> Are there other XSLT processor APIs where you can define or hint at the 
> size of the result document?
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/ 


0
11/9/2007 1:28:39 AM
Reply:

Similar Artilces:

Best Way ?
G'day All, Looking for some information. With Outlook you can have all your contacts...address, email address, yada, yada, yada. Can I use this information in to say mail merge with Word and email a letter to the ppl with email addresses? Or is this better done with a Access? The reason I ask is that we want to deliver an email to all our clients with the latest promotions. And want it to be a bit more automated? Any information or pointers in the right direction would be appreciated. Have a good one, Scott V You can use either Access or Outlook as the data source for a ma...

Banding Results
Hi, I've tried to search to find an answer to this question, but I've drawn a blank so far. If I've got a column which displays salary details, is there any easy way to "band" the results into user-defined ranges (i.e. $0-$5000, $5000-$10000 etc.). Thus far I've been using a long-winded IF statement, but I'm hampered by the amount of nested IFs I can use - for the latest spreadsheet I'd need more than 20 IFs to split the results into the relevant bands. I can't help thinking there must be an easier way of doing this. Can anyone help? BH Hi do your r...

Which is more efficient?
I have several of the following throughout my database. I had a thought: is it more efficient to use the recordset listed below or to do multiple DLOOKUP's? In this example, I know for sure that only one row of data will always be returned. Dim dbMDS As Database Dim Appointment As Recordset Set dbMDS = Application.CurrentDb Set Appointment = dbMDS.OpenRecordset _ ("select ap_start_time, ap_end_time, ap_type, ap_comments, ap_with_whom, ap_date, apremindertime " _ & " FROM Appointments " _ & " WHERE AP_Date = #" & tmp_date &...

A way to create sub-categories?
I want to group contacts by category and then a sub-category for easy viewing. Apart from creating a new field for sub-category is there a way of doing this? Outlook doesn't seem to support sub-categories. Thanks Nope. -- Patricia Cardoza Outlook MVP Author - Special Edition Using Microsoft Office Outlook 2003 Lead Author - Access 2003 VBA Programmer's Reference Author - Absolute Beginner's Guide to Microsoft OneNote 2003 http://blogs.officezealot.com/cardoza http://www.cardozasolutions.com "Casebase" <junkmail@casebase.net> wrote in message news:%23rx5a...

Is there a way to color code Outlook Contact File Folder Labels?
Is there a way to color code Outlook Contact File Folder Labels? No. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Join OneNote Tips mailing list: http://www.onenote-tips.net/ "isailhbca" <isailhbca@discussions.microsoft.com> wrote in message news:4DBD10F7-FAA0-4102-A4C3-E2697908EFE8@microsoft.com... >...

Excel 2002 document not opening with a proper view in Excel 2003
On opening an Excel 2002 document, I do not get the actual text in column names or values. For example Name is showing as #NAME? and not "Kevin Depeter". You might want to widen the column. It might not have enough room to show the name. "taj" wrote: > > On opening an Excel 2002 document, I do not get the actual text in column > names or values. For example Name is showing as #NAME? and not "Kevin > Depeter". ...

pictures in a document
i had inserted picture in tiff in a document in publisher 2002 a month ago and printed copies and saved the file. Now when I open the file, cant see picture in file. In print preview I can see the picture. When I print, picture is not printed. what happen? Is any of my setting doing this? In the print dialogue, click advance printing settings, clear "do not print any graphics." ..tiff images can be tricky. Additional text converters and image filters are available in the Microsoft Office File Converter Pack http://support.microsoft.com/kb/212265/ Do you have all the Office XP...

is there a way to crop a corner out of a rectangular image in Visi
Using subtract on two shapes accomplishes what i want to do, but when the first shape is a .gif image, it does not work. No, the "boolean operations", as they're called, do not operate on foreign objects like bitmaps and controls. Visio has crop functionality for imported graphics, but it is only rectangular. You could draw a small white triangle and give it "no line". Then place it over the corner of your bitmap. -- Hope this helps, Chris Roth Visio MVP "doug" <doug@discussions.microsoft.com> wrote in message news:29D479A6-6099-4051-B7A0-1...

is there a way to change the time card repor format?
i'm using activereports in RMS to generate a custome timecard report. for my timein and timeout colums, the datatype i have assigned to the columns is vbDate. when I generate the report, the columns only show the date as mm/dd/yyyy, they do not show the time of day piece for exactly when the cashier punched in or out. is there any way to change the formatting of this so that in the report the time shows up? for example, instead of showing 2/6/2005 in the time in column, it would show 2/5/2005 8:00:00 AM. thanks in advance, kevin There is a timecard report on the Reports Library...

Query regarding A,B,C char. width values returned in 16-bit and 32-bit OS
I am trying to retrieve individual character widths of a string (from a TrueType font) and I tried using GetCharWidth (which weirdly works for TrueType fonts too tho' MSDN says otherwise) and/or GetCharABCWidths to retrieve the A,B and C spacings. Please note that I have selected the TrueType font (hFont) into the Device Context (hDC). I used GetCharABCWidths. Problem is this: GetCharABCWidths returns correct A,B and C widths in Win 98 and incorrect (much lesser A,B and C widths such that the characters OVERLAP) in other 32-bit OS (NT, XP). The effect is seen across all TrueType fonts, th...

Can You Count This Way?
I have some cells with note type data: For ex: ax,3b7,22,xy,zz, Is there a way to count every item between the commas? Thanks. Hi try =LEN(A1)-LEN(SUBSTITUTE(A1,",","")+LEN(A1)>0 -- Regards Frank Kabel Frankfurt, Germany Timothy Wright wrote: > I have some cells with note type data: > > For ex: > > ax,3b7,22,xy,zz, > > Is there a way to count every item between the commas? > > Thanks. On Wed, 19 May 2004 20:13:53 +0200, "Frank Kabel" <frank.kabel@freenet.de> wrote: >Hi >try >=LEN(A1)-LEN(SUBSTITUTE(A1,&q...

best way to deserialize xml
I'm at a quandry as to what's the best/fastest way to deserialize an incoming xml stream? I ran a small test on xmlserializer and on a small file it performed 10 times worse then when I used the XMLDocument and deserialized the values myself. Is the xmlserializer really that slow? I'm expecting a file about 1 MB in length and if it's that slow on a 2 K file then I can't phantom how it's going to behave on a 1 MB file. Should I just skip the xmlserializer and XML Dom and go straight to xmlreader and do the deserialization myself? This has been discussed a few times...

linking entire word documents
I would like to link two identical documents. The source document is placed on server X, the target document on sever Y. Changes on X should automatically appear on Y. Is that possible, and how? Thanks for responding! Hi Michael, Yes, via Insert|File (Word 97-2003) or Insert|Object|Text from File (Word 2007) and choosing the 'Insert as link' option. Also check out the INCLUDETEXT field entry in Word's help file. Using an INCLUDETEXT field, any changes to the source file will be reflected in the destination file. Plus, if you edit the linked data in the destination f...

Visual c++ 6.0 and 2005
I've recently migrated from 6.0 to Net 2005 an using Visual c++ i don't understand how implement event handler function for button created in toolbar. In 6.0 version i created buttons assigning them an ID and with class wizard i was able to map the related OnButtonName() eventHandler function. In 2005 version i can do this with menu items, but the ID assigned to toolbar buttons created don't appear in the list of events related to every class for the project.In the events class list are present the default ID_FILE_OPEN, ID_FILE_CUT,ecc that are mapped to the related toolbar bu...

Is there a way to Sort data by color in Excel?
I am trying to sort data by color, is that possible? see http://www.xldynamic.com/source/xld.ColourCounter.html#sorting -- HTH Bob Phillips "SRTUC" <SRTUC@discussions.microsoft.com> wrote in message news:B5121232-FB1D-46AF-94F8-04B7EAA2D90C@microsoft.com... > I am trying to sort data by color, is that possible? You're gonna need a User defined function to get the value of a color. See Chip Pearson's site for a nice version: http://www.cpearson.com/excel/colors.htm Look for: Returning The ColorIndex Of A Cell Then you could use that UDF in a separate colu...

Fastest way to load an xml file into an array in .net
Hi All VS 2005 SP1 (C#, VB.NET) I need the absolut fastest way of loading an xml-file of about 700KB into an array. I need to load about 1500 of those xml-Files into arrays on startup of my application. Therefore it needs to be as fast as possible. Please also tell me if the xml structure can be improved. the xml looks like: y: Year m: Month h: Hour value <data> <v y="1998" m="1" h="1">0.227777109151971</v> <v y="1998" m="1" h="2">0.206573903224972</v> <v y="1998" m="1"...

Is there a convenient way to save data
Is there a convenient way to save dialog data so it remembers the users last selection? I have a dialog based application that only has three user variables all of which are ints. What is the best way to make theses variables persistent for a given user on a given machine? Thanks "Jeff B" <jb@nospan.net> wrote in message news:fpDif.10451$Ay6.2336@fe13.lga... > > Is there a convenient way to save dialog data so it remembers the users last > selection? I have a dialog based application that only has three user > variables all of which are ints. What is the best w...

Is there a way
G'Day, Is there a way to turn off NDR's in Ex5.5 SP4 on an NT server running SP6a ? Also, can the ability for the server to receive TELNET connections be turned off? My server isn't an open relay, but, I know it's being used to SPAM using DNR's and I can see TELNET connections in the log files.... Thank You, Admin_In_Syd i know that u can turn off the ndrs to be sent from exchange at the standard poliy setting, thats how i configured it at exchange 2000 .... there must be also a setting at exch 5.5, actually i dont remeber it .... "Steve@Home" <sprob@...

way to verify time stamp?
Is there a way to verify when a forwarded message to you had originally been sent? I suspect someone is mis- representing themselves and simply typed new fields into the "original message" time and date. If not - is it possible (or at all likely) that someone sent me two emails days ago and they never bounced back and never made it to my inbox, while all other email functions appear completely normal?? Thanks! "Julie" <anonymous@discussions.microsoft.com> wrote in message news:27d701c49d00$dd3315d0$a401280a@phx.gbl... > Is there a way to verify when a for...

VB6 Code 1/2 way finished......any suggestions
Have a issue with a VB6 program, had someone write some code, he got 1/2 way thru and decided to work on other projects and keeps putting us on the back burner, been waiting 4 months now, looking at what he has put together looks very nice, but is trademarked? so we cant get to the code, any ideas or suggestions? Thanks Bill On 4/1/2010 12:48 AM, David Kaye wrote: > "Bill"<got2believe@msn.com> wrote: > >> trademarked? so we cant get to the code, any ideas or suggestions? Thanks > > If it'...

trying to figure out a two way lookup to determine a value
I have a large spreadsheet that lists numerous customers. Each custtomer has a code for the service that we provide them and then has a price negotiated at the time of service. We are have set up a price list that gives the service code, in a vertical column and then has a range of dollar values for each service code (about 20 separate codes) ranging from $0 to $75 broken up in 5 grade (E,D,C,B, A) categories. The pricing is different ranges for each service code. What I need to do is have each customer line, take their code, find a match in the Price LIst code, the take the price they are pa...

Any way to Paste without Relative reposition?
I often want to copy and paste a block of cells, but still have their references point to the same cells as the original copied block. By default, Excel changes all the references by the position change of the copy block. For example if I copy a column of cells A that refers column M on another worksheet, and paste it 3 columns to the right in column D, all its references will now refer column P on that other worksheet. What if I still want them to refer to column M? I know I can do this one cell at a time by selecting the formula text in the cell and pasting that, but if I have a larg...

Equation giving unexpected results
Oh Wise Ones, I have a chart that gave me the equation below. When I tried to solve for x, I keep getting unexpected results. What am I doing wrong? B5=1.1563 inches, B8=.76lbs D5=.6875 inches, D8=.34lbs When I solve for y (courtesy algebrahelp.com) I don't get the correct results. From the cell relationships above if C5 contains 1.1250 inches, it should yield a lbs result between .76 and .34. I get: x = 1.066552901 Trend gives me: y = -0.4688x + 1.625 Mike Simplifying 1.125 = -0.4688x + 1.625 Reorder the terms: 1.125 = 1.625 + -0.4688x Solvin...

ADC
we are migrating from 5.5 to 2003. The new 2003 org is new - not the same as the 5.5 and all our addresses are changing as well. We did a one way 5.5>E2K3 once, now management wants a two way as we begin to move more and more people. I've manually been putting CR's in 5.5. What are the pitfalls and issues that I may face with a 2 way. Nancy Stevens Nstevens@tycoint.com "Nancy Stevens" <nstevens@tycoint.com> wrote: >we are migrating from 5.5 to 2003. The new 2003 org is new - not the same >as the 5.5 and all our addresses are changing as well. W...

Payment applied but document does not exist
A customer is showing a zero statement when they have a balance. There is a payment applied but when I try to drill down there is no document associated with the payment. I need to clear the apply and re-enter the transaction. Can I go into go to the RM20201 table and delete the row to correct this problem?? Thanks for your help in advance! Richard Whaley would be glad to hear me say this: use the interface first! 1) Run a check links on your Receivables Open Transaction Files logical table group, by going to Microsoft Dynamics GP > Maintenance > Check Links. Select Series: S...