Project

Profile

Help

How to connect?
Download (2.36 KB) Statistics
| Branch: | Tag: | Revision:

he / tags / 9.6.0.7 / hen / csource / cmd / Transform.cs @ aa733b18

1
using System;
2
using System.Text;
3
using net.sf.saxon;
4
using System.Reflection;
5
using net.sf.saxon.dotnet;
6

    
7
namespace Saxon.Cmd
8
{
9

    
10
    /**
11
     * This class provides the command line interface for the .NET executable
12
     */
13

    
14
    public class DotNetTransform : net.sf.saxon.Transform
15
    {
16

    
17
        // This class has no static dependency on the Saxon-SA DLL. If schema-aware
18
        // processing is required, the DLL is loaded dynamically. This has changed
19
        // with IKVM 0.32.0.0, it is now done by calling Class.forName() using the
20
        // asssembly-qualified name of the class as the class name.
21

    
22
        //private static string saxonSaClassName =
23
        //    DotNetPlatform.getSaxonSaFullyQualifiedClassName();
24

    
25

    
26
        /**
27
         * Private constructor, ensuring the class can only be used via its "Main" method.
28
         */
29

    
30
        private DotNetTransform()
31
        {
32
            // Ensure the extended character sets in charsets.jar are loaded
33
            GC.KeepAlive(typeof(sun.nio.cs.ext.ExtendedCharsets));
34
        }
35

    
36
        /**
37
         * Set the configuration in the TransformerFactory. This is designed to be
38
         * overridden in a subclass
39
         * @param schemaAware
40
         */
41

    
42
        public override void setFactoryConfiguration(bool schemaAware, String className)
43
        {
44
            base.setFactoryConfiguration(schemaAware, null);
45
        }
46

    
47
        /**
48
         * Entry point for use from the .NET command line
49
         * @param args command line arguments
50
         * @throws java.lang.Exception
51
         */
52

    
53
        public static void Main(String[] args)
54
        {
55
            new DotNetTransform().doTransform(args, "Transform");
56
        }
57

    
58
    }
59
}
60

    
61
//
62
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
63
// you may not use this file except in compliance with the License. You may obtain a copy of the
64
// License at http://www.mozilla.org/MPL/
65
//
66
// Software distributed under the License is distributed on an "AS IS" basis,
67
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
68
// See the License for the specific language governing rights and limitations under the License.
69
//
70
// The Original Code is: all this file.
71
//
72
// The Initial Developer of the Original Code is Michael H. Kay.
73
//
74
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
75
//
76
// Contributor(s): none.
77
//
(3-3/4)