| java.lang.Object java.io.Writer com.caucho.xsl.XslWriter
XslWriter | public class XslWriter extends Writer implements ExtendedLocator(Code) | | Writer stream for generating stylesheet output.
Because XSL produces an XML tree, XslWriter contains extra
methods for constructing the tree.
The writer methods, e.g. println, add to the current text node.
In addition, stylesheets can access variables through getPwd and
getPage.
|
Inner Class :static class StackItem | |
Method Summary | |
public void | addCacheDepend(Path path) Add a dependency to the result document. | public void | addNamespace(String prefix, String url) | public void | attribute(String url, String prefix, String local, String qName, String value) | public void | attribute(String qName, String value) | public void | bindNamespace(String prefix, String url) | public void | close() | public void | copyOf(Object value) Adds a deep copy of the node to the current node. | public boolean | disableEscaping(boolean disable) | public void | flush() flush is meaningless for XslWriter. | public int | getColumnNumber() | ArrayList | getDepends() Returns the Path dependency list of the generated stylesheet. | public boolean | getDisableEscaping() | public String | getFilename() | public int | getLineNumber() | public javax.servlet.jsp.PageContext | getPage() | public Object | getParameter(String name) | public Object | getProperty(String name) Returns the attribute with the given name. | public Iterator | getPropertyNames() Lists the names of all the attributes. | public String | getPublicId() | public Path | getPwd() | public String | getSystemId() | public TransformerImpl | getTransformer() | void | init(XMLWriter xmlWriter) | boolean | isCacheable() Returns true if the generated stylesheet is currently cacheable. | public boolean | isFlagFirst(int id) Implementation function so jsp:decl tags aren't repeated. | public XslWriter | openResultDocument(OutputStream os) | public OutputStream | openWrite(ExprEnvironment env, String href) | public void | popAttribute(XMLWriter writer) Sets the attribute value to the current text, and sets the current node
to the parent. | public void | popComment() Sets the comment data to the current text, and sets the current
to the the parent. | public void | popCopy(Node copyNode) Pops the copy. | public void | popElement() | public Node | popFragment(XMLWriter oldWriter) Returns the generated fragment. | public void | popPi(String name) Sets the PI data to the current text, and sets the current node
to the parent. | public void | popText() Pop the accumulated text to the DOM. | public void | print(String string) Adds a string to the current text node. | public void | print(boolean b) Adds a boolean to the current text node. | public void | print(char ch) Adds a character to the current text node. | public void | print(int i) Adds an integer to the current text node. | public void | print(long l) Adds an integer to the current text node. | public void | print(float f) Adds a float to the current text node. | public void | print(double d) Adds a double to the current text node. | public void | print(Object o) Adds an object to the current text node, converted by
String.valueOf. | public void | println() Adds a newline to the current text node. | public void | println(boolean b) Adds a boolean to the current text node. | public void | println(String s) Adds a string to the current text node. | public void | println(char ch) Adds a character to the current text node. | public void | println(int i) Adds an integer to the current text node. | public void | println(long l) Adds a long to the current text node. | public void | println(double d) Adds a double to the current text node. | public void | println(float f) Adds a float to the current text node. | public void | println(Object o) Adds an object to the current text node, converted by String.valueOf. | public XMLWriter | pushAttribute(String name) Adds a new attribute with the given name to the current node, making
the attribute the current node. | public XMLWriter | pushAttribute(String name, NamespaceContext namespace) Adds a new attribute with the given name to the current node, making
the attribute the current node. | public XMLWriter | pushAttribute(String prefix, String local, String url) Adds a namespace-aware attribute to the current node, making the
new attribute the current node.
Each pushAttribute should be matched by a popAttribute.
Parameters: prefix - the prefix of the element name, e.g. | public XMLWriter | pushAttributeNs(String name, String url) Adds a new attribute to the current node, making the new attribute the
current node. | public void | pushComment() Adds an empty comment to the current node, making
the attribute the current node. | public void | pushCopy(Node copyNode) Copies the node without attributes or children. | public void | pushElement(String name) Adds a new element to the current node, making the new element the
current node. | public void | pushElement(String name, NamespaceContext namespace) Adds a new element to the current node, making the new element the
current node. | public void | pushElement(String url, String prefix, String local, String name) Adds a namespace-aware element to the current node, making the
new element the current node.
Each pushElement should be matched by a popElement.
Parameters: prefix - the prefix of the element name, e.g. | public void | pushElementNs(String name, String url) Adds a new element to the current node, making the new element the
current node. | public XMLWriter | pushFragment() Starts a fragment. | public void | pushPi() | public void | removeProperty(String name) removes the attribute with the given name. | public void | setAttribute(String prefix, String local, String url, String value) Adds a namespace-aware attribute to the current node, making the
new attribute the current node.
Each pushAttribute should be matched by a popAttribute.
Parameters: prefix - the prefix of the element name, e.g. | public void | setAttribute(String name, NamespaceContext namespace, String value) Adds a new attribute with the given name to the current node, making
the attribute the current node. | public void | setAttribute(String name, String value) Directly sets an attribute with a value. | public void | setLocation(String systemId, String filename, int line) | public void | setNotCacheable() Indicate that the result document is not cacheable. | public void | setProperty(String name, Object value) Sets the attribute with the given name. | void | startElement(String url, String prefix, String local, String qName) | public void | valueOf(Object node) Adds a the contents of the node to the current node. | public void | write(int ch) Adds a byte to the current text node. | public void | write(byte[] buf, int offset, int length) Adds a byte buffer to the current text node. | public void | write(char[] buf, int offset, int length) Adds a char buffer to the current text node. |
addCacheDepend | public void addCacheDepend(Path path)(Code) | | Add a dependency to the result document. When the result is checked
for modification, this path will also be checked.
|
attribute | public void attribute(String url, String prefix, String local, String qName, String value) throws IOException, SAXException(Code) | | Sends the attribute to the output
Parameters: url - the namespace for the attribute name Parameters: prefix - the prefix for the attribute name Parameters: local - the local attribute name Parameters: qName - the full qualified name Parameters: value - the attribute's value |
attribute | public void attribute(String qName, String value) throws IOException, SAXException(Code) | | Sends the attribute to the output
Parameters: url - the namespace for the attribute name Parameters: prefix - the prefix for the attribute name Parameters: local - the local attribute name Parameters: qName - the full qualified name Parameters: value - the attribute's value |
flush | public void flush()(Code) | | flush is meaningless for XslWriter. It's only added to conform to Writer.
|
getColumnNumber | public int getColumnNumber()(Code) | | |
getDepends | ArrayList getDepends()(Code) | | Returns the Path dependency list of the generated stylesheet.
|
getDisableEscaping | public boolean getDisableEscaping()(Code) | | |
getLineNumber | public int getLineNumber()(Code) | | |
getProperty | public Object getProperty(String name)(Code) | | Returns the attribute with the given name.
|
getPropertyNames | public Iterator getPropertyNames()(Code) | | Lists the names of all the attributes.
|
getPwd | public Path getPwd()(Code) | | |
isCacheable | boolean isCacheable()(Code) | | Returns true if the generated stylesheet is currently cacheable.
|
isFlagFirst | public boolean isFlagFirst(int id)(Code) | | Implementation function so jsp:decl tags aren't repeated.
|
popComment | public void popComment() throws IOException, SAXException(Code) | | Sets the comment data to the current text, and sets the current
to the the parent.
|
print | public void print(String string)(Code) | | Adds a string to the current text node.
|
print | public void print(boolean b)(Code) | | Adds a boolean to the current text node.
|
print | public void print(char ch)(Code) | | Adds a character to the current text node.
|
print | public void print(int i)(Code) | | Adds an integer to the current text node.
|
print | public void print(long l)(Code) | | Adds an integer to the current text node.
|
print | public void print(float f)(Code) | | Adds a float to the current text node.
|
print | public void print(double d)(Code) | | Adds a double to the current text node.
|
print | public void print(Object o)(Code) | | Adds an object to the current text node, converted by
String.valueOf.
|
println | public void println()(Code) | | Adds a newline to the current text node.
|
println | public void println(boolean b)(Code) | | Adds a boolean to the current text node.
|
println | public void println(String s)(Code) | | Adds a string to the current text node.
|
println | public void println(char ch)(Code) | | Adds a character to the current text node.
|
println | public void println(int i)(Code) | | Adds an integer to the current text node.
|
println | public void println(long l)(Code) | | Adds a long to the current text node.
|
println | public void println(double d)(Code) | | Adds a double to the current text node.
|
println | public void println(float f)(Code) | | Adds a float to the current text node.
|
println | public void println(Object o)(Code) | | Adds an object to the current text node, converted by String.valueOf.
|
pushAttribute | public XMLWriter pushAttribute(String prefix, String local, String url) throws IOException, SAXException(Code) | | Adds a namespace-aware attribute to the current node, making the
new attribute the current node.
Each pushAttribute should be matched by a popAttribute.
Parameters: prefix - the prefix of the element name, e.g. xsl Parameters: local - the local part of the element name, e.g. template Parameters: url - the namespace url, e.g. http://www.xml.org/... |
pushAttributeNs | public XMLWriter pushAttributeNs(String name, String url) throws IOException, SAXException(Code) | | Adds a new attribute to the current node, making the new attribute the
current node.
Each pushAttributeNs should be matched by a popAttribute.
Parameters: name - name of the element Parameters: url - namespace url |
pushComment | public void pushComment() throws IOException, SAXException(Code) | | Adds an empty comment to the current node, making
the attribute the current node.
|
pushElement | public void pushElement(String name) throws IOException, SAXException(Code) | | Adds a new element to the current node, making the new element the
current node.
Each pushElement should be matched by a popElement.
Parameters: name - name of the element |
pushElement | public void pushElement(String name, NamespaceContext namespace) throws IOException, SAXException(Code) | | Adds a new element to the current node, making the new element the
current node.
Each pushElement should be matched by a popElement.
Parameters: name - name of the element Parameters: namespace - namespace context |
pushElement | public void pushElement(String url, String prefix, String local, String name) throws IOException, SAXException(Code) | | Adds a namespace-aware element to the current node, making the
new element the current node.
Each pushElement should be matched by a popElement.
Parameters: prefix - the prefix of the element name, e.g. xsl Parameters: local - the local part of the element name, e.g. template Parameters: url - the namespace url, e.g. http://www.xml.org/... |
pushElementNs | public void pushElementNs(String name, String url) throws IOException, SAXException(Code) | | Adds a new element to the current node, making the new element the
current node.
Each pushElement should be matched by a popElement.
Parameters: name - name of the element Parameters: url - namespace url |
removeProperty | public void removeProperty(String name)(Code) | | removes the attribute with the given name.
|
setAttribute | public void setAttribute(String prefix, String local, String url, String value) throws IOException, SAXException(Code) | | Adds a namespace-aware attribute to the current node, making the
new attribute the current node.
Each pushAttribute should be matched by a popAttribute.
Parameters: prefix - the prefix of the element name, e.g. xsl Parameters: local - the local part of the element name, e.g. template Parameters: url - the namespace url, e.g. http://www.xml.org/... |
setNotCacheable | public void setNotCacheable()(Code) | | Indicate that the result document is not cacheable.
|
setProperty | public void setProperty(String name, Object value)(Code) | | Sets the attribute with the given name.
|
write | public void write(int ch)(Code) | | Adds a byte to the current text node.
|
write | public void write(byte[] buf, int offset, int length)(Code) | | Adds a byte buffer to the current text node.
|
write | public void write(char[] buf, int offset, int length)(Code) | | Adds a char buffer to the current text node.
|
|
|