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 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 /** 28 * Do not strip whitespace child nodes of this element. 29 */ 30 public static final short NOTSTRIP = 1; 31 32 /** 33 * Strip whitespace child nodes of this element. 34 */ 35 public static final short STRIP = 2; 36 37 /** 38 * Inherit whitespace stripping behavior of the parent node. 39 */ 40 public static final short INHERIT = 3; 41 42 /** 43 * Test whether whitespace-only text nodes are visible in the logical 44 * view of <code>DTM</code>. Normally, this function 45 * will be called by the implementation of <code>DTM</code>; 46 * it is not normally called directly from 47 * user code. 48 * 49 * @param elementHandle int Handle of the element. 50 * @return one of NOTSTRIP, STRIP, or INHERIT. 51 */ 52 public short getShouldStripSpace(int elementHandle, DTM dtm); 53 54 } 55