Project

Profile

Help

Revision be17ef52

Added by Debbie Lockett 8 months ago

Get saxon10 samples up to date (copied from saxon.he/latest10/samples)

View differences:

src/samples/cs/SampleExtensions.cs
11 11
    /// <summary>
12 12
    /// This class contains some example methods that can be invoked from XSLT as
13 13
    /// extension functions or from XQuery as external functions. For examples of calls
14
    /// on these functions, from both XSLT and XQuery, see the ExamplesPE.cs and 
15
    /// ExamplesEE.cs programs.
14
	/// on these functions, from both XSLT and XQuery, see the ExamplesPE.cs and 
15
	/// ExamplesEE.cs programs.
16 16
    /// </summary>
17 17

  
18 18
    public class SampleExtensions
......
47 47

  
48 48
        public static string hostLanguage(net.sf.saxon.expr.XPathContext context)
49 49
        {
50
            int lang = context.getController().getExecutable().getHostLanguage();
51
            if (lang == net.sf.saxon.Configuration.XQUERY)
50
            var lang = context.getController().getExecutable().getHostLanguage();
51
            if (lang == net.sf.saxon.s9api.HostLanguage.XQUERY)
52 52
            {
53 53
                return "XQuery";
54 54
            }
55
            else if (lang == net.sf.saxon.Configuration.XSLT)
55
            else if (lang == net.sf.saxon.s9api.HostLanguage.XSLT)
56 56
            {
57 57
                return "XSLT";
58 58
            }
59
            else if (lang == net.sf.saxon.Configuration.XPATH)
59
            else if (lang == net.sf.saxon.s9api.HostLanguage.XPATH)
60 60
            {
61 61
                return "XPath";
62 62
            }

Also available in: Unified diff