• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements.  See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License.  You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 // $Id: TemplatesHandler.java 446598 2006-09-15 12:55:40Z jeremias $
19 
20 package javax.xml.transform.sax;
21 
22 import javax.xml.transform.Templates;
23 import org.xml.sax.ContentHandler;
24 
25 /**
26  * A SAX ContentHandler that may be used to process SAX
27  * parse events (parsing transformation instructions) into a Templates object.
28  *
29  * <p>Note that TemplatesHandler does not need to implement LexicalHandler.</p>
30  */
31 public interface TemplatesHandler extends ContentHandler {
32 
33     /**
34      * When a TemplatesHandler object is used as a ContentHandler
35      * for the parsing of transformation instructions, it creates a Templates object,
36      * which the caller can get once the SAX events have been completed.
37      *
38      * @return The Templates object that was created during
39      * the SAX event process, or null if no Templates object has
40      * been created.
41      *
42      */
getTemplates()43     public Templates getTemplates();
44 
45     /**
46      * Set the base ID (URI or system ID) for the Templates object
47      * created by this builder.  This must be set in order to
48      * resolve relative URIs in the stylesheet.  This must be
49      * called before the startDocument event.
50      *
51      * @param systemID Base URI for this stylesheet.
52      */
setSystemId(String systemID)53     public void setSystemId(String systemID);
54 
55     /**
56      * Get the base ID (URI or system ID) from where relative
57      * URLs will be resolved.
58      * @return The systemID that was set with {@link #setSystemId}.
59      */
getSystemId()60     public String getSystemId();
61 }
62