Questions tagged [xslcompiledtransform]
111 questions
73
votes
10 answers
How do I prevent and/or handle a StackOverflowException?
I would like to either prevent or handle a StackOverflowException that I am getting from a call to the XslCompiledTransform.Transform method within an Xsl Editor I am writing. The problem seems to be that the user can write an Xsl script that is…

JohnnyM
- 28,758
- 10
- 38
- 37
33
votes
2 answers
Passing parameters to XSLT Stylesheet via .NET
I'm trying to pass a parameter to an XSLT stylesheet, but all i'm getting is an empty xml document when the document is transformed using XSlCompiledTransform.
This is the C# method used to add the parameters(after adding in people's…

MrBliz
- 5,830
- 15
- 57
- 81
26
votes
12 answers
XSLT self-closing tags issue
I am using xslt to transform an xml file to html.
The .net xslt engine keeps serving me self-closing tags for empty tags.
Example:
becomes
The former is valid html, while the latter is illegal html…
NorthWind
15
votes
1 answer
How do I use XslCompiledTransform when input XML and transform XSL are strings. How do I get the transformation result as a string?
I have one string inputXMLString, and the second one containg transform XSL named transformXSLString. Both of them are correctly formatted xml's.
How to perform the transformation with XslCompiledTransform in C# so as to get the result also as a…

vanpersil
- 764
- 1
- 8
- 26
10
votes
4 answers
Whitespace stripping with XslCompiledTransform
I'm trying to migrate a large app from XslTransform to compiled xsl files and XslCompiledTransform.
The app uses the Xsl to create HTML files, and the transformation data (Xml) was passed to the Xsl with a XmlDataDocument, returned from the…

nicosantangelo
- 13,216
- 3
- 33
- 47
7
votes
3 answers
How do I resolve and elements with relative paths when using xsltc.exe XslCompiledTransforms?
As part of our web application's build process, I have set up our XSLT stylesheets to be built with Microsoft's xsltc.exe compiler whenever we run a full compile. During local development this has worked great, as the code is compiled and hosted in…

Technetium
- 5,902
- 2
- 43
- 54
7
votes
1 answer
StackOverflowException loading XsltCompiledTransform
i have some big xslt crashing iis (StackOverflowException) when loading an XslCompiledTransform while the old (deprecated) XslTransform works fine.
Is there some known issue with big templates? Strangely enough, the same XslCompiledTransform loads…

user40577
- 73
- 2
7
votes
5 answers
XslCompiledTransform.Load() raises System.IO.FileNotFoundException
My webapp (ASP.NET 2.0) consumes a webservice (asmx on 1.1 framework)
on the same machine. After getting XML in return, I pass it to
XslCompiledTransform for transform XML to HTML and it works fine.
Yesterday I got a…

tongdee
- 229
- 1
- 5
- 9
6
votes
4 answers
How to resolve XSL includes in a Transformation that loads XSL from a String?
.NET 2.0/VS2005
I am trying to use the XslCompiledTransform class to perform a XSL Transformation. I have two XSL files, the first of which includes a reference to the other in the form of an statement :
Main.xsl:

Cerebrus
- 25,615
- 8
- 56
- 70
6
votes
3 answers
Is there a more efficient way to transform an XDocument that already contains a reference to an XSLT?
I have an XML file that already contains a reference to an XSLT file.
I'm looking at converting this XML file, according to the referenced transformation rules, so that I can then create a nice PDF file.
It appears that I can perform the actual…

James Skemp
- 8,018
- 9
- 64
- 107
6
votes
5 answers
XslTransform vs XslCompiledTransform
XslTransform appears to have been deprecated by Microsoft in favor of XslCompiledTransform. Theoretically, if I was doing just one transform during the execution of my application, shouldn't interpreting the XSLT (through XslTransform) be faster…

JM.
- 85
- 1
- 6
6
votes
3 answers
.NET Xsl script transform results in 'System.Object' is not defined or imported
XSL noobie but uttery stuck!
I have a transform that formats a date using c# scripting function , this works fine when I am in VS 2008 and run "show xml output", the output is exactly what I want.
However , when i try to run this using code I get…

Chris
- 221
- 3
- 15
6
votes
2 answers
Exclude XML directive from XslCompiledTransform.Transform output
I'm using an XsltCompiledTransform to transform some XML into a fragment of HTML (not a complete HTML document, just a DIV that I will include in page generated elsewhere).
I'm doing the transformation as follows:
StringBuilder output = new…

kristian
- 22,731
- 8
- 50
- 78
5
votes
1 answer
How to migrate from XslTransform to XslCompiledTransform
I have the following code that I need to migrate from VS 2003 (.Net 1.1) to VS 2008 (.Net 2+)
but I get compilation error -
System.Xml.Xsl.XslTransform' is obsolete: This class has been deprecated.
I probably need to use…

Atara
- 3,523
- 6
- 37
- 56
5
votes
1 answer
XslCompiledTransform and custom XmlUrlResolver: "An entry with the same key already exists"
Is there a way to debug XSLT documents that are loaded from a database by a custom XmlUrlResolver or does anyone know, what the errormessage below is about?
I have a XSLT stylesheet that imports a common xslt document:

ovm
- 2,452
- 3
- 28
- 51