Прочетете на английски Редактиране

Споделяне чрез


XslCompiledTransform Constructors

Definition

Initializes a new instance of the XslCompiledTransform class.

Overloads

XslCompiledTransform()

Initializes a new instance of the XslCompiledTransform class.

XslCompiledTransform(Boolean)

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

XslCompiledTransform()

Source:
XslCompiledTransform.cs
Source:
XslCompiledTransform.cs
Source:
XslCompiledTransform.cs

Initializes a new instance of the XslCompiledTransform class.

C#
public XslCompiledTransform();

See also

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

XslCompiledTransform(Boolean)

Source:
XslCompiledTransform.cs
Source:
XslCompiledTransform.cs
Source:
XslCompiledTransform.cs

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

C#
public XslCompiledTransform(bool enableDebug);

Parameters

enableDebug
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.

Examples

The following example shows how to enable XSLT debugging.

C#
// 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();

Remarks

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

See also

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1