I’m using C# to process an XSLT sheet which uses XML data.
On my XSLT sheet, I am applying a template which goes through the XML data and is suppose to throw out figures based on the parameters passed through to it.
When I run the XSLT sheet and pass parameters to it, there is no output. The html side of the XSLT seems to run just fine.
Here is my XSLT code :
Here is my XML file :
I am using Visual Studio 2012 to process the above, if we exclude my C# classes that I use to process the xslt, even in the inbuilt XSLT debugger of VS it doesn’t seem to do anything (no data is output).
I’ve spent hours going through but can’t really find out where i’m going wrong and there isn’t any Syntax that is highlighted red or any errors shown. This language is much harder than c#…
Your XSLT was in need of some serious cleanup. Remember to keep in mind the DRY principle. By avoiding the use of repeated parts, I was able to reduce the length of your XSLT by more than 100 lines. Once you figure out how to pass the parameter values correctly, this should work:
The only call to
AddParameter()I see in your ASPX code isMyXMLConduit.AddParameter("TheFilter", AFilter);. Since the name of your parameter in the XSLT is “SearchRecipe”, you need to use that as the parameter name, not “TheFilter”. You also need to get the value of therdoSearchTypequery parameter and add that as one of the XSLT’s parameters.