~ubuntu-branches/ubuntu/gutsy/libjaxp1.3-java/gutsy

« back to all changes in this revision

Viewing changes to javax/xml/transform/Templates.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2006-08-03 10:30:58 UTC
  • Revision ID: james.westby@ubuntu.com-20060803103058-7jwwiqv9g8w9094d
Tags: upstream-1.3.03
ImportĀ upstreamĀ versionĀ 1.3.03

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2003-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
// $Id: Templates.java 226183 2005-04-08 10:39:14Z neeraj $
 
18
 
 
19
package javax.xml.transform;
 
20
 
 
21
import java.util.Properties;
 
22
 
 
23
 
 
24
 
 
25
 
 
26
/**
 
27
 * An object that implements this interface is the runtime representation of processed
 
28
 * transformation instructions.
 
29
 *
 
30
 * <p>Templates must be threadsafe for a given instance
 
31
 * over multiple threads running concurrently, and may
 
32
 * be used multiple times in a given session.</p>
 
33
 */
 
34
public interface Templates {
 
35
 
 
36
    /**
 
37
     * Create a new transformation context for this Templates object.
 
38
     *
 
39
     * @return A valid non-null instance of a Transformer.
 
40
     *
 
41
     * @throws TransformerConfigurationException if a Transformer can not be created.
 
42
     */
 
43
    Transformer newTransformer() throws TransformerConfigurationException;
 
44
 
 
45
    /**
 
46
     * Get the properties corresponding to the effective xsl:output element.
 
47
     * The object returned will
 
48
     * be a clone of the internal values. Accordingly, it can be mutated
 
49
     * without mutating the Templates object, and then handed in to
 
50
     * {@link javax.xml.transform.Transformer#setOutputProperties}.
 
51
     *
 
52
     * <p>The properties returned should contain properties set by the stylesheet,
 
53
     * and these properties are "defaulted" by default properties specified by
 
54
     * <a href="http://www.w3.org/TR/xslt#output">section 16 of the
 
55
     * XSL Transformations (XSLT) W3C Recommendation</a>.  The properties that
 
56
     * were specifically set by the stylesheet should be in the base
 
57
     * Properties list, while the XSLT default properties that were not
 
58
     * specifically set should be in the "default" Properties list.  Thus,
 
59
     * getOutputProperties().getProperty(String key) will obtain any
 
60
     * property in that was set by the stylesheet, <em>or</em> the default
 
61
     * properties, while
 
62
     * getOutputProperties().get(String key) will only retrieve properties
 
63
     * that were explicitly set in the stylesheet.</p>
 
64
     *
 
65
     * <p>For XSLT,
 
66
     * <a href="http://www.w3.org/TR/xslt#attribute-value-templates">Attribute
 
67
     * Value Templates</a> attribute values will
 
68
     * be returned unexpanded (since there is no context at this point).  The
 
69
     * namespace prefixes inside Attribute Value Templates will be unexpanded,
 
70
     * so that they remain valid XPath values.</p>
 
71
     *
 
72
     * @return A Properties object, never null.
 
73
     */
 
74
    Properties getOutputProperties();
 
75
}