org.apache.xml.utils
Interface DTMFilter


public interface DTMFilter

Simple filter for doing node tests. Note the semantics of this are somewhat different that the DOM's NodeFilter.


Field Summary
static int SHOW_ALL
          Show all Nodes.
static int SHOW_ATTRIBUTE
          Show Attr nodes.
static int SHOW_BYFUNCTION
          Special bitmap for match patterns starting with a function.
static int SHOW_CDATA_SECTION
          Show CDATASection nodes.
static int SHOW_COMMENT
          Show Comment nodes.
static int SHOW_DOCUMENT
          Show Document nodes.
static int SHOW_DOCUMENT_FRAGMENT
          Show DocumentFragment nodes.
static int SHOW_DOCUMENT_TYPE
          Show DocumentType nodes.
static int SHOW_ELEMENT
          Show Element nodes.
static int SHOW_ENTITY
          Show Entity nodes.
static int SHOW_ENTITY_REFERENCE
          Show EntityReference nodes.
static int SHOW_NAMESPACE
          This bit specifies a namespace, and extends the SHOW_XXX stuff in NodeFilter.
static int SHOW_NOTATION
          Show Notation nodes.
static int SHOW_PROCESSING_INSTRUCTION
          Show ProcessingInstruction nodes.
static int SHOW_TEXT
          Show Text nodes.
 
Method Summary
 short acceptNode(int nodeHandle, int whatToShow)
          Test whether a specified node is visible in the logical view of a DTMIterator.
 short acceptNode(int nodeHandle, int whatToShow, int expandedName)
          Test whether a specified node is visible in the logical view of a DTMIterator.
 

Field Detail

SHOW_ALL

public static final int SHOW_ALL
Show all Nodes.

SHOW_ELEMENT

public static final int SHOW_ELEMENT
Show Element nodes.

SHOW_ATTRIBUTE

public static final int SHOW_ATTRIBUTE
Show Attr nodes. This is meaningful only when creating an iterator or tree-walker with an attribute node as its root; 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.

SHOW_TEXT

public static final int SHOW_TEXT
Show Text nodes.

SHOW_CDATA_SECTION

public static final int SHOW_CDATA_SECTION
Show CDATASection nodes.

SHOW_ENTITY_REFERENCE

public static final int SHOW_ENTITY_REFERENCE
Show EntityReference nodes.

SHOW_ENTITY

public static final int SHOW_ENTITY
Show Entity nodes. This is meaningful only when creating an iterator or tree-walker with an Entity node as its root; in this case, it means that the Entity 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.

SHOW_PROCESSING_INSTRUCTION

public static final int SHOW_PROCESSING_INSTRUCTION
Show ProcessingInstruction nodes.

SHOW_COMMENT

public static final int SHOW_COMMENT
Show Comment nodes.

SHOW_DOCUMENT

public static final int SHOW_DOCUMENT
Show Document nodes.

SHOW_DOCUMENT_TYPE

public static final int SHOW_DOCUMENT_TYPE
Show DocumentType nodes.

SHOW_DOCUMENT_FRAGMENT

public static final int SHOW_DOCUMENT_FRAGMENT
Show DocumentFragment nodes.

SHOW_NOTATION

public static final int SHOW_NOTATION
Show Notation nodes. This is meaningful only when creating an iterator or tree-walker with a Notation node as its root; in this case, it means that the Notation 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.

SHOW_NAMESPACE

public static final int SHOW_NAMESPACE
This bit specifies a namespace, and extends the SHOW_XXX stuff in NodeFilter.

SHOW_BYFUNCTION

public static final int SHOW_BYFUNCTION
Special bitmap for match patterns starting with a function. Make sure this does not conflict with NodeFilter.
Method Detail

acceptNode

public short acceptNode(int nodeHandle,
                        int whatToShow)
Test whether a specified node is visible in the logical view of a DTMIterator. Normally, this function will be called by the implementation of DTMIterator; it is not normally called directly from user code.
Parameters:
nodeHandle - int Handle of the node.
whatToShow - one of SHOW_XXX values.
Returns:
one of FILTER_ACCEPT, FILTER_REJECT, or FILTER_SKIP.

acceptNode

public short acceptNode(int nodeHandle,
                        int whatToShow,
                        int expandedName)
Test whether a specified node is visible in the logical view of a DTMIterator. Normally, this function will be called by the implementation of DTMIterator; it is not normally called directly from user code.
Parameters:
nodeHandle - int Handle of the node.
whatToShow - one of SHOW_XXX values.
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.
Returns:
one of FILTER_ACCEPT, FILTER_REJECT, or FILTER_SKIP.


Copyright © 2000 Apache XML Project. All Rights Reserved.