David,
I agree with what you say about creating the styles, and settings documents, and that's why I figured it would be best to walk before you run. At the moment I have some predefined styles in another document which I have unzipped and placed into a folder. I want to take XHTML documents and convert them into content.xml documents, and then use Ant to rezip the files. It's crude, but it should do the trick.

I figure that such an XSLT probably exists already and I just need to find it. ;-)

A Java API for converting CSS to the styles.xml format sounds interesting. I think I've seen something already that parses CSS and it would be just a matter of defining a writer that knows how to take that object and generate the appropriate style.xml document.

Mark

J David Eisenberg wrote:
On Wed, 8 Feb 2006, Mark Fortner wrote:

I was wondering if there was a stylesheet that would allow you to easily convert XHTML to OpenDocument content.xml? Although I guess you would need several stylesheets since content.xml is used to store Writer, Calc and Impress data. I've seen the export stylesheets but nothing that would allow you to import into OpenDocument.

One minor problem here is creating multiple files (settings.xml, styles.xml, and content.xml as the main ones), although there are XSLT extensions to handle that.

The big problem that I see is merging internal CSS stylesheet information and style="" and class="" attributes on tags, if you want to get a really accurate representation of the original. That takes some major parsing which is not within the normal capabilities of XSLT.

>
I'd also like to find a stylesheet that could handle XHTML to WordML conversion.

I've read the articles on using OpenOffice from the command line to handle some of these conversions, but what I'm interested in is a lightweight solution that I can use with Ant.

If you don't object to having a program written in Java or Ruby or Python/Jython that can do that heavy computation, I'd say that would be the way to go.

For a heavyweight solution, of course, you could use OpenOffice.org in
command line mode and have it open the HTML file and save it as ODF.

Any help would be greatly appreciated.

Regards,

Mark Fortner

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to