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 intConstant to identify HTML5 documentsstatic final intConstant to identify XHTML + MathML documentsstatic final intConstant to identify XHTML 1.0 strict documentsstatic final intConstant to identify XHTML 1.1 documentsstatic final intConstant to identify HTML5 documents with .xhtml extension -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest whether this document contains mathematical formulasvoidstatic final StringgetExtension(int nType) Returns the file extension of theDocumentrepresented.Get the MIME type of theOutputFile.booleanhasMath()Does this document contain any math nodes?booleanTest whether this document is part of the main document flow (master documents) or an auxiliary documentvoidread(InputStream is) Read the OfficeDocumentfrom the specifiedInputStream.voidreadFromTemplate(XhtmlDocument template) voidsetConfig(XhtmlConfig config) voidsetContentDOM(Document doc) voidsetContentNode(Element contentNode) voidwrite(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:
-
XHTML5
public static final int XHTML5Constant to identify HTML5 documents with .xhtml extension- 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:OutputFileGet the MIME type of theOutputFile.- Specified by:
getMIMETypein interfaceOutputFile- Overrides:
getMIMETypein classDOMDocument- Returns:
- string representation of the MIME type
-
isMasterDocument
public boolean isMasterDocument()Description copied from interface:OutputFileTest whether this document is part of the main document flow (master documents) or an auxiliary document- Specified by:
isMasterDocumentin interfaceOutputFile- Overrides:
isMasterDocumentin classDOMDocument- Returns:
- true if this document is a master document
-
containsMath
public boolean containsMath()Description copied from interface:OutputFileTest whether this document contains mathematical formulas- Specified by:
containsMathin interfaceOutputFile- Overrides:
containsMathin classDOMDocument- Returns:
- true if the document contains formulas
-
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:DOMDocumentRead the OfficeDocumentfrom the specifiedInputStream.- Overrides:
readin classDOMDocument- Parameters:
is- Office documentInputStream.- Throws:
IOException- If any I/O error occurs.
-
readFromTemplate
-
setConfig
-
getEncoding
-
getFileExtension
Description copied from class:DOMDocumentReturns the file extension of theDocumentrepresented.- Overrides:
getFileExtensionin classDOMDocument- Returns:
- file extension of the
Document.
-
write
Write out content to the suppliedOutputStream. (with pretty printing)- Specified by:
writein interfaceOutputFile- Overrides:
writein classDOMDocument- Parameters:
os- XMLOutputStream.- Throws:
IOException- If any I/O error occurs.
-