📄 dtm.java
字号:
public int getNextAttribute(int nodeHandle); /** * Given a namespace handle, advance to the next namespace in the same scope * (local or local-plus-inherited, as selected by getFirstNamespaceNode) * * @param baseHandle handle to original node from where the first child * was relative to (needed to return nodes in document order). * @param namespaceHandle handle to node which must be of type * NAMESPACE_NODE. * NEEDSDOC @param inScope * @return handle of next namespace, * or DTM.NULL to indicate none exists. */ public int getNextNamespaceNode(int baseHandle, int namespaceHandle, boolean inScope); /** * Given a node handle, find its parent node. * * @param nodeHandle the id of the node. * @return int Node handle of parent, * or DTM.NULL to indicate none exists. */ public int getParent(int nodeHandle); /** * Given a DTM which contains only a single document, * find the Node Handle of the Document node. Note * that if the DTM is configured so it can contain multiple * documents, this call will return the Document currently * under construction -- but may return null if it's between * documents. Generally, you should use getOwnerDocument(nodeHandle) * or getDocumentRoot(nodeHandle) instead. * * @return int Node handle of document, or DTM.NULL if a shared DTM * can not tell us which Document is currently active. */ public int getDocument(); /** * Given a node handle, find the owning document node. This version mimics * the behavior of the DOM call by the same name. * * @param nodeHandle the id of the node. * @return int Node handle of owning document, or DTM.NULL if the node was * a Document. * @see #getDocumentRoot(int nodeHandle) */ public int getOwnerDocument(int nodeHandle); /** * Given a node handle, find the owning document node. * * @param nodeHandle the id of the node. * @return int Node handle of owning document, or the node itself if it was * a Document. (Note difference from DOM, where getOwnerDocument returns * null for the Document node.) * @see #getOwnerDocument(int nodeHandle) */ public int getDocumentRoot(int nodeHandle); /** * Get the string-value of a node as a String object * (see http://www.w3.org/TR/xpath#data-model * for the definition of a node's string-value). * * @param nodeHandle The node ID. * * @return A string object that represents the string-value of the given node. */ public XMLString getStringValue(int nodeHandle); /** * Get number of character array chunks in * the string-value of a node. * (see http://www.w3.org/TR/xpath#data-model * for the definition of a node's string-value). * Note that a single text node may have multiple text chunks. * * @param nodeHandle The node ID. * * @return number of character array chunks in * the string-value of a node. */ public int getStringValueChunkCount(int nodeHandle); /** * Get a character array chunk in the string-value of a node. * (see http://www.w3.org/TR/xpath#data-model * for the definition of a node's string-value). * Note that a single text node may have multiple text chunks. * * @param nodeHandle The node ID. * @param chunkIndex Which chunk to get. * @param startAndLen A two-integer array which, upon return, WILL * BE FILLED with values representing the chunk's start position * within the returned character buffer and the length of the chunk. * @return The character array buffer within which the chunk occurs, * setting startAndLen's contents as a side-effect. */ public char[] getStringValueChunk(int nodeHandle, int chunkIndex, int[] startAndLen); /** * Given a node handle, return an ID that represents the node's expanded name. * * @param nodeHandle The handle to the node in question. * * @return the expanded-name id of the node. */ public int getExpandedTypeID(int nodeHandle); /** * Given an expanded name, return an ID. If the expanded-name does not * exist in the internal tables, the entry will be created, and the ID will * be returned. Any additional nodes that are created that have this * expanded name will use this ID. * * NEEDSDOC @param namespace * NEEDSDOC @param localName * NEEDSDOC @param type * * @return the expanded-name id of the node. */ public int getExpandedTypeID(String namespace, String localName, int type); /** * Given an expanded-name ID, return the local name part. * * @param ExpandedNameID an ID that represents an expanded-name. * @return String Local name of this node. */ public String getLocalNameFromExpandedNameID(int ExpandedNameID); /** * Given an expanded-name ID, return the namespace URI part. * * @param ExpandedNameID an ID that represents an expanded-name. * @return String URI value of this node's namespace, or null if no * namespace was resolved. */ public String getNamespaceFromExpandedNameID(int ExpandedNameID); /** * Given a node handle, return its DOM-style node name. This will * include names such as #text or #document. * * @param nodeHandle the id of the node. * @return String Name of this node, which may be an empty string. * %REVIEW% Document when empty string is possible... */ public String getNodeName(int nodeHandle); /** * Given a node handle, return the XPath node name. This should be * the name as described by the XPath data model, NOT the DOM-style * name. * * @param nodeHandle the id of the node. * @return String Name of this node. */ public String getNodeNameX(int nodeHandle); /** * Given a node handle, return its DOM-style localname. * (As defined in Namespaces, this is the portion of the name after the * prefix, if present, or the whole node name if no prefix exists) * * @param nodeHandle the id of the node. * @return String Local name of this node. */ public String getLocalName(int nodeHandle); /** * Given a namespace handle, return the prefix that the namespace decl is * mapping. * Given a node handle, return the prefix used to map to the namespace. * (As defined in Namespaces, this is the portion of the name before any * colon character). * * <p> %REVIEW% Are you sure you want "" for no prefix? </p> * * @param nodeHandle the id of the node. * @return String prefix of this node's name, or "" if no explicit * namespace prefix was given. */ public String getPrefix(int nodeHandle); /** * Given a node handle, return its DOM-style namespace URI * (As defined in Namespaces, this is the declared URI which this node's * prefix -- or default in lieu thereof -- was mapped to.) * @param nodeHandle the id of the node. * @return String URI value of this node's namespace, or null if no * namespace was resolved. */ public String getNamespaceURI(int nodeHandle); /** * Given a node handle, return its node value. This is mostly * as defined by the DOM, but may ignore some conveniences. * <p> * @param nodeHandle The node id. * @return String Value of this node, or null if not * meaningful for this node type. */ public String getNodeValue(int nodeHandle); /** * Given a node handle, return its DOM-style node type. * * <p>%REVIEW% Generally, returning short is false economy. Return int?</p> * * @param nodeHandle The node id. * @return int Node type, as per the DOM's Node._NODE constants. */ public short getNodeType(int nodeHandle); /** * Get the depth level of this node in the tree (equals 1 for * a parentless node). * * @param nodeHandle The node id. * @return the number of ancestors, plus one * @xsl.usage internal */ public short getLevel(int nodeHandle); // ============== Document query functions ============== /** * Tests whether DTM DOM implementation implements a specific feature and * that feature is supported by this node. * @param feature The name of the feature to test. * @param version This is the version number of the feature to test. * If the version is not * specified, supporting any version of the feature will cause the * method to return <code>true</code>. * @return Returns <code>true</code> if the specified feature is * supported on this node, <code>false</code> otherwise. */ public boolean isSupported(String feature, String version); /** * Return the base URI of the document entity. If it is not known * (because the document was parsed from a socket connection or from * standard input, for example), the value of this property is unknown. * * @return the document base URI String object or null if unknown. */ public String getDocumentBaseURI(); /** * Set the base URI of the document entity. * * @param baseURI the document base URI String object or null if unknown. */ public void setDocumentBaseURI(String baseURI); /** * Return the system identifier of the document entity. If * it is not known, the value of this property is null. * * @param nodeHandle The node id, which can be any valid node handle. * @return the system identifier String object or null if unknown. */ public String getDocumentSystemIdentifier(int nodeHandle); /** * Return the name of the character encoding scheme * in which the document entity is expressed. * * @param nodeHandle The node id, which can be any valid node handle. * @return the document encoding String object. */ public String getDocumentEncoding(int nodeHandle); /** * Return an indication of the standalone status of the document, * either "yes" or "no". This property is derived from the optional * standalone document declaration in the XML declaration at the * beginning of the document entity, and has no value if there is no * standalone document declaration. * * @param nodeHandle The node id, which can be any valid node handle. * @return the document standalone String object, either "yes", "no", or null. */ public String getDocumentStandalone(int nodeHandle); /** * Return a string representing the XML version of the document. This * property is derived from the XML declaration optionally present at the * beginning of the document entity, and has no value if there is no XML * declaration. * * @param documentHandle the document handle * @return the document version String object */ public String getDocumentVersion(int documentHandle); /** * Return an indication of * whether the processor has read the complete DTD. Its value is a * boolean. If it is false, then certain properties (indicated in their * descriptions below) may be unknown. If it is true, those properties * are never unknown. * * @return <code>true</code> if all declarations were processed; * <code>false</code> otherwise. */ public boolean getDocumentAllDeclarationsProcessed(); /** * A document type declaration information item has the following properties: * * 1. [system identifier] The system identifier of the external subset, if * it exists. Otherwise this property has no value. * * @return the system identifier String object, or null if there is none. */ public String getDocumentTypeDeclarationSystemIdentifier();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -