ODFPY  1.2.0
odf.odf2xhtml.ODF2XHTMLembedded Class Reference

The ODF2XHTML parses an ODF file and produces XHTML. More...

Inheritance diagram for odf.odf2xhtml.ODF2XHTMLembedded:
Collaboration diagram for odf.odf2xhtml.ODF2XHTMLembedded:

Public Member Functions

def __init__
 
- Public Member Functions inherited from odf.odf2xhtml.ODF2XHTML
def __init__
 
def set_plain (self)
 Tell the parser to not generate CSS. More...
 
def set_embedable (self)
 Tells the converter to only output the parts inside the <body> More...
 
def add_style_file
 Add a link to an external style file. More...
 
def writeout (self, s)
 
def writedata (self)
 
def opentag
 Create an open HTML tag. More...
 
def closetag
 Close an open HTML tag. More...
 
def emptytag
 
def characters (self, data)
 
def startElementNS (self, tag, qname, attrs)
 
def endElementNS (self, tag, qname)
 
def handle_starttag (self, tag, method, attrs)
 
def handle_endtag (self, tag, attrs, method)
 
def unknown_starttag (self, tag, attrs)
 
def unknown_endtag (self, tag, attrs)
 
def s_ignorexml (self, tag, attrs)
 Ignore this xml element and all children of it It will automatically stop ignoring. More...
 
def s_ignorecont (self, tag, attrs)
 Stop processing the text nodes. More...
 
def s_processcont (self, tag, attrs)
 Start processing the text nodes. More...
 
def classname (self, attrs)
 Generate a class name from a style name. More...
 
def get_anchor (self, name)
 Create a unique anchor id for a href name. More...
 
def purgedata (self)
 
def e_dc_title (self, tag, attrs)
 Get the title from the meta data and create a HTML <title> More...
 
def e_dc_metatag (self, tag, attrs)
 Any other meta data is added as a <meta> element. More...
 
def e_dc_contentlanguage (self, tag, attrs)
 Set the content language. More...
 
def e_dc_creator (self, tag, attrs)
 Set the content creator. More...
 
def s_custom_shape (self, tag, attrs)
 A <draw:custom-shape> is made into a

in HTML which is then styled.
More...
 
def e_custom_shape (self, tag, attrs)
 End the <draw:frame> More...
 
def s_draw_frame (self, tag, attrs)
 A <draw:frame> is made into a

in HTML which is then styled.
More...
 
def e_draw_frame (self, tag, attrs)
 End the <draw:frame> More...
 
def s_draw_fill_image (self, tag, attrs)
 
def rewritelink (self, imghref)
 Intended to be overloaded if you don't store your pictures in a Pictures subfolder. More...
 
def s_draw_image (self, tag, attrs)
 A <draw:image> becomes an element. More...
 
def s_draw_object (self, tag, attrs)
 A <draw:object> is embedded object in the document (e.g. More...
 
def s_draw_object_ole (self, tag, attrs)
 A <draw:object-ole> is embedded OLE object in the document (e.g. More...
 
def s_draw_page (self, tag, attrs)
 A <draw:page> is a slide in a presentation. More...
 
def e_draw_page (self, tag, attrs)
 
def s_draw_textbox (self, tag, attrs)
 
def e_draw_textbox (self, tag, attrs)
 End the <draw:text-box> More...
 
def html_body (self, tag, attrs)
 
def generate_stylesheet (self)
 
def generate_footnotes (self)
 
def s_office_automatic_styles (self, tag, attrs)
 
def s_office_document_content (self, tag, attrs)
 First tag in the content.xml file. More...
 
def e_office_document_content (self, tag, attrs)
 Last tag. More...
 
def s_office_master_styles (self, tag, attrs)
 
def s_office_presentation (self, tag, attrs)
 For some odd reason, OpenOffice Impress doesn't define a default-style for the 'paragraph'. More...
 
def e_office_presentation (self, tag, attrs)
 
def s_office_spreadsheet (self, tag, attrs)
 
def e_office_spreadsheet (self, tag, attrs)
 
def s_office_styles (self, tag, attrs)
 
def s_office_text (self, tag, attrs)
 OpenDocument text. More...
 
def e_office_text (self, tag, attrs)
 
def s_style_handle_properties (self, tag, attrs)
 Copy all attributes to a struct. More...
 
def s_style_default_style (self, tag, attrs)
 A default style is like a style on an HTML tag. More...
 
def e_style_default_style (self, tag, attrs)
 
def s_style_font_face (self, tag, attrs)
 It is possible that the HTML browser doesn't know how to show a particular font. More...
 
def s_style_footer (self, tag, attrs)
 
def e_style_footer (self, tag, attrs)
 
def s_style_footer_style (self, tag, attrs)
 
def s_style_header (self, tag, attrs)
 
def e_style_header (self, tag, attrs)
 
def s_style_header_style (self, tag, attrs)
 
def s_style_default_page_layout (self, tag, attrs)
 Collect the formatting for the default page layout style. More...
 
def s_style_page_layout (self, tag, attrs)
 Collect the formatting for the page layout style. More...
 
def e_style_page_layout (self, tag, attrs)
 End this style. More...
 
def s_style_master_page (self, tag, attrs)
 Collect the formatting for the page layout style. More...
 
def s_style_style (self, tag, attrs)
 Collect the formatting for the style. More...
 
def e_style_style (self, tag, attrs)
 End this style. More...
 
def s_table_table (self, tag, attrs)
 Start a table. More...
 
def e_table_table (self, tag, attrs)
 End a table. More...
 
def s_table_table_cell (self, tag, attrs)
 Start a table cell. More...
 
def e_table_table_cell (self, tag, attrs)
 End a table cell. More...
 
def s_table_table_column (self, tag, attrs)
 Start a table column. More...
 
def s_table_table_row (self, tag, attrs)
 Start a table row. More...
 
def e_table_table_row (self, tag, attrs)
 End a table row. More...
 
def s_text_a (self, tag, attrs)
 Anchors start. More...
 
def e_text_a (self, tag, attrs)
 End an anchor or bookmark reference. More...
 
def s_text_bookmark (self, tag, attrs)
 Bookmark definition. More...
 
def s_text_bookmark_ref (self, tag, attrs)
 Bookmark reference. More...
 
def s_text_h (self, tag, attrs)
 Headings start. More...
 
def e_text_h (self, tag, attrs)
 Headings end Side-effect: If there is no title in the metadata, then it is taken from the first heading of any level. More...
 
def s_text_line_break (self, tag, attrs)
 Force a line break (
) More...
 
def s_text_list (self, tag, attrs)
 Start a list (. More...
 
def e_text_list (self, tag, attrs)
 End a list. More...
 
def s_text_list_item (self, tag, attrs)
 Start list item. More...
 
def e_text_list_item (self, tag, attrs)
 End list item. More...
 
def s_text_list_level_style_bullet (self, tag, attrs)
 CSS doesn't have the ability to set the glyph to a particular character, so we just go through the available glyphs. More...
 
def e_text_list_level_style_bullet (self, tag, attrs)
 
def s_text_list_level_style_number (self, tag, attrs)
 
def e_text_list_level_style_number (self, tag, attrs)
 
def s_text_note (self, tag, attrs)
 
def e_text_note (self, tag, attrs)
 
def collectnote (self, s)
 
def s_text_note_body (self, tag, attrs)
 
def e_text_note_body (self, tag, attrs)
 
def e_text_note_citation (self, tag, attrs)
 
def s_text_p (self, tag, attrs)
 Paragraph. More...
 
def e_text_p (self, tag, attrs)
 End Paragraph. More...
 
def s_text_s (self, tag, attrs)
 Generate a number of spaces. More...
 
def s_text_span (self, tag, attrs)
 The <text:span> element matches the element in HTML. More...
 
def e_text_span (self, tag, attrs)
 End the <text:span> More...
 
def s_text_tab (self, tag, attrs)
 Move to the next tabstop. More...
 
def s_text_x_source (self, tag, attrs)
 Various indexes and tables of contents. More...
 
def e_text_x_source (self, tag, attrs)
 Various indexes and tables of contents. More...
 
def load (self, odffile)
 Loads a document into the parser and parses it. More...
 
def odf2xhtml (self, odffile)
 Load a file and return the XHTML. More...
 
def xhtml (self)
 Returns the xhtml. More...
 
def css (self)
 Returns the CSS content. More...
 
def save
 Save the HTML under the filename. More...
 

Public Attributes

 lines
 
 generate_css
 
 elements
 
- Public Attributes inherited from odf.odf2xhtml.ODF2XHTML
 generate_css
 
 elements
 
 use_internal_css
 
 stylefilename
 
 notedict
 
 currentnote
 
 notebody
 
 lines
 
 xmlfile
 
 title
 
 language
 
 creator
 
 data
 
 tagstack
 
 htmlstack
 
 pstack
 
 processelem
 
 processcont
 
 listtypes
 
 headinglevels
 
 cs
 
 anchors
 
 stylestack
 
 styledict
 
 currentstyle
 
 metatags
 
 autoprefix
 
 prevstyle
 
 document
 

Additional Inherited Members

- Static Public Attributes inherited from odf.odf2xhtml.ODF2XHTML
string default_styles
 
dictionary familymap
 

Detailed Description

The ODF2XHTML parses an ODF file and produces XHTML.

Definition at line 1607 of file odf2xhtml.py.

Constructor & Destructor Documentation

def odf.odf2xhtml.ODF2XHTMLembedded.__init__ (   self,
  lines,
  generate_css = True,
  embedable = False 
)

Definition at line 1609 of file odf2xhtml.py.

Here is the call graph for this function:

Member Data Documentation

odf.odf2xhtml.ODF2XHTMLembedded.elements

Definition at line 1615 of file odf2xhtml.py.

odf.odf2xhtml.ODF2XHTMLembedded.generate_css

Definition at line 1614 of file odf2xhtml.py.

odf.odf2xhtml.ODF2XHTMLembedded.lines

Definition at line 1611 of file odf2xhtml.py.


The documentation for this class was generated from the following file: