1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*
  17. * $Id: DTMWSFilter.java,v 1.4 2004/02/16 23:03:44 minchau Exp $
  18. */
  19. package com.sun.org.apache.xml.internal.dtm;
  20. /**
  21. * This interface is meant to be implemented by a client of the DTM, and allows
  22. * stripping of whitespace nodes.
  23. */
  24. public interface DTMWSFilter
  25. {
  26. /**
  27. * Do not strip whitespace child nodes of this element.
  28. */
  29. public static final short NOTSTRIP = 1;
  30. /**
  31. * Strip whitespace child nodes of this element.
  32. */
  33. public static final short STRIP = 2;
  34. /**
  35. * Inherit whitespace stripping behavior of the parent node.
  36. */
  37. public static final short INHERIT = 3;
  38. /**
  39. * Test whether whitespace-only text nodes are visible in the logical
  40. * view of <code>DTM</code>. Normally, this function
  41. * will be called by the implementation of <code>DTM</code>
  42. * it is not normally called directly from
  43. * user code.
  44. *
  45. * @param elementHandle int Handle of the element.
  46. * @return one of NOTSTRIP, STRIP, or INHERIT.
  47. */
  48. public short getShouldStripSpace(int elementHandle, DTM dtm);
  49. }