Project

Profile

Help

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

he / latest10 / hen / csource / cmd / Transform.cs @ b64b1e89

1
using System;
2

    
3
namespace Saxon.Cmd
4
{
5

    
6
    /**
7
     * This class provides the command line interface for the .NET executable
8
     */
9

    
10
    public class DotNetTransform : net.sf.saxon.Transform
11
    {
12

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

    
18
        //private static string saxonSaClassName =
19
        //    DotNetPlatform.getSaxonSaFullyQualifiedClassName();
20

    
21

    
22
        /**
23
         * Private constructor, ensuring the class can only be used via its "Main" method.
24
         */
25

    
26
        private DotNetTransform()
27
        {
28
            // Ensure the extended character sets in charsets.jar are loaded
29
            GC.KeepAlive(typeof(sun.nio.cs.ext.ExtendedCharsets));
30
        }
31

    
32
        /**
33
         * Set the configuration in the TransformerFactory. This is designed to be
34
         * overridden in a subclass
35
         * @param schemaAware
36
         */
37

    
38
        public override void setFactoryConfiguration(bool schemaAware, String className)
39
        {
40
            base.setFactoryConfiguration(schemaAware, null);
41
        }
42

    
43
        /**
44
         * Entry point for use from the .NET command line
45
         * @param args command line arguments
46
         * @throws java.lang.Exception
47
         */
48

    
49
        public static void Main(String[] args)
50
        {
51
            new DotNetTransform().doTransform(args, "Transform");
52
        }
53

    
54
    }
55
}
56

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