Sign In/My Account | View Cart  
advertisement

Article:
 Hacking Open Office
Subject: Writer2xhtml
Date: 2005-01-28 07:28:56
From: Bovens

"It does have a customizable XSLT stylesheet that can be used to generate XHTML from any word processing document, but this produces far from ideal output [...]"


Have you tried the Writer2xhtml export filter (= part of Henrik Just's Writer2LaTeX Java utility)? It is easy to install, and its output is much better than OOo's default XHTML filter.


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Writer2xhtml
    2005-01-28 13:40:14 PeterSefton [Reply]

    No I have not tried that one - I had a look at it but it did not seem obvious to me how to customize the XHTML based on styles, which is important for my project. Is this possible?


    I have made some progress with the OfficeFMT XSLT filtering components available from:


    http://officefmt.iqchoice.com/xslt.html




    • Writer2xhtml
      2005-01-28 20:02:44 Bovens [Reply]

      Yes, Writer2xhtml allows output customization on three levels through a config file called writer2latex.xml. You can choose between an installation-wide configuration, user-specific configuration and ad hoc configuration. For more info and specific instructions, see the 4.3 Configuration section of the Writer2LaTeX manual.



      • Writer2xhtml
        2005-01-28 21:34:30 PeterSefton [Reply]

        I have had a look at this now, and I see that there is some style-based customization, but I'm still not sure if it will work for the kind of nesting of elements I'm after, see the example in the article of how styles need to map to elements.


        Declarative mapping systems like this one tend to work well only up to a point, but I am assuming at this stage XSLT is going to be a better option for my project, although I would be delighted if that's not the case.


        I see that there's also a place to plug in a custom stylesheet in writer2xhtml, so maybe this is the answer. What does the stylesheet operate on I wonder, and where in the toolchain does it get used?

        • Writer2xhtml
          2005-01-31 05:10:48 Henrik_Just [Reply]

          <quote>I have had a look at this now, and I see that there is some style-based customization, but I'm still not sure if it will work for the kind of nesting of elements I'm after, see the example in the article of how styles need to map to elements. </quote>


          No, it will not work with your approach. But ignoring the "this must also be possible in Word" bit, OOo Writer+Writer2xhtml actually supports a good deal of what you want out of the box.
          If you use List styles in Writer as they are intended, it already supports nested ordered and unordered lists.
          Also, with style maps in Writer2xhtml, you can insert definition lists and blockquotes in ordered and unordered lists, but currently not the other way round. (There's a bug in version 0.4 beta 2 here, it will be fixed asap)


          <quote>I see that there's also a place to plug in a custom stylesheet in writer2xhtml, so maybe this is the answer. What does the stylesheet operate on I wonder, and where in the toolchain does it get used? </quote>


          This is a css stylesheet, not xslt. Writer2xhtml gives you a choice between converting OOo styles to css or supply your own css.


Sponsored By: