net.sf.saxon.tinytree

Class TinyBuilderCondensed

public class TinyBuilderCondensed extends TinyBuilder

Variant of the TinyBuilder to create a tiny tree in which multiple text nodes or attribute nodes sharing the same string value economize on space by only holding the value once.
Field Summary
IntHashMap<int[]>textValues
Method Summary
voidattribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
For attribute nodes, the commoning-up of stored values is achieved simply by calling intern() on the string value of the attribute.
protected intmakeTextNode(CharSequence chars, int len)
Create a text node.

Field Detail

textValues

public IntHashMap<int[]> textValues

Method Detail

attribute

public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
For attribute nodes, the commoning-up of stored values is achieved simply by calling intern() on the string value of the attribute.

makeTextNode

protected int makeTextNode(CharSequence chars, int len)
Create a text node. Separate method so it can be overridden

Parameters: chars the contents of the text node len the length of the text node