nxsltc - XSLT compiler for .NET
What is nxsltc?
nxsltc is a command line XSLT compiler for .NET 3.5. It compiles one or more XSLT stylesheets into DLL. These compiled stylesheets can be later used to transform XML documents using XslCompiledTransform class.
Usage
D:\>nxsltc.exe /?
XSLT Compiler version 1.0beta2 for .NET 3.5
(c) 2007 Oleg Tkachenko, http://www.xmllab.net
Usage: nxsltc <source files> [options]
where possible options include:
/out:<file> Specifies the output file name
/debug[+|-] Emit debugging information
/nowarn Disable all warnings
/namespace:<string> Specifies namespace for compiled stylesheets
/version:<x.x.x.x> Specifies assembly version
/keyfile:<file> Specifies strong name key file
/help Display this usage message (Short form: /?)
/nologo Do not display compiler copyright banner
How do you run a compiled stylesheet? XslCompiledTransform class has new overloaded Load() method in .NET 3.5, which accepts Type:
XPathDocument doc = new XPathDocument("books.xml");
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load(typeof(Foo.Bar.catalog2html));
xslt.Transform(doc, null, Console.Out);
Note: you also can use nxslt3 tool to run compiled stylesheets.
Download
nxsltc is free open source tool under BSD license. Download nxsltc (requires .NET 3.5).
Feedback
Any comments, bug reports, feature requests are welcome at the nxslt forum.