org.apache.xalan.templates

Class WhiteSpaceInfo

Implemented Interfaces:
Document, Element, ExpressionNode, Node, NodeList, PrefixResolver, Serializable, SourceLocator, WhitespaceStrippingElementMatcher, XSLTVisitable
Known Direct Subclasses:
WhitespaceInfoPaths

public class WhiteSpaceInfo
extends ElemTemplate

This is used as a special "fake" template that can be handled by the TemplateList to do pattern matching on nodes.

Nested Class Summary

Field Summary

Fields inherited from class org.apache.xalan.templates.ElemTemplate

m_frameSize

Fields inherited from interface org.w3c.dom.Node

ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

Constructor Summary

WhiteSpaceInfo(Stylesheet thisSheet)
Constructor WhiteSpaceInfo
WhiteSpaceInfo(XPath matchPattern, boolean shouldStripSpace, Stylesheet thisSheet)
Constructor WhiteSpaceInfo

Method Summary

boolean
getShouldStripSpace()
Return true if this element specifies that the node that matches the match pattern should be stripped, otherwise the space should be preserved.
void
recompose(StylesheetRoot root)
This function is called to recompose() all of the WhiteSpaceInfo elements.

Methods inherited from class org.apache.xalan.templates.ElemTemplate

compose, endCompose, execute, getMatch, getMode, getName, getNodeName, getPriority, getPublicId, getStylesheet, getStylesheetComposed, getStylesheetRoot, getSystemId, getXSLToken, recompose, setLocaterInfo, setMatch, setMode, setName, setPriority, setStylesheet

Methods inherited from class org.apache.xalan.templates.ElemTemplateElement

appendChild, appendChild, callVisitors, canAcceptVariables, canStripWhiteSpace, compareTo, compose, containsExcludeResultPrefix, endCompose, error, error, execute, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getBaseIdentifier, getChildNodes, getColumnNumber, getDOMBackPointer, getDeclaredPrefixes, getEndColumnNumber, getEndLineNumber, getFirstChild, getFirstChildElem, getLastChild, getLastChildElem, getLength, getLineNumber, getLocalName, getNamespaceForPrefix, getNamespaceForPrefix, getNextSibling, getNextSiblingElem, getNodeName, getNodeType, getOwnerDocument, getOwnerXSLTemplate, getParentElem, getParentNode, getParentNodeElem, getPrefixes, getPreviousSibling, getPreviousSiblingElem, getPublicId, getStylesheet, getStylesheetComposed, getStylesheetRoot, getSystemId, getTagName, getUid, getXSLToken, getXmlSpace, handlesNullPrefixes, hasChildNodes, hasTextLitOnly, hasVariableDecl, insertBefore, isCompiledTemplate, item, recompose, removeChild, replaceChild, replaceChild, resolvePrefixTables, runtimeInit, setDOMBackPointer, setEndLocaterInfo, setLocaterInfo, setParentElem, setPrefixes, setPrefixes, setUid, setXmlSpace, shouldStripWhiteSpace

Methods inherited from class org.apache.xml.utils.UnImplNode

adoptNode, appendChild, appendData, cloneNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, error, error, getAttribute, getAttributeNS, getAttributeNode, getAttributeNodeNS, getAttributes, getChildNodes, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getEncoding, getFirstChild, getImplementation, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getOwnerElement, getParentNode, getPrefix, getPreviousSibling, getSpecified, getStandalone, getStrictErrorChecking, getTagName, getVersion, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, importNode, insertBefore, insertData, isSupported, item, normalize, removeAttribute, removeAttributeNS, removeAttributeNode, removeChild, replaceChild, replaceData, setAttribute, setAttributeNS, setAttributeNode, setAttributeNodeNS, setData, setEncoding, setNodeValue, setPrefix, setStandalone, setStrictErrorChecking, setValue, setVersion, splitText, substringData

Constructor Details

WhiteSpaceInfo

public WhiteSpaceInfo(Stylesheet thisSheet)
Constructor WhiteSpaceInfo

Parameters:
thisSheet - The current stylesheet


WhiteSpaceInfo

public WhiteSpaceInfo(XPath matchPattern,
                      boolean shouldStripSpace,
                      Stylesheet thisSheet)
Constructor WhiteSpaceInfo

Parameters:
matchPattern - Match pattern
shouldStripSpace - Flag indicating whether or not to strip whitespaces
thisSheet - The current stylesheet

Method Details

getShouldStripSpace

public boolean getShouldStripSpace()
Return true if this element specifies that the node that matches the match pattern should be stripped, otherwise the space should be preserved.

Returns:
value of m_shouldStripSpace flag


recompose

public void recompose(StylesheetRoot root)
This function is called to recompose() all of the WhiteSpaceInfo elements.
Overrides:
recompose in interface ElemTemplate


Copyright B) 2004 Apache XML Project. All Rights Reserved.