jkesselm 01/04/26 11:06:39
Modified: java/src/org/apache/xml/dtm Tag: DTM_EXP DTM.java
DTMFilter.java DTMIterator.java DTMManager.java
Log:
Whups. Some problems merging two separate sets of changes.
NOT STABLE. IN PROGRESS.
Revision Changes Path
No revision
No revision
1.1.2.6 +0 -212 xml-xalan/java/src/org/apache/xml/dtm/Attic/DTM.java
Index: DTM.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/Attic/DTM.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- DTM.java 2001/04/26 17:39:01 1.1.2.5
+++ DTM.java 2001/04/26 18:06:36 1.1.2.6
@@ -63,41 +63,18 @@
* construction of the model.
*
* <p>Nodes in the DTM are identified by integer "handles". A handle must
-<<<<<<< DTM.java
- * be unique within a process, and identifies a specific node and its
- * specific document. It must be possible to compare two handles
- * for node identity with "==".</p>
-=======
* be unique within a process, and carries both node identification and
* document identification. It must be possible to compare two handles
* (and thus their nodes) for identity with "==".</p>
->>>>>>> 1.2.2.10
*
-<<<<<<< DTM.java
- * <p>Namespace URLs, local-names, and expanded-names can all be
- * represented by and tested as integer ID values. An expanded name
- * represents (and may or may not directly contain) a combination of
- * the URL ID, and the local-name ID. Note that the namespace URL id
- * can be 0, which should have the meaning that the namespace is null.
- * For consistancy, zero should not be used for a local-name index
- * either. </p>
-=======
* <p>Namespace URLs, local-names, and expanded-names can all be represented
* by integer ID values which index into string pools stored outside the
* main tree structure. An expanded name is made of a combination of the
URL
* ID, and the local-name ID.</p>
->>>>>>> 1.2.2.10
*
-<<<<<<< DTM.java
- * <p>The model of the tree, as well as the general navigation model,
- * is that of XPath 1.0, for the moment. The model will eventually be
- * adapted to match the XPath 2.0 data model, XML Schema, and
- * InfoSet.</p>
-=======
* <p>The model of the tree, as well as the general navigation model, is
* that of XPath 1.0, for the moment. The model will eventually be adapted
to
* match the XPath 2.0 data model, XML Schema, and InfoSet.</p>
->>>>>>> 1.2.2.10
*
* <p>DTM does _not_ directly support the W3C's Document Object
* Model. However, it attempts to come close enough that an
@@ -208,26 +185,14 @@
/**
* Given a node handle, get the handle of the node's first child.
*
-<<<<<<< DTM.java
* @param nodeHandle int Handle of the node.
- * @return int DTM node-number of first child, or DTM.NULL to indicate
none exists.
-=======
- * @param nodeHandle int Handle of the node.
* @return int DTM node-number of first child,
* or DTM.NULL to indicate none exists.
->>>>>>> 1.2.2.10
*/
public int getFirstChild(int nodeHandle);
-<<<<<<< DTM.java
- /**
- * Given a node handle, advance to its last child.
- * If not yet resolved, waits for more nodes to be added to the document
and
- * tries again.
-=======
/**
* Given a node handle, get the handle of the node's last child.
->>>>>>> 1.2.2.10
*
* @param nodeHandle int Handle of the node.
* @return int Node-number of last child,
@@ -268,30 +233,17 @@
* @param nodeHandle handle to node, which should probably be an element
* node, but need not be.
*
-<<<<<<< DTM.java
- * @param inScope true if all namespaces in scope should be returned,
- * false if only the namespace declarations should be
- * returned.
- * @return handle of first namespace, or DTM.NULL to indicate none exists.
-=======
* @param inScope true if all namespaces in scope should be
* returned, false if only the node's own
* namespace declarations should be returned.
* @return handle of first namespace,
* or DTM.NULL to indicate none exists.
->>>>>>> 1.2.2.10
*/
public int getFirstNamespaceNode(int nodeHandle, boolean inScope);
/**
* Given a node handle, advance to its next sibling.
-<<<<<<< DTM.java
- * If not yet resolved, waits for more nodes to be added to the document
and
- * tries again.
- * @param nodeHandle int Handle of the node.
-=======
* @param nodeHandle int Handle of the node.
->>>>>>> 1.2.2.10
* @return int Node-number of next sibling,
* or DTM.NULL to indicate none exists.
*/
@@ -299,13 +251,8 @@
/**
* Given a node handle, find its preceeding sibling.
-<<<<<<< DTM.java
- * WARNING: DTM is asymmetric; this operation is resolved by search, and is
- * relatively expensive.
-=======
* WARNING: DTM implementations may be asymmetric; in some,
* this operation is resolved by search, and is relatively expensive.
->>>>>>> 1.2.2.10
*
* @param nodeHandle the id of the node.
* @return int Node-number of the previous sib,
@@ -328,30 +275,13 @@
* Given a namespace handle, advance to the next namespace in the same
scope
* (local or local-plus-inherited, as selected by getFirstNamespaceNode)
*
-<<<<<<< DTM.java
- * @param namespaceHandle handle to node which must be of type
NAMESPACE_NODE.
- * @return handle of next namespace, or DTM.NULL to indicate none exists.
-=======
* @param namespaceHandle handle to node which must be of type
* NAMESPACE_NODE.
* @return handle of next namespace,
* or DTM.NULL to indicate none exists.
->>>>>>> 1.2.2.10
*/
public int getNextNamespaceNode(int namespaceHandle, boolean inScope);
-<<<<<<< DTM.java
- /**
- * Given a node handle, advance to its next descendant.
- * If not yet resolved, waits for more nodes to be added to the document
and
- * tries again.
- *
- * @param subtreeRootNodeHandle
- * @param nodeHandle int Handle of the node.
- * @return handle of next descendant,
- * or DTM.NULL to indicate none exists.
- */
-=======
/** Lightweight subtree-walker. Given a node handle, find the next
* node in document order. (Preorder left-to-right traversal). The
* walk stops (returning DTM.NULL) when it would otherwise have to
@@ -368,7 +298,6 @@
* @param nodeHandle int Handle of a node within the subtree.
* @return handle of the next node within the subtree, in document order.
* or DTM.NULL to indicate none exists. */
->>>>>>> 1.2.2.10
public int getNextDescendant(int subtreeRootHandle, int nodeHandle);
/** Lightweight tree-walker. Given a node handle, find the next
@@ -383,16 +312,10 @@
* to distinguish it more strongly from getNextSibling.
*
* @param axisContextHandle the start of the axis that is being traversed.
-<<<<<<< DTM.java
- * @param nodeHandle
- * @return handle of next sibling,
- * or DTM.NULL to indicate none exists.
-=======
* TODO: As far as Joe can tell, this parameter is unnecessary...?
* @param nodeHandle the node whose successor we're looking for.
* @return handle of next node in the DTM tree
* or DTM.NULL to indicate none exists.
->>>>>>> 1.2.2.10
*/
public int getNextFollowing(int axisContextHandle, int nodeHandle);
@@ -406,16 +329,10 @@
* to distinguish it more strongly from getPreviousSibling.
*
* @param axisContextHandle the start of the axis that is being traversed.
-<<<<<<< DTM.java
- * @param nodeHandle the id of the node.
- * @return int Node-number of preceding sibling,
- * or DTM.NULL to indicate none exists.
-=======
* TODO: As far as Joe can tell, this parameter is unnecessary...?
* @param nodeHandle the node whose predecessor we're looking for.
* @return handle of next node in the DTM tree
* or DTM.NULL to indicate none exists.
->>>>>>> 1.2.2.10
*/
public int getNextPreceding(int axisContextHandle, int nodeHandle);
@@ -423,44 +340,12 @@
* Given a node handle, find its parent node.
*
* @param nodeHandle the id of the node.
-<<<<<<< DTM.java
- * @return int Node-number of parent,
- * or DTM.NULL to indicate none exists.
-=======
* @return int Node handle of parent,
* or DTM.NULL to indicate none exists.
->>>>>>> 1.2.2.10
*/
public int getParent(int nodeHandle);
-<<<<<<< DTM.java
- /**
- * Given a node handle, find the owning document node.
- *
- * @param nodeHandle the id of the node.
- * @return int Node handle of document, which should always be valid.
- */
- public int getDocument();
-
- /**
- * Given a node handle, find the owning document node. This has the
exact
- * same semantics as the DOM Document method of the same name, in that if
- * the nodeHandle is a document node, it will return NULL.
- *
- * <p>%REVIEW% Since this is DOM-specific, it may belong at the DOM
- * binding layer. Included here as a convenience function and to
- * aid porting of DOM code to DTM.</p>
- *
- * @param nodeHandle the id of the node.
- * @return int Node handle of owning document, or -1 if the nodeHandle is
- * a document.
- */
- public int getOwnerDocument(int nodeHandle);
-
-
/**
-=======
- /**
* Given a node handle, find the owning document node.
*
* @param nodeHandle the id of the node.
@@ -480,7 +365,6 @@
public int getOwnerDocument(int nodeHandle);
/**
->>>>>>> 1.2.2.10
* 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).
@@ -590,18 +474,12 @@
public String getLocalName(int nodeHandle);
/**
-<<<<<<< DTM.java
- * 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.
-=======
* 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).
* @param postition int Handle of the node.
->>>>>>> 1.2.2.10
*
* <p> %REVIEW% Are you sure you want "" for no prefix? </p>
*
@@ -615,10 +493,7 @@
* 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.)
-<<<<<<< DTM.java
-=======
* @param postition int Handle of the node.
->>>>>>> 1.2.2.10
*
* @param nodeHandle the id of the node.
* @return String URI value of this node's namespace, or null if no
@@ -630,11 +505,6 @@
* Given a node handle, return its node value. This is mostly
* as defined by the DOM, but may ignore some conveniences.
* <p>
-<<<<<<< DTM.java
-=======
- * @param postition int Handle of the node.
->>>>>>> 1.2.2.10
- *
* @param nodeHandle The node id.
* @return String Value of this node, or null if not
* meaningful for this node type.
@@ -643,13 +513,6 @@
/**
* Given a node handle, return its DOM-style node type.
-<<<<<<< DTM.java
- * <p>
- * %REVIEW% Generally, returning short is false economy. Return int?
-=======
- * @param postition int Handle of the node.
->>>>>>> 1.2.2.10
- *
* @param nodeHandle The node id.
* @return int Node type, as per the DOM's Node._NODE constants.
*/
@@ -664,26 +527,6 @@
* @return the number of ancestors, plus one
*/
public short getLevel(int nodeHandle);
-<<<<<<< DTM.java
-
- // ============== 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 versionThis 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);
-
-=======
/**
* Tests whether DTM DOM implementation implements a specific feature and
@@ -701,7 +544,6 @@
// ============== Document query functions ==============
->>>>>>> 1.2.2.10
/**
* Return the base URI of the specified node. If it is not known
* (because the document was parsed from a socket connection or from
@@ -849,24 +691,12 @@
// ============== Boolean methods ================
/**
-<<<<<<< DTM.java
* Return true if the xsl:strip-space or xsl:preserve-space was processed
- * during construction of the DTM document.
- *
- * <p>%REVEIW% Presumes a 1:1 mapping from DTM to Document, since
- * we aren't saying which Document to query...?</p>
- */
- boolean supportsPreStripping();
-
- /**
-=======
- * Return true if the xsl:strip-space or xsl:preserve-space was processed
* at the construction level.
*/
boolean supportsPreStripping();
/**
->>>>>>> 1.2.2.10
* Figure out whether nodeHandle2 should be considered as being later
* in the document than nodeHandle1, in Document Order as defined
* by the XPath model. This may not agree with the ordering defined
@@ -977,37 +807,6 @@
public void dispatchToEvents(
int nodeHandle, org.xml.sax.ContentHandler ch)
-<<<<<<< DTM.java
- throws org.xml.sax.SAXException;
-
- // ==== Construction methods (may not be supported by some
implementations!) =====
-
- /**
- * Append a child to the end of the document. Please note that the node
- * is always cloned if it is owned by another document.
- *
- * <p>%REVIEW% "End of the document" needs to be defined more clearly.
- * Does it become the last child of the Document? Of the root element?</p>
- *
- * @param newChild Must be a valid new node handle.
- * @param clone true if the child should be cloned into the document.
- * @param cloneDepth if the clone argument is true, specifies that the
- * clone should include all it's children.
- */
- public void appendChild(int newChild, boolean clone, boolean cloneDepth);
-
-
- /**
- * Append a text node child that will be constructed from a string,
- * to the end of the document.
- *
- * <p>%REVIEW% "End of the document" needs to be defined more clearly.
- * Does it become the last child of the Document? Of the root element?</p>
- *
- * @param str Non-null reverence to a string.
- */
- public void appendTextChild(String str);
-=======
throws org.xml.sax.SAXException;
// ==== Construction methods (may not be supported by some
implementations!) =====
@@ -1040,15 +839,4 @@
* @param str Non-null reverence to a string.
*/
public void appendTextChild(String str);
-
->>>>>>> 1.2.2.10
}
-<<<<<<< DTM.java
-
-
-=======
-
-
-
-
->>>>>>> 1.2.2.10
1.1.2.4 +0 -15
xml-xalan/java/src/org/apache/xml/dtm/Attic/DTMFilter.java
Index: DTMFilter.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/Attic/DTMFilter.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- DTMFilter.java 2001/04/26 17:39:02 1.1.2.3
+++ DTMFilter.java 2001/04/26 18:06:37 1.1.2.4
@@ -153,14 +153,7 @@
*/
public static final int SHOW_NOTATION = 0x00000800;
-<<<<<<< DTMFilter.java
/**
- * This bit specifies a namespace, and extends the SHOW_XXX stuff
- * in [EMAIL PROTECTED] org.w3c.dom.traversal.NodeFilter}.
- * Make sure this does not conflict with those values.
- */
-=======
- /**
* This bit instructs the iterator to show namespace nodes, which
* are modeled by DTM but not by the DOM. Make sure this does not
@@ -170,16 +163,9 @@
* to leave room for the DOM to expand its set of constants... Or,
* possibly, to create a DTM-specific field for these additional bits.
*/
->>>>>>> 1.1.2.3
public static final int SHOW_NAMESPACE = 0x00001000;
/**
-<<<<<<< DTMFilter.java
- * Special bitmap for match patterns starting with a function.
- * This extends the SHOW_XXX stuff
- * in [EMAIL PROTECTED] org.w3c.dom.traversal.NodeFilter}.
- * Make sure this does not conflict with those values.
-=======
* Special bit for filters implementing match patterns starting with
* a function. Make sure this does not conflict with
* [EMAIL PROTECTED] org.w3c.dom.traversal.NodeFilter}.
@@ -187,7 +173,6 @@
* ISSUE: Might be safer to start from higher bits and work down,
* to leave room for the DOM to expand its set of constants... Or,
* possibly, to create a DTM-specific field for these additional bits.
->>>>>>> 1.1.2.3
*/
public static final int SHOW_BYFUNCTION = 0x00010000;
1.1.2.4 +0 -25
xml-xalan/java/src/org/apache/xml/dtm/Attic/DTMIterator.java
Index: DTMIterator.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/Attic/DTMIterator.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- DTMIterator.java 2001/04/26 17:39:02 1.1.2.3
+++ DTMIterator.java 2001/04/26 18:06:37 1.1.2.4
@@ -120,31 +120,8 @@
* @param environment The environment object.
*/
public void setEnvironment(Object environment);
-<<<<<<< DTMIterator.java
-
- /**
- * Get an instance of a DTM that "owns" a node handle. Since a node
- * iterator may be passed without a DTMManager, this allows the
- * caller to easily get the DTM using just the iterator.
- *
- * @param nodeHandle the nodeHandle.
- *
- * @return a non-null DTM reference.
- */
- public DTM getDTM(int nodeHandle);
/**
- * Get an instance of the DTMManager. Since a node
- * iterator may be passed without a DTMManager, this allows the
- * caller to easily get the DTMManager using just the iterator.
- *
- * @return a non-null DTMManager reference.
- */
- public DTMManager getDTMManager();
-
-=======
-
- /**
* Get an instance of a DTM that "owns" a node handle. Since a node
* iterator may be passed without a DTMManager, this allows the
* caller to easily get the DTM using just the iterator.
@@ -166,8 +143,6 @@
*/
public DTMManager getDTMManager();
-
->>>>>>> 1.1.2.3
/**
* The root node of the <code>DTMIterator</code>, as specified when it
* was created. Note the root node is not the root node of the
1.1.2.7 +0 -45
xml-xalan/java/src/org/apache/xml/dtm/Attic/DTMManager.java
Index: DTMManager.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/Attic/DTMManager.java,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- DTMManager.java 2001/04/26 17:39:03 1.1.2.6
+++ DTMManager.java 2001/04/26 18:06:37 1.1.2.7
@@ -112,30 +112,6 @@
* @return a non-null DTM reference.
*/
public abstract DTM getDTM(int nodeHandle);
-<<<<<<< DTMManager.java
-
- /**
- * Creates a DTM representing an empty <code>DocumentFragment</code>
object.
- * @return a non-null DTM reference.
- */
- public abstract DTM createDocumentFragment();
-
- /**
- * Release a DTM either to a lru pool, or completely remove reference.
- * DTMs without system IDs are always hard deleted.
- * State: experimental.
- *
- * @param dtm The DTM to be released.
- * @param shouldHardDelete True if the DTM should be removed no matter
what.
- * @return true if the DTM was removed, false if it was put back in a lru
pool.
- */
- public abstract boolean release(DTM dtm, boolean shouldHardDelete);
-
-
-
-
-=======
-
/**
* Creates an empty <code>DocumentFragment</code> object.
* @return a non-null DTM reference.
@@ -153,8 +129,6 @@
*/
public abstract boolean release(DTM dtm, boolean shouldHardDelete);
->>>>>>> 1.1.2.3
-
/**
* Create a new <code>DTMIterator</code> based on an XPath
* <a href="http://www.w3.org/TR/xpath#NT-LocationPath>LocationPath</a> or
@@ -206,26 +180,9 @@
* @param entityReferenceExpansion The value of this flag determines
* whether entity reference nodes are expanded.
*
-<<<<<<< DTMManager.java
- * @return The newly created <code>DTMIterator</code>.
- */
-=======
* @return The newly created <code>DTMIterator</code>. */
->>>>>>> 1.1.2.3
public abstract DTMIterator createDTMIterator(int whatToShow,
DTMFilter filter, boolean entityReferenceExpansion);
-<<<<<<< DTMManager.java
-
- /**
- * Create a new <code>DTMIterator</code> that holds exactly one node.
- *
- * @param node The node handle that the DTMIterator will iterate to.
- *
- * @return The newly created <code>DTMIterator</code>.
- */
- public abstract DTMIterator createDTMIterator(int node);
-
-=======
/**
* Create a new <code>DTMIterator</code> that holds exactly one node.
@@ -235,6 +192,4 @@
* @return The newly created <code>DTMIterator</code>.
*/
public abstract DTMIterator createDTMIterator(int node);
-
->>>>>>> 1.1.2.3
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]