|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.services.BaseInitable org.apache.turbine.services.BaseService org.apache.turbine.services.TurbineBaseService net.sourceforge.blogentis.turbine.BlogXSLTService
Implementation of the Turbine XSLT Service. It transforms xml with a given xsl file. XSL stylesheets are compiled and cached (if the property in TurbineResources.properties is set) to improve speeds.
Field Summary | |
protected java.util.Map |
cache
Cache of compiled StyleSheetRoots. |
protected boolean |
caching
Property to control the caching of StyleSheetRoots. |
protected java.lang.String |
path
Path to style sheets used for tranforming well-formed XML documents. |
Fields inherited from class org.apache.turbine.services.BaseService |
configuration, name, serviceBroker |
Fields inherited from class org.apache.turbine.services.BaseInitable |
initableBroker, isInitialized |
Fields inherited from interface org.apache.turbine.services.xslt.XSLTService |
SERVICE_NAME, STYLESHEET_CACHING, STYLESHEET_PATH |
Constructor Summary | |
BlogXSLTService()
|
Method Summary | |
protected javax.xml.transform.Templates |
compileTemplates(java.lang.String source)
Compile Templates from an input file. |
protected java.lang.String |
getFileName(java.lang.String templateName)
Get a valid and existing filename from a template name. |
protected javax.xml.transform.Templates |
getTemplates(java.lang.String xslName)
Retrieves Templates. |
void |
init()
Initialize the TurbineXSLT Service. |
java.lang.String |
transform(java.lang.String xslName,
org.w3c.dom.Node in)
Execute an xslt |
void |
transform(java.lang.String xslName,
org.w3c.dom.Node in,
java.io.Writer out)
Execute an xslt |
java.lang.String |
transform(java.lang.String xslName,
java.io.Reader in)
Execute an xslt |
void |
transform(java.lang.String xslName,
java.io.Reader in,
java.io.Writer out)
Execute an xslt |
protected void |
transform(java.lang.String xslName,
javax.xml.transform.Source xmlin,
javax.xml.transform.Result xmlout)
|
Methods inherited from class org.apache.turbine.services.TurbineBaseService |
init, init, init, shutdown |
Methods inherited from class org.apache.turbine.services.BaseService |
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker |
Methods inherited from class org.apache.turbine.services.BaseInitable |
getInit, getInitableBroker, setInit, setInitableBroker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.turbine.services.Service |
getConfiguration, getName, getProperties, setName, setServiceBroker |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, init, setInitableBroker, shutdown |
Field Detail |
protected boolean caching
protected java.lang.String path
protected java.util.Map cache
Constructor Detail |
public BlogXSLTService()
Method Detail |
public void init() throws org.apache.turbine.services.InitializationException
init
in interface org.apache.turbine.services.Initable
org.apache.turbine.services.InitializationException
protected java.lang.String getFileName(java.lang.String templateName)
protected javax.xml.transform.Templates compileTemplates(java.lang.String source) throws java.lang.Exception
java.lang.Exception
protected javax.xml.transform.Templates getTemplates(java.lang.String xslName) throws java.lang.Exception
This method is synchronized on the xsl cache so that a thread does not attempt to load a StyleSheetRoot from the cache while it is still being compiled.
java.lang.Exception
protected void transform(java.lang.String xslName, javax.xml.transform.Source xmlin, javax.xml.transform.Result xmlout) throws java.lang.Exception
java.lang.Exception
public void transform(java.lang.String xslName, java.io.Reader in, java.io.Writer out) throws java.lang.Exception
transform
in interface org.apache.turbine.services.xslt.XSLTService
java.lang.Exception
public java.lang.String transform(java.lang.String xslName, java.io.Reader in) throws java.lang.Exception
transform
in interface org.apache.turbine.services.xslt.XSLTService
java.lang.Exception
public void transform(java.lang.String xslName, org.w3c.dom.Node in, java.io.Writer out) throws java.lang.Exception
transform
in interface org.apache.turbine.services.xslt.XSLTService
java.lang.Exception
public java.lang.String transform(java.lang.String xslName, org.w3c.dom.Node in) throws java.lang.Exception
transform
in interface org.apache.turbine.services.xslt.XSLTService
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |