OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

opendocument-users message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [opendocument-users] XHTML-> ODF conversion


On Wed, 22 Mar 2006, Andrew Thornton wrote:

> Hi!
>    I'm working on adding an ODF export for the Wiki tool in the 
> Sakaiproject (www.sakaiproject.org, a BSD licensed Collaborative 
> Learning Environment written in Java). Basically I'm looking for a java 
> or xslt way to take XHTML and convert it to ODF either as an ODT file 
> (zipped up) or as a single XML file.
> 
> I've started an attempt to do XSLT conversion of XHTML to content.xml 
> but as I'm doing this I'm realising quite how much work I'd have to do 
> to make this work. Has anyone already done this? Does anyone know of any 
> libraries that might do this for me? (I'd prefer not to have to a 
> dependency on the entirity OOo though... not sure what the project 
> leader would think about a commit of that size! ;-)

A "first approximation" is not terribly difficult; the tricky part is 
recognizing and applying stylesheet information.  There is a CSS validator 
written in Java (http://jigsaw.w3.org/css-validator/) which may provide 
useful code.

Pure XSLT would be horrible at parsing CSS; when your only tool is 
recursion, everything looks like a stack <grin/>.  XSLT with many 
extension functions, or a Java program that invokes XPath/XSLT would be 
your best bet.


-- 
J. David Eisenberg  http://catcode.com/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]