Compile a stylesheet supplied as a Stream.
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.
If the stylesheet contains any xsl:include
or xsl:import
declarations,
then the BaseURI
property must be set to allow these to be resolved.
The stylesheet is contained in the part of the input stream between its current position and the end of the stream. It is the caller's responsibility to close the input stream after use. If the compilation succeeded, then on exit the stream will be exhausted; if compilation failed, the current position of the stream on exit is undefined.
Stream source = new FileStream("input.xsl", FileMode.Open, FileAccess.Read); XsltExecutable q = compiler.Compile(source); source.Close();
XsltCompiler Class | Saxon.Api Namespace | XsltCompiler.Compile Overload List