|
Tanya,
When something fails, it's most useful to see the particular exception it generated. In absence of that, I'll take a guess at what looks like an good reason it might have failed.
You seem to be missing an XmlResolver and Evidence. The short signature Load and Transform methods have been deprecated (possibly since your original post) to force you to include resolvers and evidence. Resolvers resolve eternal references within your XML, and Evidence gives policy-based rights to process scripts. The documentation is a little sparse, but based on Microsoft's normal ways of doing things, default (i.e. -- null) evidence is probably of the level that will ignore your JScript because the system things it's untrusted.
If your examples are verbatim and complete, you can probably get away without a resolver: you don't have any external references. Try an explicit System.Security.Policy.Evidence from Assembly.Evidence of your executing assembly (probably easiest as this.GetType().Assembly.Evidence) to give green light security to any code. Bear in mind that this grants any XSL that you run through that code full policy access, so make sure your code won't break anything and comes from a trusted source. Alternately, insist that your source provides evidence and authenticate against that.
|