6
|
1 |
/*
|
|
2 |
* reserved comment block
|
|
3 |
* DO NOT REMOVE OR ALTER!
|
|
4 |
*/
|
|
5 |
/*
|
|
6 |
* Copyright 2001-2004 The Apache Software Foundation.
|
|
7 |
*
|
|
8 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9 |
* you may not use this file except in compliance with the License.
|
|
10 |
* You may obtain a copy of the License at
|
|
11 |
*
|
|
12 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13 |
*
|
|
14 |
* Unless required by applicable law or agreed to in writing, software
|
|
15 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17 |
* See the License for the specific language governing permissions and
|
|
18 |
* limitations under the License.
|
|
19 |
*/
|
|
20 |
/*
|
|
21 |
* $Id: DOM.java,v 1.2.4.1 2005/08/31 10:18:49 pvedula Exp $
|
|
22 |
*/
|
|
23 |
|
|
24 |
package com.sun.org.apache.xalan.internal.xsltc;
|
|
25 |
|
|
26 |
import com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable;
|
|
27 |
import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
|
|
28 |
|
|
29 |
import org.w3c.dom.Node;
|
|
30 |
import org.w3c.dom.NodeList;
|
|
31 |
|
|
32 |
import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
|
|
33 |
|
|
34 |
/**
|
|
35 |
* @author Jacek Ambroziak
|
|
36 |
* @author Santiago Pericas-Geertsen
|
|
37 |
*/
|
|
38 |
public interface DOM {
|
|
39 |
public final static int FIRST_TYPE = 0;
|
|
40 |
|
|
41 |
public final static int NO_TYPE = -1;
|
|
42 |
|
|
43 |
// 0 is reserved for NodeIterator.END
|
|
44 |
public final static int NULL = 0;
|
|
45 |
|
|
46 |
// used by some node iterators to know which node to return
|
|
47 |
public final static int RETURN_CURRENT = 0;
|
|
48 |
public final static int RETURN_PARENT = 1;
|
|
49 |
|
|
50 |
// Constants used by getResultTreeFrag to indicate the types of the RTFs.
|
|
51 |
public final static int SIMPLE_RTF = 0;
|
|
52 |
public final static int ADAPTIVE_RTF = 1;
|
|
53 |
public final static int TREE_RTF = 2;
|
|
54 |
|
|
55 |
/** returns singleton iterator containg the document root */
|
|
56 |
public DTMAxisIterator getIterator();
|
|
57 |
public String getStringValue();
|
|
58 |
|
|
59 |
public DTMAxisIterator getChildren(final int node);
|
|
60 |
public DTMAxisIterator getTypedChildren(final int type);
|
|
61 |
public DTMAxisIterator getAxisIterator(final int axis);
|
|
62 |
public DTMAxisIterator getTypedAxisIterator(final int axis, final int type);
|
|
63 |
public DTMAxisIterator getNthDescendant(int node, int n, boolean includeself);
|
|
64 |
public DTMAxisIterator getNamespaceAxisIterator(final int axis, final int ns);
|
|
65 |
public DTMAxisIterator getNodeValueIterator(DTMAxisIterator iter, int returnType,
|
|
66 |
String value, boolean op);
|
|
67 |
public DTMAxisIterator orderNodes(DTMAxisIterator source, int node);
|
|
68 |
public String getNodeName(final int node);
|
|
69 |
public String getNodeNameX(final int node);
|
|
70 |
public String getNamespaceName(final int node);
|
|
71 |
public int getExpandedTypeID(final int node);
|
|
72 |
public int getNamespaceType(final int node);
|
|
73 |
public int getParent(final int node);
|
|
74 |
public int getAttributeNode(final int gType, final int element);
|
|
75 |
public String getStringValueX(final int node);
|
|
76 |
public void copy(final int node, SerializationHandler handler)
|
|
77 |
throws TransletException;
|
|
78 |
public void copy(DTMAxisIterator nodes, SerializationHandler handler)
|
|
79 |
throws TransletException;
|
|
80 |
public String shallowCopy(final int node, SerializationHandler handler)
|
|
81 |
throws TransletException;
|
|
82 |
public boolean lessThan(final int node1, final int node2);
|
|
83 |
public void characters(final int textNode, SerializationHandler handler)
|
|
84 |
throws TransletException;
|
|
85 |
public Node makeNode(int index);
|
|
86 |
public Node makeNode(DTMAxisIterator iter);
|
|
87 |
public NodeList makeNodeList(int index);
|
|
88 |
public NodeList makeNodeList(DTMAxisIterator iter);
|
|
89 |
public String getLanguage(int node);
|
|
90 |
public int getSize();
|
|
91 |
public String getDocumentURI(int node);
|
|
92 |
public void setFilter(StripFilter filter);
|
|
93 |
public void setupMapping(String[] names, String[] urisArray, int[] typesArray, String[] namespaces);
|
|
94 |
public boolean isElement(final int node);
|
|
95 |
public boolean isAttribute(final int node);
|
|
96 |
public String lookupNamespace(int node, String prefix)
|
|
97 |
throws TransletException;
|
|
98 |
public int getNodeIdent(final int nodehandle);
|
|
99 |
public int getNodeHandle(final int nodeId);
|
|
100 |
public DOM getResultTreeFrag(int initialSize, int rtfType);
|
|
101 |
public DOM getResultTreeFrag(int initialSize, int rtfType, boolean addToDTMManager);
|
|
102 |
public SerializationHandler getOutputDomBuilder();
|
|
103 |
public int getNSType(int node);
|
|
104 |
public int getDocument();
|
|
105 |
public String getUnparsedEntityURI(String name);
|
|
106 |
public Hashtable getElementsWithIDs();
|
|
107 |
}
|