|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwriter2latex.xmerge.DOMDocument
writer2latex.xhtml.XhtmlDocument
public class XhtmlDocument
An implementation of Document
for
XHTML documents.
Field Summary | |
---|---|
private boolean |
bNoDoctype
|
private org.w3c.dom.Element |
bodyNode
|
private org.w3c.dom.Element |
contentNode
|
private org.w3c.dom.Element |
footerNode
|
private org.w3c.dom.Element |
headerNode
|
private org.w3c.dom.Element |
headNode
|
private int |
nType
|
private org.w3c.dom.Element |
panelNode
|
private static java.lang.String[] |
sEmpty
|
private java.lang.String |
sEncoding
|
private static java.lang.String[] |
sExtension
|
private org.w3c.dom.Element |
titleNode
|
static int |
XHTML_MATHML
Constant to identify XHTML + MathML documents |
static int |
XHTML_MATHML_XSL
Constant to identify XHTML + MathML documents using the xsl transformations from w3c's math working group (http://www.w3.org/Math/XSL/) |
static int |
XHTML10
Constant to identify XHTML 1.0 strict documents |
static int |
XHTML11
Constant to identify XHTML 1.1 documents (not used currently) |
Constructor Summary | |
---|---|
XhtmlDocument(java.lang.String name,
int nType)
Constructor. |
Method Summary | |
---|---|
private void |
collectNodes()
|
private void |
collectNodes(org.w3c.dom.Element elm)
|
void |
createHeaderFooter()
|
org.w3c.dom.Element |
getBodyNode()
|
org.w3c.dom.Element |
getContentNode()
|
java.lang.String |
getEncoding()
|
static java.lang.String |
getExtension(int nType)
|
java.lang.String |
getFileExtension()
Returns the file extension of the Document
represented. |
org.w3c.dom.Element |
getFooterNode()
|
org.w3c.dom.Element |
getHeaderNode()
|
org.w3c.dom.Element |
getHeadNode()
|
org.w3c.dom.Element |
getPanelNode()
|
org.w3c.dom.Element |
getTitleNode()
|
private boolean |
isEmpty(java.lang.String sTagName)
|
void |
read(java.io.InputStream is)
Read the Office Document from the specified
InputStream . |
void |
readFromTemplate(XhtmlDocument template)
|
void |
setContentDOM(org.w3c.dom.Document doc)
|
void |
setContentNode(org.w3c.dom.Element contentNode)
|
void |
setEncoding(java.lang.String s)
|
void |
setNoDoctype(boolean b)
|
private void |
write(org.w3c.dom.Node node,
int nLevel,
java.io.OutputStreamWriter osw)
|
void |
write(java.io.OutputStream os)
Write out content to the supplied OutputStream . |
private void |
write(java.lang.String s,
java.io.OutputStreamWriter osw)
|
private void |
writeAttribute(java.lang.String s,
java.io.OutputStreamWriter osw)
|
private void |
writeAttributes(org.w3c.dom.Node node,
java.io.OutputStreamWriter osw)
|
private void |
writeSpaces(int nCount,
java.io.OutputStreamWriter osw)
|
Methods inherited from class writer2latex.xmerge.DOMDocument |
---|
getContentDOM, getFileName, getName, initContentDOM, setContentDOM |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int XHTML10
public static final int XHTML11
public static final int XHTML_MATHML
public static final int XHTML_MATHML_XSL
private static final java.lang.String[] sExtension
private static final java.lang.String[] sEmpty
private int nType
private java.lang.String sEncoding
private boolean bNoDoctype
private org.w3c.dom.Element headNode
private org.w3c.dom.Element bodyNode
private org.w3c.dom.Element titleNode
private org.w3c.dom.Element contentNode
private org.w3c.dom.Element panelNode
private org.w3c.dom.Element headerNode
private org.w3c.dom.Element footerNode
Constructor Detail |
---|
public XhtmlDocument(java.lang.String name, int nType)
name
- Document
name.nType
- the type of documentMethod Detail |
---|
public static final java.lang.String getExtension(int nType)
public org.w3c.dom.Element getHeadNode()
public org.w3c.dom.Element getBodyNode()
public org.w3c.dom.Element getTitleNode()
public org.w3c.dom.Element getContentNode()
public void setContentNode(org.w3c.dom.Element contentNode)
public org.w3c.dom.Element getPanelNode()
public org.w3c.dom.Element getHeaderNode()
public org.w3c.dom.Element getFooterNode()
public void createHeaderFooter()
public void setContentDOM(org.w3c.dom.Document doc)
public void read(java.io.InputStream is) throws java.io.IOException
DOMDocument
Document
from the specified
InputStream
.
read
in interface Document
read
in class DOMDocument
is
- Office document InputStream
.
java.io.IOException
- If any I/O error occurs.public void readFromTemplate(XhtmlDocument template)
private void collectNodes(org.w3c.dom.Element elm)
private void collectNodes()
public void setEncoding(java.lang.String s)
public java.lang.String getEncoding()
public void setNoDoctype(boolean b)
public java.lang.String getFileExtension()
DOMDocument
Document
represented.
getFileExtension
in class DOMDocument
Document
.public void write(java.io.OutputStream os) throws java.io.IOException
OutputStream
.
(with pretty printing)
write
in interface OutputFile
write
in class DOMDocument
os
- XML OutputStream
.
java.io.IOException
- If any I/O error occurs.private boolean isEmpty(java.lang.String sTagName)
private void write(org.w3c.dom.Node node, int nLevel, java.io.OutputStreamWriter osw) throws java.io.IOException
java.io.IOException
private void writeAttributes(org.w3c.dom.Node node, java.io.OutputStreamWriter osw) throws java.io.IOException
java.io.IOException
private void writeSpaces(int nCount, java.io.OutputStreamWriter osw) throws java.io.IOException
java.io.IOException
private void write(java.lang.String s, java.io.OutputStreamWriter osw) throws java.io.IOException
java.io.IOException
private void writeAttribute(java.lang.String s, java.io.OutputStreamWriter osw) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |