|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.xsltc.runtime.AbstractTranslet
public abstract class AbstractTranslet
Field Summary | |
---|---|
private Hashtable |
_auxClasses
|
java.util.Vector |
_cdata
|
private int |
_currentRootForKeys
|
java.lang.String |
_doctypePublic
|
java.lang.String |
_doctypeSystem
|
private DOMCache |
_domCache
DOM cache handling |
protected org.w3c.dom.DOMImplementation |
_domImplementation
DOMImplementation caching for basis library |
private KeyIndex |
_emptyKeyIndex
|
java.lang.String |
_encoding
|
Hashtable |
_formatSymbols
Decimal number format symbol handling |
protected boolean |
_hasIdCall
|
boolean |
_indent
|
int |
_indentamount
|
private int |
_indexSize
|
private Hashtable |
_keyIndexes
Index(es) for |
java.lang.String |
_mediaType
|
java.lang.String |
_method
|
private MessageHandler |
_msgHandler
Message handling - implementation of |
boolean |
_omitHeader
|
java.lang.String |
_standalone
|
protected javax.xml.transform.Templates |
_templates
|
java.lang.String |
_version
|
static int |
CURRENT_TRANSLET_VERSION
|
private static java.lang.String |
EMPTYSTRING
|
static int |
FIRST_TRANSLET_VERSION
|
private static java.lang.String |
ID_INDEX_NAME
|
protected java.lang.String[] |
namesArray
|
protected java.lang.String[] |
namespaceArray
|
protected java.util.ArrayList |
paramsStack
|
protected int |
pbase
Parameter handling |
protected int |
pframe
Parameter handling |
protected StringValueHandler |
stringValueHandler
|
protected int |
transletVersion
|
protected int[] |
typesArray
|
protected java.lang.String[] |
urisArray
|
static int |
VER_SPLIT_NAMES_ARRAY
|
Constructor Summary | |
---|---|
AbstractTranslet()
|
Method Summary | |
---|---|
void |
addAuxiliaryClass(java.lang.Class auxClass)
|
void |
addCdataElement(java.lang.String name)
Add's a name of an element whose text contents should be output as CDATA |
void |
addDecimalFormat(java.lang.String name,
java.text.DecimalFormatSymbols symbols)
Adds a DecimalFormat object to the _formatSymbols hashtable. |
java.lang.Object |
addParameter(java.lang.String name,
java.lang.Object value)
Add a new global parameter if not already in the current frame. |
java.lang.Object |
addParameter(java.lang.String name,
java.lang.Object value,
boolean isDefault)
Add a new global or local parameter if not already in the current frame. |
private void |
buildIDIndex(DOM document)
Leverages the Key Class to implement the XSLT id() function. |
void |
buildKeyIndex(java.lang.String name,
DOM dom)
Create an empty KeyIndex in the DOM case |
void |
buildKeyIndex(java.lang.String name,
int node,
java.lang.Object value)
Adds a value to a key/id index |
void |
buildKeys(DOM document,
DTMAxisIterator iterator,
SerializationHandler handler,
int root)
This method builds key indexes - it is overridden in the compiled translet in cases where the |
void |
characters(java.lang.String string,
SerializationHandler handler)
Used by some compiled code as a shortcut for passing strings to the output handler |
void |
clearParameters()
Clears the parameter stack. |
void |
closeOutputHandler(SerializationHandler handler)
|
KeyIndex |
createKeyIndex()
Creates a KeyIndex object of the desired size - don't want to resize!!! |
void |
displayMessage(java.lang.String msg)
Pass a message to the message handler - used by Message class. |
java.lang.Class |
getAuxiliaryClass(java.lang.String className)
|
java.text.DecimalFormat |
getDecimalFormat(java.lang.String name)
Retrieves a named DecimalFormat object from _formatSymbols hashtable. |
DOMCache |
getDOMCache()
Returns the DOM cache used for this translet. |
KeyIndex |
getKeyIndex(java.lang.String name)
Returns the index for a given key (or id). |
java.lang.String[] |
getNamesArray()
|
java.lang.String[] |
getNamespaceArray()
|
java.lang.Object |
getParameter(java.lang.String name)
Get the value of a parameter from the current frame or null if undefined. |
javax.xml.transform.Templates |
getTemplates()
|
int[] |
getTypesArray()
|
java.lang.String[] |
getUrisArray()
|
boolean |
hasIdCall()
|
DOMAdapter |
makeDOMAdapter(DOM dom)
Wrap the initial input DOM in a dom adapter. |
org.w3c.dom.Document |
newDocument(java.lang.String uri,
java.lang.String qname)
|
SerializationHandler |
openOutputHandler(java.lang.String filename)
|
SerializationHandler |
openOutputHandler(java.lang.String filename,
boolean append)
Multiple output document extension. |
void |
popParamFrame()
Pop the topmost parameter frame. |
void |
postInitialization()
After constructing the translet object, this method must be called to perform any version-specific post-initialization that's required. |
void |
prepassDocument(DOM document)
Give the translet an opportunity to perform a prepass on the document to extract any information that it can store in an optimized form. |
void |
printInternalState()
Debugging |
void |
pushParamFrame()
Push a new parameter frame. |
void |
setAuxiliaryClasses(Hashtable auxClasses)
|
void |
setDOMCache(DOMCache cache)
Sets the DOM cache used for additional documents loaded using the document() function. |
void |
setIndexSize(int size)
This method is used to pass the largest DOM size to the translet. |
void |
setKeyIndexDom(java.lang.String name,
DOM document)
This method builds key indexes - it is overridden in the compiled translet in cases where the |
void |
setMessageHandler(MessageHandler handler)
Set the translet's message handler - must implement MessageHandler |
private void |
setRootForKeys(int root)
|
void |
setTemplates(javax.xml.transform.Templates templates)
|
protected void |
transferOutputSettings(SerializationHandler handler)
Transfer the output settings to the output post-processor |
abstract void |
transform(DOM document,
DTMAxisIterator iterator,
SerializationHandler handler)
Main transform() method - this is overridden by the compiled translet |
void |
transform(DOM document,
SerializationHandler handler)
Calls transform() with a given output handler |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.xalan.xsltc.Translet |
---|
transform |
Field Detail |
---|
public java.lang.String _version
public java.lang.String _method
public java.lang.String _encoding
public boolean _omitHeader
public java.lang.String _standalone
public java.lang.String _doctypePublic
public java.lang.String _doctypeSystem
public boolean _indent
public java.lang.String _mediaType
public java.util.Vector _cdata
public int _indentamount
public static final int FIRST_TRANSLET_VERSION
public static final int VER_SPLIT_NAMES_ARRAY
public static final int CURRENT_TRANSLET_VERSION
protected int transletVersion
protected java.lang.String[] namesArray
protected java.lang.String[] urisArray
protected int[] typesArray
protected java.lang.String[] namespaceArray
protected javax.xml.transform.Templates _templates
protected boolean _hasIdCall
protected StringValueHandler stringValueHandler
private static final java.lang.String EMPTYSTRING
private static final java.lang.String ID_INDEX_NAME
protected int pbase
protected int pframe
protected java.util.ArrayList paramsStack
private MessageHandler _msgHandler
public Hashtable _formatSymbols
private Hashtable _keyIndexes
private KeyIndex _emptyKeyIndex
private int _indexSize
private int _currentRootForKeys
private DOMCache _domCache
private Hashtable _auxClasses
protected org.w3c.dom.DOMImplementation _domImplementation
Constructor Detail |
---|
public AbstractTranslet()
Method Detail |
---|
public void printInternalState()
public final DOMAdapter makeDOMAdapter(DOM dom) throws TransletException
TransletException
public final void pushParamFrame()
public final void popParamFrame()
public final java.lang.Object addParameter(java.lang.String name, java.lang.Object value)
addParameter
in interface Translet
public final java.lang.Object addParameter(java.lang.String name, java.lang.Object value, boolean isDefault)
public void clearParameters()
public final java.lang.Object getParameter(java.lang.String name)
public final void setMessageHandler(MessageHandler handler)
public final void displayMessage(java.lang.String msg)
public void addDecimalFormat(java.lang.String name, java.text.DecimalFormatSymbols symbols)
public final java.text.DecimalFormat getDecimalFormat(java.lang.String name)
public final void prepassDocument(DOM document)
private final void buildIDIndex(DOM document)
public final void postInitialization()
public void setIndexSize(int size)
public KeyIndex createKeyIndex()
public void buildKeyIndex(java.lang.String name, int node, java.lang.Object value)
name
- is the name of the index (the key or ##id)node
- is the node handle of the node to insertvalue
- is the value that will look up the node in the given indexpublic void buildKeyIndex(java.lang.String name, DOM dom)
name
- is the name of the index (the key or ##id)dom
- is the DOMpublic KeyIndex getKeyIndex(java.lang.String name)
private void setRootForKeys(int root)
public void buildKeys(DOM document, DTMAxisIterator iterator, SerializationHandler handler, int root) throws TransletException
buildKeys
in interface Translet
TransletException
public void setKeyIndexDom(java.lang.String name, DOM document)
public void setDOMCache(DOMCache cache)
public DOMCache getDOMCache()
public SerializationHandler openOutputHandler(java.lang.String filename, boolean append) throws TransletException
TransletException
public SerializationHandler openOutputHandler(java.lang.String filename) throws TransletException
TransletException
public void closeOutputHandler(SerializationHandler handler)
public abstract void transform(DOM document, DTMAxisIterator iterator, SerializationHandler handler) throws TransletException
transform
in interface Translet
TransletException
public final void transform(DOM document, SerializationHandler handler) throws TransletException
transform
in interface Translet
TransletException
public final void characters(java.lang.String string, SerializationHandler handler) throws TransletException
TransletException
public void addCdataElement(java.lang.String name)
protected void transferOutputSettings(SerializationHandler handler)
public void addAuxiliaryClass(java.lang.Class auxClass)
addAuxiliaryClass
in interface Translet
public void setAuxiliaryClasses(Hashtable auxClasses)
public java.lang.Class getAuxiliaryClass(java.lang.String className)
getAuxiliaryClass
in interface Translet
public java.lang.String[] getNamesArray()
getNamesArray
in interface Translet
public java.lang.String[] getUrisArray()
getUrisArray
in interface Translet
public int[] getTypesArray()
getTypesArray
in interface Translet
public java.lang.String[] getNamespaceArray()
getNamespaceArray
in interface Translet
public boolean hasIdCall()
public javax.xml.transform.Templates getTemplates()
public void setTemplates(javax.xml.transform.Templates templates)
public org.w3c.dom.Document newDocument(java.lang.String uri, java.lang.String qname) throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |