XML Saxon Error with MVP-XML Lib

Topics: Developer Forum
Dec 3, 2007 at 7:02 PM
I'm working with a team that has built an XSLT with the Saxon (for Java) engine.

We tried using the Mvp.XML lib MvpXslTransform to run it. Unfortunately it keeps erroring out. The error, and my code are below. Any pointers on where I should post this, or look for examples/help would be great.

// Error:
System.Xml.Xsl.XslTransformException: To use a result tree fragment in a path expression, first convert it to a node-set using the msxsl:node-set() function. at System.Xml.Xsl.Runtime.XsltConvert.EnsureNodeSet(IList`1 listItems) at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime

// ** The .NET code is here:
Mvp.Xml.Common.Xsl.MvpXslTransform xsl = new Mvp.Xml.Common.Xsl.MvpXslTransform();
Mvp.Xml.Common.Xsl.XmlInput inX = new Mvp.Xml.Common.Xsl.XmlInput(xmlPath);
Mvp.Xml.Common.Xsl.XmlOutput outX = new Mvp.Xml.Common.Xsl.XmlOutput(htmlPath);

xsl.SupportedFunctions = ExsltFunctionNamespace.DatesAndTimes;
xsl.MultiOutput = false;

XsltArgumentList args = new XsltArgumentList();
args.AddExtensionObject(Mvp.Xml.Exslt.ExsltNamespaces.GDNDatesAndTimes, new Mvp.Xml.Exslt.ExsltDatesAndTimes());
Mvp.Xml.Exslt.ExsltDatesAndTimes());

xsl.Load(xsltPath);
xsl.Transform(inX, args, outX);

Thanks!