Skip to main content.
home | support | download

Back to List Archive

Re: Draft of OpenDocument filter

From: Lars D. Noodén <lars(at)not-real.umich.edu>
Date: Thu Nov 17 2005 - 12:36:11 GMT
Thanks.  Those are useful tips.

On Wed, 16 Nov 2005, Bill Moseley wrote:
[...]
>    application/vnd.sun.xml.calc                        sxc
>    application/vnd.sun.xml.calc.template               stc
>    application/vnd.sun.xml.draw                        sxd
>    application/vnd.sun.xml.draw.template               std

The mimetypes you list are not for OpenDocument but the immediate 
predecessor.  They're close and the module should also work with them, but 
technically it's a different format.  I'll try to make sure the module 
works with them, too.

Archive::Zip sounds like a good idea, but I had wanted to limit the number 
of additional modules needed and the Pdf2html filter was my model.

> Why not use Archive::Zip instead of relying on the unzip program?

I like that idea.  Thanks for the code sample.

> That's what you are suppose to do.  You are converting from one mime
> type to another mime type, so you should just say:
>
>   $doc->set_content_type( 'text/xml' );
>
> I don't really see why you would need to extract out the mimetype from
> the opendoc{ument} file.

Nor I.  But I've seen specifications for indexes where mimetype as a 
searchable field was required.  I guess it should then just be passed as 
metadata instead.

> I might be tempted to put this back on:
>    <?xml version="1.0" encoding="utf-8"?>

Sounds good.

> ... For swishtitle you would have to format as HTML and then use 
> <title>.  The advantage of formatting for html is that it makes it easy 
> to index html and open doc files in the same index (and same config 
> file).

There is actually someone already working on an OpenDocument to XHTML 
conversion using XSLT:
 	http://books.evc-cit.info/odf_utils/odt_to_xhtml.html

Converting to XHTML or using the XML parser to extract or rewrite certain 
fields seems a lot more work than using aliases in the swish config file 
to map the tag names.  However, mapping means that the config file has to 
be set up correctly.

On Wed, 16 Nov 2005, Peter Karman wrote:
[...]
> Good start. Can you make some example OO docs available on the same site
> so we can test?

Yes.  Here are two to start with:

 	http://www-personal.umich.edu/~lars/Swish-e/spp744_1.odt
 	http://www-personal.umich.edu/~lars/Swish-e/spp744_2.odt

-Lars
Lars Nooden (lars@umich.edu)
 	On the Internet, nobody knows you're a dog ...
 	... until you start barking.
Received on Thu Nov 17 04:36:11 2005