KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xalan > internal > xsltc > DOM


1 /*
2  * Copyright 2001-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: DOM.java,v 1.17 2004/02/16 20:54:58 minchau Exp $
18  */

19
20 package com.sun.org.apache.xalan.internal.xsltc;
21
22 import com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable;
23 import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
24
25 import org.w3c.dom.Node JavaDoc;
26 import org.w3c.dom.NodeList JavaDoc;
27
28 import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
29
30 /**
31  * @author Jacek Ambroziak
32  * @author Santiago Pericas-Geertsen
33  */

34 public interface DOM {
35     public final static int FIRST_TYPE = 0;
36
37     public final static int NO_TYPE = -1;
38     
39     // 0 is reserved for NodeIterator.END
40
public final static int NULL = 0;
41
42     // used by some node iterators to know which node to return
43
public final static int RETURN_CURRENT = 0;
44     public final static int RETURN_PARENT = 1;
45     
46     // Constants used by getResultTreeFrag to indicate the types of the RTFs.
47
public final static int SIMPLE_RTF = 0;
48     public final static int ADAPTIVE_RTF = 1;
49     public final static int TREE_RTF = 2;
50     
51     /** returns singleton iterator containg the document root */
52     public DTMAxisIterator getIterator();
53     public String JavaDoc getStringValue();
54     
55     public DTMAxisIterator getChildren(final int node);
56     public DTMAxisIterator getTypedChildren(final int type);
57     public DTMAxisIterator getAxisIterator(final int axis);
58     public DTMAxisIterator getTypedAxisIterator(final int axis, final int type);
59     public DTMAxisIterator getNthDescendant(int node, int n, boolean includeself);
60     public DTMAxisIterator getNamespaceAxisIterator(final int axis, final int ns);
61     public DTMAxisIterator getNodeValueIterator(DTMAxisIterator iter, int returnType,
62                          String JavaDoc value, boolean op);
63     public DTMAxisIterator orderNodes(DTMAxisIterator source, int node);
64     public String JavaDoc getNodeName(final int node);
65     public String JavaDoc getNodeNameX(final int node);
66     public String JavaDoc getNamespaceName(final int node);
67     public int getExpandedTypeID(final int node);
68     public int getNamespaceType(final int node);
69     public int getParent(final int node);
70     public int getAttributeNode(final int gType, final int element);
71     public String JavaDoc getStringValueX(final int node);
72     public void copy(final int node, SerializationHandler handler)
73     throws TransletException;
74     public void copy(DTMAxisIterator nodes, SerializationHandler handler)
75     throws TransletException;
76     public String JavaDoc shallowCopy(final int node, SerializationHandler handler)
77     throws TransletException;
78     public boolean lessThan(final int node1, final int node2);
79     public void characters(final int textNode, SerializationHandler handler)
80     throws TransletException;
81     public Node JavaDoc makeNode(int index);
82     public Node JavaDoc makeNode(DTMAxisIterator iter);
83     public NodeList JavaDoc makeNodeList(int index);
84     public NodeList JavaDoc makeNodeList(DTMAxisIterator iter);
85     public String JavaDoc getLanguage(int node);
86     public int getSize();
87     public String JavaDoc getDocumentURI(int node);
88     public void setFilter(StripFilter filter);
89     public void setupMapping(String JavaDoc[] names, String JavaDoc[] urisArray, int[] typesArray, String JavaDoc[] namespaces);
90     public boolean isElement(final int node);
91     public boolean isAttribute(final int node);
92     public String JavaDoc lookupNamespace(int node, String JavaDoc prefix)
93     throws TransletException;
94     public int getNodeIdent(final int nodehandle);
95     public int getNodeHandle(final int nodeId);
96     public DOM getResultTreeFrag(int initialSize, int rtfType);
97     public DOM getResultTreeFrag(int initialSize, int rtfType, boolean addToDTMManager);
98     public SerializationHandler getOutputDomBuilder();
99     public int getNSType(int node);
100     public int getDocument();
101     public String JavaDoc getUnparsedEntityURI(String JavaDoc name);
102     public Hashtable getElementsWithIDs();
103 }
104
Popular Tags