KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icl > saxon > sql > SQLColumn


1 package com.icl.saxon.sql;
2 import com.icl.saxon.*;
3 import com.icl.saxon.style.*;
4 import com.icl.saxon.expr.*;
5 import org.xml.sax.SAXException JavaDoc;
6 import org.xml.sax.AttributeList JavaDoc;
7 import java.sql.*;
8 import javax.xml.transform.TransformerException JavaDoc;
9 import javax.xml.transform.TransformerConfigurationException JavaDoc;
10
11
12 /**
13 * An sql:insert element in the stylesheet.<BR>
14 */

15
16 public class SQLColumn extends XSLGeneralVariable {
17
18     /**
19     * Determine whether this node is an instruction.
20     * @return false - it is not an instruction
21     */

22
23     public boolean isInstruction() {
24         return false;
25     }
26
27     /**
28     * Determine whether this type of element is allowed to contain a template-body
29     * @return false: yes, it may not contain a template-body
30     */

31
32     public boolean mayContainTemplateBody() {
33         return false;
34     }
35
36     public void validate() throws TransformerConfigurationException JavaDoc {
37         if (!(getParentNode() instanceof SQLInsert)) {
38             compileError("parent node must be sql:insert");
39         }
40     }
41
42     public void process( Context context ) {
43
44     }
45
46     public String JavaDoc getColumnName() {
47         return getAttributeValue("", "name");
48     }
49
50     public Value getColumnValue(Context context) throws TransformerException JavaDoc {
51         return getSelectValue(context);
52     }
53
54 }
55
56 //
57
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
58
// you may not use this file except in compliance with the License. You may obtain a copy of the
59
// License at http://www.mozilla.org/MPL/
60
//
61
// Software distributed under the License is distributed on an "AS IS" basis,
62
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
63
// See the License for the specific language governing rights and limitations under the License.
64
//
65
// The Original Code is: all this file.
66
//
67
// The Initial Developer of the Original Code is
68
// Michael Kay of International Computers Limited (mhkay@iclway.co.uk).
69
//
70
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
71
//
72
// Contributor(s): none.
73
//
74
Popular Tags