You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by jk...@apache.org on 2001/04/09 22:58:14 UTC

cvs commit: xml-xalan/java/src/org/apache/xml/utils DTMFilter.java

jkesselm    01/04/09 13:58:14

  Modified:    java/src/org/apache/xml/utils Tag: DTM_EXP DTMFilter.java
  Log:
  Javadoc
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +42 -17    xml-xalan/java/src/org/apache/xml/utils/DTMFilter.java
  
  Index: DTMFilter.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/DTMFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- DTMFilter.java	2001/03/29 19:17:54	1.1
  +++ DTMFilter.java	2001/04/09 20:58:14	1.1.2.1
  @@ -1,14 +1,15 @@
   package org.apache.xml.utils;
   
   /**
  - * Simple filter for doing node tests.  Note the semantics of this are somewhat 
  - * different that the DOM's NodeFilter.
  + * Simple filter for doing node tests.  Note the semantics of this are
  + * somewhat different that the DOM's NodeFilter.
    */
   public interface DTMFilter
   {
   
     // Constants for whatToShow.  These are used to set the node type that will 
  -  // be traversed.
  +  // be traversed. These values may be ORed together before being passed to
  +  // the DTMIterator.
   
     /**
      * Show all <code>Nodes</code>.
  @@ -26,7 +27,7 @@
      * <code>root</code>; in this case, it means that the attribute node
      * will appear in the first position of the iteration or traversal.
      * Since attributes are never children of other nodes, they do not
  -   * appear when traversing over the document tree.
  +   * appear when traversing over the main document tree.
      */
     public static final int SHOW_ATTRIBUTE = 0x00000002;
   
  @@ -41,7 +42,9 @@
     public static final int SHOW_CDATA_SECTION = 0x00000008;
   
     /**
  -   * Show <code>EntityReference</code> nodes.
  +   * Show <code>EntityReference</code> nodes. Note that if Entity References
  +   * have been fully expanded while the tree was being constructed, these
  +   * nodes will not appear and this mask has no effect.
      */
     public static final int SHOW_ENTITY_REFERENCE = 0x00000010;
   
  @@ -51,7 +54,7 @@
      * <code>root</code>; in this case, it means that the <code>Entity</code>
      *  node will appear in the first position of the traversal. Since
      * entities are not part of the document tree, they do not appear when
  -   * traversing over the document tree.
  +   * traversing over the main document tree.
      */
     public static final int SHOW_ENTITY = 0x00000020;
   
  @@ -66,17 +69,21 @@
     public static final int SHOW_COMMENT = 0x00000080;
   
     /**
  -   * Show <code>Document</code> nodes.
  +   * Show <code>Document</code> nodes. (Of course, as with Attributes
  +   * and such, this is meaningful only when the iteration root is the
  +   * Document itself, since Document has no parent.)
      */
     public static final int SHOW_DOCUMENT = 0x00000100;
   
     /**
  -   * Show <code>DocumentType</code> nodes.
  +   * Show <code>DocumentType</code> nodes. 
      */
     public static final int SHOW_DOCUMENT_TYPE = 0x00000200;
   
     /**
  -   * Show <code>DocumentFragment</code> nodes.
  +   * Show <code>DocumentFragment</code> nodes. (Of course, as with
  +   * Attributes and such, this is meaningful only when the iteration
  +   * root is the Document itself, since DocumentFragment has no parent.)
      */
     public static final int SHOW_DOCUMENT_FRAGMENT = 0x00000400;
   
  @@ -86,17 +93,30 @@
      * <code>root</code>; in this case, it means that the
      * <code>Notation</code> node will appear in the first position of the
      * traversal. Since notations are not part of the document tree, they do
  -   * not appear when traversing over the document tree.
  +   * not appear when traversing over the main document tree.
      */
     public static final int SHOW_NOTATION = 0x00000800;
     
  -  /** This bit specifies a namespace, and extends the SHOW_XXX stuff 
  -   *  in {@link org.w3c.dom.traversal.NodeFilter}. */
  +  /**
  +
  +   * This bit instructs the iterator to show namespace nodes, which
  +   * are modeled by DTM but not by the DOM.  Make sure this does not
  +   * conflict with {@link org.w3c.dom.traversal.NodeFilter}.
  +   * <p>
  +   * 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.
  +   */
     public static final int SHOW_NAMESPACE = 0x00001000;
   
     /**
  -   * Special bitmap for match patterns starting with a function.
  -   * Make sure this does not conflict with {@link org.w3c.dom.traversal.NodeFilter}.
  +   * Special bit for filters implementing match patterns starting with
  +   * a function.  Make sure this does not conflict with
  +   * {@link org.w3c.dom.traversal.NodeFilter}.
  +   * <p>
  +   * 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.
      */
     public static final int SHOW_BYFUNCTION = 0x00010000;
   
  @@ -119,14 +139,19 @@
      * will be called by the implementation of <code>DTMIterator</code>; 
      * it is not normally called directly from
      * user code.
  +   * <p>
  +   * Issue: Is 0xFFFF really better than '*'? 
  +   * <p>
  +   * Issue: Should this be setNameMatch(expandedName) followed by
  +   * normal accept()? Or will we really be testing a different name at
  +   * every invocation?
      * 
      * @param nodeHandle int Handle of the node.
      * @param whatToShow one of SHOW_XXX values.
      * @param expandedName a value defining the exanded name as defined in 
      *                     the DTM interface.  Wild cards will be defined 
      *                     by 0xFFFF in the high word and/or in the low word.
  -   * @return one of FILTER_ACCEPT, FILTER_REJECT, or FILTER_SKIP.
  -   */
  +   * @return one of FILTER_ACCEPT, FILTER_REJECT, or FILTER_SKIP.  */
     public short acceptNode(int nodeHandle, int whatToShow, int expandedName);
    
  -}
  \ No newline at end of file
  +}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org