org.apache.xalan.templates
Class WhiteSpaceInfo

java.lang.Object
  extended byorg.apache.xml.utils.UnImplNode
      extended byorg.apache.xalan.templates.ElemTemplateElement
          extended byorg.apache.xalan.templates.ElemTemplate
              extended byorg.apache.xalan.templates.WhiteSpaceInfo
All Implemented Interfaces:
org.w3c.dom.Document, org.w3c.dom.Element, ExpressionNode, org.w3c.dom.Node, org.w3c.dom.NodeList, PrefixResolver, Serializable, javax.xml.transform.SourceLocator, WhitespaceStrippingElementMatcher, XSLTVisitable
Direct Known 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.

See Also:
Serialized Form

Field Summary
private  boolean m_shouldStripSpace
          Flag indicating whether whitespaces should be stripped.
 
Fields inherited from class org.apache.xalan.templates.ElemTemplate
m_frameSize, m_inArgsSize
 
Fields inherited from class org.apache.xalan.templates.ElemTemplateElement
m_docOrderNumber, m_firstChild, m_hasVariableDecl, m_nextSibling, m_parentNode, m_prefixTable
 
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, setLocaterInfo, setMatch, setMode, setName, setPriority, setStylesheet
 
Methods inherited from class org.apache.xalan.templates.ElemTemplateElement
accept, addOrReplaceDecls, appendChild, appendChild, callChildVisitors, callChildVisitors, callVisitors, canAcceptVariables, canStripWhiteSpace, compareTo, containsExcludeResultPrefix, error, error, executeNSDecls, executeNSDecls, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getBaseIdentifier, getChildNodes, getColumnNumber, getDeclaredPrefixes, getDOMBackPointer, getFirstChild, getFirstChildElem, getLastChild, getLastChildElem, getLength, getLineNumber, getLocalName, getNamespaceForPrefix, getNamespaceForPrefix, getNextSibling, getNextSiblingElem, getNodeType, getOwnerDocument, getOwnerXSLTemplate, getParentElem, getParentNode, getParentNodeElem, getPrefixes, getPreviousSibling, getPreviousSiblingElem, getTagName, getUid, getXmlSpace, handlesNullPrefixes, hasChildNodes, hasTextLitOnly, hasVariableDecl, insertBefore, isCompiledTemplate, isValidNCName, item, needToCheckExclude, removeChild, replaceChild, replaceChild, resolvePrefixTables, runtimeInit, setDOMBackPointer, setParentElem, setPrefixes, setPrefixes, setUid, setXmlSpace, shouldStripWhiteSpace, unexecuteNSDecls, unexecuteNSDecls
 
Methods inherited from class org.apache.xml.utils.UnImplNode
adoptNode, appendData, cloneNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getEncoding, getImplementation, getNamespaceURI, getNodeValue, getOwnerElement, getPrefix, getSpecified, getStandalone, getStrictErrorChecking, getVersion, hasAttribute, hasAttributeNS, hasAttributes, importNode, insertData, isSupported, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceData, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setEncoding, setNodeValue, setPrefix, setStandalone, setStrictErrorChecking, setValue, setVersion, splitText, substringData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_shouldStripSpace

private boolean m_shouldStripSpace
Flag indicating whether whitespaces should be stripped.

Constructor Detail

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 Detail

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 class ElemTemplate
Parameters:
root - The root stylesheet for this transformation.