You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Reinhard Poetz <re...@apache.org> on 2004/01/05 20:52:45 UTC

[Contribution] Openoffice support

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


Re: [Contribution] Openoffice support

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Hi Reinhard:

What a genial idea! :-DDD

I hope we will soon see people writing forrest docs in OpenOffice.org

Best Regards,

Antonio Gallardo.

Reinhard Poetz dijo:
>
> 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
>


Re: [Contribution] Openoffice support

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Reinhard Poetz wrote:
...
> If nobody objects I'll add it to CVS next week myself.

Excellent, go ahead :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


RE: [Contribution] Openoffice support

Posted by Reinhard Poetz <re...@apache.org>.
From: David Crossley

> Thanks for adding that to CVS Reinhard. However your commit 
> missed adding the open-office/dummy.dtd

just fixed this

> I would be pleased to see that "dummy" approach work.
> We have tried it in the past with no success. Perhaps
> you have found a neat way.

didn't know that this hasn't been solved. I simply added a complety
empty file and the parser stopped complaining. Please check this if it
works for you too.

> If not, then we will need to wait until the "fetch-dtd" 
> capability. This is yet another case were we need to be able 
> to describe where to get the DTD, so that users can 
> automatically download a DTD which Forrest cannot redistribute.

--
Reinhard 


RE: [Contribution] Openoffice support

Posted by David Crossley <cr...@indexgeo.com.au>.
Thanks for adding that to CVS Reinhard. However your commit
missed adding the open-office/dummy.dtd

I would be pleased to see that "dummy" approach work.
We have tried it in the past with no success. Perhaps
you have found a neat way.

If not, then we will need to wait until the "fetch-dtd"
capability. This is yet another case were we need to be
able to describe where to get the DTD, so that users
can automatically download a DTD which Forrest cannot
redistribute.

--David



RE: [Contribution] Openoffice support

Posted by Reinhard Poetz <re...@apache.org>.
From: David Crossley

> Reinhard Poetz wrote:
> > 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/cocoo> 
> n-2.1/src/blocks/scratchpad/jav
> > a/
> > 
> org/apache/cocoon/components/source/impl/ZipSourceFactory.java
> ?view=mark
> > up
> > 
> > - I checked out the latest Forrest version and added support for sxw
> > files:
> 
> You beauty!
> 
> <snip/>
> 
> > 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!
> 
> You *are* a Forrest committer.

Fine!

> All Cocoon committers are also
> Forrest committers. Sure, it is good to discuss major 
> additions on forrest-dev beforehand.
> 
> There may be one issue. We started to add a docbook2xdoc
> stylesheet a while ago. However it was only partial support, 
> which handled some elements and ignored others. The 
> stylesheet was not being further enhanced by the Forrest 
> community so we are discouraging its use and instead 
> directing people via the 
> documentation to configure their sitemap to enable full 
> DocBook rendering.
> 
> This OpenOffice SXW sounds like a different situation. So it
> should be okay, 

I use the SXW format to create document-v12 documents (or in the future
XHTML2 docs) and a full support for all document-v12 elements is only a
question of time (I'll use it to document my own projects in the future
and will complete the XSLT whenever a need arises.).

> but if it does not gain a following then it
> may need to be removed later.

Of course that's the nature of open source. (I hope that if this really
happens the customization ideas for Forrest will also be available as
code ;-)  
As mentioned above I'll certainly use and improve it because I don't
like all those XML editors very much. I think some more people think so
too and will attract some of them to become users.

> So i am +0 (because i cannot help) for it to be added to CVS.

If nobody objects I'll add it to CVS next week myself.

Reinhard


Re: [Contribution] Openoffice support

Posted by David Crossley <cr...@indexgeo.com.au>.
Reinhard Poetz wrote:
> 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:

You beauty!

<snip/>

> 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!

You *are* a Forrest committer. All Cocoon committers are also
Forrest committers. Sure, it is good to discuss major additions
on forrest-dev beforehand.

There may be one issue. We started to add a docbook2xdoc
stylesheet a while ago. However it was only partial support,
which handled some elements and ignored others. The stylesheet
was not being further enhanced by the Forrest community so we
are discouraging its use and instead directing people via the 
documentation to configure their sitemap to enable full DocBook
rendering.

This OpenOffice SXW sounds like a different situation. So it
should be okay, but if it does not gain a following then it may
need to be removed later.

So i am +0 (because i cannot help) for it to be added to CVS.

--David