Package writer2latex.xhtml
Class XhtmlDocument
java.lang.Object
writer2latex.base.DOMDocument
writer2latex.xhtml.XhtmlDocument
- All Implemented Interfaces:
OutputFile
An implementation of
Document
for
XHTML documents.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Constant to identify HTML5 documentsstatic final int
Constant to identify XHTML + MathML documentsstatic final int
Constant to identify XHTML 1.0 strict documentsstatic final int
Constant to identify XHTML 1.1 documents -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
static final String
getExtension
(int nType) Returns the file extension of theDocument
represented.Get the MIME type of theOutputFile
.boolean
hasMath()
Does this document contain any math nodes?boolean
Test whether this document is part of the main document flow (master documents) or an auxiliary documentvoid
read
(InputStream is) Read the OfficeDocument
from the specifiedInputStream
.void
readFromTemplate
(XhtmlDocument template) void
setConfig
(XhtmlConfig config) void
setContentDOM
(Document doc) void
setContentNode
(Element contentNode) void
write
(OutputStream os) Write out content to the suppliedOutputStream
.Methods inherited from class writer2latex.base.DOMDocument
getContentDOM, getFileName, getName, initContentDOM, setContentDOM
-
Field Details
-
XHTML10
public static final int XHTML10Constant to identify XHTML 1.0 strict documents- See Also:
-
XHTML11
public static final int XHTML11Constant to identify XHTML 1.1 documents- See Also:
-
XHTML_MATHML
public static final int XHTML_MATHMLConstant to identify XHTML + MathML documents- See Also:
-
HTML5
public static final int HTML5Constant to identify HTML5 documents- See Also:
-
-
Constructor Details
-
XhtmlDocument
Constructor. This constructor also creates the DOM (minimal: root, head, title and body node only)- Parameters:
name
- name of this documentnType
- the type of document
-
-
Method Details
-
getExtension
-
getMIMEType
Description copied from interface:OutputFile
Get the MIME type of theOutputFile
.- Specified by:
getMIMEType
in interfaceOutputFile
- Overrides:
getMIMEType
in classDOMDocument
- Returns:
- string representation of the MIME type
-
isMasterDocument
public boolean isMasterDocument()Description copied from interface:OutputFile
Test whether this document is part of the main document flow (master documents) or an auxiliary document- Specified by:
isMasterDocument
in interfaceOutputFile
- Overrides:
isMasterDocument
in classDOMDocument
- Returns:
- true if this document is a master document
-
getHeadNode
-
getBodyNode
-
getTitleNode
-
getContentNode
-
setContentNode
-
getPanelNode
-
getHeaderNode
-
setContentDOM
-
hasMath
public boolean hasMath()Does this document contain any math nodes?- Returns:
- true if so
-
read
Description copied from class:DOMDocument
Read the OfficeDocument
from the specifiedInputStream
.- Overrides:
read
in classDOMDocument
- Parameters:
is
- Office documentInputStream
.- Throws:
IOException
- If any I/O error occurs.
-
readFromTemplate
-
setConfig
-
getEncoding
-
getFileExtension
Description copied from class:DOMDocument
Returns the file extension of theDocument
represented.- Overrides:
getFileExtension
in classDOMDocument
- Returns:
- file extension of the
Document
.
-
write
Write out content to the suppliedOutputStream
. (with pretty printing)- Specified by:
write
in interfaceOutputFile
- Overrides:
write
in classDOMDocument
- Parameters:
os
- XMLOutputStream
.- Throws:
IOException
- If any I/O error occurs.
-