This topic has not yet been rated - Rate this topic

XslCompiledTransform Constructor (Boolean)

Initializes a new instance of the XslCompiledTransform class with the specified debug setting.

Namespace:  System.Xml.Xsl
Assembly:  System.Xml (in System.Xml.dll)
public XslCompiledTransform(
	bool enableDebug
)

Parameters

enableDebug
Type: System.Boolean
true to generate debug information; otherwise false. Setting this to true enables you to debug the style sheet with the Microsoft Visual Studio Debugger.

The following conditions must be met in order to step into the code and debug the style sheet:

The following example shows how to enable XSLT debugging.


// Enable XSLT debugging.
XslCompiledTransform xslt = new XslCompiledTransform(true);

// Load the style sheet.
xslt.Load("output.xsl");

// Create the writer.
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent=true;
XmlWriter writer = XmlWriter.Create("output.xml", settings);

// Execute the transformation.
xslt.Transform("books.xml", writer);
writer.Close();


.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Think twice before setting the enableDebug flag
Here is an article of interest to read before deciding to set the enableDebug flag : .NET Memory Leak: XslCompiledTransform and “leaked” dynamic assemblies (http://blogs.msdn.com/b/tess/archive/2010/05/05/net-memory-leak-xslcompiledtransform-and-leaked-dynamic-assemblies.aspx)