This documentation is archived and is not being maintained.

XslCompiledTransform.Transform Method (XmlReader, XsltArgumentList, XmlWriter)

Executes the transform using the input document specified by the XmlReader object and outputs the results to an XmlWriter. The XsltArgumentList provides additional run-time arguments.

Namespace: System.Xml.Xsl
Assembly: System.Xml (in system.xml.dll)

public void Transform (
	XmlReader input,
	XsltArgumentList arguments,
	XmlWriter results
)
public void Transform (
	XmlReader input, 
	XsltArgumentList arguments, 
	XmlWriter results
)
public function Transform (
	input : XmlReader, 
	arguments : XsltArgumentList, 
	results : XmlWriter
)
Not applicable.

Parameters

input

An XmlReader containing the input document.

arguments

An XsltArgumentList containing the namespace-qualified arguments used as input to the transform. This value can be a null reference (Nothing in Visual Basic).

results

The XmlWriter to which you want to output.

If the style sheet contains an xsl:output element, you should create the XmlWriter using the XmlWriterSettings object returned from the OutputSettings property. This ensures that the XmlWriter has the correct output settings.

Exception typeCondition

ArgumentNullException

The input or results value is a null reference (Nothing in Visual Basic).

XsltException

There was an error executing the XSLT transform.

If the style sheet includes an XSLT document() function, it is resolved using an XmlUrlResolver with no user credentials. If the external resource is located on a network resource that requires authentication, use the overload that takes an XmlResolver as one of its arguments and specify an XmlResolver with the necessary credentials.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Show: