public abstract class AbstractStylesheet extends java.lang.Object implements CauchoStylesheet, javax.xml.transform.Templates
The resulting document can be printed, or it can be added to another XML tree.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_errorPage |
protected java.util.Properties |
_output |
protected AbstractStylesheet |
_stylesheet |
protected javax.xml.transform.URIResolver |
_uriResolver |
CACHE_DEPENDS, DEPENDS, GLOBAL_PARAM
Constructor and Description |
---|
AbstractStylesheet() |
Modifier and Type | Method and Description |
---|---|
protected void |
addCacheDepend(java.lang.String path)
Adds a cache dependency.
|
protected void |
addDepend(PersistentDependency depend)
Add a dependency to the stylesheet.
|
java.lang.Object |
clone()
Clone the stylesheet.
|
protected void |
copy(AbstractStylesheet stylesheet)
Copies the current stylesheet into the new stylesheet.
|
java.util.ArrayList<java.lang.String> |
getCacheDepends() |
java.util.ArrayList<PersistentDependency> |
getDepends()
Returns the dependency list of the stylesheet.
|
java.util.Properties |
getOutputProperties()
Returns the output properties for the stylesheet.
|
Path |
getPath() |
java.lang.Object |
getProperty(java.lang.String name)
Returns a stylesheet property.
|
javax.xml.transform.URIResolver |
getURIResolver() |
void |
init(Path path)
Initialize the stylesheet with the search path.
|
boolean |
isModified()
Returns true if the any of the source stylesheets have been modified
since this stylesheet was compiled.
|
javax.xml.transform.Transformer |
newTransformer()
Creates a new transformer.
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a stylesheet property.
|
void |
setURIResolver(javax.xml.transform.URIResolver resolver) |
abstract void |
transform(org.w3c.dom.Node xml,
XMLWriter out,
TransformerImpl transformer)
Transforms the XML node to a new XML document based on this stylesheet.
|
protected java.util.Properties _output
protected AbstractStylesheet _stylesheet
protected java.lang.String _errorPage
protected javax.xml.transform.URIResolver _uriResolver
public void init(Path path) throws java.lang.Exception
path
- the path of the stylepath used to search for stylesheets.java.lang.Exception
public void setURIResolver(javax.xml.transform.URIResolver resolver)
public javax.xml.transform.URIResolver getURIResolver()
protected void copy(AbstractStylesheet stylesheet)
stylesheet
- the new stylesheet which will contain the copied values.public java.lang.Object clone()
clone
in class java.lang.Object
public java.util.Properties getOutputProperties()
getOutputProperties
in interface javax.xml.transform.Templates
public Path getPath()
public java.lang.Object getProperty(java.lang.String name)
public void setProperty(java.lang.String name, java.lang.Object value)
public javax.xml.transform.Transformer newTransformer()
newTransformer
in interface javax.xml.transform.Templates
public boolean isModified()
isModified
in interface CauchoStylesheet
protected void addDepend(PersistentDependency depend)
path
- the path of the source stylesheet.public java.util.ArrayList<PersistentDependency> getDepends()
protected void addCacheDepend(java.lang.String path)
public java.util.ArrayList<java.lang.String> getCacheDepends()
public abstract void transform(org.w3c.dom.Node xml, XMLWriter out, TransformerImpl transformer) throws java.lang.Exception
Since Documents are DocumentFragments, calling functions can insert the contents using appendChild.
xml
- source xml to convertout
- source xml to convertjava.lang.Exception