[Mono-bugs] [Bug 498385] New: Inconsistent behavior of XPathResultType.Navigator between Mono and .NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Apr 27 06:19:14 EDT 2009


           Summary: Inconsistent behavior of XPathResultType.Navigator
                    between Mono and .NET
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: Other
        OS/Version: Windows Server 2003
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: ashmind at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Third Party Developer/Partner

Description of Problem:

Steps to reproduce the problem:
1. Create a CustomXsltContext class inheriting from System.Xml.Xsl.XsltContext.
2. Create a CustomXsltFunction class inheriting from
3. In CustomXsltFunction.ArgTypes return a single element array consisting only
of XPathResultType.Navigator.
4. In CustomXsltFunction.Invoke do Console.WriteLine(args[0].GetType()).
4. In CustomXsltContext override ResolveFunction to return CustomXsltFunction
when name is "custom-function".
5. Create a new XPath expression:
var xpath = XPathExpression.Compile("custom-function('.')");
xpath.SetContext(new CustomXsltContext());
6. Apply the created expression to any xml document/node (probably non-text

Actual Results:
In Console you will see that the argument type was System.String.

Expected Results:
Doing the same in Microsoft .NET outputs System.Xml.XPath.XPathNodeIterator.

How often does this happen? 

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list