Saxon API for .NET |

# XsltCompiler.Compile Method (Stream)

Compile a stylesheet supplied as a Stream.

public XsltExecutable Compile(
Stream input
);

#### Parameters

input
  A stream containing the source text of the stylesheet

#### Return Value

An `XsltExecutable` which represents the compiled stylesheet object. The XsltExecutable may be loaded as many times as required, in the same or a different thread. The `XsltExecutable` is not affected by any changes made to the `XsltCompiler` once it has been compiled.

#### Example

                XsltExecutable q = compiler.Compile(new FileStream("input.xsl", FileMode.Open, FileAccess.Read));

#### See Also

XsltCompiler Class | Saxon.Api Namespace | XsltCompiler.Compile Overload List