286N/A/*
286N/A * reserved comment block
286N/A * DO NOT REMOVE OR ALTER!
286N/A */
286N/A/*
286N/A * Copyright 2001-2004 The Apache Software Foundation.
286N/A *
286N/A * Licensed under the Apache License, Version 2.0 (the "License");
286N/A * you may not use this file except in compliance with the License.
286N/A * You may obtain a copy of the License at
286N/A *
286N/A * http://www.apache.org/licenses/LICENSE-2.0
286N/A *
286N/A * Unless required by applicable law or agreed to in writing, software
286N/A * distributed under the License is distributed on an "AS IS" BASIS,
286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
286N/A * See the License for the specific language governing permissions and
286N/A * limitations under the License.
286N/A */
286N/A/*
286N/A * $Id: DOM.java,v 1.2.4.1 2005/08/31 10:18:49 pvedula Exp $
286N/A */
286N/A
286N/Apackage com.sun.org.apache.xalan.internal.xsltc;
286N/A
286N/Aimport com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable;
286N/Aimport com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
286N/A
286N/Aimport org.w3c.dom.Node;
286N/Aimport org.w3c.dom.NodeList;
286N/A
286N/Aimport com.sun.org.apache.xml.internal.serializer.SerializationHandler;
286N/A
286N/A/**
286N/A * @author Jacek Ambroziak
286N/A * @author Santiago Pericas-Geertsen
286N/A */
286N/Apublic interface DOM {
286N/A public final static int FIRST_TYPE = 0;
286N/A
286N/A public final static int NO_TYPE = -1;
286N/A
286N/A // 0 is reserved for NodeIterator.END
286N/A public final static int NULL = 0;
286N/A
286N/A // used by some node iterators to know which node to return
286N/A public final static int RETURN_CURRENT = 0;
286N/A public final static int RETURN_PARENT = 1;
286N/A
286N/A // Constants used by getResultTreeFrag to indicate the types of the RTFs.
286N/A public final static int SIMPLE_RTF = 0;
286N/A public final static int ADAPTIVE_RTF = 1;
286N/A public final static int TREE_RTF = 2;
286N/A
286N/A /** returns singleton iterator containg the document root */
286N/A public DTMAxisIterator getIterator();
286N/A public String getStringValue();
286N/A
286N/A public DTMAxisIterator getChildren(final int node);
286N/A public DTMAxisIterator getTypedChildren(final int type);
286N/A public DTMAxisIterator getAxisIterator(final int axis);
286N/A public DTMAxisIterator getTypedAxisIterator(final int axis, final int type);
286N/A public DTMAxisIterator getNthDescendant(int node, int n, boolean includeself);
286N/A public DTMAxisIterator getNamespaceAxisIterator(final int axis, final int ns);
286N/A public DTMAxisIterator getNodeValueIterator(DTMAxisIterator iter, int returnType,
286N/A String value, boolean op);
286N/A public DTMAxisIterator orderNodes(DTMAxisIterator source, int node);
286N/A public String getNodeName(final int node);
286N/A public String getNodeNameX(final int node);
286N/A public String getNamespaceName(final int node);
286N/A public int getExpandedTypeID(final int node);
286N/A public int getNamespaceType(final int node);
286N/A public int getParent(final int node);
286N/A public int getAttributeNode(final int gType, final int element);
286N/A public String getStringValueX(final int node);
286N/A public void copy(final int node, SerializationHandler handler)
286N/A throws TransletException;
286N/A public void copy(DTMAxisIterator nodes, SerializationHandler handler)
286N/A throws TransletException;
286N/A public String shallowCopy(final int node, SerializationHandler handler)
286N/A throws TransletException;
286N/A public boolean lessThan(final int node1, final int node2);
286N/A public void characters(final int textNode, SerializationHandler handler)
286N/A throws TransletException;
286N/A public Node makeNode(int index);
286N/A public Node makeNode(DTMAxisIterator iter);
286N/A public NodeList makeNodeList(int index);
286N/A public NodeList makeNodeList(DTMAxisIterator iter);
286N/A public String getLanguage(int node);
286N/A public int getSize();
286N/A public String getDocumentURI(int node);
286N/A public void setFilter(StripFilter filter);
286N/A public void setupMapping(String[] names, String[] urisArray, int[] typesArray, String[] namespaces);
286N/A public boolean isElement(final int node);
286N/A public boolean isAttribute(final int node);
286N/A public String lookupNamespace(int node, String prefix)
286N/A throws TransletException;
286N/A public int getNodeIdent(final int nodehandle);
286N/A public int getNodeHandle(final int nodeId);
286N/A public DOM getResultTreeFrag(int initialSize, int rtfType);
286N/A public DOM getResultTreeFrag(int initialSize, int rtfType, boolean addToDTMManager);
286N/A public SerializationHandler getOutputDomBuilder();
286N/A public int getNSType(int node);
286N/A public int getDocument();
286N/A public String getUnparsedEntityURI(String name);
286N/A public Hashtable getElementsWithIDs();
286N/A}