Joris Gillis wrote:
If that stylesheet doesn't satisfy you, why not improve it yourself?
http://books.evc-cit.info/book.php is a good place to learn the file
format of OpenOffice.
I tried to develop my own style, but there are some things in XPath, which I
do not know how to express. If I understand correctly then the unordered
list in OOImpress is like this:
<text:unordered-list text:style-name="L2">
<text:list-item>
<text:unordered-list>
<text:list-item>
<text:p text:style-name="P3">Presentation for Living Waters</text:p>
</text:list-item>
</text:unordered-list>
</text:list-item>
</text:unordered-list>
<text:unordered-list text:style-name="L2">
<text:list-item>
<text:unordered-list>
<text:list-item>
<text:p text:style-name="P3">Monday, December 5th</text:p>
</text:list-item>
</text:unordered-list>
</text:list-item>
</text:unordered-list>
The problem is that I would need to condens all elements
<text:unordered-list text:style-name="L2"> into one <ul> element. Do you
have idea how to do it with XSLT, please?
Thanks a lot,
Matej
--
Matej Cepl,
http://www.ceplovi.cz/matej
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
Scouts are saving aluminum cans, bottles and other items to be
recycled. Proceeds will be used to cripple children.
-- from a church bulletin
------------------------------
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml"
xmlns:style="http://openoffice.org/2000/style"
xmlns:text="http://openoffice.org/2000/text"
xmlns:office="http://openoffice.org/2000/office"
xmlns:table="http://openoffice.org/2000/table"
xmlns:draw="http://openoffice.org/2000/drawing"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:meta="http://openoffice.org/2000/meta"
xmlns:number="http://openoffice.org/2000/datastyle"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:chart="http://openoffice.org/2000/chart"
xmlns:dr3d="http://openoffice.org/2000/dr3d"
xmlns:math="http://www.w3.org/1998/Math/MathML"
xmlns:form="http://openoffice.org/2000/form"
xmlns:script="http://openoffice.org/2000/script"
xmlns:config="http://openoffice.org/2001/config"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:presentation="http://openoffice.org/2000/presentation"
office:class="text"
exclude-result-prefixes="office meta table number dc fo xlink chart math
script xsl draw svg dr3d form config text style">
<xsl:output indent="yes"
method="xml"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
encoding="utf-8"
/>
<xsl:template match="draw:page">
<h1><xsl:number/>.
<xsl:value-of select="draw:text-box[1]/text:p[1]"/></h1>
<!-- xsl:apply-templates select="presentation:notes"/ -->
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="text:p">
<p><xsl:apply-templates/></p>
</xsl:template>
<xsl:template match="/">
<html>
<head>
<title>Speaker Notes</title>
<xsl:element name="meta">
<xsl:attribute name="name">DC.date</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="/dc:date"/>
</xsl:attribute>
</xsl:element>
<style>
<xsl:comment>
p {font-size: 10pt}
h1 {font-family: arial; font-size: 12pt; font-weight:
bold}
</xsl:comment>
</style>
</head>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="office:body">
<body>
<xsl:apply-templates />
</body>
</xsl:template>
<xsl:template match="text:unordered-list[@text:style-name='L2']">
<ul>
<xsl:apply-templates />
</ul>
</xsl:template>
<xsl:template match="text:ordered-list">
<ol>
<xsl:apply-templates />
</ol>
</xsl:template>
<xsl:template match="text:list-item[not(text:unordered-list)]">
<li><xsl:apply-templates /></li>
</xsl:template>
<xsl:template match="text:span[@text:style-name='T1']">
<em><xsl:apply-templates/></em>
</xsl:template>
<!-- sections of the OO format we don't need at present -->
<xsl:template match="office:automatic-styles" />
<xsl:template match="office:font-decls" />
<xsl:template match="office:meta" />
<xsl:template match="office:script" />
<xsl:template match="office:settings" />
<xsl:template match="office:styles" />
<xsl:template match="style:*" />
<xsl:template match="dc:*">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="meta:creation-date">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="meta:editing-cycles" />
<xsl:template match="meta:editing-duration" />
<xsl:template match="meta:generator" />
<xsl:template match="meta:user-defined" />
<!--
<xsl:template match="text()">
<xsl:apply-templates select="normalize-space(.)"/>
</xsl:template>
-->
</xsl:stylesheet>