Project

Profile

Help

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

he / latest9.4 / hen / csource / cmd / Transform.cs @ c3c84ba2

1
using System;
2
using System.Text;
3
using net.sf.saxon;
4
using System.Reflection;
5
using net.sf.saxon.dotnet;
6
using sun.nio.cs.ext;
7

    
8
namespace Saxon.Cmd
9
{
10

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

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

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

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

    
26

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

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

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

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

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

    
54
        public static void Main(String[] args)
55
        {
56
            new DotNetTransform().doTransform(args, "Transform");
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
//
(4-4/5)