|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.transform.TransformerFactory | +--javax.xml.transform.sax.SAXTransformerFactory | +--com.caucho.xsl.AbstractStylesheetFactory
Abstract factory for creating stylesheets.
Fields inherited from class javax.xml.transform.sax.SAXTransformerFactory |
FEATURE, FEATURE_XMLFILTER |
Constructor Summary | |
protected |
AbstractStylesheetFactory()
|
Method Summary | |
Source |
getAssociatedStylesheet(Source source,
java.lang.String media,
java.lang.String title,
java.lang.String charset)
Returns the stylesheet source object associated with the given XML document. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns an implementation-specific attribute. |
java.lang.ClassLoader |
getClassLoader()
Gets the classloader for the stylesheet. |
java.lang.String |
getClassName()
|
ErrorListener |
getErrorListener()
Returns the error listener. |
boolean |
getFeature(java.lang.String name)
Returns an implementation-specific feature. |
boolean |
getLoadPrecompiledStylesheet()
Returns true if precompiled stylesheets should be loaded. |
Path |
getScriptPath()
|
Path |
getSearchPath()
Returns the stylesheet search path. |
Path |
getStylePath()
Returns the stylesheet search path. |
java.lang.String |
getSystemId()
Returns the system-id (file path) of the Source |
URIResolver |
getURIResolver()
Returns the URI to filename resolver. |
Path |
getWorkPath()
Gets the working directory. |
protected StylesheetImpl |
loadStylesheet(java.lang.String systemId,
java.lang.String className)
Loads the compiled stylesheet .class file |
Stylesheet |
newStylesheet(Document xsl)
Creates a new stylesheet from an XML document. |
Stylesheet |
newStylesheet(java.io.InputStream is)
Create a new stylesheet from a reader. |
Stylesheet |
newStylesheet(Path path)
|
Stylesheet |
newStylesheet(java.io.Reader reader)
Create a new stylesheet from a reader. |
Stylesheet |
newStylesheet(java.lang.String systemId)
Loads a stylesheet from a named file |
Templates |
newTemplates(Node node)
Convenience class to create a compiled stylesheet. |
Templates |
newTemplates(Source source)
Create a compiled stylesheet from an input stream. |
Templates |
newTemplates(java.lang.String systemId)
Convenience class to create a compiled stylesheet. |
TemplatesHandler |
newTemplatesHandler()
Returns a templates handler. |
Transformer |
newTransformer()
Create an identity transformer. |
Transformer |
newTransformer(Document xsl)
Convenience class to create a transformer instance. |
Transformer |
newTransformer(Source source)
Create a transformer from an input stream. |
TransformerHandler |
newTransformerHandler()
Create a new transformer handler. |
TransformerHandler |
newTransformerHandler(Source source)
Create a new transformer handler based on a source. |
TransformerHandler |
newTransformerHandler(Templates templates)
Create a new transformer handler based on a stylesheet. |
org.xml.sax.XMLFilter |
newXMLFilter(Source source)
Returns an XML filter from the transformer. |
org.xml.sax.XMLFilter |
newXMLFilter(Templates templates)
Returns an XML filter from the transformer. |
protected Node |
parseStylesheet(Source source)
Parses a stylesheet from the source. |
protected abstract Document |
parseXSL(ReadStream rs)
Parses the XSL into a DOM document. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets an implementation-specific attribute. |
void |
setClassLoader(java.lang.ClassLoader loader)
Sets the classloader for the stylesheet. |
void |
setClassName(java.lang.String className)
|
void |
setErrorListener(ErrorListener errorListener)
Sets the error listener. |
void |
setLoadPrecompiledStylesheet(boolean preload)
Returns true if precompiled stylesheets should be loaded. |
void |
setScriptPath(Path path)
|
void |
setSearchPath(Path path)
Sets the search path for stylesheets. |
void |
setStylePath(Path path)
Sets the search path for stylesheets. |
void |
setSystemId(java.lang.String systemId)
Sets the system-id (file path) of the Source. |
void |
setURIResolver(URIResolver uriResolver)
Sets the URI to filename resolver. |
void |
setWorkPath(Path path)
Sets the working directory. |
void |
transform(Document xsl,
Node xml,
java.io.OutputStream out)
Convenience class to transform a node. |
void |
transform(java.lang.String xsl,
Node xml,
java.io.OutputStream out)
Convenience class to transform a node. |
Methods inherited from class javax.xml.transform.TransformerFactory |
newInstance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AbstractStylesheetFactory()
Method Detail |
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in class TransformerFactory
name
- the attribute namepublic void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in class TransformerFactory
name
- the attribute namevalue
- the attribute valuepublic boolean getFeature(java.lang.String name)
getFeature
in class TransformerFactory
name
- the feature namepublic URIResolver getURIResolver()
getURIResolver
in class TransformerFactory
public void setURIResolver(URIResolver uriResolver)
setURIResolver
in class TransformerFactory
public ErrorListener getErrorListener()
getErrorListener
in class TransformerFactory
public void setErrorListener(ErrorListener errorListener)
setErrorListener
in class TransformerFactory
public java.lang.String getSystemId()
Source
javax.xml.transform.Source
public void setSystemId(java.lang.String systemId)
Source
javax.xml.transform.Source
systemId
- set the system id as a URLpublic void setStylePath(Path path)
setStylePath
in interface StylesheetFactory
path
- path containing stylesheets.public Path getStylePath()
getStylePath
in interface StylesheetFactory
public void setSearchPath(Path path)
path
- path containing stylesheets.public Path getSearchPath()
public void setScriptPath(Path path)
public Path getScriptPath()
public void setWorkPath(Path path)
public Path getWorkPath()
public void setClassName(java.lang.String className)
public java.lang.String getClassName()
public void setClassLoader(java.lang.ClassLoader loader)
setClassLoader
in interface StylesheetFactory
loader
- the new loader.public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface StylesheetFactory
public boolean getLoadPrecompiledStylesheet()
public void setLoadPrecompiledStylesheet(boolean preload)
public Source getAssociatedStylesheet(Source source, java.lang.String media, java.lang.String title, java.lang.String charset) throws TransformerConfigurationException
getAssociatedStylesheet
in class TransformerFactory
source
- the XML document which needs a stylesheet.media
- the media attribute for the stylesheettitle
- the title attribute for the stylesheetcharset
- the character encoding for the stylesheet result.public Transformer newTransformer(Source source) throws TransformerConfigurationException
newTransformer
in class TransformerFactory
source
- the source streampublic Transformer newTransformer() throws TransformerConfigurationException
newTransformer
in class TransformerFactory
public Stylesheet newStylesheet(Document xsl) throws java.lang.Exception
newStylesheet
in interface StylesheetFactory
public Stylesheet newStylesheet(java.io.Reader reader) throws java.lang.Exception
newStylesheet
in interface StylesheetFactory
public Stylesheet newStylesheet(java.io.InputStream is) throws java.lang.Exception
newStylesheet
in interface StylesheetFactory
com.caucho.transform.StylesheetFactory
is
- input stream to an XSL/StyleScript file.public Stylesheet newStylesheet(java.lang.String systemId) throws java.lang.Exception
newStylesheet
in interface StylesheetFactory
systemId
- the URL of the filepublic Stylesheet newStylesheet(Path path) throws java.lang.Exception
public Templates newTemplates(Source source) throws TransformerConfigurationException
newTemplates
in class TransformerFactory
source
- the source streampublic TransformerHandler newTransformerHandler() throws TransformerConfigurationException
newTransformerHandler
in class SAXTransformerFactory
public TransformerHandler newTransformerHandler(Source source) throws TransformerConfigurationException
newTransformerHandler
in class SAXTransformerFactory
public TransformerHandler newTransformerHandler(Templates templates) throws TransformerConfigurationException
newTransformerHandler
in class SAXTransformerFactory
javax.xml.transform.sax.SAXTransformerFactory
templates
- compiled stylesheetpublic TemplatesHandler newTemplatesHandler() throws TransformerConfigurationException
newTemplatesHandler
in class SAXTransformerFactory
source
- the source filepublic org.xml.sax.XMLFilter newXMLFilter(Source source) throws TransformerConfigurationException
newXMLFilter
in class SAXTransformerFactory
source
- the source filepublic org.xml.sax.XMLFilter newXMLFilter(Templates templates) throws TransformerConfigurationException
newXMLFilter
in class SAXTransformerFactory
source
- the source fileprotected Node parseStylesheet(Source source) throws TransformerConfigurationException
public Templates newTemplates(Node node) throws TransformerConfigurationException
node
- DOM source for the stylesheet.public Templates newTemplates(java.lang.String systemId) throws TransformerConfigurationException
systemId
- source path for the stylesheet.public Transformer newTransformer(Document xsl) throws TransformerConfigurationException
xsl
- DOM source for the stylesheet.public void transform(Document xsl, Node xml, java.io.OutputStream out) throws java.lang.Exception
xsl
- DOM containing the parsed xsl.xml
- DOM document node.out
- output stream destination.public void transform(java.lang.String xsl, Node xml, java.io.OutputStream out) throws java.lang.Exception
xsl
- path name to the xsl file.xml
- dom source document.out
- output stream destination.protected abstract Document parseXSL(ReadStream rs) throws TransformerConfigurationException
rs
- the input stream.protected StylesheetImpl loadStylesheet(java.lang.String systemId, java.lang.String className) throws java.lang.Exception
className
- the mangled classname for the stylesheet
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |