|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.xsl.Stylesheet
A compiled XSL stylesheet. Stylesheets use 'transform' to transform an XML tree to an XML Document.
The resulting document can be printed, or it can be added to another XML tree.
Inner Class Summary | |
static class |
Stylesheet.Depend
|
Field Summary | |
protected java.util.ArrayList |
cacheDepends
|
protected java.lang.String |
errorPage
|
Constructor Summary | |
Stylesheet()
|
Method Summary | |
protected void |
addCacheDepend(java.lang.String path)
|
protected void |
addDepend(Path path)
|
protected void |
addDepend(Path path,
long lastModified)
|
java.util.ArrayList |
getCacheDepends()
|
java.lang.String |
getContentType()
|
java.util.ArrayList |
getDepends()
|
java.lang.String |
getErrorPage()
Returns the error page, like the error page in JSP. |
long |
getLastModified()
Returns last modification time |
java.lang.String |
getOutputAttribute(java.lang.String name)
Returns the named output attribute. |
void |
init(Path path)
|
boolean |
isModified()
|
void |
print(WriteStream out,
Node top)
|
com.caucho.java.LineMap |
print(WriteStream out,
Node top,
boolean withLines)
Prints a document generated by this stylesheet. |
protected void |
setOutputAttribute(java.lang.String name,
java.lang.String value)
|
Document |
transform(Node xml)
Transforms the XML node to a new XML document based on this stylesheet. |
Document |
transform(Node xml,
java.util.HashMap env)
Transforms the XML node to a new XML document based on this stylesheet. |
abstract Document |
transform(Node xml,
java.util.HashMap env,
Path pwd,
PageContext page)
Transforms the XML node to a new XML document based on this stylesheet. |
abstract CacheableDocument |
transformCacheable(Node xml,
java.util.HashMap env,
Path pwd,
PageContext page)
Transforms the XML node to a new XML document based on this stylesheet. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.ArrayList cacheDepends
protected java.lang.String errorPage
Constructor Detail |
public Stylesheet()
Method Detail |
public void init(Path path) throws java.lang.Exception
public java.lang.String getOutputAttribute(java.lang.String name)
protected void setOutputAttribute(java.lang.String name, java.lang.String value)
public java.lang.String getErrorPage()
public long getLastModified()
public boolean isModified()
protected void addDepend(Path path)
protected void addDepend(Path path, long lastModified)
public java.util.ArrayList getDepends()
protected void addCacheDepend(java.lang.String path)
public java.util.ArrayList getCacheDepends()
public abstract Document transform(Node xml, java.util.HashMap env, Path pwd, PageContext page) throws java.lang.Exception
Since Documents are DocumentFragments, calling functions can insert the contents using appendChild.
xml
- source xml to convertenv
- hash map of properties to pass to the stylesheetpwd
- the working directory for the stylesheetpage
- the JSP page context for XTPpublic Document transform(Node xml, java.util.HashMap env) throws java.lang.Exception
Since Documents are DocumentFragments, calling functions can insert the contents using appendChild.
xml
- source xml to convertenv
- hash map of properties to pass to the stylesheetpublic Document transform(Node xml) throws java.lang.Exception
Since Documents are DocumentFragments, calling functions can insert the contents using appendChild.
xml
- source xml to convertpublic abstract CacheableDocument transformCacheable(Node xml, java.util.HashMap env, Path pwd, PageContext page) throws java.lang.Exception
The CacheableDocument class lets a caller, like XTP, avoid recomputing the stylesheet when nothing has changed.
xml
- source xml to convertenv
- hash map of properties to pass to the stylesheetpwd
- the working directory for the stylesheetpage
- the JSP page context for XTPpublic java.lang.String getContentType()
public void print(WriteStream out, Node top) throws java.io.IOException
public com.caucho.java.LineMap print(WriteStream out, Node top, boolean withLines) throws java.io.IOException
out
- the write stream to send output to.top
- the root of the generated document
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |