XslCompiledTransform Construtores

Definição

Inicializa uma nova instância da classe XslCompiledTransform.

Sobrecargas

XslCompiledTransform()

Inicializa uma nova instância da classe XslCompiledTransform.

XslCompiledTransform(Boolean)

Inicializa uma nova instância da classe XslCompiledTransform com a configuração de depuração especificada.

XslCompiledTransform()

Inicializa uma nova instância da classe XslCompiledTransform.

public:
 XslCompiledTransform();
public XslCompiledTransform ();
Public Sub New ()

Confira também

Aplica-se a

XslCompiledTransform(Boolean)

Inicializa uma nova instância da classe XslCompiledTransform com a configuração de depuração especificada.

public:
 XslCompiledTransform(bool enableDebug);
public XslCompiledTransform (bool enableDebug);
new System.Xml.Xsl.XslCompiledTransform : bool -> System.Xml.Xsl.XslCompiledTransform
Public Sub New (enableDebug As Boolean)

Parâmetros

enableDebug
Boolean

true para gerar informações de depuração. Caso contrário, false. Configurar esse valor como true permite depurar a folha de estilos com o depurador do Microsoft Visual Studio.

Exemplos

O exemplo a seguir mostra como habilitar a depuração XSLT.

// 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();
' Enable XSLT debugging.
Dim xslt As New XslCompiledTransform(true)

' Load the style sheet.
xslt.Load("output.xsl")

' Create the writer.
Dim settings As New XmlWriterSettings()
settings.Indent=true
Dim writer As XmlWriter = XmlWriter.Create("output.xml", settings)

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

Comentários

As seguintes condições devem ser atendidas para entrar no código e depurar a folha de estilos:

Confira também

Aplica-se a