writer2latex.xhtml

Class XhtmlDocument

Implemented Interfaces:
Document, OutputFile

public class XhtmlDocument
extends DOMDocument

An implementation of Document for XHTML documents.

Field Summary

static int
XHTML10
Constant to identify XHTML 1.0 strict documents
static int
XHTML11
Constant to identify XHTML 1.1 documents (not used currently)
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/)

Constructor Summary

XhtmlDocument(String name, int nType)
Constructor.

Method Summary

void
createHeaderFooter()
Element
getBodyNode()
Element
getContentNode()
String
getEncoding()
static String
getExtension(int nType)
String
getFileExtension()
Element
getFooterNode()
Element
getHeadNode()
Element
getHeaderNode()
Element
getPanelNode()
Element
getTitleNode()
void
read(InputStream is)
Reads the content from the InputStream into the Document.

This method may not be thread-safe.

void
readFromTemplate(XhtmlDocument template)
void
setAddBOM(boolean b)
void
setContentDOM(Document doc)
void
setContentNode(Element contentNode)
void
setEncoding(String s)
void
setNoDoctype(boolean b)
void
setUseNamedEntities(boolean b)
void
setXsltPath(String s)
void
write(OutputStream os)
Write out content to the supplied OutputStream.

Methods inherited from class writer2latex.xmerge.DOMDocument

getContentDOM, getFileExtension, getFileName, getName, initContentDOM, read, setContentDOM, write

Field Details

XHTML10

public static final int XHTML10
Constant to identify XHTML 1.0 strict documents
Field Value:
0

XHTML11

public static final int XHTML11
Constant to identify XHTML 1.1 documents (not used currently)
Field Value:
1

XHTML_MATHML

public static final int XHTML_MATHML
Constant to identify XHTML + MathML documents
Field Value:
2

XHTML_MATHML_XSL

public static final 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/)
Field Value:
3

Constructor Details

XhtmlDocument

public XhtmlDocument(String name,
                     int nType)
Constructor. This constructor also creates the DOM (minimal: root, head, title and body node only) - unlike the constructors in writer2latex.xmerge.DOMDocument.
Parameters:
name - Document name.
nType - the type of document

Method Details

createHeaderFooter

public void createHeaderFooter()

getBodyNode

public Element getBodyNode()

getContentNode

public Element getContentNode()

getEncoding

public String getEncoding()

getExtension

public static final String getExtension(int nType)

getFileExtension

public String getFileExtension()
Overrides:
getFileExtension in interface DOMDocument

getFooterNode

public Element getFooterNode()

getHeadNode

public Element getHeadNode()

getHeaderNode

public Element getHeaderNode()

getPanelNode

public Element getPanelNode()

getTitleNode

public Element getTitleNode()

read

public void read(InputStream is)
            throws IOException
Reads the content from the InputStream into the Document.

This method may not be thread-safe. Implementations may or may not synchronize this method. User code (i.e. caller) must make sure that calls to this method are thread-safe.

Specified by:
read in interface Document
Overrides:
read in interface DOMDocument
Parameters:
is - InputStream to read in the Document content.

readFromTemplate

public void readFromTemplate(XhtmlDocument template)

setAddBOM

public void setAddBOM(boolean b)

setContentDOM

public void setContentDOM(Document doc)

setContentNode

public void setContentNode(Element contentNode)

setEncoding

public void setEncoding(String s)

setNoDoctype

public void setNoDoctype(boolean b)

setUseNamedEntities

public void setUseNamedEntities(boolean b)

setXsltPath

public void setXsltPath(String s)

write

public void write(OutputStream os)
            throws IOException
Write out content to the supplied OutputStream. (with pretty printing)
Specified by:
write in interface OutputFile
Overrides:
write in interface DOMDocument
Parameters:
os - XML OutputStream.