|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xalan.xslt.XSLTEngineImpl
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)
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.
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
XSLTProcessorFactory
,
XSLTProcessor
Field Summary | |
protected org.w3c.dom.Node |
m_currentNode
The current input element that is being processed. |
protected java.lang.String |
m_pendingElementName
The pending element. |
protected boolean |
m_pendingStartDoc
Flag to tell if a StartDocument event is pending. |
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. |
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(XMLParserLiaison parserLiason)
Construct an XSL processor that uses the the given parser liaison. |
Method Summary | |
void |
addTraceListener(TraceListener tl)
Add a trace listener for the purposes of debugging and diagnosis. |
void |
associateXLocatorToNode(org.w3c.dom.Node node,
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,
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,
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. |
XMLParserLiaison |
createLiaison()
Get a Liaison class, as specified by parserLiaisonClassName property Patch from Costin Manolache |
StylesheetRoot |
createStylesheetRoot(java.lang.String baseIdentifier)
Bottleneck the creation of the stylesheet for derivation purposes. |
XBoolean |
createXBoolean(boolean b)
Convenience function to create an XBoolean. |
XMLParserLiaison |
createXercesLiaison()
Create a Xerces Liaison - used for special handling of DTM Patch from Costin Manolache |
XNodeSet |
createXNodeSet(org.w3c.dom.Node n)
Convenience function to create an XNodeSet from a node. |
XNodeSet |
createXNodeSet(org.w3c.dom.NodeList nl)
Convenience function to create an XNodeSet. |
XNull |
createXNull()
Convenience function to create an XNull. |
XNumber |
createXNumber(double d)
Convenience function to create an XNumber. |
XObject |
createXObject(java.lang.Object o)
Convenience function to create an XObject. |
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. |
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. |
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. |
org.xml.sax.DocumentHandler |
getDocumentHandler()
Get the current DocumentHandler. |
org.w3c.dom.Document |
getDOMFactory()
Get a DOM document, primarily for creating result tree fragments. |
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,
PrefixResolver nscontext)
Given a valid element key, return the corresponding node list. |
java.lang.String |
getOutputFileName()
Get the filename of the output document, if it was set. |
ProblemListener |
getProblemListener()
Get the problem listener property. |
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,
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. |
StylesheetRoot |
getStylesheet()
Get the current stylesheet for this processor. |
java.lang.String |
getStyleSheetURIfromDoc(org.w3c.dom.Node sourceTree)
Deprecated. |
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. |
XObject |
getVariable(QName qname)
Given a name, locate a variable in the current context, and return the Object. |
XLocator |
getXLocatorFromNode(org.w3c.dom.Node node)
Get an XLocator provider keyed by node. |
XMLParserLiaison |
getXMLProcessorLiaison()
Get the XML Parser Liaison that this processor uses. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Implement the ignorableWhitespace event. |
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(XObject obj,
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. |
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. |
void |
removeTraceListener(TraceListener tl)
Remove a trace listener. |
void |
reset()
Reset the state. |
protected void |
resetCurrentState(org.w3c.dom.Node xmlNode)
Reset the current element state |
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(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(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,
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. |
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. |
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,
QName mode)
Write the children of a stylesheet element to the given listener. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.lang.String m_pendingElementName
protected boolean m_pendingStartDoc
protected java.util.Stack m_resultNameSpaces
protected org.w3c.dom.Node m_currentNode
public static int m_recursionLimit
Constructor Detail |
protected XSLTEngineImpl() throws org.xml.sax.SAXException
XSLTProcessorFactory
,
XSLTProcessor
public XSLTEngineImpl(java.lang.String parserLiaisonClassName) throws org.xml.sax.SAXException
XSLTProcessorFactory
,
XSLTProcessor
public XSLTEngineImpl(XMLParserLiaison parserLiason)
XMLParserLiaison
- A liaison to an XML parser.XMLParserLiaison
,
XSLTProcessorFactory
,
XSLTProcessor
Method Detail |
public void reset()
public XMLParserLiaison createLiaison() throws org.xml.sax.SAXException
public XMLParserLiaison createXercesLiaison() throws org.xml.sax.SAXException
public void process(XSLTInputSource inputSource, XSLTInputSource stylesheetSource, XSLTResultTarget outputTarget) throws org.xml.sax.SAXException
XSLTProcessor#Process(XSLTInputSource, XSLTInputSource, XSLTResultTarget)
method.
inputSource
- The input source.stylesheetSource
- The stylesheet source. May be null if source has a xml-stylesheet PI.outputTarget
- The output source tree.public StylesheetRoot createStylesheetRoot(java.lang.String baseIdentifier) throws java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException, org.xml.sax.SAXException
public StylesheetRoot processStylesheet(XSLTInputSource stylesheetSource) throws org.xml.sax.SAXException
xmldocURLString
- The URL to the input XML document.public StylesheetRoot processStylesheet(java.lang.String xsldocURLString) throws org.xml.sax.SAXException
xmldocURLString
- The URL to the input XML document.public void setStylesheet(StylesheetRoot stylesheetRoot)
public StylesheetRoot getStylesheet()
public java.lang.String getOutputFileName()
public void setOutputFileName(java.lang.String filename)
public java.net.URL getURLFromString(java.lang.String urlString, java.lang.String base) throws org.xml.sax.SAXException
public org.w3c.dom.Node getSourceTreeFromInput(XSLTInputSource inputSource) throws org.xml.sax.SAXException
public org.w3c.dom.Document parseXML(java.net.URL url, org.xml.sax.DocumentHandler docHandler, org.w3c.dom.Document docToRegister) throws org.xml.sax.SAXException, java.io.IOException
url
- The location of the XML.docHandler
- The SAX event handler.docToRegister
- If using a SAX event handler, the object to register in the source docs table.public StylesheetSpec getAssociatedStylesheet(XSLTInputSource source, java.lang.String media, java.lang.String charset) throws org.xml.sax.SAXException
media
- The media attribute to be matched. May be null, in which
case the prefered stylesheet will be used (i.e. alternate = no).title
- The value of the title attribute to match. May be null.charset
- The value of the charset attribute to match. May be null.public java.util.Vector getAssociatedStylesheets(XSLTInputSource source, java.lang.String mediaRequest, java.lang.String charsetRequest) throws org.xml.sax.SAXException
media
- The media attribute to be matched. May be null, in which
case the prefered stylesheet will be used (i.e. alternate = no).title
- The value of the title attribute to match. May be null.charset
- The value of the charset attribute to match. May be null.public java.lang.String findURIFromDoc(org.w3c.dom.Document doc)
public java.util.Hashtable getSourceDocsTable()
public void setSourceDocument(java.lang.String uri, org.w3c.dom.Document doc)
public void outputToResultTree(Stylesheet stylesheetTree, java.lang.Object obj) throws org.xml.sax.SAXException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException
obj
- the Java object to output. If its of an Xpublic boolean functionAvailable(java.lang.String namespace, java.lang.String extensionName)
public boolean elementAvailable(java.lang.String namespace, java.lang.String extensionName)
public java.lang.Object extFunction(java.lang.String namespace, java.lang.String extensionName, java.util.Vector argVec, java.lang.Object methodKey) throws org.xml.sax.SAXException
public void addTraceListener(TraceListener tl) throws java.util.TooManyListenersException
tl
- Trace listener to be added.public void removeTraceListener(TraceListener tl)
tl
- Trace listener to be removed.public void message(java.lang.String msg) throws org.xml.sax.SAXException
public void message(org.w3c.dom.Node styleNode, org.w3c.dom.Node sourceNode, java.lang.String msg) throws org.xml.sax.SAXException
public void warn(int msg) throws org.xml.sax.SAXException
public void warn(int msg, java.lang.Object[] args) throws org.xml.sax.SAXException
public void warn(org.w3c.dom.Node styleNode, org.w3c.dom.Node sourceNode, int msg) throws org.xml.sax.SAXException
public void warn(org.w3c.dom.Node styleNode, org.w3c.dom.Node sourceNode, int msg, java.lang.Object[] args) throws org.xml.sax.SAXException
public void error(java.lang.String msg) throws org.xml.sax.SAXException
public void error(int msg) throws org.xml.sax.SAXException
public void error(int msg, java.lang.Object[] args) throws org.xml.sax.SAXException
public void error(int msg, java.lang.Exception e) throws org.xml.sax.SAXException
public void error(int msg, java.lang.Object[] args, java.lang.Exception e) throws org.xml.sax.SAXException
public void error(org.w3c.dom.Node styleNode, org.w3c.dom.Node sourceNode, int msg) throws org.xml.sax.SAXException
public void error(org.w3c.dom.Node styleNode, org.w3c.dom.Node sourceNode, int msg, java.lang.Object[] args) throws org.xml.sax.SAXException
protected void displayDuration(java.lang.String info, java.lang.Object key)
public void setDiagnosticsOutput(java.io.OutputStream out)
public void setDiagnosticsOutput(java.io.PrintWriter pw)
protected void diag(java.lang.String s)
public void setTraceTemplates(boolean b)
public void setTraceSelect(boolean b)
public void setTraceTemplateChildren(boolean b)
public void setQuietConflictWarnings(boolean b)
b
- true if conflict warnings should be suppressed.protected void traceSelect(org.w3c.dom.Element template, org.w3c.dom.NodeList nl) throws org.xml.sax.SAXException
protected void traceTemplate(org.w3c.dom.Node templateNode) throws org.xml.sax.SAXException
protected void diagnoseTemplateChildren(org.w3c.dom.Node templateChild, org.w3c.dom.Node sourceNode)
protected void cloneToResultTree(Stylesheet stylesheetTree, org.w3c.dom.Node node, boolean shouldCloneWithChildren, boolean overrideStrip, boolean shouldCloneAttributes) throws org.xml.sax.SAXException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException
public void writeChildren(org.xml.sax.DocumentHandler flistener, Stylesheet stylesheetTree, ElemTemplateElement templateParent, org.w3c.dom.Node sourceTree, org.w3c.dom.Node sourceNode, QName mode) throws org.xml.sax.SAXException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException
stylesheetTree
- The stylesheet object that holds the fragment.templateParent
- The template element that holds the fragment.sourceTree
- The source tree document context.sourceNode
- The current source context node.mode
- The mode under which the template is operating.public void outputResultTreeFragment(XObject obj, XPathSupport support) throws org.xml.sax.SAXException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException
protected void copyAttributeToTarget(org.w3c.dom.Attr attr, org.w3c.dom.Node contextNode, Stylesheet stylesheetTree, MutableAttrListImpl attrList, org.w3c.dom.Element namespaceContext) throws org.xml.sax.SAXException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException
protected void copyAttributesToAttList(org.w3c.dom.Element contextNode, Stylesheet stylesheetTree, MutableAttrListImpl attList) throws org.xml.sax.SAXException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException
public boolean shouldStripSourceNode(org.w3c.dom.Node textNode) throws org.xml.sax.SAXException
textNode
- A text node from the source tree.public XPathSupport getExecContext()
public void setExecContext(XMLParserLiaison liaison)
public XMLParserLiaison getXMLProcessorLiaison()
public XString createXString(java.lang.String s)
s
- A valid string.public XObject createXObject(java.lang.Object o)
o
- Any java object.public XNumber createXNumber(double d)
d
- Any double number.public XBoolean createXBoolean(boolean b)
b
- boolean value.public XNodeSet createXNodeSet(org.w3c.dom.NodeList nl)
nl
- A NodeList object.public XNodeSet createXNodeSet(org.w3c.dom.Node n)
n
- A DOM node.public XNull createXNull()
public org.w3c.dom.NodeList getNodeSetByKey(org.w3c.dom.Node doc, java.lang.String name, java.lang.String ref, PrefixResolver nscontext) throws org.xml.sax.SAXException
public XObject getVariable(QName qname) throws org.xml.sax.SAXException
public XLocator getXLocatorFromNode(org.w3c.dom.Node node)
public void associateXLocatorToNode(org.w3c.dom.Node node, XLocator xlocator)
public void deassociateXLocatorToNode(org.w3c.dom.Node node)
public java.lang.String getStyleSheetURIfromDoc(org.w3c.dom.Node sourceTree)
public void setStylesheetParam(java.lang.String key, java.lang.String expression)
key
- The name of the param.expression
- An expression that will be evaluated.public void setStylesheetParam(java.lang.String key, XObject value)
key
- The name of the param.value
- An XObject that will be used.public org.w3c.dom.Node getSourceNode()
public org.w3c.dom.Node getSourceNode(java.lang.String selectPattern, PrefixResolver namespaceContext) throws org.xml.sax.SAXException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException
protected final void resetCurrentState(org.w3c.dom.Node xmlNode)
protected org.w3c.dom.Element findElementByAttribute(org.w3c.dom.Node elem, java.lang.String targetElementName, java.lang.String targetAttributeName, java.lang.String targetAttributeValue)
public org.xml.sax.DocumentHandler getDocumentHandler()
public void setDocumentHandler(org.xml.sax.DocumentHandler listener)
public org.xml.sax.DocumentHandler getFormatterListener()
public void setFormatterListener(org.xml.sax.DocumentHandler flistener)
public void setDOMFactory(org.w3c.dom.Document doc)
public org.w3c.dom.Document getDOMFactory()
public void setProblemListener(ProblemListener l)
l
- A ProblemListener interface.public ProblemListener getProblemListener()
public void setOutputStream(java.io.OutputStream os)
public void setDocumentLocator(org.xml.sax.Locator locator)
public void startDocument() throws org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
public void startElement(java.lang.String name, org.xml.sax.AttributeList atts) throws org.xml.sax.SAXException
public void endElement(java.lang.String name) throws org.xml.sax.SAXException
public void startCDATA() throws org.xml.sax.SAXException
The contents of the CDATA section will be reported through the regular characters event.
endCDATA()
public void endCDATA() throws org.xml.sax.SAXException
startCDATA()
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
public void charactersRaw(char[] ch, int start, int length) throws org.xml.sax.SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
public void comment(char[] ch, int start, int length) throws org.xml.sax.SAXException
This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read).
ch
- An array holding the characters in the comment.start
- The starting position in the array.length
- The number of characters to use from the array.public void startEntity(java.lang.String name) throws org.xml.sax.SAXException
The start and end of the document entity are not reported. The start and end of the external DTD subset are reported using the pseudo-name "[dtd]". All other events must be properly nested within start/end entity events.
Note that skipped entities will be reported through the skippedEntity event, which is part of the ContentHandler interface.
name
- The name of the entity. If it is a parameter
entity, the name will begin with '%'.endEntity(java.lang.String)
,
DeclHandler.internalEntityDecl(java.lang.String, java.lang.String)
,
DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)
public void endEntity(java.lang.String name) throws org.xml.sax.SAXException
name
- The name of the entity that is ending.startEntity(java.lang.String)
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
Any declarations are assumed to be in the internal subset unless otherwise indicated by a startEntity event.
name
- The document type name.publicId
- The declared public identifier for the
external DTD subset, or null if none was declared.systemId
- The declared system identifier for the
external DTD subset, or null if none was declared.endDTD()
,
startEntity(java.lang.String)
public void endDTD() throws org.xml.sax.SAXException
startDTD(java.lang.String, java.lang.String, java.lang.String)
protected void flushPending() throws org.xml.sax.SAXException
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs60 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |