Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## writer2latex.xhtml
Class XhtmlDocument

    java.lang.Object
      writer2latex.xmerge.DOMDocument
          writer2latex.xhtml.XhtmlDocument

All Implemented Interfaces:
  OutputFile, Document

    public class XhtmlDocument

extends DOMDocument

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

### XHTML10

    public static final int XHTML10

  Constant to identify XHTML 1.0 strict documents

  See Also:
    Constant Field Values

### XHTML11

    public static final int XHTML11

  Constant to identify XHTML 1.1 documents (not used currently)

  See Also:
    Constant Field Values

### XHTML_MATHML

    public static final int XHTML_MATHML

  Constant to identify XHTML + MathML documents

  See Also:
    Constant Field Values

### 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/)

  See Also:
    Constant Field Values

### sExtension

    private static final java.lang.String[] sExtension

### sEmpty

    private static final java.lang.String[] sEmpty

### nType

    private int nType

### sEncoding

    private java.lang.String sEncoding

### bNoDoctype

    private boolean bNoDoctype

### headNode

    private org.w3c.dom.Element headNode

### bodyNode

    private org.w3c.dom.Element bodyNode

### titleNode

    private org.w3c.dom.Element titleNode

### contentNode

    private org.w3c.dom.Element contentNode

### panelNode

    private org.w3c.dom.Element panelNode

### headerNode

    private org.w3c.dom.Element headerNode

### footerNode

    private org.w3c.dom.Element footerNode

Constructor Detail

### XhtmlDocument

    public XhtmlDocument(java.lang.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 Detail

### getExtension

    public static final java.lang.String getExtension(int nType)

### getHeadNode

    public org.w3c.dom.Element getHeadNode()

### getBodyNode

    public org.w3c.dom.Element getBodyNode()

### getTitleNode

    public org.w3c.dom.Element getTitleNode()

### getContentNode

    public org.w3c.dom.Element getContentNode()

### setContentNode

    public void setContentNode(org.w3c.dom.Element contentNode)

### getPanelNode

    public org.w3c.dom.Element getPanelNode()

### getHeaderNode

    public org.w3c.dom.Element getHeaderNode()

### getFooterNode

    public org.w3c.dom.Element getFooterNode()

### createHeaderFooter

    public void createHeaderFooter()

### setContentDOM

    public void setContentDOM(org.w3c.dom.Document doc)

### read

    public void read(java.io.InputStream is)
              throws java.io.IOException

  Description copied from class: `DOMDocument`
  Read the Office `Document` from the specified `InputStream`.

  Specified by:
    `read` in interface `Document`
  Overrides:
    `read` in class `DOMDocument`
  Parameters:
    `is` - Office document `InputStream`.
  Throws:
    `java.io.IOException` - If any I/O error occurs.

### readFromTemplate

    public void readFromTemplate(XhtmlDocument template)

### collectNodes

    private void collectNodes(org.w3c.dom.Element elm)

### collectNodes

    private void collectNodes()

### setEncoding

    public void setEncoding(java.lang.String s)

### getEncoding

    public java.lang.String getEncoding()

### setNoDoctype

    public void setNoDoctype(boolean b)

### getFileExtension

    public java.lang.String getFileExtension()

  Description copied from class: `DOMDocument`
  Returns the file extension of the `Document` represented.

  Overrides:
    `getFileExtension` in class `DOMDocument`
  Returns:
    file extension of the `Document`.

### write

    public void write(java.io.OutputStream os)
               throws java.io.IOException

  Write out content to the supplied `OutputStream`. (with pretty printing)

  Specified by:
    `write` in interface `OutputFile`
  Overrides:
    `write` in class `DOMDocument`
  Parameters:
    `os` - XML `OutputStream`.
  Throws:
    `java.io.IOException` - If any I/O error occurs.

### isEmpty

    private boolean isEmpty(java.lang.String sTagName)

### write

    private void write(org.w3c.dom.Node node,
                       int nLevel,
                       java.io.OutputStreamWriter osw)
                throws java.io.IOException

  Throws:
    `java.io.IOException`

### writeAttributes

    private void writeAttributes(org.w3c.dom.Node node,
                                 java.io.OutputStreamWriter osw)
                          throws java.io.IOException

  Throws:
    `java.io.IOException`

### writeSpaces

    private void writeSpaces(int nCount,
                             java.io.OutputStreamWriter osw)
                      throws java.io.IOException

  Throws:
    `java.io.IOException`

### write

    private void write(java.lang.String s,
                       java.io.OutputStreamWriter osw)
                throws java.io.IOException

  Throws:
    `java.io.IOException`

### writeAttribute

    private void writeAttribute(java.lang.String s,
                                java.io.OutputStreamWriter osw)
                         throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD