source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 2.3 KB
Line 
1/*
2 * Copyright 2000-2002,2004 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18package org.apache.tools.ant.taskdefs;
19
20import java.io.File;
21
22/**
23 * Proxy interface for XSLT processors.
24 *
25 * @see XSLTProcess
26 * @since Ant 1.1
27 */
28public interface XSLTLiaison {
29
30 /**
31 * the file protocol prefix for systemid.
32 * This file protocol must be appended to an absolute path.
33 * Typically: <tt>FILE_PROTOCOL_PREFIX + file.getAbsolutePath()</tt>
34 * Note that on Windows, an extra '/' must be appended to the
35 * protocol prefix so that there is always 3 consecutive slashes.
36 * @since Ant 1.4
37 */
38 String FILE_PROTOCOL_PREFIX = "file://";
39
40 /**
41 * set the stylesheet to use for the transformation.
42 * @param stylesheet the stylesheet to be used for transformation.
43 * @throws Exception thrown if any problems happens.
44 * @since Ant 1.4
45 */
46 void setStylesheet(File stylesheet) throws Exception;
47
48 /**
49 * Add a parameter to be set during the XSL transformation.
50 * @param name the parameter name.
51 * @param expression the parameter value as an expression string.
52 * @throws Exception thrown if any problems happens.
53 * @since Ant 1.3
54 */
55 void addParam(String name, String expression) throws Exception;
56
57 /**
58 * Perform the transformation of a file into another.
59 * @param infile the input file, probably an XML one. :-)
60 * @param outfile the output file resulting from the transformation
61 * @throws Exception thrown if any problems happens.
62 * @see #setStylesheet(File)
63 * @since Ant 1.4
64 */
65 void transform(File infile, File outfile) throws Exception;
66
67} //-- XSLTLiaison
Note: See TracBrowser for help on using the repository browser.