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