XslTransform.Transform Method (IXPathNavigable, XsltArgumentList, XmlWriter)
NOTE: This member is now obsolete.
You should pass XmlResolver to Transform() method
Transforms the XML data in the IXPathNavigable using the specified args and outputs the result to an XmlWriter.
[Visual Basic] <Obsolete("You should pass XmlResolver to Transform() method", _ False)> Overloads Public Sub Transform( _ ByVal input As IXPathNavigable, _ ByVal args As XsltArgumentList, _ ByVal output As XmlWriter _ ) [C#] [Obsolete("You should pass XmlResolver to Transform() method", false)] public void Transform( IXPathNavigable input, XsltArgumentList args, XmlWriter output ); [C++] [Obsolete("You should pass XmlResolver to Transform() method", false)] public: void Transform( IXPathNavigable* input, XsltArgumentList* args, XmlWriter* output ); [JScript] public Obsolete("You should pass XmlResolver to Transform() method", false) function Transform( input : IXPathNavigable, args : XsltArgumentList, output : XmlWriter );
Parameters
- input
- An object implementing the IXPathNavigable interface. In the .NET Framework this can be either an XmlNode (typically an XmlDocument), or an XPathDocument containing the data to be transformed.
- args
- An XsltArgumentList containing the namespace-qualified arguments used as input to the transform.
- output
- The XmlWriter to which you want to output.
Exceptions
| Exception Type | Condition |
|---|---|
| XsltException | There was an error processing the XSLT transform. |
Remarks
XslTransform supports the XSLT 1.0 syntax. The XSLT stylesheet must include the namespace declaration xmlns:xsl= http://www.w3.org/1999/XSL/Transform.
Note This method is obsolete in version 1.1 of the .NET Framework. The recommended practice is to use the Transform method which takes an XmlResolver object as one of its arguments.
The args are matched with the xsl:param elements defined in the stylesheet. The xsl:output element is not supported when outputting to an XmlWriter (xsl:output is ignored). See Outputs from an XslTransform for more information.
Transformations apply to the document as a whole. In other words, if you pass in a node other than the document root node, this does not prevent the transformation process from accessing all nodes in the loaded document. To transform a node fragment, you must create an XmlDocument containing just the node fragment, and pass that XmlDocument to the Transform method. See XslTransform Class Implements the XSLT Processor for more information.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
XslTransform Class | XslTransform Members | System.Xml.Xsl Namespace | XslTransform.Transform Overload List | Implementation of Discretionary Behaviors in the XslTransform Class | Outputs from an XslTransform