|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The transformation processor -- use XSLTProcessorFactory
to instantiate an implementation of this interface.
It's the responsibility of the implementation (XSLTEngineImpl),
collaborating with a XMLParserLiaison, 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.
Use the process(...)
are the primary
public entry points.
Look at the Process class main() method for
for an advanced usage example.
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.
Method Summary | |
void |
addTraceListener(TraceListener tl)
Deprecated. Add a trace listener for the purposes of debugging and diagnosis. |
XBoolean |
createXBoolean(boolean b)
Deprecated. Convenience function to create an XBoolean. |
XNodeSet |
createXNodeSet(org.w3c.dom.Node n)
Deprecated. Convenience function to create an XNodeSet from a node. |
XNodeSet |
createXNodeSet(org.w3c.dom.NodeList nl)
Deprecated. Convenience function to create an XNodeSet. |
XNull |
createXNull()
Deprecated. Convenience function to create an XNull. |
XNumber |
createXNumber(double d)
Deprecated. Convenience function to create an XNumber. |
XObject |
createXObject(java.lang.Object o)
Deprecated. Convenience function to create an XObject. |
XString |
createXString(java.lang.String s)
Deprecated. Convenience function to create an XString. |
StylesheetSpec |
getAssociatedStylesheet(XSLTInputSource source,
java.lang.String media,
java.lang.String charset)
Deprecated. Get the preferred stylesheet for the XSLTInputSource XML document, as identified by the xml-stylesheet PI, and matching the media and charset criteria. |
java.util.Vector |
getAssociatedStylesheets(XSLTInputSource source,
java.lang.String media,
java.lang.String charset)
Deprecated. Get a list of stylesheet specifications for the XSLTInputSource XML document, as identified by the xml-stylesheet PI, and matching the media and charset criteria. |
org.xml.sax.DocumentHandler |
getDocumentHandler()
Deprecated. Get the current SAX DocumentHandler (the same object as the FormatterListener), or null if none has been set. |
org.xml.sax.DocumentHandler |
getFormatterListener()
Deprecated. Get the current FormatterListener (SAX DocumentHandler), or null if none has been set. |
ProblemListener |
getProblemListener()
Deprecated. Get the problem listener property. |
org.w3c.dom.Node |
getSourceTreeFromInput(XSLTInputSource inputSource)
Deprecated. Get the DOM Node from the XSLTInputSource object. |
StylesheetRoot |
getStylesheet()
Deprecated. Get the current Stylesheet setting for this XSLTProcessor. |
XMLParserLiaison |
getXMLProcessorLiaison()
Deprecated. Get the XMLParserLiaison that this processor uses. |
void |
process(XSLTInputSource xmlSource,
XSLTInputSource xslStylesheet,
XSLTResultTarget resultTree)
Deprecated. Use the XSL stylesheet to transform the XML input, placing the result in the result tree. |
StylesheetRoot |
processStylesheet(java.lang.String xsldocURLString)
Deprecated. Given a URL to (or file name of) an XSL stylesheet, Compile the stylesheet into an internal representation, and use it to set the XSLTProcessor Stylesheet property. |
StylesheetRoot |
processStylesheet(XSLTInputSource stylesheetSource)
Deprecated. Compile the XSL stylesheet represented by an XSLTInputSource object into an internal representation, and use it to set the XSLTProcessor Stylesheet property. |
void |
removeTraceListener(TraceListener tl)
Deprecated. Remove a trace listener. |
void |
reset()
Deprecated. Reset the XSLTProcessor state. |
void |
setDiagnosticsOutput(java.io.OutputStream out)
Deprecated. If set, diagnostics will be written to the m_diagnosticsPrintWriter stream. |
void |
setDiagnosticsOutput(java.io.PrintWriter pw)
Deprecated. If set, diagnostics will be written to the m_diagnosticsPrintWriter stream. |
void |
setDocumentHandler(org.xml.sax.DocumentHandler listener)
Deprecated. Set the current SAX DocumentHandler (the same object as the FormatterListener). |
void |
setFormatterListener(org.xml.sax.DocumentHandler flistener)
Deprecated. Set the FormatterListener (the SAX DocumentHandler). |
void |
setOutputStream(java.io.OutputStream os)
Deprecated. Set the output stream. |
void |
setProblemListener(ProblemListener l)
Deprecated. Set the problem listener property. |
void |
setQuietConflictWarnings(boolean b)
Deprecated. If set to true (the default), pattern conflict warnings are not printed to the diagnostics stream. |
void |
setStylesheet(StylesheetRoot stylesheetRoot)
Deprecated. Use a compiled stylesheet to set the Stylesheet property for this processor. |
void |
setStylesheetParam(java.lang.String key,
java.lang.String expression)
Deprecated. Set a top-level stylesheet parameter. |
void |
setStylesheetParam(java.lang.String key,
XObject value)
Deprecated. Submit a top-level stylesheet parameter. |
void |
setTraceSelect(boolean b)
Deprecated. If set to true, selection events are traced. |
void |
setTraceTemplateChildren(boolean b)
Deprecated. If set to true (the default is false), as template children are being constructed, debug diagnostics are written to the m_diagnosticsPrintWriter stream. |
void |
setTraceTemplates(boolean b)
Deprecated. If set to true, template calls are traced. |
Methods inherited from interface org.xml.sax.DocumentHandler |
characters,
endDocument,
endElement,
ignorableWhitespace,
processingInstruction,
setDocumentLocator,
startDocument,
startElement |
Methods inherited from interface org.xml.sax.ext.LexicalHandler |
comment,
endCDATA,
endDTD,
endEntity,
startCDATA,
startDTD,
startEntity |
Method Detail |
public void process(XSLTInputSource xmlSource, XSLTInputSource xslStylesheet, XSLTResultTarget resultTree) throws org.xml.sax.SAXException
xmlSource
- The XML input to be transformed.xslStylesheet
- The XSL stylesheet to be used for the transformation. May be null if XML input
has an XSL stylesheet PI.resultTree
- The tree where the result of the transformation is placed.public StylesheetRoot processStylesheet(XSLTInputSource stylesheetSource) throws org.xml.sax.SAXException
stylesheetSource
- The XSL stylesheet.public StylesheetRoot processStylesheet(java.lang.String xsldocURLString) throws org.xml.sax.SAXException
xsldocURLString
- The URL to the XSL stylesheet.public void setOutputStream(java.io.OutputStream os)
public void reset()
public org.w3c.dom.Node getSourceTreeFromInput(XSLTInputSource inputSource) throws org.xml.sax.SAXException
public void setStylesheet(StylesheetRoot stylesheetRoot)
public StylesheetRoot getStylesheet()
public XMLParserLiaison getXMLProcessorLiaison()
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 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 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 void setStylesheetParam(java.lang.String key, XObject value)
key
- The name of the param.value
- An XObject that will be used.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 org.xml.sax.DocumentHandler getFormatterListener()
public void setFormatterListener(org.xml.sax.DocumentHandler flistener)
public org.xml.sax.DocumentHandler getDocumentHandler()
public void setDocumentHandler(org.xml.sax.DocumentHandler listener)
public void addTraceListener(TraceListener tl) throws java.util.TooManyListenersException
tl
- Trace listener to be added.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.public void removeTraceListener(TraceListener tl)
tl
- Trace listener to be removed.public void setDiagnosticsOutput(java.io.OutputStream out)
setDiagnosticsOutput(java.io.PrintWriter)
.
public void setDiagnosticsOutput(java.io.PrintWriter pw)
public void setProblemListener(ProblemListener l)
l
- A ProblemListener interface.public ProblemListener getProblemListener()
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs70 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |