01: package net.sf.saxon.sql;
02:
03: import net.sf.saxon.style.ExtensionElementFactory;
04:
05: /**
06: * Class SQLElementFactory. <br>
07: * A "Factory" for SQL extension nodes in the stylesheet tree. <br>
08: */
09:
10: public class SQLElementFactory implements ExtensionElementFactory {
11:
12: /**
13: * Identify the class to be used for stylesheet elements with a given local name.
14: * The returned class must extend net.sf.saxon.style.StyleElement
15: * @return null if the local name is not a recognised element type in this
16: * namespace.
17: */
18:
19: public Class getExtensionClass(String localname) {
20: if (localname.equals("connect"))
21: return SQLConnect.class;
22: if (localname.equals("insert"))
23: return SQLInsert.class;
24: if (localname.equals("column"))
25: return SQLColumn.class;
26: if (localname.equals("close"))
27: return SQLClose.class;
28: if (localname.equals("query"))
29: return SQLQuery.class;
30: return null;
31: }
32:
33: }
34:
35: //
36: // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
37: // you may not use this file except in compliance with the License. You may obtain a copy of the
38: // License at http://www.mozilla.org/MPL/
39: //
40: // Software distributed under the License is distributed on an "AS IS" basis,
41: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
42: // See the License for the specific language governing rights and limitations under the License.
43: //
44: // The Original Code is: all this file.
45: //
46: // The Initial Developer of the Original Code is Michael H. Kay.
47: //
48: // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
49: //
50: // Contributor(s): none.
51: //
|