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

java.lang.Objectorg.apache.xalan.xslt.XSLTEngineImpl
- All Implemented Interfaces:
- org.xml.sax.DocumentHandler, org.xml.sax.ext.LexicalHandler, org.apache.xalan.xpath.XPathEnvSupport, XSLTProcessor
- public class XSLTEngineImpl
- extends java.lang.Object
- implements org.apache.xalan.xpath.XPathEnvSupport, XSLTProcessor
- extends java.lang.Object
The Xalan workhorse -- Collaborates with the XML parser liaison, the DOM, and the XPath engine, to transform a source tree of nodes into a result tree according to instructions and templates specified by a stylesheet tree. We suggest you use one of the static XSLTProcessorFactory getProcessor() methods to instantiate the processor and return an interface that greatly simplifies the process of manipulating XSLTEngineImpl.
The methods process(...) are the primary public entry points.
The best way to perform transformations is to use the
XSLTProcessor.process(XSLTInputSource, XSLTInputSource, XSLTResultTarget) 55 method,
but you may use any of process methods defined in XSLTEngineImpl.
Please note that this class is not safe per instance over multiple threads. If you are in a multithreaded environment, you should keep a pool of these objects, or create a new one each time. In a multithreaded environment, the right way to do things is to create a StylesheetRoot via processStylesheet, and then reuse this object over multiple threads.
If you reuse the processor instance, you should call reset() between transformations.
| Nested Class Summary | |
(package private) class |
XSLTEngineImpl.ResultTreeHandler
Class to bottleneck the SAX output events for the result tree. |
(package private) class |
XSLTEngineImpl.StackGuard
The StackGuard class guard against infinite loops. |
(package private) class |
XSLTEngineImpl.VariableGuard
The VariableGuard class guard against the circular use of variables. |
(package private) class |
XSLTEngineImpl.XSLInfiniteLoopException
An exception for that occurs when a given stylesheet goes into an infinite loop. |
| Field Summary | |
private static java.lang.Boolean |
FALSE
Static false for pushing on the stack and the like. |
(package private) java.util.Stack |
m_attrSetStack
Stack for the purposes of flagging infinite recursion with attribute sets. |
(package private) java.util.Stack |
m_cdataStack
Stack of Booleans to keep track of if we should be outputting cdata instead of escaped text. |
private CountersTable |
m_countersTable
The table of counters for xsl:number support. |
protected org.w3c.dom.Node |
m_currentNode
The current input element that is being processed. |
(package private) org.apache.xalan.xpath.xml.BoolStack |
m_currentTemplateRuleIsNull
Is >0 when we're processing a for-each |
(package private) java.io.PrintWriter |
m_diagnosticsPrintWriter
|
(package private) java.util.Hashtable |
m_durationsTable
|
(package private) static ResultNameSpace |
m_emptyNamespace
This is pushed on the m_resultNameSpaces stack 'till a xmlns attribute is found. |
(package private) org.xml.sax.DocumentHandler |
m_flistener
The listener for formatting events. |
private boolean |
m_isCData
|
(package private) java.util.Vector |
m_key_tables
Table of tables of element keys. |
(package private) boolean |
m_mustFlushStartDoc
|
(package private) boolean |
m_needToCheckForInfiniteLoops
This is set to true when the "ancestor" attribute of the select element is encountered. |
private java.lang.String |
m_outputFileName
This is for use by multiple output documents, to determine the base directory for the output document. |
private java.io.OutputStream |
m_outputStream
|
(package private) org.apache.xalan.xpath.xml.XMLParserLiaison |
m_parserLiaison
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. |
(package private) org.apache.xalan.xpath.xml.MutableAttrListImpl |
m_pendingAttributes
The pending attributes. |
protected java.lang.String |
m_pendingElementName
The pending element. |
protected boolean |
m_pendingStartDoc
Flag to tell if a StartDocument event is pending. |
(package private) boolean |
m_quietConflictWarnings
If this is set to true, do not warn about pattern match conflicts. |
static int |
m_recursionLimit
Used for infinite loop check. |
protected java.util.Stack |
m_resultNameSpaces
A stack to keep track of the result tree namespaces. |
(package private) XSLTEngineImpl.ResultTreeHandler |
m_resultTreeHandler
Output handler to bottleneck SAX events. |
(package private) org.w3c.dom.Node |
m_rootDoc
The root document. |
private org.apache.xalan.xpath.xml.FormatterToDOM |
m_sourceTreeHandler
|
private XSLTEngineImpl.StackGuard |
m_stackGuard
Object to guard agains infinite recursion when doing queries. |
(package private) java.util.Stack |
m_stylesheetLocatorStack
The top of this stack should contain the currently processed stylesheet SAX locator object. |
(package private) StylesheetRoot |
m_stylesheetRoot
The root of a linked set of stylesheets. |
(package private) java.util.Vector |
m_topLevelParams
Vector of stylesheet parameters pushed by the API via setStylesheetParam. |
(package private) java.util.Vector |
m_traceListeners
List of listeners who are interested in tracing what's being generated. |
(package private) boolean |
m_traceSelects
|
private boolean |
m_traceTemplateChildren
|
private boolean |
m_traceTemplates
|
(package private) boolean |
m_translateCSS
Deprecated. |
(package private) int |
m_uniqueNSValue
This is used whenever a unique namespace is needed. |
private XSLTEngineImpl.VariableGuard |
m_variableGuard
Object to guard against circular use of variables. |
private VariableStack |
m_variableStacks
The stack of Variable stacks. |
private static org.apache.xalan.xpath.xml.XSLMessages |
m_XSLMessages
|
(package private) static java.lang.String |
m_XSLNameSpaceURL
The namespace that we must match as a minumum for XSLT. |
(package private) static java.lang.String |
m_XSLT4JNameSpaceURL
Special lotus namespace for built-in extensions. |
(package private) static double |
m_XSLTVerSupported
The minimum version of XSLT supported. |
(package private) java.lang.String |
parserLiaisonClassName
The class name for the liaison. |
private static java.lang.Boolean |
TRUE
Static true for pushing on the stack and the like. |
| Constructor Summary | |
protected |
XSLTEngineImpl()
Construct an XSLT processor that uses the default DTM (Document Table Model) liaison and XML parser. |
|
XSLTEngineImpl(java.lang.String parserLiaisonClassName)
Construct an XSLT processor that uses the the given parser liaison. |
|
XSLTEngineImpl(org.apache.xalan.xpath.xml.XMLParserLiaison parserLiason)
Construct an XSL processor that uses the the given parser liaison. |
(package private) |
XSLTEngineImpl(org.apache.xalan.xpath.xml.XMLParserLiaison parserLiason,
org.apache.xalan.xpath.XPathFactory xpathFactory)
Construct an XSLT processor that can call back to the XML parser, in order to handle included files and the like. |
| Method Summary | |
(package private) void |
addResultAttribute(org.apache.xalan.xpath.xml.MutableAttrListImpl attList,
java.lang.String aname,
java.lang.String value)
Bottleneck addition of result tree attributes, so I can keep track of namespaces. |
void |
addTraceListener(org.apache.xalan.xslt.trace.TraceListener tl)
Add a trace listener for the purposes of debugging and diagnosis. |
(package private) void |
addTraceListenersToStylesheet()
Add a trace listener for the purposes of debugging and diagnosis. |
void |
associateXLocatorToNode(org.w3c.dom.Node node,
org.apache.xalan.xpath.XLocator xlocator)
Associate an XLocator provider to a node. |
void |
characters(char[] ch,
int start,
int length)
Implement the characters event. |
void |
charactersRaw(char[] ch,
int start,
int length)
Implement the characters event. |
protected void |
cloneToResultTree(Stylesheet stylesheetTree,
org.w3c.dom.Node node,
boolean shouldCloneWithChildren,
boolean overrideStrip,
boolean shouldCloneAttributes)
Clone an element with or without children. |
void |
comment(char[] ch,
int start,
int length)
Report an XML comment anywhere in the document. |
protected void |
copyAttributesToAttList(org.w3c.dom.Element contextNode,
Stylesheet stylesheetTree,
org.apache.xalan.xpath.xml.MutableAttrListImpl attList)
Copy the attributes from the XSL element to the created output element, executing attribute templates and processing the xsl:use attribute as need be. |
protected void |
copyAttributeToTarget(org.w3c.dom.Attr attr,
org.w3c.dom.Node contextNode,
Stylesheet stylesheetTree,
org.apache.xalan.xpath.xml.MutableAttrListImpl attrList,
org.w3c.dom.Element namespaceContext)
Copy an attribute to the created output element, executing attribute templates as need be, and processing the xsl:use attribute. |
(package private) void |
copySourceNSAttrs(org.w3c.dom.Node src,
org.apache.xalan.xpath.xml.MutableAttrListImpl destination)
Copy xmlns: attributes in if not already in scope. |
(package private) org.w3c.dom.DocumentFragment |
createDocFrag()
Create a document fragment. |
org.apache.xalan.xpath.xml.XMLParserLiaison |
createLiaison()
Get a Liaison class, as specified by parserLiaisonClassName property Patch from Costin Manolache |
(package private) org.w3c.dom.DocumentFragment |
createResultTreeFrag(Stylesheet stylesheetTree,
ElemTemplateElement templateParent,
org.w3c.dom.Node sourceTree,
org.w3c.dom.Node sourceNode,
org.apache.xalan.xpath.xml.QName mode)
Given a stylesheet element, create a result tree fragment from it's contents. |
StylesheetRoot |
createStylesheetRoot(java.lang.String baseIdentifier)
Bottleneck the creation of the stylesheet for derivation purposes. |
org.apache.xalan.xpath.XBoolean |
createXBoolean(boolean b)
Convenience function to create an XBoolean. |
org.apache.xalan.xpath.xml.XMLParserLiaison |
createXercesLiaison()
Create a Xerces Liaison - used for special handling of DTM Patch from Costin Manolache |
org.apache.xalan.xpath.XNodeSet |
createXNodeSet(org.w3c.dom.Node n)
Convenience function to create an XNodeSet from a node. |
org.apache.xalan.xpath.XNodeSet |
createXNodeSet(org.w3c.dom.NodeList nl)
Convenience function to create an XNodeSet. |
org.apache.xalan.xpath.XNull |
createXNull()
Convenience function to create an XNull. |
org.apache.xalan.xpath.XNumber |
createXNumber(double d)
Convenience function to create an XNumber. |
org.apache.xalan.xpath.XObject |
createXObject(java.lang.Object o)
Convenience function to create an XObject. |
org.apache.xalan.xpath.XString |
createXString(java.lang.String s)
Convenience function to create an XString. |
void |
deassociateXLocatorToNode(org.w3c.dom.Node node)
Deassociate an XLocator provider to a node. |
protected void |
diag(java.lang.String s)
Bottleneck output of diagnostics. |
protected void |
diagnoseTemplateChildren(org.w3c.dom.Node templateChild,
org.w3c.dom.Node sourceNode)
Print some diagnostics about the current template child. |
protected void |
displayDuration(java.lang.String info,
java.lang.Object key)
Display the duration since pushTime was called. |
boolean |
elementAvailable(java.lang.String namespace,
java.lang.String extensionName)
Execute the element-available() function. |
void |
endCDATA()
Report the end of a CDATA section. |
void |
endDocument()
Implement the endDocument event. |
void |
endDTD()
Report the end of DTD declarations. |
void |
endElement(java.lang.String name)
Implement the endElement event. |
void |
endEntity(java.lang.String name)
Report the end of an entity. |
void |
error(int msg)
Tell the user of an error, and probably throw an exception. |
void |
error(int msg,
java.lang.Exception e)
Tell the user of an error, and probably throw an exception. |
void |
error(int msg,
java.lang.Object[] args)
Tell the user of an error, and probably throw an exception. |
void |
error(int msg,
java.lang.Object[] args,
java.lang.Exception e)
Tell the user of an error, and probably throw an exception. |
void |
error(org.w3c.dom.Node styleNode,
org.w3c.dom.Node sourceNode,
int msg)
Tell the user of an error, and probably throw an exception. |
void |
error(org.w3c.dom.Node styleNode,
org.w3c.dom.Node sourceNode,
int msg,
java.lang.Object[] args)
Tell the user of an error, and probably throw an exception. |
void |
error(java.lang.String msg)
Tell the user of an error, and probably throw an exception. |
private java.lang.String |
excludePrefix(java.lang.String name)
Check to see if the output prefix should be excluded. |
java.lang.Object |
extFunction(java.lang.String namespace,
java.lang.String extensionName,
java.util.Vector argVec,
java.lang.Object methodKey)
Handle an extension function. |
protected org.w3c.dom.Element |
findElementByAttribute(org.w3c.dom.Node elem,
java.lang.String targetElementName,
java.lang.String targetAttributeName,
java.lang.String targetAttributeValue)
Given a tag name, an attribute name, and an attribute value, do a very crude recursive search and locate the first match. |
java.lang.String |
findURIFromDoc(org.w3c.dom.Document doc)
Given a DOM Document, tell what URI was used to parse it. |
(package private) void |
fireGenerateEvent(org.apache.xalan.xslt.trace.GenerateEvent te)
Fire a generate event. |
(package private) java.lang.String |
fixWhiteSpace(java.lang.String string,
boolean trimHead,
boolean trimTail,
boolean doublePunctuationSpaces)
(Code stolen and modified from XML4J) Conditionally trim all leading and trailing whitespace in the specified String. |
protected void |
flushPending()
Flush the pending element. |
boolean |
functionAvailable(java.lang.String namespace,
java.lang.String extensionName)
Execute the function-available() function. |
StylesheetSpec |
getAssociatedStylesheet(XSLTInputSource source,
java.lang.String media,
java.lang.String charset)
Get the preferred InputSource specification that is associated with a given document specified in the source param, via the xml-stylesheet processing instruction (see http://www.w3.org/TR/xml-stylesheet/), and that matches the given criteria. |
java.util.Vector |
getAssociatedStylesheets(XSLTInputSource source,
java.lang.String mediaRequest,
java.lang.String charsetRequest)
Get the InputSource specifications that are associated with a given document specified in the source param, via the xml-stylesheet processing instruction (see http://www.w3.org/TR/xml-stylesheet/), and that matches the given criteria. |
(package private) static java.lang.String |
getAttrVal(org.w3c.dom.Element el,
java.lang.String key)
Given an element, return an attribute value in the form of a string. |
(package private) static java.lang.String |
getAttrVal(org.w3c.dom.Element el,
java.lang.String key,
org.w3c.dom.Node contextNode)
Given an element, return an attribute value in the form of a string. |
(package private) CountersTable |
getCountersTable()
Get the table of counters, for optimized xsl:number support. |
org.xml.sax.DocumentHandler |
getDocumentHandler()
Get the current DocumentHandler. |
org.w3c.dom.Document |
getDOMFactory()
Get a DOM document, primarily for creating result tree fragments. |
(package private) org.w3c.dom.Element |
getElementByID(java.lang.String id,
org.w3c.dom.Document doc)
Given a valid element id, return the corresponding element. |
org.apache.xalan.xpath.XPathSupport |
getExecContext()
Get the execution context for XPath. |
org.xml.sax.DocumentHandler |
getFormatterListener()
Get the current formatter listener. |
org.w3c.dom.NodeList |
getNodeSetByKey(org.w3c.dom.Node doc,
java.lang.String name,
java.lang.String ref,
org.apache.xalan.xpath.xml.PrefixResolver nscontext)
Given a valid element key, return the corresponding node list. |
(package private) java.lang.String |
getNormalizedText(org.w3c.dom.Text tx)
Normalize the linefeeds and/or carriage returns to be consistently 0x0D 0x0A. |
java.lang.String |
getOutputFileName()
Get the filename of the output document, if it was set. |
private java.lang.String |
getPrefixForNamespace(java.lang.String namespace,
org.w3c.dom.Element namespaceContext)
This should probably be in the XMLParserLiaison interface. |
org.apache.xalan.xpath.xml.ProblemListener |
getProblemListener()
Get the problem listener property. |
(package private) java.lang.String |
getResultNamespaceForPrefix(java.lang.String prefix)
Given a prefix, return the namespace, |
(package private) java.lang.String |
getResultPrefixForNamespace(java.lang.String namespace)
This should probably be in the XMLParserLiaison interface. |
java.util.Hashtable |
getSourceDocsTable()
Get table of source tree documents. |
org.w3c.dom.Node |
getSourceNode()
Returns the current input node that is being processed. |
org.w3c.dom.Node |
getSourceNode(java.lang.String selectPattern,
org.apache.xalan.xpath.xml.PrefixResolver namespaceContext)
Returns the current input node that is being processed. |
org.w3c.dom.Node |
getSourceTreeFromInput(XSLTInputSource inputSource)
Given an input source, get the source tree. |
(package private) XSLTEngineImpl.StackGuard |
getStackGuard()
Get the object used to guard the stack from recursion. |
StylesheetRoot |
getStylesheet()
Get the current stylesheet for this processor. |
(package private) Stylesheet |
getStylesheetFromPIURL(java.lang.String xslURLString,
org.w3c.dom.Node fragBase,
java.lang.String xmlBaseIdent,
boolean isRoot)
Reset the state of the XSL processor by reading in a new XSL stylesheet. |
java.lang.String |
getStyleSheetURIfromDoc(org.w3c.dom.Node sourceTree)
Deprecated. |
(package private) java.net.URL |
getURLFromString(java.lang.String urlString)
Take a user string and try and parse XML, and also return the url. |
java.net.URL |
getURLFromString(java.lang.String urlString,
java.lang.String base)
Take a user string and try and parse XML, and also return the url. |
org.apache.xalan.xpath.XObject |
getVariable(org.apache.xalan.xpath.xml.QName qname)
Given a name, locate a variable in the current context, and return the Object. |
(package private) XSLTEngineImpl.VariableGuard |
getVariableGuard()
Get the object used to guard the variables stack from recursion. |
(package private) VariableStack |
getVarStack()
Get the variable stack, which is in charge of variables and parameters. |
org.apache.xalan.xpath.XLocator |
getXLocatorFromNode(org.w3c.dom.Node node)
Get an XLocator provider keyed by node. |
org.apache.xalan.xpath.xml.XMLParserLiaison |
getXMLProcessorLiaison()
Get the XML Parser Liaison that this processor uses. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Implement the ignorableWhitespace event. |
(package private) boolean |
isCDataResultElem(java.lang.String elementName)
Tell if a given element name should output it's text as cdata. |
(package private) static boolean |
isSpace(char ch)
Returns whether the specified ch conforms to the XML 1.0 definition of whitespace. |
(package private) boolean |
isWhiteSpace(java.lang.String string)
Tell if the string is whitespace. |
void |
message(org.w3c.dom.Node styleNode,
org.w3c.dom.Node sourceNode,
java.lang.String msg)
Warn the user of an problem. |
void |
message(java.lang.String msg)
Warn the user of an problem. |
void |
outputResultTreeFragment(org.apache.xalan.xpath.XObject obj,
org.apache.xalan.xpath.XPathSupport support)
Given a result tree fragment, walk the tree and output it to the result stream. |
void |
outputToResultTree(Stylesheet stylesheetTree,
java.lang.Object obj)
Output an object to the result tree by doing the right conversions. |
org.w3c.dom.Document |
parseXML(java.net.URL url,
org.xml.sax.DocumentHandler docHandler,
org.w3c.dom.Document docToRegister)
Read in the XML file, either producing a Document or calling SAX events, and register the document in a table. |
private boolean |
pendingHasDefaultNS()
Tell if the default namespace is listed in the pending attributes. |
(package private) long |
popDuration(java.lang.Object key)
Returns the duration since pushTime was called, in milliseconds. |
void |
process(XSLTInputSource inputSource,
XSLTInputSource stylesheetSource,
XSLTResultTarget outputTarget)
Transform the source tree to the output in the given result tree target. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Implement the processingInstruction event. |
StylesheetRoot |
processStylesheet(java.lang.String xsldocURLString)
Given a URI to an XSL stylesheet, Compile the stylesheet into an internal representation. |
StylesheetRoot |
processStylesheet(XSLTInputSource stylesheetSource)
Given a URI to an XSL stylesheet, Compile the stylesheet into an internal representation. |
(package private) void |
pushTime(java.lang.Object key)
Mark the time, so that displayDuration can later display the elapse. |
(package private) boolean |
qnameEqualsResultElemName(org.apache.xalan.xpath.xml.QName qname,
java.lang.String elementName)
Tell if a qualified name equals the current result tree name. |
void |
removeTraceListener(org.apache.xalan.xslt.trace.TraceListener tl)
Remove a trace listener. |
void |
reset()
Reset the state. |
protected void |
resetCurrentState(org.w3c.dom.Node xmlNode)
Reset the current element state |
(package private) void |
resolveTopLevelParams()
Resolve the params that were pushed by the caller. |
void |
setDiagnosticsOutput(java.io.OutputStream out)
If this is set, diagnostics will be written to the m_diagnosticsPrintWriter stream. |
void |
setDiagnosticsOutput(java.io.PrintWriter pw)
If this is set, diagnostics will be written to the m_diagnosticsPrintWriter stream. |
void |
setDocumentHandler(org.xml.sax.DocumentHandler listener)
Set the current DocumentHandler. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Implement the setDocumentLocator event. |
void |
setDOMFactory(org.w3c.dom.Document doc)
Set a DOM document factory, primarily for creating result tree fragments. |
void |
setExecContext(org.apache.xalan.xpath.xml.XMLParserLiaison liaison)
Set the execution context for XPath. |
void |
setFormatterListener(org.xml.sax.DocumentHandler flistener)
Set the current formatter listener. |
void |
setOutputFileName(java.lang.String filename)
Set the filename of the output document. |
void |
setOutputStream(java.io.OutputStream os)
Set the output stream that will be used. |
void |
setProblemListener(org.apache.xalan.xpath.xml.ProblemListener l)
Set the problem listener property. |
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 |
setSourceDocument(java.lang.String uri,
org.w3c.dom.Document doc)
Set a source document. |
void |
setStylesheet(StylesheetRoot stylesheetRoot)
Set the stylesheet for this processor. |
void |
setStylesheetParam(java.lang.String key,
java.lang.String expression)
Push a top-level stylesheet parameter. |
void |
setStylesheetParam(java.lang.String key,
org.apache.xalan.xpath.XObject value)
Push a top-level stylesheet parameter. |
void |
setTraceSelect(boolean b)
If this is set to true, simple traces of template calls are made. |
void |
setTraceTemplateChildren(boolean b)
If this is set to true, debug diagnostics about template children as they are being constructed will be written to the m_diagnosticsPrintWriter stream. |
void |
setTraceTemplates(boolean b)
If this is set to true, simple traces of template calls are made. |
boolean |
shouldStripSourceNode(org.w3c.dom.Node textNode)
Tells, through the combination of the default-space attribute on xsl:stylesheet, xsl:strip-space, xsl:preserve-space, and the xml:space attribute, whether or not extra whitespace should be stripped from the node. |
void |
startCDATA()
Report the start of a CDATA section. |
void |
startDocument()
Implement the startDocument event. |
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Report the start of DTD declarations, if any. |
void |
startElement(java.lang.String name,
org.xml.sax.AttributeList atts)
Implement the startElement event. |
void |
startEntity(java.lang.String name)
Report the beginning of an entity. |
(package private) void |
switchLiaisonsIfNeeded(org.w3c.dom.Node sourceNode,
org.w3c.dom.Node resultNode)
Switch the liaisons if needed according to the type of the source and result nodes. |
protected void |
traceSelect(org.w3c.dom.Element template,
org.w3c.dom.NodeList nl)
Print a trace of a selection being made. |
protected void |
traceTemplate(org.w3c.dom.Node templateNode)
Print a trace of a template that is being called, either by a match, name, or as part of for-each. |
(package private) java.lang.String |
trim(java.lang.String string)
Trim all leading and trailing whitespace in the specified String. |
(package private) int |
trimLen(java.lang.String string)
Tell how long the string will be if we trim the whitespace. |
void |
warn(int msg)
Warn the user of an problem. |
void |
warn(int msg,
java.lang.Object[] args)
Warn the user of an problem. |
void |
warn(org.w3c.dom.Node styleNode,
org.w3c.dom.Node sourceNode,
int msg)
Warn the user of an problem. |
void |
warn(org.w3c.dom.Node styleNode,
org.w3c.dom.Node sourceNode,
int msg,
java.lang.Object[] args)
Warn the user of an problem. |
void |
writeChildren(org.xml.sax.DocumentHandler flistener,
Stylesheet stylesheetTree,
ElemTemplateElement templateParent,
org.w3c.dom.Node sourceTree,
org.w3c.dom.Node sourceNode,
org.apache.xalan.xpath.xml.QName mode)
Write the children of a stylesheet element to the given listener. |
private void |
writeObject(java.io.ObjectOutputStream stream)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
m_stylesheetRoot
StylesheetRoot m_stylesheetRoot
- The root of a linked set of stylesheets.
m_rootDoc
org.w3c.dom.Node m_rootDoc
- The root document.
m_XSLTVerSupported
static final double m_XSLTVerSupported
- The minimum version of XSLT supported.
- See Also:
- Constant Field Values
m_XSLNameSpaceURL
static final java.lang.String m_XSLNameSpaceURL
- The namespace that we must match as a minumum for XSLT.
- See Also:
- Constant Field Values
m_XSLT4JNameSpaceURL
static final java.lang.String m_XSLT4JNameSpaceURL
- Special lotus namespace for built-in extensions.
- See Also:
- Constant Field Values
m_quietConflictWarnings
boolean m_quietConflictWarnings
- If this is set to true, do not warn about pattern
match conflicts.
m_traceTemplateChildren
private boolean m_traceTemplateChildren
m_traceTemplates
private boolean m_traceTemplates
m_traceSelects
boolean m_traceSelects
m_diagnosticsPrintWriter
java.io.PrintWriter m_diagnosticsPrintWriter
m_durationsTable
java.util.Hashtable m_durationsTable
m_stylesheetLocatorStack
java.util.Stack m_stylesheetLocatorStack
- The top of this stack should contain the currently processed
stylesheet SAX locator object.
m_pendingElementName
protected java.lang.String m_pendingElementName
- The pending element. We have to delay the call to
m_flistener.startElement(name, atts) because of the
xsl:attribute and xsl:copy calls. In other words,
the attributes have to be fully collected before you
can call startElement.
m_pendingStartDoc
protected boolean m_pendingStartDoc
- Flag to tell if a StartDocument event is pending.
m_pendingAttributes
org.apache.xalan.xpath.xml.MutableAttrListImpl m_pendingAttributes
- The pending attributes. We have to delay the call to
m_flistener.startElement(name, atts) because of the
xsl:attribute and xsl:copy calls. In other words,
the attributes have to be fully collected before you
can call startElement.
m_resultNameSpaces
protected java.util.Stack m_resultNameSpaces
- A stack to keep track of the result tree namespaces.
m_emptyNamespace
static final ResultNameSpace m_emptyNamespace
- This is pushed on the m_resultNameSpaces stack 'till a
xmlns attribute is found.
m_uniqueNSValue
int m_uniqueNSValue
- This is used whenever a unique namespace is needed.
m_translateCSS
boolean m_translateCSS
- Deprecated.
- Keyed on CSS2 property names, and holding dummy values for quickly looking up if a result tree element attribute is a CSS attribute or not.
- Keyed on CSS2 property names, and holding dummy values for quickly looking up if a result tree element attribute is a CSS attribute or not.
m_topLevelParams
java.util.Vector m_topLevelParams
- Vector of stylesheet parameters pushed by the API via
setStylesheetParam.
parserLiaisonClassName
java.lang.String parserLiaisonClassName
- The class name for the liaison. Defaults to Constants.LIAISON_CLASS
m_parserLiaison
org.apache.xalan.xpath.xml.XMLParserLiaison m_parserLiaison
- 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_flistener
org.xml.sax.DocumentHandler m_flistener
- The listener for formatting events. This should be
supplied by the Formatter object.
m_currentNode
protected org.w3c.dom.Node m_currentNode
- The current input element that is being processed.
m_needToCheckForInfiniteLoops
boolean m_needToCheckForInfiniteLoops
- This is set to true when the "ancestor" attribute of
the select element is encountered.
m_stackGuard
private XSLTEngineImpl.StackGuard m_stackGuard
- Object to guard agains infinite recursion when
doing queries.
m_variableGuard
private XSLTEngineImpl.VariableGuard m_variableGuard
- Object to guard against circular use of variables.
m_variableStacks
private VariableStack m_variableStacks
- The stack of Variable stacks. A VariableStack will be
pushed onto this stack for each template invocation.
m_outputFileName
private java.lang.String m_outputFileName
- This is for use by multiple output documents, to determine
the base directory for the output document. It needs to
be set by the caller.
m_cdataStack
java.util.Stack m_cdataStack
- Stack of Booleans to keep track of if we should be outputting
cdata instead of escaped text.
Optimization: use array stack instead of object stack.
m_resultTreeHandler
XSLTEngineImpl.ResultTreeHandler m_resultTreeHandler
- Output handler to bottleneck SAX events.
m_XSLMessages
private static org.apache.xalan.xpath.xml.XSLMessages m_XSLMessages
TRUE
private static final java.lang.Boolean TRUE
- Static true for pushing on the stack and the like.
FALSE
private static final java.lang.Boolean FALSE
- Static false for pushing on the stack and the like.
m_key_tables
transient java.util.Vector m_key_tables
- Table of tables of element keys.
- See Also:
KeyTable.
m_attrSetStack
transient java.util.Stack m_attrSetStack
- Stack for the purposes of flagging infinite recursion with
attribute sets.
m_countersTable
private transient CountersTable m_countersTable
- The table of counters for xsl:number support.
- See Also:
- ElemNumber
m_currentTemplateRuleIsNull
org.apache.xalan.xpath.xml.BoolStack m_currentTemplateRuleIsNull
- Is >0 when we're processing a for-each
m_recursionLimit
public static int m_recursionLimit
- 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.
m_traceListeners
transient java.util.Vector m_traceListeners
- List of listeners who are interested in tracing what's
being generated.
m_sourceTreeHandler
private org.apache.xalan.xpath.xml.FormatterToDOM m_sourceTreeHandler
m_outputStream
private java.io.OutputStream m_outputStream
m_isCData
private boolean m_isCData
m_mustFlushStartDoc
boolean m_mustFlushStartDoc
| Constructor Detail |
XSLTEngineImpl
protected XSLTEngineImpl()
throws org.xml.sax.SAXException
- Construct an XSLT processor that uses the default DTM (Document Table Model) liaison
and XML parser. As a general rule, you should use XSLTProcessorFactory to create an
instance of this class and provide access to the instance via the XSLTProcessor interface.
XSLTEngineImpl
public XSLTEngineImpl(java.lang.String parserLiaisonClassName) throws org.xml.sax.SAXException
- Construct an XSLT processor that uses the the given parser liaison.
As a general rule, you should use XSLTProcessorFactory to create an
instance of this class and provide access to the instance via the XSLTProcessor interface.
XSLTEngineImpl
public XSLTEngineImpl(org.apache.xalan.xpath.xml.XMLParserLiaison parserLiason)
- Construct an XSL processor that uses the the given parser liaison.
As a general rule, you should use XSLTProcessorFactory to create an
instance of this class and provide access to the instance via the XSLTProcessor interface.
XSLTEngineImpl
XSLTEngineImpl(org.apache.xalan.xpath.xml.XMLParserLiaison parserLiason, org.apache.xalan.xpath.XPathFactory xpathFactory)
- Construct an XSLT processor that can call back to the XML parser, in order to handle
included files and the like.
| Method Detail |
getVarStack
final VariableStack getVarStack()
- Get the variable stack, which is in charge of variables and
parameters.
getCountersTable
CountersTable getCountersTable()
- Get the table of counters, for optimized xsl:number support.
reset
public void
JAVADOC
org.apache.xalan.xslt.XSLTEngineImpl