Need help debugging MvpXslTransform

Topics: User Forum
Jul 30, 2008 at 11:53 AM
Hi,
I'm having problems getting MvpXslTransform to work properly - can someone help?
Here's my code:
        public XmlReader GetXmlAsReader()
        {
            XElement qualification = GetQualification();
            XmlReader reader = null;
            XmlInput input = new XmlInput(qualification.CreateNavigator());
            MvpXslTransform transform = new MvpXslTransform(true);
            try { transform.Load(GetStylesheet()); }
            catch (Exception ex) { ... }
            try { reader = transform.Transform(input, null); }
            catch (Exception ex) { ... }
            return reader;
        }

The output of the reader (if, say, I output to a file) is an empty file. I don't understand why.
I basically need some ideas on how to debug this to find out why it's not working. I'm not very familiar with XmlReaders, and inspecting the properties & methods doesn't really highlight anything to me.
  • GetStylesheet() returns an XmlReader (but I've also tried with just a URI).
  • The XmlInput seems to be OK, although when I check it in the debugger my xml file is enclosed by "{" and "{" - is that to be expected?
  • I've used the stylesheet with a XslCompiledTransform, and it works as expected.
Any ideas, suggestions or pointers will be warmly welcomed!
Thanks in advance,
Peter.