KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xpath > WhitespaceStrippingElementMatcher


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: WhitespaceStrippingElementMatcher.java,v 1.4 2004/02/17 04:30:02 minchau Exp $
18  */

19 package org.apache.xpath;
20
21 import javax.xml.transform.TransformerException JavaDoc;
22
23 import org.w3c.dom.Element JavaDoc;
24
25 /**
26  * A class that implements this interface can tell if a given element should
27  * strip whitespace nodes from it's children.
28  */

29 public interface WhitespaceStrippingElementMatcher
30 {
31   /**
32    * Get information about whether or not an element should strip whitespace.
33    * @see <a HREF="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
34    *
35    * @param support The XPath runtime state.
36    * @param targetElement Element to check
37    *
38    * @return true if the whitespace should be stripped.
39    *
40    * @throws TransformerException
41    */

42   public boolean shouldStripWhiteSpace(
43           XPathContext support, Element JavaDoc targetElement) throws TransformerException JavaDoc;
44   
45   /**
46    * Get information about whether or not whitespace can be stripped.
47    * @see <a HREF="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
48    *
49    * @return true if the whitespace can be stripped.
50    */

51   public boolean canStripWhiteSpace();
52 }
53
Popular Tags