Here are some things you can do with XSLT stylesheets in XPD. Post-ProcessorsOnce a stylesheet has finished rendering, you can pass off the output of that stylesheet to another stylesheet by adding a post-process instruction at the top of the document, e.g.: <?post-process href="forms.xslt" type="text/xsl" ?> Form HandlersBefore XPD begins to render a document, it will call all of the form handlers for the document. A form handler is a .NET class that implements the XPD.FormHandler interface. To register a form handler with an XSLT stylesheet, include an attribute starting with pre-process- whose value is the name of the class implementing FormHandler. e.g.: <xsl:stylesheet ... pre-process-checkloggedin="MyNamespace.MyFormHandler, MyAssembly" The form handler will look like:
namespace MyNamespace {
public class MyFormHandler : XPD.FormHandler {
public bool Process(XPD.Context context) {
// Check System.Web.HttpContext.Current.Request...
// Return true to abort all further processing
// of this document.
return false;
}
}
}
And it should be in the assembly MyAssembly.dll in the bin directory. |