1. package org.apache.xml.dtm;
  2. /**
  3. * This interface is meant to be implemented by a client of the DTM, and allows
  4. * stripping of whitespace nodes.
  5. */
  6. public interface DTMWSFilter
  7. {
  8. /**
  9. * Do not strip whitespace child nodes of this element.
  10. */
  11. public static final short NOTSTRIP = 1;
  12. /**
  13. * Strip whitespace child nodes of this element.
  14. */
  15. public static final short STRIP = 2;
  16. /**
  17. * Inherit whitespace stripping behavior of the parent node.
  18. */
  19. public static final short INHERIT = 3;
  20. /**
  21. * Test whether whitespace-only text nodes are visible in the logical
  22. * view of <code>DTM</code>. Normally, this function
  23. * will be called by the implementation of <code>DTM</code>
  24. * it is not normally called directly from
  25. * user code.
  26. *
  27. * @param elementHandle int Handle of the element.
  28. * @return one of NOTSTRIP, STRIP, or INHERIT.
  29. */
  30. public short getShouldStripSpace(int elementHandle, DTM dtm);
  31. }