01: /*
02: * Copyright 1999-2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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 org.apache.xml.dtm;
20:
21: /**
22: * This interface is meant to be implemented by a client of the DTM, and allows
23: * stripping of whitespace nodes.
24: */
25: public interface DTMWSFilter {
26: /**
27: * Do not strip whitespace child nodes of this element.
28: */
29: public static final short NOTSTRIP = 1;
30:
31: /**
32: * Strip whitespace child nodes of this element.
33: */
34: public static final short STRIP = 2;
35:
36: /**
37: * Inherit whitespace stripping behavior of the parent node.
38: */
39: public static final short INHERIT = 3;
40:
41: /**
42: * Test whether whitespace-only text nodes are visible in the logical
43: * view of <code>DTM</code>. Normally, this function
44: * will be called by the implementation of <code>DTM</code>;
45: * it is not normally called directly from
46: * user code.
47: *
48: * @param elementHandle int Handle of the element.
49: * @return one of NOTSTRIP, STRIP, or INHERIT.
50: */
51: public short getShouldStripSpace(int elementHandle, DTM dtm);
52:
53: }
|