|
Java example source code file (DOMWSFilter.java)
The DOMWSFilter.java Java example source code/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2002-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: DOMWSFilter.java,v 1.2.4.1 2005/09/06 06:14:31 pvedula Exp $
*/
package com.sun.org.apache.xalan.internal.xsltc.dom;
import com.sun.org.apache.xalan.internal.xsltc.DOM;
import com.sun.org.apache.xalan.internal.xsltc.DOMEnhancedForDTM;
import com.sun.org.apache.xalan.internal.xsltc.StripFilter;
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
import com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable;
import com.sun.org.apache.xml.internal.dtm.DTM;
import com.sun.org.apache.xml.internal.dtm.DTMWSFilter;
/**
* A wrapper class that adapts the
* {@link com.sun.org.apache.xml.internal.dtm.DTMWSFilter DTMWSFilter} interface to the XSLTC
* DOM {@link com.sun.org.apache.xalan.internal.xsltc.StripFilter StripFilter} interface.
*/
public class DOMWSFilter implements DTMWSFilter {
private AbstractTranslet m_translet;
private StripFilter m_filter;
// The Hashtable for DTM to mapping array
private Hashtable m_mappings;
// Cache the DTM and mapping that are used last time
private DTM m_currentDTM;
private short[] m_currentMapping;
/**
* Construct an adapter connecting the <code>DTMWSFilter interface
* to the <code>StripFilter interface.
*
* @param translet A translet that also implements the StripFilter
* interface.
*
* @see com.sun.org.apache.xml.internal.dtm.DTMWSFilter
* @see com.sun.org.apache.xalan.internal.xsltc.StripFilter
*/
public DOMWSFilter(AbstractTranslet translet) {
m_translet = translet;
m_mappings = new Hashtable();
if (translet instanceof StripFilter) {
m_filter = (StripFilter) translet;
}
}
/**
* Test whether whitespace-only text nodes are visible in the logical
* view of <code>DTM. Normally, this function
* will be called by the implementation of <code>DTM;
* it is not normally called directly from
* user code.
*
* @param node int handle of the node.
* @param dtm the DTM that owns this node
* @return one of <code>NOTSTRIP,
Other Java examples (source code examples)Here is a short list of links related to this Java DOMWSFilter.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.