public class XhtmlDocument extends DOMDocument
Document
for
XHTML documents.Modifier and Type | Field and Description |
---|---|
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
|
Constructor and Description |
---|
XhtmlDocument(java.lang.String name,
int nType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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() |
java.lang.String |
getMIMEType()
Get the MIME type of the
OutputFile . |
org.w3c.dom.Element |
getPanelNode() |
org.w3c.dom.Element |
getTitleNode() |
boolean |
isMasterDocument()
Test whether this document is part of the main document flow (master documents) or
an auxiliary document
|
void |
read(java.io.InputStream is)
Read the Office
Document from the specified
InputStream . |
void |
readFromTemplate(XhtmlDocument template) |
void |
setConfig(XhtmlConfig config) |
void |
setContentDOM(org.w3c.dom.Document doc) |
void |
setContentNode(org.w3c.dom.Element contentNode) |
void |
write(java.io.OutputStream os)
Write out content to the supplied
OutputStream . |
getContentDOM, getFileName, getName, initContentDOM, setContentDOM
public static final int XHTML10
public static final int XHTML11
public static final int XHTML_MATHML
public static final int XHTML_MATHML_XSL
public XhtmlDocument(java.lang.String name, int nType)
name
- Document
name.nType
- the type of documentpublic static final java.lang.String getExtension(int nType)
public java.lang.String getMIMEType()
OutputFile
OutputFile
.getMIMEType
in interface OutputFile
getMIMEType
in class DOMDocument
public boolean isMasterDocument()
OutputFile
isMasterDocument
in interface OutputFile
isMasterDocument
in class DOMDocument
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)
public void setConfig(XhtmlConfig config)
public java.lang.String getEncoding()
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.