Project

Profile

Help

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

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

1
using System;
2
using System.Text;
3
using com.saxonica;
4

    
5
namespace Saxon.cmd
6
{
7

    
8
    /// <summary>
9
    /// This class provides the command line interface for the .NET executable
10
    /// </summary>
11
    /// 
12
    class DotNetStylesheetPackager : com.saxonica.ptree.StylesheetPackager
13
    {
14

    
15
        /// <summary>
16
        /// Report incorrect usage of the command line.
17
        /// </summary>
18
       private static void badUsage(string message) {
19
            if (!"".Equals(message))
20
            {
21
                Console.WriteLine(message);
22
            }
23
            Console.WriteLine("Usage: see http://saxonica.com/documentation/html/!using-xsl/packaged-xslt.html");
24
            Console.WriteLine("StylesheetPackager [stylesheet file name] [zip file name]");
25
        
26
        }
27

    
28
        /// <summary>
29
        /// Private constructor, ensuring the class can only be used via its "main" method.
30
        /// </summary>
31
        /// 
32
        private DotNetStylesheetPackager()
33
        { 
34
        }
35

    
36

    
37

    
38
        /// <summary>
39
        /// Entry point for use from the .NET command line
40
        /// <param name="args">command line arguments</param>
41
        /// </summary>
42
        /// Throws java.lang.Exception
43
        static void Main(string[] args)
44
        {
45

    
46
            if (args.Length != 2)
47
            {
48
                DotNetStylesheetPackager.badUsage("");
49
            } else {
50
                    DotNetStylesheetPackager packager = new DotNetStylesheetPackager();
51
                    packager.archive(args[0], args[1]);
52
            }
53
        }
54
    }
55
}
(2-2/4)