Hi Dag,

I have had a chance to look further at the cause of the damaged file
message I was getting for ODT packages.  There seems to be two parts
to the fix:

1. use Libreoffice 3.5
2. include a settings.xml even if I don't think Oasis requires it.  A
document-settings element containing an empty settings element seems
acceptable to LO.

The need for a settings.xml file explains why it works when copying
everything from a styles-doc file.

So I now know how to generate ODT by:

1. using a standard mimetype, Thumbnails/thumbnail.png and
manifest.rdf files generated from python.
2. taking contents.xml generated by asciidoc with meta.xml embedded in
an XML comment,
3. extracting that and putting it in meta.xml
4. scanning content.xml for images to include in Pictures/ in the package
5. if --styles-doc is specified:
5a extract styles.xml and settings.xml from that package
5b. scanning styles.xml and settings.xml for any references to
Pictures/ and copying those items from the styles-doc package to the
generated package (@Dag, I know you don't approve, but thats what LO
does so no choice)
6. if --styles-doc is not specified:
6a. create a styles.xml file as per the makefile (@Dag, I'm assuming
that will make a valid file, have you checked it with jing?)
6b. use a standard minimal settings.xml file
7. write a META-INF/manifest.xml file to match the above

When the way themes and backends are going to work is decided, step 6a
can choose the styles file based on the theme.

Now all I need is time to do it.

Cheers
Lex

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to