OpenOffice stylesheet
Trond Andersen <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
Hello, I hope I send these kind of questions on this mailing list.
I've been working with a plugin in maven (http://maven.apache.org) which uses maven's xml syntax for documentation called Xdocs. If one could have the business side work on a OpenOffice (OO) document to document their requirements and still be able to use maven's xdocs, it would be a great feature.
I've gotten a lot to work, but there is one big issue I'm struggeling with. OO typically have this kind of XML structure (I skipped some details):
<office:document-content>
...
<office:body>
<text:h text:level="1">Heading 1</text:h>
<text:h text:level="2">Heading 2</text:h>
<text:p>This my content</text:p>
<text:h text:level="3">Heading 3</text:h>
<text:p>This my third level content</text:p>
</office:body>
<office:document-content>
Xdocs requires a structure similar to this:
<document>
...
<body>
<section name="Heading 1">
<subsection name="Heading 2">
<p>This is my content</p>
<p><strong>Heading 3</strong></p>
<p>This is my third level content</p>
</subsection>
</section>
</body>
</document>
So basically this is about deepening the structure of the OO document - adding this section/subsection and to get all <text:h> with level 2 to be part of a section. I've looked a the following-sibling XPATH possibility, but I seem to get some hard time since elements like tables, lists, images and stuff can show up everywhere - and this must also obey this section/subsection in xdocs.
So - do anyone have a good hint about how one should address this ? Any good strategy. I've look at the XSLT Cookbook on the subject, but the examples were a bit simple and I always ended up in trouble. Do anyone have links to possible solution that I might look at ?
Best regards Trond Andersen
-------------------------------------------------
WebMail fra Tele2 http://www.tele2.no
-------------------------------------------------