An XSLT document is just XML. You can construct an XML document with the XmlDocument or XmlTextWriter class (maybe more). You just have to provide the right node names and prefixes to make them "xsl" specific.
One thing you could try, is load an existing XSL document into the XmlDocument class and look at the node structure and properties that exist in the class (if you are using Visual Studio, you could just look at the XmlDocument in a debug window and browse around at the various properties). This would give you a good idea how you would programmatically construct a similar document.