forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reinhard Poetz" <reinh...@apache.org>
Subject [Contribution] Openoffice support
Date Mon, 05 Jan 2004 19:52:45 GMT

As I think OpenOffice would be a good way editing (and reusing) files
for documentations I started with the implementation of a pseudo
protocol reading the content for ZIP files which is necessary to get the
content of OpenOffice files:
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/scratchpad/java/
org/apache/cocoon/components/source/impl/ZipSourceFactory.java?view=mark
up

- I checked out the latest Forrest version and added support for sxw
files:

  <map:when test="{project:content.xdocs}{1}.sxw">
    <map:match type="regexp" pattern="^(.*?)([^/]*).xml$">
      <map:generate
src="zip://content.xml@{project:content.xdocs}{1}{2}.sxw" />
      <map:transform
src="{forrest:stylesheets}/openoffice-writer2forrest.xsl">
         <map:parameter name="filename" value="{2}" />
      </map:transform>
      <map:serialize type="xml-document"/>
    </map:match>
  </map:when>

  As you can see I started to develop an openoffice-writer2forrest
stylesheet 
  which needs some improvements but first samples are already working.

- As Openoffice files have a doctype declaration I had to add 
  support for it in the entity resolver catalog. 

- I also had to add the Java classes which could be removed after an 
  upgrade to Cocoon 2.1.4.

- added a sample for to the examples provided by "project seed"

I'd like to contribute these additions to your project. The easiest way
would be committing the new files and the changes into your CVS myself.
As I'm not Forrest committer I don't go for it without your
acknowledgement. Please let me know if this is okay for you.
If you think that an official patch would be the way to go I can provide
it of course (although this means more work on both sides ;-)

Please let me know what you think!

--
Reinhard


Mime
View raw message