Bases: lpod.element.odf_element
Delete the given element from the XML tree. If no element is given, “self” is deleted. The XML library may allow to continue to use an element now “orphan” as long as you have a reference to it.
For odf_annotation : delete the annotation-end tag if exists.
Arguments:
child – odf_element
Returns the annotated content from an annotation.
If no content exists (single position annotation or annotation-end not found), returns [] (or u’’ if text flag is True). If as_text is True: returns the text content. If clean is True: suppress unwanted tags (deletions marks, ...) If no_header is True: existing text:h are changed in text:p By default: returns a list of odf_element, cleaned and without headers.
Arguments:
as_text – boolean
clean – boolean
no_header – boolean
Return: list or odf_element or text
Return the corresponding annotation-end tag or None.
Return self.
Bases: lpod.element.odf_element
The <office:annotation-end> element may be used to define the end of a text range of document content that spans element boundaries. In that case, an <office:annotation> element shall precede the <office:annotation-end> element. Both elements shall have the same value for their office:name attribute. The <office:annotation-end> element shall be preceded by an <office:annotation> element that has the same value for its office:name attribute as the <office:annotation-end> element. An <office:annotation-end> element without a preceding <office:annotation> element that has the same name assigned is ignored.
Return self.
Return the corresponding annotation starting tag or None.
Bases: lpod.element.odf_element
Provide an autogenerated unique <office:name> for the document.
Create an annotation element credited to the given creator with the given text, optionally dated (current date by default). If name not provided and some parent is provided, the name is autogenerated.
Arguments:
text – unicode or odf_element
creator – unicode
date – datetime
name – unicode
parent – odf_element
Return: odf_element
Create an annotation-end element. Either annotation or name must be provided to have proper reference for the annotation-end.
Arguments:
annotation – odf_annotation element
name – unicode
Return: odf_element
Create either a footnote or a endnote element with the given text, optionally referencing it using the given note_id.
Arguments:
note_class – ‘footnote’ or ‘endnote’
note_id – str
citation – unicode
body – unicode or odf_element
Return: odf_element