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 Details

    • XHTML10

      public static final int XHTML10
      Constant to identify XHTML 1.0 strict documents
      See Also:
    • XHTML11

      public static final int XHTML11
      Constant to identify XHTML 1.1 documents (not used currently)
      See Also:
    • XHTML_MATHML

      public static final int XHTML_MATHML
      Constant to identify XHTML + MathML documents
      See Also:
    • 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:
  • 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

    • getExtension

      public static final String getExtension(int nType)
    • getHeadNode

      public Element getHeadNode()
    • getBodyNode

      public Element getBodyNode()
    • getTitleNode

      public Element getTitleNode()
    • getContentNode

      public Element getContentNode()
    • setContentNode

      public void setContentNode(Element contentNode)
    • getPanelNode

      public Element getPanelNode()
    • getHeaderNode

      public Element getHeaderNode()
    • getFooterNode

      public Element getFooterNode()
    • createHeaderFooter

      public void createHeaderFooter()
    • setContentDOM

      public void setContentDOM(Document doc)
    • read

      public void read(InputStream is) throws 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:
      IOException - If any I/O error occurs.
    • readFromTemplate

      public void readFromTemplate(XhtmlDocument template)
    • setEncoding

      public void setEncoding(String s)
    • getEncoding

      public String getEncoding()
    • setNoDoctype

      public void setNoDoctype(boolean b)
    • setAddBOM

      public void setAddBOM(boolean b)
    • setUseNamedEntities

      public void setUseNamedEntities(boolean b)
    • setXsltPath

      public void setXsltPath(String s)
    • getFileExtension

      public 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(OutputStream os) throws 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:
      IOException - If any I/O error occurs.