|
|||||||||
| Home >> All >> org >> apache >> xalan >> [ transformer overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.xalan.transformer
Class TransformerImpl

java.lang.Objectjavax.xml.transform.Transformer
org.apache.xalan.transformer.TransformerImpl
- All Implemented Interfaces:
- org.apache.xml.dtm.DTMWSFilter, org.apache.xpath.ExtensionsProvider, java.lang.Runnable, org.apache.xml.serializer.SerializerTrace
- public class TransformerImpl
- extends javax.xml.transform.Transformer
- implements java.lang.Runnable, org.apache.xml.dtm.DTMWSFilter, org.apache.xpath.ExtensionsProvider, org.apache.xml.serializer.SerializerTrace
- extends javax.xml.transform.Transformer
This class implements the javax.xml.transform.Transformer interface, and is the core representation of the transformation execution.
| Field Summary | |
(package private) java.util.Stack |
m_attrSetStack
Stack for the purposes of flagging infinite recursion with attribute sets. |
(package private) CountersTable |
m_countersTable
The table of counters for xsl:number support. |
(package private) org.apache.xml.utils.ObjectStack |
m_currentFuncResult
Keeps track of the result delivered by any EXSLT func:result
instruction that has been executed for the currently active EXSLT
func:function |
(package private) org.apache.xml.utils.NodeVector |
m_currentMatchedNodes
A node vector used as a stack to track the current node that was matched. |
(package private) java.util.Stack |
m_currentMatchTemplates
A node vector used as a stack to track the current ElemTemplate that was matched. |
(package private) org.apache.xml.utils.ObjectStack |
m_currentTemplateElements
A node vector used as a stack to track the current ElemTemplateElement. |
(package private) org.apache.xml.utils.BoolStack |
m_currentTemplateRuleIsNull
Is > 0 when we're processing a for-each. |
private int |
m_doc
This is needed for support of setSourceTreeDocForThread(Node doc), which must be called in order for the transform thread's run method to obtain the root of the source tree to be transformed. |
(package private) javax.xml.parsers.DocumentBuilder |
m_docBuilder
The JAXP Document Builder, mainly to create Result Tree Fragments. |
private javax.xml.transform.ErrorListener |
m_errorHandler
The SAX error handler, where errors and warnings are sent. |
private java.lang.Exception |
m_exceptionThrown
If the transform thread throws an exception, the exception needs to be stashed away so that the main thread can pass it on to the client. |
private org.apache.xalan.extensions.ExtensionsTable |
m_extensionsTable
The table of ExtensionHandlers. |
private boolean |
m_hasBeenReset
Flag to to tell if the tranformer needs to be reset. |
private boolean |
m_hasTransformThreadErrorCatcher
NEEDSDOC Field m_hasTransformThreadErrorCatcher |
(package private) org.xml.sax.ContentHandler |
m_inputContentHandler
The content handler for the source input tree. |
private boolean |
m_isTransformDone
If the the transform is on the secondary thread, we need to know when it is done, so we can return. |
private KeyManager |
m_keyManager
The key manager, which manages xsl:keys. |
private java.util.Stack |
m_modes
A stack of current template modes. |
private MsgMgr |
m_msgMgr
The message manager, which manages error messages, warning messages, and other types of message events. |
private org.xml.sax.ContentHandler |
m_outputContentHandler
The content handler for the result tree. |
private org.apache.xalan.templates.OutputProperties |
m_outputFormat
The output format object set by the user. |
private java.io.FileOutputStream |
m_outputStream
This is null unless we own the stream. |
private javax.xml.transform.Result |
m_outputTarget
The Result object at the start of the transform, if any. |
private boolean |
m_parserEventsOnMain
True if the parser events should be on the main thread, false if not. |
private boolean |
m_quietConflictWarnings
If this is set to true, do not warn about pattern match conflicts. |
private java.lang.Boolean |
m_reentryGuard
NEEDSDOC Field m_reentryGuard |
private org.apache.xml.serializer.SerializationHandler |
m_serializationHandler
Output handler to bottleneck SAX events. |
private boolean |
m_shouldReset
NEEDSDOC Field m_shouldReset |
private StackGuard |
m_stackGuard
Object to guard agains infinite recursion when doing queries. |
private org.apache.xml.utils.ObjectPool |
m_stringWriterObjectPool
Related to m_textResultHandlerObjectPool, this is a pool of StringWriters, which are passed to the Text Serializers. |
private org.apache.xalan.templates.StylesheetRoot |
m_stylesheetRoot
The root of a linked set of stylesheets. |
private org.apache.xalan.templates.OutputProperties |
m_textformat
A static text format object, which can be used over and over to create the text serializers. |
private org.apache.xml.utils.ObjectPool |
m_textResultHandlerObjectPool
A pool of ResultTreeHandlers, for serialization of a subtree to text. |
private org.apache.xalan.trace.TraceManager |
m_traceManager
The trace manager. |
private java.lang.Thread |
m_transformThread
The thread that the transformer is running on. |
private java.lang.String |
m_urlOfSource
The base URL of the source tree. |
(package private) java.util.Vector |
m_userParams
NEEDSDOC Field m_userParams |
private org.apache.xpath.XPathContext |
m_xcontext
The liason to the XML parser, so the XSL processor can handle included files, and the like, and do the initial parse of the XSL document. |
private javax.xml.transform.Source |
m_xmlSource
The InputSource for the source tree, which is needed if the parse thread is not the main thread, in order for the parse thread's run method to get to the input source. |
static boolean |
S_DEBUG
This is a compile-time flag to turn off calling of trace listeners. |
| Fields inherited from interface org.apache.xml.dtm.DTMWSFilter |
INHERIT, NOTSTRIP, STRIP |
| Fields inherited from interface org.apache.xml.serializer.SerializerTrace |
EVENTTYPE_CDATA, EVENTTYPE_CHARACTERS, EVENTTYPE_COMMENT, EVENTTYPE_ENDDOCUMENT, EVENTTYPE_ENDELEMENT, EVENTTYPE_ENTITYREF, EVENTTYPE_IGNORABLEWHITESPACE, EVENTTYPE_OUTPUT_CHARACTERS, EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS, EVENTTYPE_PI, EVENTTYPE_STARTDOCUMENT, EVENTTYPE_STARTELEMENT |
| Constructor Summary | |
TransformerImpl(org.apache.xalan.templates.StylesheetRoot stylesheet)
Construct a TransformerImpl. |
|
| Method Summary | |
boolean |
applyTemplateToNode(org.apache.xalan.templates.ElemTemplateElement xslInstruction,
org.apache.xalan.templates.ElemTemplate template,
int child)
Given an element and mode, find the corresponding template and process the contents. |
void |
clearParameters()
Reset the parameters to a null list. |
org.apache.xml.serializer.SerializationHandler |
createSerializationHandler(javax.xml.transform.Result outputTarget)
Create a result ContentHandler from a Result object, based on the current OutputProperties. |
org.apache.xml.serializer.SerializationHandler |
createSerializationHandler(javax.xml.transform.Result outputTarget,
org.apache.xalan.templates.OutputProperties format)
Create a ContentHandler from a Result object and an OutputProperties. |
boolean |
currentFuncResultSeen()
Determines whether an EXSLT func:result instruction has been
executed for the currently active EXSLT func:function. |
boolean |
currentTemplateRuleIsNull()
Tell if the current template rule is null, i.e. |
boolean |
elementAvailable(java.lang.String ns,
java.lang.String elemName)
Is the extension element available? |
void |
executeChildTemplates(org.apache.xalan.templates.ElemTemplateElement elem,
boolean shouldAddAttrs)
Execute each of the children of a template element. |
void |
executeChildTemplates(org.apache.xalan.templates.ElemTemplateElement elem,
org.xml.sax.ContentHandler handler)
Execute each of the children of a template element. |
void |
executeChildTemplates(org.apache.xalan.templates.ElemTemplateElement elem,
org.w3c.dom.Node context,
org.apache.xml.utils.QName mode,
org.xml.sax.ContentHandler handler)
Execute each of the children of a template element. |
void |
executeFromSnapshot(TransformSnapshot ts)
Deprecated. This is an internal tooling API that nobody seems to be using |
java.lang.Object |
extFunction(org.apache.xpath.functions.FuncExtFunction extFunction,
java.util.Vector argVec)
Execute the extension function. |
java.lang.Object |
extFunction(java.lang.String ns,
java.lang.String funcName,
java.util.Vector argVec,
java.lang.Object methodKey)
Execute the extension function. |
private void |
fatalError(java.lang.Throwable throwable)
|
void |
fireGenerateEvent(int eventType)
Fire off startDocument, endDocument events. |
void |
fireGenerateEvent(int eventType,
char[] ch,
int start,
int length)
Fire off characters, cdate events. |
void |
fireGenerateEvent(int eventType,
java.lang.String data)
Fire off comment and entity ref events. |
void |
fireGenerateEvent(int eventType,
java.lang.String name,
org.xml.sax.Attributes atts)
Fire off startElement, endElement events. |
void |
fireGenerateEvent(int eventType,
java.lang.String name,
java.lang.String data)
Fire off processingInstruction events. |
boolean |
functionAvailable(java.lang.String ns,
java.lang.String funcName)
Is the extension function available? |
java.lang.String |
getBaseURLOfSource()
Get the base URL of the source. |
org.xml.sax.ContentHandler |
getContentHandler()
Get the content event handler. |
org.apache.xml.dtm.DTMIterator |
getContextNodeList()
Get the current context node list. |
CountersTable |
getCountersTable()
Get the table of counters, for optimized xsl:number support. |
org.apache.xalan.templates.ElemTemplateElement |
getCurrentElement()
Retrieves the current ElemTemplateElement that is being executed. |
int |
getCurrentNode()
This method retrieves the current context node in the source tree. |
org.apache.xalan.templates.ElemTemplate |
getCurrentTemplate()
This method retrieves the xsl:template that is in effect, which may be a matched template or a named template. |
org.apache.xml.utils.ObjectStack |
getCurrentTemplateElements()
Get the count of how many elements are active. |
int |
getCurrentTemplateElementsCount()
Get the count of how many elements are active. |
java.util.Vector |
getElementCallstack()
Get the stack of ElemTemplateElements. |
javax.xml.transform.ErrorListener |
getErrorListener()
Get the current error event handler. |
java.lang.Exception |
getExceptionThrown()
Get the exception thrown by the secondary thread (normally the transform thread). |
org.apache.xalan.extensions.ExtensionsTable |
getExtensionsTable()
Get the extensions table object. |
boolean |
getFeature(java.lang.String name)
Look up the value of a feature. |
org.xml.sax.ContentHandler |
getInputContentHandler()
Get a SAX2 ContentHandler for the input. |
org.xml.sax.ContentHandler |
getInputContentHandler(boolean doDocFrag)
Get a SAX2 ContentHandler for the input. |
org.xml.sax.ext.DeclHandler |
getInputDeclHandler()
Get a SAX2 DeclHandler for the input. |
org.xml.sax.ext.LexicalHandler |
getInputLexicalHandler()
Get a SAX2 LexicalHandler for the input. |
KeyManager |
getKeyManager()
Get the KeyManager object. |
int |
getMatchedNode()
Retrieves the node in the source tree that matched the template obtained via getMatchedTemplate(). |
org.apache.xalan.templates.ElemTemplate |
getMatchedTemplate()
This method retrieves the xsl:template that was matched. |
org.apache.xml.utils.QName |
getMode()
NEEDSDOC Method getMode NEEDSDOC (getMode) @return |
MsgMgr |
getMsgMgr()
Return the message manager. |
org.apache.xalan.templates.OutputProperties |
getOutputFormat()
Get the output properties used for the transformation. |
java.util.Properties |
getOutputProperties()
Get a copy of the output properties for the transformation. |
java.lang.String |
getOutputProperty(java.lang.String qnameString)
Get an output property that is in effect for the transformation. |
java.lang.String |
getOutputPropertyNoDefault(java.lang.String qnameString)
Get the value of a property, without using the default properties. |
javax.xml.transform.Result |
getOutputTarget()
Get the original output target. |
java.lang.Object |
getParameter(java.lang.String name)
Get a parameter that was explicitly set with setParameter or setParameters. |
boolean |
getProperty(java.lang.String property)
getProperty returns the current setting of the
property described by the property argument. |
boolean |
getQuietConflictWarnings()
Get quietConflictWarnings property. |
int |
getRecursionLimit()
Get the recursion limit. |
org.apache.xml.serializer.SerializationHandler |
getResultTreeHandler()
Get the SerializationHandler object. |
org.apache.xml.serializer.SerializationHandler |
getSerializationHandler()
Get the SerializationHandler object. |
short |
getShouldStripSpace(int elementHandle,
org.apache.xml.dtm.DTM dtm)
Test whether whitespace-only text nodes are visible in the logical view of DTM. |
TransformSnapshot |
getSnapshot()
Deprecated. This is an internal tooling API that nobody seems to be using |
StackGuard |
getStackGuard()
Get the object used to guard the stack from recursion. |
org.apache.xml.utils.ObjectPool |
getStringWriterPool()
Get the StringWriter pool, so that StringWriter objects may be reused. |
org.apache.xalan.templates.StylesheetRoot |
getStylesheet()
Get the current stylesheet for this processor. |
java.util.Vector |
getTemplateCallstack()
Get the call stack of xsl:template elements. |
org.apache.xalan.trace.TraceManager |
getTraceManager()
Get an instance of the trace manager for this transformation. |
javax.xml.transform.Transformer |
getTransformer()
Get the TrAX Transformer object in effect. |
java.lang.Thread |
getTransformThread()
Get the thread that the transform process is on. |
javax.xml.transform.URIResolver |
getURIResolver()
Get an object that will be used to resolve URIs used in document(), etc. |
org.apache.xpath.XPathContext |
getXPathContext()
Get the XPath context associated with this transformer. |
boolean |
hasTraceListeners()
Tell if trace listeners are present. |
boolean |
hasTransformThreadErrorCatcher()
Return true if the transform was initiated from the transform method, otherwise it was probably done from a pure parse events. |
void |
init(org.apache.xml.serializer.ToXMLSAXHandler h,
javax.xml.transform.Transformer transformer,
org.xml.sax.ContentHandler realHandler)
Initializer method. |
boolean |
isParserEventsOnMain()
Get true if the parser events should be on the main thread, false if not. |
boolean |
isRecursiveAttrSet(org.apache.xalan.templates.ElemAttributeSet attrSet)
Check to see if this is a recursive attribute definition. |
boolean |
isTransformDone()
Tell if the transform method is completed. |
java.lang.Object |
popCurrentFuncResult()
Pops the result of the currently active EXSLT func:function. |
void |
popCurrentMatched()
Pop the elements that were pushed via pushPairCurrentMatched. |
void |
popCurrentTemplateRuleIsNull()
Push true if the current template rule is null, false otherwise. |
void |
popElemAttributeSet()
Pop the current executing attribute set. |
void |
popElemTemplateElement()
Pop the current template element. |
void |
popMode()
NEEDSDOC Method popMode |
(package private) void |
postExceptionFromThread(java.lang.Exception e)
From a secondary thread, post the exception, so that it can be picked up from the main thread. |
java.util.Vector |
processSortKeys(org.apache.xalan.templates.ElemForEach foreach,
int sourceNodeContext)
Get the keys for the xsl:sort elements. |
void |
pushCurrentFuncResult(java.lang.Object val)
Push a funcion result for the currently active EXSLT func:function. |
void |
pushCurrentTemplateRuleIsNull(boolean b)
Push true if the current template rule is null, false otherwise. |
void |
pushElemAttributeSet(org.apache.xalan.templates.ElemAttributeSet attrSet)
Push an executing attribute set, so we can check for recursive attribute definitions. |
void |
pushElemTemplateElement(org.apache.xalan.templates.ElemTemplateElement elem)
Push the current template element. |
protected void |
pushGlobalVars(int contextNode)
Internal -- push the global variables from the Stylesheet onto the context's runtime variable stack. |
void |
pushMode(org.apache.xml.utils.QName mode)
NEEDSDOC Method pushMode NEEDSDOC @param mode |
void |
pushPairCurrentMatched(org.apache.xalan.templates.ElemTemplateElement template,
int child)
Push both the current xsl:template or xsl:for-each onto the stack, along with the child node that was matched. |
private void |
replaceOrPushUserParam(org.apache.xml.utils.QName qname,
org.apache.xpath.objects.XObject xval)
NEEDSDOC Method replaceOrPushUserParam NEEDSDOC @param qname NEEDSDOC @param xval |
void |
reset()
Reset the state. |
void |
resetToStylesheet(TransformSnapshot ts)
Deprecated. This is an internal tooling API that nobody seems to be using |
private void |
resetUserParameters()
Reset parameters that the user specified for the transformation. |
void |
run()
Run the transform thread. |
void |
runTransformThread()
Called by this.transform() if isParserEventsOnMain()==false. |
void |
runTransformThread(int priority)
Called by SourceTreeHandler to start the transformation in a separate thread NEEDSDOC @param priority |
static void |
runTransformThread(java.lang.Runnable runnable)
Called by CoRoutineSAXParser. |
void |
setBaseURLOfSource(java.lang.String base)
Get the base URL of the source. |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Set the content event handler. |
void |
setCurrentElement(org.apache.xalan.templates.ElemTemplateElement e)
Set the top of the current template elements stack. |
void |
setErrorListener(javax.xml.transform.ErrorListener listener)
Set the error event listener. |
void |
setExceptionThrown(java.lang.Exception e)
Set the exception thrown by the secondary thread (normally the transform thread). |
(package private) void |
setExtensionsTable(org.apache.xalan.templates.StylesheetRoot sroot)
If the stylesheet contains extensions, set the extensions table object. |
void |
setIsTransformDone(boolean done)
Set if the transform method is completed. |
void |
setOutputFormat(org.apache.xalan.templates.OutputProperties oformat)
Set the output properties for the transformation. |
void |
setOutputProperties(java.util.Properties oformat)
Set the output properties for the transformation. |
void |
setOutputProperty(java.lang.String name,
java.lang.String value)
Set the value of a property. |
void |
setOutputTarget(javax.xml.transform.Result outputTarget)
Set the original output target. |
void |
setParameter(java.lang.String name,
java.lang.Object value)
Set a parameter for the transformation. |
void |
setParameter(java.lang.String name,
java.lang.String namespace,
java.lang.Object value)
Set a parameter for the templates. |
void |
setParameters(java.util.Properties params)
Set a bag of parameters for the transformation. |
void |
setProperty(java.lang.String property,
java.lang.Object value)
Set a runtime property for this TransformerImpl. |
void |
setQuietConflictWarnings(boolean b)
If the quietConflictWarnings property is set to true, warnings about pattern conflicts won't be printed to the diagnostics stream. |
void |
setRecursionLimit(int limit)
Set the recursion limit. |
void |
setSerializationHandler(org.apache.xml.serializer.SerializationHandler xoh)
|
void |
setShouldReset(boolean shouldReset)
NEEDSDOC Method setShouldReset NEEDSDOC @param shouldReset |
void |
setSourceTreeDocForThread(int doc)
This is just a way to set the document for run(). |
void |
setStylesheet(org.apache.xalan.templates.StylesheetRoot stylesheetRoot)
Set the stylesheet for this processor. |
void |
setTransformThread(java.lang.Thread t)
Get the thread that the transform process is on. |
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Set an object that will be used to resolve URIs used in document(), etc. |
void |
setXMLSource(javax.xml.transform.Source source)
Set the input source for the source tree, which is needed if the parse thread is not the main thread, in order for the parse thread's run method to get to the input source. |
void |
setXPathContext(org.apache.xpath.XPathContext xcontext)
Set the execution context for XPath. |
void |
stopTransformation()
NEEDSDOC Method stopTransformation |
void |
transform(javax.xml.transform.Source source)
Process the source tree to SAX parse events. |
void |
transform(javax.xml.transform.Source source,
boolean shouldRelease)
Process the source tree to SAX parse events. |
void |
transform(javax.xml.transform.Source xmlSource,
javax.xml.transform.Result outputTarget)
Process the source tree to the output result. |
void |
transform(javax.xml.transform.Source xmlSource,
javax.xml.transform.Result outputTarget,
boolean shouldRelease)
Process the source tree to the output result. |
void |
transformNode(int node)
Process the source node to the output result, if the processor supports the "http://xml.org/trax/features/dom/input" feature. |
void |
transformNode(int node,
javax.xml.transform.Result outputTarget)
Process the source node to the output result, if the processor supports the "http://xml.org/trax/features/dom/input" feature. |
int |
transformToGlobalRTF(org.apache.xalan.templates.ElemTemplateElement templateParent)
Given a stylesheet element, create a result tree fragment from it's contents. |
int |
transformToRTF(org.apache.xalan.templates.ElemTemplateElement templateParent)
Given a stylesheet element, create a result tree fragment from it's contents. |
private int |
transformToRTF(org.apache.xalan.templates.ElemTemplateElement templateParent,
org.apache.xml.dtm.DTM dtmFrag)
Given a stylesheet element, create a result tree fragment from it's contents. |
java.lang.String |
transformToString(org.apache.xalan.templates.ElemTemplateElement elem)
Take the contents of a template element, process it, and convert it to a string. |
void |
waitTransformThread()
Used by SourceTreeHandler to wait until the transform completes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
m_reentryGuard
private java.lang.Boolean m_reentryGuard
- NEEDSDOC Field m_reentryGuard
m_outputStream
private java.io.FileOutputStream m_outputStream
- This is null unless we own the stream.
m_parserEventsOnMain
private boolean m_parserEventsOnMain
- True if the parser events should be on the main thread,
false if not. Experemental. Can not be set right now.
m_transformThread
private java.lang.Thread m_transformThread
- The thread that the transformer is running on.
m_urlOfSource
private java.lang.String m_urlOfSource
- The base URL of the source tree.
m_outputTarget
private javax.xml.transform.Result m_outputTarget
- The Result object at the start of the transform, if any.
m_outputFormat
private org.apache.xalan.templates.OutputProperties m_outputFormat
- The output format object set by the user. May be null.
m_inputContentHandler
org.xml.sax.ContentHandler m_inputContentHandler
- The content handler for the source input tree.
m_outputContentHandler
private org.xml.sax.ContentHandler m_outputContentHandler
- The content handler for the result tree.
m_docBuilder
javax.xml.parsers.DocumentBuilder m_docBuilder
- The JAXP Document Builder, mainly to create Result Tree Fragments.
m_textResultHandlerObjectPool
private org.apache.xml.utils.ObjectPool m_textResultHandlerObjectPool
- A pool of ResultTreeHandlers, for serialization of a subtree to text.
Please note that each of these also holds onto a Text Serializer.
m_stringWriterObjectPool
private org.apache.xml.utils.ObjectPool m_stringWriterObjectPool
- Related to m_textResultHandlerObjectPool, this is a pool of
StringWriters, which are passed to the Text Serializers.
(I'm not sure if this is really needed any more. -sb)
m_textformat
private org.apache.xalan.templates.OutputProperties m_textformat
- A static text format object, which can be used over and
over to create the text serializers.
m_currentTemplateElements
org.apache.xml.utils.ObjectStack m_currentTemplateElements
- A node vector used as a stack to track the current
ElemTemplateElement. Needed for the
org.apache.xalan.transformer.TransformState interface,
so a tool can discover the calling template. Note the use of an array
for this limits the recursion depth to 4K.
m_currentMatchTemplates
java.util.Stack m_currentMatchTemplates
- A node vector used as a stack to track the current
ElemTemplate that was matched.
Needed for the
org.apache.xalan.transformer.TransformState interface,
so a tool can discover the matched template
m_currentMatchedNodes
org.apache.xml.utils.NodeVector m_currentMatchedNodes
- A node vector used as a stack to track the current
node that was matched.
Needed for the
org.apache.xalan.transformer.TransformState interface,
so a tool can discover the matched
node.
m_stylesheetRoot
private org.apache.xalan.templates.StylesheetRoot m_stylesheetRoot
- The root of a linked set of stylesheets.
m_quietConflictWarnings
private boolean m_quietConflictWarnings
- If this is set to true, do not warn about pattern
match conflicts.
m_xcontext
private org.apache.xpath.XPathContext m_xcontext
- The liason to the XML parser, so the XSL processor
can handle included files, and the like, and do the
initial parse of the XSL document.
m_stackGuard
private StackGuard m_stackGuard
- Object to guard agains infinite recursion when
doing queries.
m_serializationHandler
private org.apache.xml.serializer.SerializationHandler m_serializationHandler
- Output handler to bottleneck SAX events.
m_keyManager
private KeyManager m_keyManager
- The key manager, which manages xsl:keys.
m_attrSetStack
java.util.Stack m_attrSetStack
- Stack for the purposes of flagging infinite recursion with
attribute sets.
m_countersTable
CountersTable m_countersTable
- The table of counters for xsl:number support.
- See Also:
ElemNumber
m_currentTemplateRuleIsNull
org.apache.xml.utils.BoolStack m_currentTemplateRuleIsNull
- Is > 0 when we're processing a for-each.
m_currentFuncResult
org.apache.xml.utils.ObjectStack m_currentFuncResult
- Keeps track of the result delivered by any EXSLT
func:resultinstruction that has been executed for the currently active EXSLTfunc:function
m_msgMgr
private MsgMgr m_msgMgr
- The message manager, which manages error messages, warning
messages, and other types of message events.
S_DEBUG
public static boolean S_DEBUG
- This is a compile-time flag to turn off calling
of trace listeners. Set this to false for optimization purposes.
m_errorHandler
private javax.xml.transform.ErrorListener m_errorHandler
- The SAX error handler, where errors and warnings are sent.
m_traceManager
private org.apache.xalan.trace.TraceManager m_traceManager
- The trace manager.
m_exceptionThrown
private java.lang.Exception m_exceptionThrown
- If the transform thread throws an exception, the exception needs to
be stashed away so that the main thread can pass it on to the
client.
m_xmlSource
private javax.xml.transform.Source m_xmlSource
- The InputSource for the source tree, which is needed if the
parse thread is not the main thread, in order for the parse
thread's run method to get to the input source.
(Delete this if reversing threads is outlawed. -sb)
m_doc
private int m_doc
- This is needed for support of setSourceTreeDocForThread(Node doc),
which must be called in order for the transform thread's run
method to obtain the root of the source tree to be transformed.
m_isTransformDone
private boolean m_isTransformDone
- If the the transform is on the secondary thread, we
need to know when it is done, so we can return.
m_hasBeenReset
private boolean m_hasBeenReset
- Flag to to tell if the tranformer needs to be reset.
m_shouldReset
private boolean m_shouldReset
- NEEDSDOC Field m_shouldReset
m_modes
private java.util.Stack m_modes
- A stack of current template modes.
m_extensionsTable
private org.apache.xalan.extensions.ExtensionsTable m_extensionsTable
- The table of ExtensionHandlers.
m_hasTransformThreadErrorCatcher
private boolean m_hasTransformThreadErrorCatcher
- NEEDSDOC Field m_hasTransformThreadErrorCatcher
m_userParams
java.util.Vector m_userParams
- NEEDSDOC Field m_userParams
| Constructor Detail |
TransformerImpl
public TransformerImpl(org.apache.xalan.templates.StylesheetRoot stylesheet)
- Construct a TransformerImpl.
| Method Detail |
setShouldReset
public void setShouldReset(boolean shouldReset)
- NEEDSDOC Method setShouldReset
NEEDSDOC @param shouldReset
getExtensionsTable
public org.apache.xalan.extensions.ExtensionsTable getExtensionsTable()
- Get the extensions table object.
setExtensionsTable
void setExtensionsTable(org.apache.xalan.templates.StylesheetRoot sroot) throws javax.xml.transform.TransformerException
- If the stylesheet contains extensions, set the extensions table object.
functionAvailable
public boolean functionAvailable(java.lang.String ns, java.lang.String funcName) throws javax.xml.transform.TransformerException
- Description copied from interface:
org.apache.xpath.ExtensionsProvider - Is the extension function available?
- Specified by:
functionAvailablein interfaceorg.apache.xpath.ExtensionsProvider
elementAvailable
public boolean elementAvailable(java.lang.String ns, java.lang.String elemName) throws javax.xml.transform.TransformerException
- Description copied from interface:
org.apache.xpath.ExtensionsProvider - Is the extension element available?
- Specified by:
elementAvailablein interfaceorg.apache.xpath.ExtensionsProvider
extFunction
public java.lang.Object extFunction(java.lang.String ns, java.lang.String funcName, java.util.Vector argVec, java.lang.Object methodKey) throws javax.xml.transform.TransformerException
- Description copied from interface:
org.apache.xpath.ExtensionsProvider - Execute the extension function.
- Specified by:
extFunctionin interfaceorg.apache.xpath.ExtensionsProvider
extFunction
public java.lang.Object extFunction(org.apache.xpath.functions.FuncExtFunction extFunction, java.util.Vector argVec) throws javax.xml.transform.TransformerException
- Description copied from interface:
org.apache.xpath.ExtensionsProvider - Execute the extension function.
- Specified by:
extFunctionin interfaceorg.apache.xpath.ExtensionsProvider
reset
public void reset()
- Reset the state. This needs to be called after a process() call
is invoked, if the processor is to be used again.
getProperty
public boolean getProperty(java.lang.String property)
getPropertyreturns the current setting of the property described by thepropertyargument. %REVIEW% Obsolete now that source_location is handled in the TransformerFactory?
setProperty
public void setProperty(java.lang.String property, java.lang.Object value)
- Set a runtime property for this
TransformerImpl. %REVIEW% Obsolete now that source_location is handled in the TransformerFactory?
isParserEventsOnMain
public boolean isParserEventsOnMain()
- Get true if the parser events should be on the main thread,
false if not. Experimental. Can not be set right now.
getTransformThread
public java.lang.Thread getTransformThread()
- Get the thread that the transform process is on.
setTransformThread
public void setTransformThread(java.lang.Thread t)
- Get the thread that the transform process is on.
hasTransformThreadErrorCatcher
public boolean hasTransformThreadErrorCatcher()
- Return true if the transform was initiated from the transform method,
otherwise it was probably done from a pure parse events.
NEEDSDOC ($objectName$) @return
transform
public void transform(javax.xml.transform.Source source) throws javax.xml.transform.TransformerException
- Process the source tree to SAX parse events.
transform
public void transform(javax.xml.transform.Source source, boolean shouldRelease) throws javax.xml.transform.TransformerException
- Process the source tree to SAX parse events.
fatalError
private void fatalError(java.lang.Throwable throwable) throws javax.xml.transform.TransformerException
getBaseURLOfSource
public java.lang.String getBaseURLOfSource()
- Get the base URL of the source.
setBaseURLOfSource
public void setBaseURLOfSource(java.lang.String base)
- Get the base URL of the source.
NEEDSDOC @param base
getOutputTarget
public javax.xml.transform.Result getOutputTarget()
- Get the original output target.
setOutputTarget
public void setOutputTarget(javax.xml.transform.Result outputTarget)
- Set the original output target. This is useful when using a SAX transform and
supplying a ContentHandler or when the URI of the output target should
not be the same as the systemID of the original output target.
NEEDSDOC @param outputTarget
getOutputProperty
public java.lang.String getOutputProperty(java.lang.String qnameString) throws java.lang.IllegalArgumentException
- Get an output property that is in effect for the
transformation. The property specified may be a property
that was set with setOutputProperty, or it may be a
property specified in the stylesheet.
getOutputPropertyNoDefault
public java.lang.String getOutputPropertyNoDefault(java.lang.String qnameString) throws java.lang.IllegalArgumentException
- Get the value of a property, without using the default properties. This
can be used to test if a property has been explicitly set by the stylesheet
or user.
setOutputProperty
public void setOutputProperty(java.lang.String name, java.lang.String value) throws java.lang.IllegalArgumentException
- Set the value of a property. Recognized properties are:
"http://xml.apache.org/xslt/sourcebase" - the base URL for the source, which is needed when pure SAX ContentHandler transformation is to be done.
setOutputProperties
public void setOutputProperties(java.util.Properties oformat) throws java.lang.IllegalArgumentException
- Set the output properties for the transformation. These
properties will override properties set in the templates
with xsl:output.
If argument to this function is null, any properties previously set will be removed.
getOutputProperties
public java.util.Properties getOutputProperties()
- Get a copy of the output properties for the transformation. These
properties will override properties set in the templates
with xsl:output.
Note that mutation of the Properties object returned will not effect the properties that the transformation contains.
createSerializationHandler
public org.apache.xml.serializer.SerializationHandler createSerializationHandler(javax.xml.transform.Result outputTarget) throws javax.xml.transform.TransformerException
- Create a result ContentHandler from a Result object, based
on the current OutputProperties.
createSerializationHandler
public org.apache.xml.serializer.SerializationHandler createSerializationHandler(javax.xml.transform.Result outputTarget, org.apache.xalan.templates.OutputProperties format) throws javax.xml.transform.TransformerException
- Create a ContentHandler from a Result object and an OutputProperties.
transform
public void transform(javax.xml.transform.Source xmlSource, javax.xml.transform.Result outputTarget) throws javax.xml.transform.TransformerException
- Process the source tree to the output result.
transform
public void transform(javax.xml.transform.Source xmlSource, javax.xml.transform.Result outputTarget, boolean shouldRelease) throws javax.xml.transform.TransformerException
- Process the source tree to the output result.
transformNode
public void transformNode(int node,
javax.xml.transform.Result outputTarget)
throws javax.xml.transform.TransformerException
- Process the source node to the output result, if the
processor supports the "http://xml.org/trax/features/dom/input"
feature.
%REVIEW% Do we need a Node version of this?
transformNode
public void transformNode(int node)
throws javax.xml.transform.TransformerException
- Process the source node to the output result, if the
processor supports the "http://xml.org/trax/features/dom/input"
feature.
%REVIEW% Do we need a Node version of this?
getInputContentHandler
public org.xml.sax.ContentHandler getInputContentHandler()
- Get a SAX2 ContentHandler for the input.
getInputContentHandler
public org.xml.sax.ContentHandler getInputContentHandler(boolean doDocFrag)
- Get a SAX2 ContentHandler for the input.
getInputDeclHandler
public org.xml.sax.ext.DeclHandler getInputDeclHandler()
- Get a SAX2 DeclHandler for the input.
getInputLexicalHandler
public org.xml.sax.ext.LexicalHandler getInputLexicalHandler()
- Get a SAX2 LexicalHandler for the input.
setOutputFormat
public void setOutputFormat(org.apache.xalan.templates.OutputProperties oformat)
- Set the output properties for the transformation. These
properties will override properties set in the templates
with xsl:output.
getOutputFormat
public org.apache.xalan.templates.OutputProperties getOutputFormat()
- Get the output properties used for the transformation.
setParameter
public void setParameter(java.lang.String name, java.lang.String namespace, java.lang.Object value)
- Set a parameter for the templates.
setParameter
public void setParameter(java.lang.String name, java.lang.Object value)
- Set a parameter for the transformation.
replaceOrPushUserParam
private void replaceOrPushUserParam(org.apache.xml.utils.QName qname, org.apache.xpath.objects.XObject xval)
- NEEDSDOC Method replaceOrPushUserParam
NEEDSDOC @param qname
NEEDSDOC @param xval
getParameter
public java.lang.Object getParameter(java.lang.String name)
- Get a parameter that was explicitly set with setParameter
or setParameters.
NEEDSDOC @param name
resetUserParameters
private void resetUserParameters()
- Reset parameters that the user specified for the transformation.
Called during transformer.reset() after we have cleared the
variable stack. We need to make sure that user params are
reset so that the transformer object can be reused.
setParameters
public void setParameters(java.util.Properties params)
- Set a bag of parameters for the transformation. Note that
these will not be additive, they will replace the existing
set of parameters.
clearParameters
public void clearParameters()
- Reset the parameters to a null list.
pushGlobalVars
protected void pushGlobalVars(int contextNode)
throws javax.xml.transform.TransformerException
- Internal -- push the global variables from the Stylesheet onto
the context's runtime variable stack.
If we encounter a variable that is already defined in the variable stack, we ignore it. This is because the second variable definition will be at a lower import precedence. Presumably, global"variables at the same import precedence with the same name will have been caught during the recompose process.
However, if we encounter a parameter that is already defined in the variable stack, we need to see if this is a parameter whose value was supplied by a setParameter call. If so, we need to "receive" the one already in the stack, ignoring this one. If it is just an earlier xsl:param or xsl:variable definition, we ignore it using the same reasoning as explained above for the variable.
setURIResolver
public void setURIResolver(javax.xml.transform.URIResolver resolver)
- Set an object that will be used to resolve URIs used in
document(), etc.
getURIResolver
public javax.xml.transform.URIResolver getURIResolver()
- Get an object that will be used to resolve URIs used in
document(), etc.
setContentHandler
public void setContentHandler(org.xml.sax.ContentHandler handler)
- Set the content event handler.
getContentHandler
public org.xml.sax.ContentHandler getContentHandler()
- Get the content event handler.
transformToRTF
public int transformToRTF(org.apache.xalan.templates.ElemTemplateElement templateParent) throws javax.xml.transform.TransformerException
- Given a stylesheet element, create a result tree fragment from it's
contents. The fragment will be built within the shared RTF DTM system
used as a variable stack.
transformToGlobalRTF
public int transformToGlobalRTF(org.apache.xalan.templates.ElemTemplateElement templateParent) throws javax.xml.transform.TransformerException
- Given a stylesheet element, create a result tree fragment from it's
contents. The fragment will also use the shared DTM system, but will
obtain its space from the global variable pool rather than the dynamic
variable stack. This allows late binding of XUnresolvedVariables without
the risk that their content will be discarded when the variable stack
is popped.
transformToRTF
private int transformToRTF(org.apache.xalan.templates.ElemTemplateElement templateParent, org.apache.xml.dtm.DTM dtmFrag) throws javax.xml.transform.TransformerException
- Given a stylesheet element, create a result tree fragment from it's
contents.
getStringWriterPool
public org.apache.xml.utils.ObjectPool getStringWriterPool()
- Get the StringWriter pool, so that StringWriter
objects may be reused.
transformToString
public java.lang.String transformToString(org.apache.xalan.templates.ElemTemplateElement elem) throws javax.xml.transform.TransformerException
- Take the contents of a template element, process it, and
convert it to a string.
applyTemplateToNode
public boolean applyTemplateToNode(org.apache.xalan.templates.ElemTemplateElement xslInstruction, org.apache.xalan.templates.ElemTemplate template, int child) throws javax.xml.transform.TransformerException
- Given an element and mode, find the corresponding
template and process the contents.
executeChildTemplates
public void executeChildTemplates(org.apache.xalan.templates.ElemTemplateElement elem, org.w3c.dom.Node context, org.apache.xml.utils.QName mode, org.xml.sax.ContentHandler handler) throws javax.xml.transform.TransformerException
- Execute each of the children of a template element. This method
is only for extension use.
executeChildTemplates
public void executeChildTemplates(org.apache.xalan.templates.ElemTemplateElement elem, boolean shouldAddAttrs) throws javax.xml.transform.TransformerException
- Execute each of the children of a template element.
executeChildTemplates
public void executeChildTemplates(org.apache.xalan.templates.ElemTemplateElement elem, org.xml.sax.ContentHandler handler) throws javax.xml.transform.TransformerException
- Execute each of the children of a template element.
processSortKeys
public java.util.Vector processSortKeys(org.apache.xalan.templates.ElemForEach foreach, int sourceNodeContext) throws javax.xml.transform.TransformerException
- Get the keys for the xsl:sort elements.
Note: Should this go into ElemForEach?
getElementCallstack
public java.util.Vector getElementCallstack()
- Get the stack of ElemTemplateElements.
getCurrentTemplateElementsCount
public int getCurrentTemplateElementsCount()
- Get the count of how many elements are
active.
getCurrentTemplateElements
public org.apache.xml.utils.ObjectStack getCurrentTemplateElements()
- Get the count of how many elements are
active.
pushElemTemplateElement
public void pushElemTemplateElement(org.apache.xalan.templates.ElemTemplateElement elem)
- Push the current template element.
popElemTemplateElement
public void popElemTemplateElement()
- Pop the current template element.
setCurrentElement
public void setCurrentElement(org.apache.xalan.templates.ElemTemplateElement e)
- Set the top of the current template elements
stack.
getCurrentElement
public org.apache.xalan.templates.ElemTemplateElement getCurrentElement()
- Retrieves the current ElemTemplateElement that is
being executed.
getCurrentNode
public int getCurrentNode()
- This method retrieves the current context node
in the source tree.
getTemplateCallstack
public java.util.Vector getTemplateCallstack()
- Get the call stack of xsl:template elements.
getCurrentTemplate
public org.apache.xalan.templates.ElemTemplate getCurrentTemplate()
- This method retrieves the xsl:template
that is in effect, which may be a matched template
or a named template.
Please note that the ElemTemplate returned may be a default template, and thus may not have a template defined in the stylesheet.
pushPairCurrentMatched
public void pushPairCurrentMatched(org.apache.xalan.templates.ElemTemplateElement template, int child)
- Push both the current xsl:template or xsl:for-each onto the
stack, along with the child node that was matched.
(Note: should this only be used for xsl:templates?? -sb)
popCurrentMatched
public void popCurrentMatched()
- Pop the elements that were pushed via pushPairCurrentMatched.
getMatchedTemplate
public org.apache.xalan.templates.ElemTemplate getMatchedTemplate()
- This method retrieves the xsl:template
that was matched. Note that this may not be
the same thing as the current template (which
may be from getCurrentElement()), since a named
template may be in effect.
getMatchedNode
public int getMatchedNode()
- Retrieves the node in the source tree that matched
the template obtained via getMatchedTemplate().
getContextNodeList
public org.apache.xml.dtm.DTMIterator getContextNodeList()
- Get the current context node list.
getTransformer
public javax.xml.transform.Transformer getTransformer()
- Get the TrAX Transformer object in effect.
setStylesheet
public void setStylesheet(org.apache.xalan.templates.StylesheetRoot stylesheetRoot)
- Set the stylesheet for this processor. If this is set, then the
process calls that take only the input .xml will use
this instead of looking for a stylesheet PI. Also,
setting the stylesheet is needed if you are going
to use the processor as a SAX ContentHandler.
getStylesheet
public final org.apache.xalan.templates.StylesheetRoot getStylesheet()
- Get the current stylesheet for this processor.
getQuietConflictWarnings
public boolean getQuietConflictWarnings()
- Get quietConflictWarnings property. If the quietConflictWarnings
property is set to true, warnings about pattern conflicts won't be
printed to the diagnostics stream.
setQuietConflictWarnings
public void setQuietConflictWarnings(boolean b)
- If the quietConflictWarnings property is set to
true, warnings about pattern conflicts won't be
printed to the diagnostics stream.
False by default.
(Currently setting this property will have no effect.)
setXPathContext
public void setXPathContext(org.apache.xpath.XPathContext xcontext)
- Set the execution context for XPath.
getXPathContext
public final org.apache.xpath.XPathContext getXPathContext()
- Get the XPath context associated with this transformer.
getStackGuard
public StackGuard getStackGuard()
- Get the object used to guard the stack from
recursion.
getRecursionLimit
public int getRecursionLimit()
- Get the recursion limit.
Used for infinite loop check. If the value is -1, do not
check for infinite loops. Anyone who wants to enable that
check should change the value of this variable to be the
level of recursion that they want to check. Be careful setting
this variable, if the number is too low, it may report an
infinite loop situation, when there is none.
Post version 1.0.0, we'll make this a runtime feature.
setRecursionLimit
public void setRecursionLimit(int limit)
- Set the recursion limit.
Used for infinite loop check. If the value is -1, do not
check for infinite loops. Anyone who wants to enable that
check should change the value of this variable to be the
level of recursion that they want to check. Be careful setting
this variable, if the number is too low, it may report an
infinite loop situation, when there is none.
Post version 1.0.0, we'll make this a runtime feature.
getResultTreeHandler
public org.apache.xml.serializer.SerializationHandler getResultTreeHandler()
- Get the SerializationHandler object.
getSerializationHandler
public org.apache.xml.serializer.SerializationHandler getSerializationHandler()
- Get the SerializationHandler object.
getKeyManager
public KeyManager getKeyManager()
- Get the KeyManager object.
isRecursiveAttrSet
public boolean isRecursiveAttrSet(org.apache.xalan.templates.ElemAttributeSet attrSet)
- Check to see if this is a recursive attribute definition.
pushElemAttributeSet
public void pushElemAttributeSet(org.apache.xalan.templates.ElemAttributeSet attrSet)
- Push an executing attribute set, so we can check for
recursive attribute definitions.
popElemAttributeSet
public void popElemAttributeSet()
- Pop the current executing attribute set.
getCountersTable
public CountersTable getCountersTable()
- Get the table of counters, for optimized xsl:number support.
currentTemplateRuleIsNull
public boolean currentTemplateRuleIsNull()
- Tell if the current template rule is null, i.e. if we are
directly within an apply-templates. Used for xsl:apply-imports.
pushCurrentTemplateRuleIsNull
public void pushCurrentTemplateRuleIsNull(boolean b)
- Push true if the current template rule is null, false
otherwise.
popCurrentTemplateRuleIsNull
public void popCurrentTemplateRuleIsNull()
- Push true if the current template rule is null, false
otherwise.
pushCurrentFuncResult
public void pushCurrentFuncResult(java.lang.Object val)
- Push a funcion result for the currently active EXSLT
func:function.
popCurrentFuncResult
public java.lang.Object popCurrentFuncResult()
- Pops the result of the currently active EXSLT
func:function.
currentFuncResultSeen
public boolean currentFuncResultSeen()
- Determines whether an EXSLT
func:resultinstruction has been executed for the currently active EXSLTfunc:function.
getMsgMgr
public MsgMgr getMsgMgr()
- Return the message manager.
setErrorListener
public void setErrorListener(javax.xml.transform.ErrorListener listener) throws java.lang.IllegalArgumentException
- Set the error event listener.
getErrorListener
public javax.xml.transform.ErrorListener getErrorListener()
- Get the current error event handler.
getTraceManager
public org.apache.xalan.trace.TraceManager getTraceManager()
- Get an instance of the trace manager for this transformation.
This object can be used to set trace listeners on various
events during the transformation.
getFeature
public boolean getFeature(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
- Look up the value of a feature.
The feature name is any fully-qualified URI. It is possible for an TransformerFactory to recognize a feature name but to be unable to return its value; this is especially true in the case of an adapter for a SAX1 Parser, which has no way of knowing whether the underlying parser is validating, for example.
Open issues:
Should getFeature be changed to hasFeature?
- Keith Visco writes: Should getFeature be changed to hasFeature? It returns a boolean which indicated whether the "state" of feature is "true or false". I assume this means whether or not a feature is supported? I know SAX is using "getFeature", but to me "hasFeature" is cleaner.
getMode
public org.apache.xml.utils.QName getMode()
- NEEDSDOC Method getMode
NEEDSDOC (getMode) @return
pushMode
public void pushMode(org.apache.xml.utils.QName mode)
- NEEDSDOC Method pushMode
NEEDSDOC @param mode
popMode
public void popMode()
- NEEDSDOC Method popMode
runTransformThread
public void runTransformThread(int priority)
- Called by SourceTreeHandler to start the transformation
in a separate thread
NEEDSDOC @param priority
runTransformThread
public void runTransformThread()
- Called by this.transform() if isParserEventsOnMain()==false.
Similar with runTransformThread(), but no priority is set
and setTransformThread is not set.
runTransformThread
public static void runTransformThread(java.lang.Runnable runnable)
- Called by CoRoutineSAXParser. Launches the CoroutineSAXParser
in a thread, and prepares it to invoke the parser from that thread
upon request.
waitTransformThread
public void waitTransformThread()
throws org.xml.sax.SAXException
- Used by SourceTreeHandler to wait until the transform
completes
getExceptionThrown
public java.lang.Exception getExceptionThrown()
- Get the exception thrown by the secondary thread (normally
the transform thread).
setExceptionThrown
public void setExceptionThrown(java.lang.Exception e)
- Set the exception thrown by the secondary thread (normally
the transform thread).
setSourceTreeDocForThread
public void setSourceTreeDocForThread(int doc)
- This is just a way to set the document for run().
setXMLSource
public void setXMLSource(javax.xml.transform.Source source)
- Set the input source for the source tree, which is needed if the
parse thread is not the main thread, in order for the parse
thread's run method to get to the input source.
isTransformDone
public boolean isTransformDone()
- Tell if the transform method is completed.
setIsTransformDone
public void setIsTransformDone(boolean done)
- Set if the transform method is completed.
postExceptionFromThread
void postExceptionFromThread(java.lang.Exception e)
- From a secondary thread, post the exception, so that
it can be picked up from the main thread.
run
public void run()
- Run the transform thread.
- Specified by:
runin interfacejava.lang.Runnable
getSnapshot
public TransformSnapshot getSnapshot()
- Deprecated. This is an internal tooling API that nobody seems to be using
- This will get a snapshot of the current executing context
- This will get a snapshot of the current executing context
executeFromSnapshot
public void executeFromSnapshot(TransformSnapshot ts) throws javax.xml.transform.TransformerException
- Deprecated. This is an internal tooling API that nobody seems to be using
- This will execute the following XSLT instructions from the snapshot point, after the stylesheet execution context has been reset from the snapshot point.
- This will execute the following XSLT instructions from the snapshot point, after the stylesheet execution context has been reset from the snapshot point.
resetToStylesheet
public void resetToStylesheet(TransformSnapshot ts)
- Deprecated. This is an internal tooling API that nobody seems to be using
- This will reset the stylesheet execution context from the snapshot point.
- This will reset the stylesheet execution context from the snapshot point.
stopTransformation
public void stopTransformation()
- NEEDSDOC Method stopTransformation
getShouldStripSpace
public short getShouldStripSpace(int elementHandle,
org.apache.xml.dtm.DTM dtm)
- Test whether whitespace-only text nodes are visible in the logical
view of
DTM. Normally, this function will be called by the implementation ofDTM; it is not normally called directly from user code.- Specified by:
getShouldStripSpacein interfaceorg.apache.xml.dtm.DTMWSFilter
init
public void init(org.apache.xml.serializer.ToXMLSAXHandler h, javax.xml.transform.Transformer transformer, org.xml.sax.ContentHandler realHandler)
- Initializer method.
setSerializationHandler
public void setSerializationHandler(org.apache.xml.serializer.SerializationHandler xoh)
fireGenerateEvent
public void fireGenerateEvent(int eventType,
char[] ch,
int start,
int length)
- Fire off characters, cdate events.
- Specified by:
fireGenerateEventin interfaceorg.apache.xml.serializer.SerializerTrace
fireGenerateEvent
public void fireGenerateEvent(int eventType,
java.lang.String name,
org.xml.sax.Attributes atts)
- Fire off startElement, endElement events.
- Specified by:
fireGenerateEventin interfaceorg.apache.xml.serializer.SerializerTrace
fireGenerateEvent
public void fireGenerateEvent(int eventType,
java.lang.String name,
java.lang.String data)
- Fire off processingInstruction events.
- Specified by:
fireGenerateEventin interfaceorg.apache.xml.serializer.SerializerTrace
fireGenerateEvent
public void fireGenerateEvent(int eventType,
java.lang.String data)
- Fire off comment and entity ref events.
- Specified by:
fireGenerateEventin interfaceorg.apache.xml.serializer.SerializerTrace
fireGenerateEvent
public void fireGenerateEvent(int eventType)
- Fire off startDocument, endDocument events.
- Specified by:
fireGenerateEventin interfaceorg.apache.xml.serializer.SerializerTrace
hasTraceListeners
public boolean hasTraceListeners()
- Description copied from interface:
org.apache.xml.serializer.SerializerTrace - Tell if trace listeners are present.
- Specified by:
hasTraceListenersin interfaceorg.apache.xml.serializer.SerializerTrace
|
|||||||||
| Home >> All >> org >> apache >> xalan >> [ transformer overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC