net.sf.saxon.style
Class StyleElement

java.lang.Object
  extended by net.sf.saxon.tree.NodeImpl
      extended by net.sf.saxon.tree.ElementImpl
          extended by net.sf.saxon.tree.ElementWithAttributes
              extended by net.sf.saxon.style.StyleElement
All Implemented Interfaces:
Source, SourceLocator, LocationProvider, SaxonLocator, Container, FingerprintedNode, Item, NodeInfo, ValueRepresentation, InstructionInfo, Locator
Direct Known Subclasses:
AbsentExtensionElement, ExtensionInstruction, LiteralResultElement, SaxonCollation, SaxonDoctype, SaxonEntityRef, SaxonImportQuery, SaxonScript, SaxonWhile, XSLAnalyzeString, XSLApplyImports, XSLApplyTemplates, XSLAttributeSet, XSLCallTemplate, XSLCharacterMap, XSLChoose, XSLCopy, XSLCopyOf, XSLDecimalFormat, XSLDocument, XSLElement, XSLFallback, XSLForEach, XSLForEachGroup, XSLFunction, XSLGeneralIncorporate, XSLGeneralVariable, XSLIf, XSLImportSchema, XSLKey, XSLMatchingSubstring, XSLMessage, XSLNamespaceAlias, XSLNextMatch, XSLNumber, XSLOtherwise, XSLOutput, XSLOutputCharacter, XSLPerformSort, XSLPreserveSpace, XSLResultDocument, XSLSequence, XSLSort, XSLStringConstructor, XSLStylesheet, XSLTemplate, XSLWhen

public abstract class StyleElement
extends ElementWithAttributes
implements Locator, Container, InstructionInfo

Abstract superclass for all element nodes in the stylesheet.
Note: this class implements Locator. The element retains information about its own location in the stylesheet, which is useful when an XSL error is found.


Field Summary
static int REPORT_ALWAYS
           
static int REPORT_IF_INSTANTIATED
           
static int REPORT_UNLESS_FALLBACK_AVAILABLE
           
static int REPORT_UNLESS_FORWARDS_COMPATIBLE
           
 
Fields inherited from class net.sf.saxon.tree.NodeImpl
NODE_LETTER
 
Fields inherited from interface net.sf.saxon.om.NodeInfo
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
 
Fields inherited from interface net.sf.saxon.om.ValueRepresentation
EMPTY_VALUE_ARRAY
 
Constructor Summary
StyleElement()
          Constructor
 
Method Summary
 void addChild(NodeImpl node, int index)
          Add a child node to this node.
 int allocateLocationId(String systemId, int lineNumber)
          Allocate a location identifier
 void allocatePatternSlots(Pattern match, SlotManager frame)
          Allocate space for range variables within predicates in the match pattern.
 void allocateSlots(Expression exp)
          Allocate slots in the local stack frame to range variables used in an XPath expression
 void allocateSlots(Pattern pattern)
          Allocate slots to any variables used within a pattern.
 boolean backwardsCompatibleModeIsEnabled()
          Determine whether backwards-compatible mode is enabled for this element
 XSLVariableDeclaration bindVariable(int fingerprint)
          Bind a variable used in this element to the compiled form of the XSLVariable element in which it is declared
 void checkEmpty()
          Convenience method to check that the stylesheet element is empty
 void checkTopLevel(String errorCode)
          Convenience method to check that the stylesheet element is at the top level
 void checkWithinTemplate()
          Check that the stylesheet element is within a sequence constructor
 void compact(int size)
          Compact the space used by this node
abstract  Expression compile(Executable exec)
          Compile the instruction on the stylesheet tree into an executable instruction for use at run-time.
 Expression compileSequenceConstructor(Executable exec, AxisIterator iter, boolean includeParams)
          Compile the children of this instruction on the stylesheet tree, adding the subordinate instructions to the parent instruction on the execution tree.
 AxisIterator enumerateChildren(NodeTest test)
          Get an enumeration of the children of this node
 void fixupReferences()
          Fix up references from XPath expressions.
 boolean forwardsCompatibleModeIsEnabled()
          Determine whether forwards-compatible mode is enabled for this element
 String getAttributeValue(String clarkName)
          Get an attribute value given the Clark name of the attribute (that is, the name in {uri}local format).
 int getConstructType()
          Get the type of construct.
 SlotManager getContainingSlotManager()
          Get the SlotManager for the containing Procedure definition
 XSLStylesheet getContainingStylesheet()
          Get the containing XSLStylesheet element
 Executable getExecutable()
          Get the Executable (representing a complete stylesheet or query) of which this Container forms part
 NodeInfo getFirstChild()
          Get the first child node of the element
 int getHostLanguage()
          Get the host language (XSLT, XQuery, XPath) used to implement the code in this container
 NodeInfo getLastChild()
          Get the last child node of the element
 int getLineNumber()
          Get the line number of the node within its source document entity
 int getLineNumber(int locationId)
          Get the line number within the document or module containing a particular location
 LocationProvider getLocationProvider()
          Get the LocationProvider allowing location identifiers to be resolved.
 NamespaceResolver getNamespaceResolver()
          Get the namespace context of the instruction.
 int getObjectFingerprint()
          Get a fingerprint identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc.
 int getObjectNameCode()
          Get a name identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc.
 int getPrecedence()
          Get the import precedence of this stylesheet element.
 PreparedStylesheet getPreparedStylesheet()
          Get the PreparedStylesheet object.
 Iterator getProperties()
          Get an iterator over all the properties available.
 Object getProperty(String name)
          Get the value of a particular property of the instruction.
 SchemaType getSchemaType(String typeAtt)
          Get the Schema type definition for a type named in the stylesheet (in a "type" attribute).
 StaticContext getStaticContext()
          Get the static context for expressions on this element
 String getStringValue()
          Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.
 CharSequence getStringValueCS()
          Get the value of the item as a CharSequence.
 XSLFunction getStylesheetFunction(int fingerprint, int arity)
          Get a FunctionCall declared using an xsl:function element in the stylesheet
 String getSystemId(int locationId)
          Get the URI of the document or module containing a particular location
 NamePool getTargetNamePool()
          Get the namepool to be used at run-time, this namepool holds the names used in all XPath expressions and patterns
 int getTypeAnnotation(SchemaType schemaType)
          Get the type annotation to use for a given schema type
 BigDecimal getVersion()
          Get the numeric value of the version number on this element, or inherited from its ancestors
 boolean hasChildNodes()
          Determine if the node has any children.
 boolean isExcludedNamespace(short uriCode)
          Check whether a namespace uri defines an namespace excluded from the result.
 boolean isExtensionNamespace(short uriCode)
          Check whether a namespace uri defines an extension element.
 boolean isInstruction()
          Determine whether this node is an instruction.
 boolean isTopLevel()
          Test whether this is a top-level element
 Expression makeAttributeValueTemplate(String expression)
          Make an attribute value template in the context of this stylesheet element
 Expression makeExpression(String expression)
          Make an expression in the context of this stylesheet element
 int makeNameCode(String qname)
          Make a NameCode, using this Element as the context for namespace resolution, and registering the code in the namepool.
 SavedNamespaceContext makeNamespaceContext()
          Make a NamespaceContext object representing the list of in-scope namespaces.
 Pattern makePattern(String pattern)
          Make a pattern in the context of this stylesheet element
 SequenceType makeSequenceType(String sequenceType)
          Process an attribute whose value is a SequenceType
 void markTailCalls()
          Mark tail-recursive calls on templates and functions.
 boolean mayContainFallback()
          Determine whether this type of element is allowed to contain an xsl:fallback instruction
 boolean mayContainSequenceConstructor()
          Determine whether this type of element is allowed to contain a sequence constructor
 void postValidate()
          Hook to allow additional validation of a parent element immediately after its children have been validated.
abstract  void prepareAttributes()
          Set the attribute list for the element.
 void processAllAttributes()
          Process the attributes of this element and all its children
 void processAttributes()
          Process the attribute list for the element.
 boolean replaceSubExpression(Expression original, Expression replacement)
          Replace one subexpression by a replacement subexpression
 void reportAbsence(String attribute)
          Convenience method to report the absence of a mandatory attribute
 void setLineNumber(int lineNumber)
          Set the line number of the element within its source document entity
 void setObjectNameCode(int nameCode)
          Set the object name code
 void substituteFor(StyleElement temp)
          Make this node a substitute for a temporary one previously added to the tree.
 Expression typeCheck(String name, Expression exp)
          Type-check an expression.
 Pattern typeCheck(String name, Pattern pattern)
          Type-check a pattern.
 void useChildrenArray(NodeImpl[] array)
          Supply an array to be used for the array of children.
 void validate()
          Check that the stylesheet element is valid.
 void validateSubtree()
          Recursive walk through the stylesheet to validate all nodes
 
Methods inherited from class net.sf.saxon.tree.ElementWithAttributes
copy, getAttributeList, getAttributeValue, getDeclaredNamespaces, getInScopeNamespaceCodes, getPrefixForURI, getURICodeForPrefix, getURIForPrefix, initialise, iteratePrefixes, sendNamespaceDeclarations, setNamespaceDeclarations
 
Methods inherited from class net.sf.saxon.tree.ElementImpl
generateId, getBaseURI, getDocumentRoot, getNameCode, getNodeKind, getRoot, getSystemId, setNameCode, setSystemId
 
Methods inherited from class net.sf.saxon.tree.NodeImpl
atomize, compareOrder, equals, getColumnNumber, getConfiguration, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNamePool, getNextInDocument, getNextSibling, getParent, getPrefix, getPreviousInDocument, getPreviousSibling, getPublicId, getTypeAnnotation, getTypedValue, getURI, hashCode, isSameNodeInfo, iterateAxis, iterateAxis
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.saxon.trace.InstructionInfo
getSystemId
 

Field Detail

REPORT_ALWAYS

public static final int REPORT_ALWAYS
See Also:
Constant Field Values

REPORT_UNLESS_FORWARDS_COMPATIBLE

public static final int REPORT_UNLESS_FORWARDS_COMPATIBLE
See Also:
Constant Field Values

REPORT_IF_INSTANTIATED

public static final int REPORT_IF_INSTANTIATED
See Also:
Constant Field Values

REPORT_UNLESS_FALLBACK_AVAILABLE

public static final int REPORT_UNLESS_FALLBACK_AVAILABLE
See Also:
Constant Field Values
Constructor Detail

StyleElement

public StyleElement()
Constructor

Method Detail

getExecutable

public Executable getExecutable()
Description copied from interface: Container
Get the Executable (representing a complete stylesheet or query) of which this Container forms part

Specified by:
getExecutable in interface Container

getLocationProvider

public LocationProvider getLocationProvider()
Get the LocationProvider allowing location identifiers to be resolved.

Specified by:
getLocationProvider in interface Container

getTargetNamePool

public NamePool getTargetNamePool()
Get the namepool to be used at run-time, this namepool holds the names used in all XPath expressions and patterns


getStaticContext

public StaticContext getStaticContext()
Get the static context for expressions on this element

Returns:
the static context

getLineNumber

public int getLineNumber()
Description copied from class: ElementImpl
Get the line number of the node within its source document entity

Specified by:
getLineNumber in interface SourceLocator
Specified by:
getLineNumber in interface NodeInfo
Specified by:
getLineNumber in interface InstructionInfo
Specified by:
getLineNumber in interface Locator
Overrides:
getLineNumber in class ElementImpl
Returns:
the line number of the node in its original source document; or -1 if not available

setLineNumber

public void setLineNumber(int lineNumber)
Description copied from class: ElementImpl
Set the line number of the element within its source document entity

Overrides:
setLineNumber in class ElementImpl

substituteFor

public void substituteFor(StyleElement temp)
Make this node a substitute for a temporary one previously added to the tree. See StyleNodeFactory for details. "A node like the other one in all things but its class". Note that at this stage, the node will not yet be known to its parent, though it will contain a reference to its parent; and it will have no children.


isInstruction

public boolean isInstruction()
Determine whether this node is an instruction. The default implementation says it isn't.


markTailCalls

public void markTailCalls()
Mark tail-recursive calls on templates and functions. For most instructions, this does nothing.


mayContainSequenceConstructor

public boolean mayContainSequenceConstructor()
Determine whether this type of element is allowed to contain a sequence constructor


mayContainFallback

public boolean mayContainFallback()
Determine whether this type of element is allowed to contain an xsl:fallback instruction


getContainingStylesheet

public XSLStylesheet getContainingStylesheet()
Get the containing XSLStylesheet element


getPrecedence

public int getPrecedence()
Get the import precedence of this stylesheet element.


makeNameCode

public final int makeNameCode(String qname)
                       throws XPathException,
                              NamespaceException
Make a NameCode, using this Element as the context for namespace resolution, and registering the code in the namepool. If the name is unprefixed, the default namespace is not used.

Parameters:
qname - The name as written, in the form "[prefix:]localname". The name must have already been validated as a syntactically-correct QName.
Throws:
XPathException - if the qname is not a lexically-valid QName, or if the name is in a reserved namespace.
NamespaceException - if the prefix of the qname has not been declared

makeNamespaceContext

public SavedNamespaceContext makeNamespaceContext()
Make a NamespaceContext object representing the list of in-scope namespaces. The NamePool used for numeric codes in the NamespaceContext will be the target name pool.


processAllAttributes

public void processAllAttributes()
                          throws XPathException
Process the attributes of this element and all its children

Throws:
XPathException

getAttributeValue

public String getAttributeValue(String clarkName)
Get an attribute value given the Clark name of the attribute (that is, the name in {uri}local format).


processAttributes

public final void processAttributes()
                             throws XPathException
Process the attribute list for the element. This is a wrapper method that calls prepareAttributes (provided in the subclass) and traps any exceptions

Throws:
XPathException

prepareAttributes

public abstract void prepareAttributes()
                                throws XPathException
Set the attribute list for the element. This is called to process the attributes (note the distinction from processAttributes in the superclass). Must be supplied in a subclass

Throws:
XPathException

makeExpression

public Expression makeExpression(String expression)
                          throws XPathException
Make an expression in the context of this stylesheet element

Throws:
XPathException

makePattern

public Pattern makePattern(String pattern)
                    throws XPathException
Make a pattern in the context of this stylesheet element

Throws:
XPathException

makeAttributeValueTemplate

public Expression makeAttributeValueTemplate(String expression)
                                      throws XPathException
Make an attribute value template in the context of this stylesheet element

Throws:
XPathException

makeSequenceType

public SequenceType makeSequenceType(String sequenceType)
                              throws XPathException
Process an attribute whose value is a SequenceType

Throws:
XPathException

getVersion

public BigDecimal getVersion()
Get the numeric value of the version number on this element, or inherited from its ancestors


forwardsCompatibleModeIsEnabled

public boolean forwardsCompatibleModeIsEnabled()
Determine whether forwards-compatible mode is enabled for this element


backwardsCompatibleModeIsEnabled

public boolean backwardsCompatibleModeIsEnabled()
Determine whether backwards-compatible mode is enabled for this element


isExtensionNamespace

public boolean isExtensionNamespace(short uriCode)
Check whether a namespace uri defines an extension element. This checks whether the namespace is defined as an extension namespace on this or any ancestor node.

Parameters:
uriCode - the namespace URI code being tested

isExcludedNamespace

public boolean isExcludedNamespace(short uriCode)
Check whether a namespace uri defines an namespace excluded from the result. This checks whether the namespace is defined as an excluded namespace on this or any ancestor node.

Parameters:
uriCode - the code of the namespace URI being tested

getSchemaType

public SchemaType getSchemaType(String typeAtt)
                         throws XPathException
Get the Schema type definition for a type named in the stylesheet (in a "type" attribute).

Throws:
XPathException - if the type is not declared in an imported schema, or is not a built-in type

getTypeAnnotation

public int getTypeAnnotation(SchemaType schemaType)
Get the type annotation to use for a given schema type


validate

public void validate()
              throws XPathException
Check that the stylesheet element is valid. This is called once for each element, after the entire tree has been built. As well as validation, it can perform first-time initialisation. The default implementation does nothing; it is normally overriden in subclasses.

Throws:
XPathException

postValidate

public void postValidate()
                  throws XPathException
Hook to allow additional validation of a parent element immediately after its children have been validated.

Throws:
XPathException

typeCheck

public Expression typeCheck(String name,
                            Expression exp)
                     throws XPathException
Type-check an expression. This is called to check each expression while the containing instruction is being validated. It is not just a static type-check, it also adds code to perform any necessary run-time type checking and/or conversion.

Throws:
XPathException

allocateSlots

public void allocateSlots(Expression exp)
Allocate slots in the local stack frame to range variables used in an XPath expression

Parameters:
exp - the XPath expression for which slots are to be allocated

allocateSlots

public void allocateSlots(Pattern pattern)
Allocate slots to any variables used within a pattern. This is needed only for "free-standing" patterns such as template match or key match; other cases are handed by the containing PatternSponsor


allocatePatternSlots

public void allocatePatternSlots(Pattern match,
                                 SlotManager frame)
Allocate space for range variables within predicates in the match pattern. The xsl:template element has no XPath expressions among its attributes, so if this method is called on this object it can only be because there are variables used in the match pattern. We work out how many slots are needed for the match pattern in each template rule, and then apply-templates can allocate a stack frame that is large enough for the most demanding match pattern in the entire stylesheet.


typeCheck

public Pattern typeCheck(String name,
                         Pattern pattern)
                  throws XPathException
Type-check a pattern. This is called to check each pattern while the containing instruction is being validated. It is not just a static type-check, it also adds code to perform any necessary run-time type checking and/or conversion.

Throws:
XPathException

fixupReferences

public void fixupReferences()
                     throws XPathException
Fix up references from XPath expressions. Overridden for function declarations and variable declarations

Throws:
XPathException

getContainingSlotManager

public SlotManager getContainingSlotManager()
Get the SlotManager for the containing Procedure definition

Returns:
the SlotManager associated with the containing Function, Template, etc, or null if there is no such containing Function, Template etc.

validateSubtree

public void validateSubtree()
                     throws XPathException
Recursive walk through the stylesheet to validate all nodes

Throws:
XPathException

getPreparedStylesheet

public PreparedStylesheet getPreparedStylesheet()
Get the PreparedStylesheet object.

Returns:
the PreparedStylesheet to which this stylesheet element belongs

checkWithinTemplate

public void checkWithinTemplate()
                         throws XPathException
Check that the stylesheet element is within a sequence constructor

Throws:
XPathException - if not within a sequence constructor

checkTopLevel

public void checkTopLevel(String errorCode)
                   throws XPathException
Convenience method to check that the stylesheet element is at the top level

Throws:
XPathException - if not at top level

checkEmpty

public void checkEmpty()
                throws XPathException
Convenience method to check that the stylesheet element is empty

Throws:
XPathException - if it is not empty

reportAbsence

public void reportAbsence(String attribute)
                   throws XPathException
Convenience method to report the absence of a mandatory attribute

Throws:
XPathException - if the attribute is missing

compile

public abstract Expression compile(Executable exec)
                            throws XPathException
Compile the instruction on the stylesheet tree into an executable instruction for use at run-time.

Returns:
either a ComputedExpression, or null. The value null is returned when compiling an instruction that returns a no-op, or when compiling a top-level object such as an xsl:template that compiles into something other than an instruction.
Throws:
XPathException

compileSequenceConstructor

public Expression compileSequenceConstructor(Executable exec,
                                             AxisIterator iter,
                                             boolean includeParams)
                                      throws XPathException
Compile the children of this instruction on the stylesheet tree, adding the subordinate instructions to the parent instruction on the execution tree.

Returns:
the array of children
Throws:
XPathException

allocateLocationId

public int allocateLocationId(String systemId,
                              int lineNumber)
Allocate a location identifier


isTopLevel

public boolean isTopLevel()
Test whether this is a top-level element


bindVariable

public XSLVariableDeclaration bindVariable(int fingerprint)
                                    throws StaticError
Bind a variable used in this element to the compiled form of the XSLVariable element in which it is declared

Parameters:
fingerprint - The fingerprint of the name of the variable
Returns:
the XSLVariableDeclaration (that is, an xsl:variable or xsl:param instruction) for the variable
Throws:
StaticError - if the variable has not been declared

getStylesheetFunction

public XSLFunction getStylesheetFunction(int fingerprint,
                                         int arity)
Get a FunctionCall declared using an xsl:function element in the stylesheet

Parameters:
fingerprint - the fingerprint of the name of the function
arity - the number of arguments in the function call. The value -1 indicates that any arity will do (this is used to support the function-available() function).
Returns:
the XSLFunction object representing the function declaration in the stylesheet, or null if no such function is defined.

getConstructType

public int getConstructType()
Get the type of construct. This will be a constant in class Location. This method is part of the InstructionInfo interface

Specified by:
getConstructType in interface InstructionInfo

getObjectNameCode

public int getObjectNameCode()
Get a name identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc. This is used only where the name is known statically. If there is no name, the value will be -1.

Specified by:
getObjectNameCode in interface InstructionInfo

getObjectFingerprint

public int getObjectFingerprint()
Get a fingerprint identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc. This is used only where the name is known statically. If there is no name, the value will be -1.


setObjectNameCode

public void setObjectNameCode(int nameCode)
Set the object name code


getNamespaceResolver

public NamespaceResolver getNamespaceResolver()
Get the namespace context of the instruction.

Specified by:
getNamespaceResolver in interface InstructionInfo

getProperty

public Object getProperty(String name)
Get the value of a particular property of the instruction. This is part of the InstructionInfo interface for run-time tracing and debugging. The properties available include all the attributes of the source instruction (named by the attribute name): these are all provided as string values.

Specified by:
getProperty in interface InstructionInfo
Parameters:
name - The name of the required property
Returns:
The value of the requested property, or null if the property is not available

getProperties

public Iterator getProperties()
Get an iterator over all the properties available. The values returned by the iterator will be of type String, and each string can be supplied as input to the getProperty() method to retrieve the value of the property.

Specified by:
getProperties in interface InstructionInfo

getSystemId

public String getSystemId(int locationId)
Description copied from interface: LocationProvider
Get the URI of the document or module containing a particular location

Specified by:
getSystemId in interface LocationProvider
Parameters:
locationId - identifier of the location in question (as passed down the Receiver pipeline)
Returns:
the URI of the document or module.

getLineNumber

public int getLineNumber(int locationId)
Description copied from interface: LocationProvider
Get the line number within the document or module containing a particular location

Specified by:
getLineNumber in interface LocationProvider
Parameters:
locationId - identifier of the location in question (as passed down the Receiver pipeline)
Returns:
the line number within the document or module.

getHostLanguage

public int getHostLanguage()
Get the host language (XSLT, XQuery, XPath) used to implement the code in this container

Specified by:
getHostLanguage in interface Container
Returns:
typically Configuration.XSLT or Configuration.XQUERY

replaceSubExpression

public boolean replaceSubExpression(Expression original,
                                    Expression replacement)
Replace one subexpression by a replacement subexpression

Specified by:
replaceSubExpression in interface Container
Parameters:
original - the original subexpression
replacement - the replacement subexpression
Returns:
true if the original subexpression is found

hasChildNodes

public final boolean hasChildNodes()
Determine if the node has any children.

Specified by:
hasChildNodes in interface NodeInfo
Overrides:
hasChildNodes in class NodeImpl
Returns:
true if the node has any children, false if the node has no children.

enumerateChildren

public final AxisIterator enumerateChildren(NodeTest test)
Get an enumeration of the children of this node

Parameters:
test - A NodeTest to be satisfied by the child nodes, or null if all child node are to be returned

getFirstChild

public final NodeInfo getFirstChild()
Get the first child node of the element

Overrides:
getFirstChild in class NodeImpl
Returns:
the first child node of the required type, or null if there are no children

getLastChild

public final NodeInfo getLastChild()
Get the last child node of the element

Overrides:
getLastChild in class NodeImpl
Returns:
the last child of the element, or null if there are no children

getStringValue

public String getStringValue()
Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.

Returns:
the accumulated character content of the element, including descendant elements.
See Also:
Item.getStringValueCS()

getStringValueCS

public CharSequence getStringValueCS()
Description copied from class: NodeImpl
Get the value of the item as a CharSequence. This is in some cases more efficient than the version of the method that returns a String.

Specified by:
getStringValueCS in interface Item
Specified by:
getStringValueCS in interface ValueRepresentation
Overrides:
getStringValueCS in class NodeImpl
Returns:
the string value of the item
See Also:
Item.getStringValue()

useChildrenArray

public void useChildrenArray(NodeImpl[] array)
Supply an array to be used for the array of children. For system use only.


addChild

public void addChild(NodeImpl node,
                     int index)
Add a child node to this node. For system use only. Note: normalizing adjacent text nodes is the responsibility of the caller.


compact

public void compact(int size)
Compact the space used by this node



Copyright (C) Michael H. Kay. All rights reserved.