Preserving ODF Elements in CSS/HTML
Publication Date: 2012-Aug-23
The IP.com Prior Art Database
AbstractDisclosed is a method of preserving Open Document Format (ODF) elements when converting to HTML. ODF elements need to be preserved when the element is not supported in HTML. By preserving the ODF element in an HTML attribute allows for easy conversion back to an ODF document without losing content due to conversion.
Page 01 of 1
Because the internet allows everyone to easily share documents and presentations, converting open document format (ODF) to CSS/HTML is advantageous. However, not all elements represented in ODF format can be displayed or rendered in HTML. To eliminate the loss of critical data, a methodology was developed to preserve the unsupported ODF element as an attribute of an HTML element.
For instance, a parent ODF element might contain a sub element which is a link that opens a spreadsheet application. When converting the parent element to an HTML element, the unsupported sub element (spreadsheet link) is detected. A possible solution might be to ignore the imbedded object and not convert it to HTML. However, by preserving the ODF element, if the document were to be converted back to ODF from HTML, the unsupported link element is not lost. If the HTML element containing the unsupported content is copied in HTML, the unsupported link element is also copied and restored when converted back to ODF.
The mechanism for doing this is to programmatically recognize unsupported elements when converting from ODF to HTML. Once an unsupported element is recognized, the ODF element is flattened and stored as an attribute of the corresponding HTML element. When it is time to convert the HTML back to ODF, the HTML is parsed to detect any HTML elements that have an attribute that is marked as "preserve only". If a preserve only attribute is found, the attribute is unflattened and the OD...