On 3 Aug 2014, at 3:05 am, Dennis E. Hamilton <dennis.hamil...@acm.org> wrote:
> In line with the sketch that Peter Kelley provides below, I am personally > very sympathetic to the idea of having an internal model that can tolerate > difference in format between input and output while preserving in the output > everything from the input format it can, even by leaving markers that will be > useful on future input of the produced form. (There is a well-known case of > Microsoft Office doing this for HTML it exports, although the added > information for recovery of the MSO rendition led to many complaints about > document bloat.) On a semi-related note, there's once quite fascinating implementation of ODF I've seen called WebODF (see http://webodf.org; the code is open source). This is an in-browser editor, and actually works by loading the content.xml file from the ODF package into the DOM tree of the browser, thus having it contained within the HTML content of the page. Through clever use of CSS namespaces, it's able to achieve a pretty faithful rendering of the document using the browser's built-in layout engine, even though the content itself is not in HTML. From what I understand about their approach, the reason they did this I believe is as a way to ensure that the XML structure of the ODF file is preserved exactly, which is much more difficult to achieve if the content is converted into HTML first (as in my implementation). Web browsers are actually very good at handling content in this way, since you can just use the CSS property setting "display: none" to hide any elements that shouldn't be rendered on screen, and this CSS can be kept entirely separate (or even dynamically generated by javascript) and not part of the XML content itself. So WebODF takes advantage of the fact that a web browser will just preserve information by default, and it works quite well. -- Dr. Peter M. Kelly Founder, UX Productivity pe...@uxproductivity.com http://www.uxproductivity.com/ http://www.kellypmk.net/ PGP key: http://www.kellypmk.net/pgp-key (fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)
signature.asc
Description: Message signed with OpenPGP using GPGMail