ODF reader for Firefox

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ODF reader for Firefox

Talin-3
I've created a little Firefox extension that allows ODF (Open Document
Format) files to be viewed directly in Firefox without a helper app.

Essentially, the extension consists of a javascript stream handler that
unzips the ODF archive and extracts the "content.xml" document. It then
chooses an appropriate XSLT stylesheet, based on the document's
mime-type, that translates the ODF document into XHTML + CSS. This is
actually easier than it sounds, because the ODF style properties use
many of the same naming conventions and measurement units as CSS
(aren't standards great?)

The current implementation is highly experimental and only supports a
few basic style properties, such as bold, italic, underline,
font-family. left-margin, and so on, however there's no reason why this
couldn't be extended to cover a large number of ODF properties. While
the ODF standard itself iis quite large, I have also found it to be
fairly comprehensible.

My intent with this is not to try and provide a pixel-perfect rendering
of an ODF document, but rather something that is readable, attractive,
and doesn't lose any essential information. Specifically, I would like
for an ODF user (such as, say, a civil servant working for the
Massachusetts state government) to be able to toss their document onto
a shared directory on an FTP server and allow internet denizens to view
the content of the document, without having to do any kind of special
conversion step or reformatting of the original source doc.

And I see no reason why it shouldn't be possible to do a much better
job of conversion than the current "View as HTML" option for PDFs as
implemented by Google.

Unfortunately, with all my other projects I don't have a lot of time to
work on this one. I would be willing to make the source available if
anyone is interested in hacking on it or playing with it. If there is
some convenient repository where I could place a copy of the code, I
would be happy to post a link here. (In particular, I don't want to
create a source forge project and then abandon it, I've made that
mistake before :)

-- Talin

_______________________________________________
mozilla-general mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-general
Reply | Threaded
Open this post in threaded view
|

Re: ODF reader for Firefox

Nuno J. Silva
A 30-12-2005 01:10, [hidden email] escreveu:

> I've created a little Firefox extension that allows ODF (Open Document
> Format) files to be viewed directly in Firefox without a helper app.
>
> Essentially, the extension consists of a javascript stream handler that
> unzips the ODF archive and extracts the "content.xml" document. It then
> chooses an appropriate XSLT stylesheet, based on the document's
> mime-type, that translates the ODF document into XHTML + CSS. This is
> actually easier than it sounds, because the ODF style properties use
> many of the same naming conventions and measurement units as CSS
> (aren't standards great?)
>
> The current implementation is highly experimental and only supports a
> few basic style properties, such as bold, italic, underline,
> font-family. left-margin, and so on, however there's no reason why this
> couldn't be extended to cover a large number of ODF properties. While
> the ODF standard itself iis quite large, I have also found it to be
> fairly comprehensible.
>
> My intent with this is not to try and provide a pixel-perfect rendering
> of an ODF document, but rather something that is readable, attractive,
> and doesn't lose any essential information. Specifically, I would like
> for an ODF user (such as, say, a civil servant working for the
> Massachusetts state government) to be able to toss their document onto
> a shared directory on an FTP server and allow internet denizens to view
> the content of the document, without having to do any kind of special
> conversion step or reformatting of the original source doc.
>
> And I see no reason why it shouldn't be possible to do a much better
> job of conversion than the current "View as HTML" option for PDFs as
> implemented by Google.
>
> Unfortunately, with all my other projects I don't have a lot of time to
> work on this one. I would be willing to make the source available if
> anyone is interested in hacking on it or playing with it. If there is
> some convenient repository where I could place a copy of the code, I
> would be happy to post a link here. (In particular, I don't want to
> create a source forge project and then abandon it, I've made that
> mistake before :)
I want to look at your extension. Can you send me it by e-mail?

My e-mail address:

        nunojsg AT gmail DOT com

--
Nuno Silva (aka NJSG)
Lisbon, Portugal
http://njsg.no.sapo.pt/
Registered Linux User #402207 - http://counter.li.org
Mozilla/5.0 (X11; U; Linux i686; pt-PT; rv:1.7.12) Gecko/20050929
Thunderbird/1.0.7 Fedora/1.0.7-1.1.fc3 Mnenhy/0.6.0.104
Fedora Core release 3 (Heidelberg) - Kernel 2.6.12-njsg - i686
Intel Pentium II (80686) Deschutes - 334Mhz -- 256 Mbs SDRAM

A: Top-posting.
> Q: What is the most annoying thing in the Internet?

signature.asc (259 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ODF reader for Firefox

Chris C-2
In reply to this post by Talin-3
[hidden email] wrote:
> I've created a little Firefox extension that allows ODF (Open Document
> Format) files to be viewed directly in Firefox without a helper app.

That sounds all kinds of awesome. I'd be interested in having a look.
It's a pity this didn't happen a few months ago, this sounds like
exactly the kind of killer extension MoCo are holding a competition for
just now.

  - Chris
_______________________________________________
mozilla-general mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-general
Reply | Threaded
Open this post in threaded view
|

Re: ODF reader for Firefox

Gervase Markham
In reply to this post by Talin-3
[hidden email] wrote:
> I've created a little Firefox extension that allows ODF (Open Document
> Format) files to be viewed directly in Firefox without a helper app.

That sounds extremely cool. If you can get it working (even for a small
part of ODF), why not enter it for the Firefox extension contest?
http://developer.mozilla.org/contests/extendfirefox/

Deadline is midnight Eastern Time on January 6th (tomorrow)...

Even if you don't enter it, please post the code publically (ideally
under the normal mozilla.org tri-license; see
http://www.mozilla.org/MPL/), then someone else can pick up the baton.

Nice work!

Gerv
_______________________________________________
mozilla-general mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-general
Reply | Threaded
Open this post in threaded view
|

Re: ODF reader for Firefox

GabrielTM
In reply to this post by Talin-3
Talin, your idea sounds promising.  Although in the end the content.xml won't be sufficient at least the styles.xml is in need as well.
I guess something like an ZIP-URL of the styles.xml and meta.xml have to be provided as parameter to the processor and internally used by the document() function.

Something similar works with Xalan and JAR URL, but I havn't tried out with Firefox's Transformiix (and actually I am a little unaware of it's API used by Javascript as you might did)...

What IDE is used by you/usually being used for debugging / developing?

Is your source available for download?
Otherwise you might sent it to me:  Gabriel.the.messenger AT gmx.de

Thanks in advance
GTM