473,792 Members | 3,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSL stylesheet for export of outline from OOImpressu to HTML?

Hello,

does anybody have %subj%? I would like to generate some very simple HTML
(XHTML?) file from OOImpress, so that I can send it to the friend for
review and not bother her with all images, layouts, and the other junk
(moreover, she probably never heard about OO.o). Powerpoint of the cursed
memory used to have export of outline to RTF. Is there something similar
for OOImpress (certainly, I do not care about RTF, OOWriter or HTML would
be more than enough).

I tried the template from
http://www.xml.com/pub/a/2004/02/04/tr-xml.html, but even though I tried to
install it into OOImpress (with Tools/XML Filter Settings), but the result
is highly unnice (see original at
http://www.ceplovi.cz/matej/tmp/gene...-testimony.sxi and the
result is
http://www.ceplovi.cz/matej/tmp/gene...ony.xhtml.bz2).

Any thoughts?

Thanks for any reply,

Matìj

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

Q: Is vi an easy editor to learn, is it intuitive?
A: Yes, some of us think so. But most people think that we are
crazy.
-- vi FAQ
Jul 20 '05 #1
8 1773
Hi,
does anybody have %subj%? I would like to generate some very simple HTML
(XHTML?) file from OOImpress, so that I can send it to the friend for
review and not bother her with all images, layouts, and the other junk Well, in the first place, you could consider not to make presentations full of junk:)
(moreover, she probably never heard about OO.o). Then let her know it exists;-)
Powerpoint of the cursed
memory used to have export of outline to RTF. Is there something similar
for OOImpress (certainly, I do not care about RTF, OOWriter or HTML would
be more than enough).
OOImpress has export filters to PDF, flash and html. You can probably use one of them.
File->Export...
I tried the template from
http://www.xml.com/pub/a/2004/02/04/tr-xml.html, but even though I tried to
install it into OOImpress (with Tools/XML Filter Settings), but the result
is highly unnice (see original at
http://www.ceplovi.cz/matej/tmp/gene...-testimony.sxi and the
result is
http://www.ceplovi.cz/matej/tmp/gene...ony.xhtml.bz2).


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.

regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Ceterum censeo XML omnibus esse utendum
Jul 20 '05 #2
Joris Gillis wrote:
Well, in the first place, you could consider not to make presentations
full of junk:)
I meant pictures and such stuff.
(moreover, she probably never heard about OO.o).

OOImpress has export filters to PDF, flash and html. You can probably use
one of them. File->Export...


Unfortunately, the export to HTML is of no use for me -- it exports every
slide into one page with all images attached as graphics files. What would
I need is just text in form of outline on one page.
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.


That's helpful. Thanks!

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

As with the Christian religion, the worst advertisement for
Socialism is its adherents.
-- George Orwell
Jul 20 '05 #3
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:unorder ed-list text:style-name="L2">
<text:list-item>
<text:unorder ed-list>
<text:list-item>
<text:p text:style-name="P3">Prese ntation for Living Waters</text:p>
</text:list-item>
</text:unordered-list>
</text:list-item>
</text:unordered-list>
<text:unorder ed-list text:style-name="L2">
<text:list-item>
<text:unorder ed-list>
<text:list-item>
<text:p text:style-name="P3">Monda y, 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:unorder ed-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:styleshe et xmlns="http://www.w3.org/1999/xhtml"
xmlns:style="ht tp://openoffice.org/2000/style"
xmlns:text="htt p://openoffice.org/2000/text"
xmlns:office="h ttp://openoffice.org/2000/office"
xmlns:table="ht tp://openoffice.org/2000/table"
xmlns:draw="htt p://openoffice.org/2000/drawing"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xlink="ht tp://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:meta="htt p://openoffice.org/2000/meta"
xmlns:number="h ttp://openoffice.org/2000/datastyle"
xmlns:svg="http ://www.w3.org/2000/svg"
xmlns:chart="ht tp://openoffice.org/2000/chart"
xmlns:dr3d="htt p://openoffice.org/2000/dr3d"
xmlns:math="htt p://www.w3.org/1998/Math/MathML"
xmlns:form="htt p://openoffice.org/2000/form"
xmlns:script="h ttp://openoffice.org/2000/script"
xmlns:config="h ttp://openoffice.org/2001/config"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:presentat ion="http://openoffice.org/2000/presentation"
office:class="t ext"
exclude-result-prefixes="offic e 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:pag e">
<h1><xsl:numb er/>.
<xsl:value-of select="draw:te xt-box[1]/text:p[1]"/></h1>
<!-- xsl:apply-templates select="present ation:notes"/ -->
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="text:p">
<p><xsl:apply-templates/></p>
</xsl:template>

<xsl:template match="/">
<html>
<head>
<title>Speake r Notes</title>
<xsl:element name="meta">
<xsl:attribut e name="name">DC. date</xsl:attribute>
<xsl:attribut e 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:b ody">
<body>
<xsl:apply-templates />
</body>
</xsl:template>

<xsl:template match="text:uno rdered-list[@text:style-name='L2']">
<ul>
<xsl:apply-templates />
</ul>
</xsl:template>

<xsl:template match="text:ord ered-list">
<ol>
<xsl:apply-templates />
</ol>
</xsl:template>

<xsl:template match="text:lis t-item[not(text:unorde red-list)]">
<li><xsl:appl y-templates /></li>
</xsl:template>

<xsl:template match="text:spa n[@text:style-name='T1']">
<em><xsl:appl y-templates/></em>
</xsl:template>

<!-- sections of the OO format we don't need at present -->
<xsl:template match="office:a utomatic-styles" />
<xsl:template match="office:f ont-decls" />
<xsl:template match="office:m eta" />
<xsl:template match="office:s cript" />
<xsl:template match="office:s ettings" />
<xsl:template match="office:s tyles" />
<xsl:template match="style:*" />
<xsl:template match="dc:*">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="meta:cre ation-date">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="meta:edi ting-cycles" />
<xsl:template match="meta:edi ting-duration" />
<xsl:template match="meta:gen erator" />
<xsl:template match="meta:use r-defined" />
<!--
<xsl:template match="text()">
<xsl:apply-templates select="normali ze-space(.)"/>
</xsl:template>
-->
</xsl:stylesheet>
Jul 20 '05 #4
On Sun, 05 Dec 2004 17:03:53 -0500, Matej Cepl <ce**@surfbest. net>
wrote:
<text:unorder ed-list text:style-name="L2">
<text:list-item>
<text:unorder ed-list>
<text:list-item>
<text:p text:style-name="P3">Prese ntation for Living Waters</text:p>
</text:list-item>
</text:unordered-list>
</text:list-item>
</text:unordered-list>
<text:unorder ed-list text:style-name="L2">
<text:list-item>
<text:unorder ed-list>
<text:list-item>
<text:p text:style-name="P3">Monda y, 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:unordere d-list text:style-name="L2"> into one <ul> element. Do you
have idea how to do it with XSLT, please?


In some template:
<ul>
<xsl:apply-templates
select="text:un ordered-list[@text:style-name="'L2'"]/>
</ul>

and then
....

<xsl:template match="text:uno rdered-list">
<xsl:value-of select="."/>
</xsl:template>

Or, alternately:

<ul>
<xsl:for-each select="text:un ordered-list[@text:style-name="'L2'"]>
<xsl:value-of select="."/>
</xsl:for-each>
</ul>

--
Morris M. Keesan -- ke****@alum.bu. edu

Jul 20 '05 #5
Morris M. Keesan wrote:
The problem is that I would need to condens all elements
<text:unorder ed-list text:style-name="L2"> into one <ul> element. Do you
have idea how to do it with XSLT, please?


In some template:
<ul>
<xsl:apply-templates
select="text:un ordered-list[@text:style-name="'L2'"]/>
</ul>

and then
...

<xsl:template match="text:uno rdered-list">
<xsl:value-of select="."/>
</xsl:template>


I tried this one, but it doesn't seem to work. See
http://www.ceplovi.cz/matej/tmp/gene...timony.xml.bz2
(FlatXML from OpenOffice) and
http://www.ceplovi.cz/matej/tmp/ooimpress-to-html.xsl, which produces
http://www.ceplovi.cz/matej/tmp/gene...estimony.xhtml --
certainly not what I hoped for.

Any thoughts?

Matej Cepl

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

In order to avoid being called a flirt, she always yielded
easily.
-- Charles, Count Talleyrand
Jul 20 '05 #6
Hi,

You are extremely close to the solution; try this:
Nice stylesheet of yours, by the way.

<?xml version="1.0" encoding="utf-8"?>
<xsl:styleshe et xmlns="http://www.w3.org/1999/xhtml"
xmlns:style="ht tp://openoffice.org/2000/style"
xmlns:text="htt p://openoffice.org/2000/text"
xmlns:office="h ttp://openoffice.org/2000/office"
xmlns:table="ht tp://openoffice.org/2000/table"
xmlns:draw="htt p://openoffice.org/2000/drawing"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xlink="ht tp://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:meta="htt p://openoffice.org/2000/meta"
xmlns:number="h ttp://openoffice.org/2000/datastyle"
xmlns:svg="http ://www.w3.org/2000/svg"
xmlns:chart="ht tp://openoffice.org/2000/chart"
xmlns:dr3d="htt p://openoffice.org/2000/dr3d"
xmlns:math="htt p://www.w3.org/1998/Math/MathML"
xmlns:form="htt p://openoffice.org/2000/form"
xmlns:script="h ttp://openoffice.org/2000/script"
xmlns:config="h ttp://openoffice.org/2001/config"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:presentat ion="http://openoffice.org/2000/presentation"
office:class="t ext"
exclude-result-prefixes="offic e 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="/">
<html>
<head>
<title>Speake r Notes</title>
<xsl:element name="meta">
<xsl:attribut e name="name">DC. date</xsl:attribute>
<xsl:attribut e 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:b ody">
<body>
<xsl:apply-templates />
</body>
</xsl:template>

<xsl:template match="draw:pag e">
<h1><xsl:numb er/>.
<xsl:value-of select="draw:te xt-box[1]/text:p[1]"/></h1>

<xsl:apply-templates />

</xsl:template>
<xsl:template match="text:p">
<p><xsl:apply-templates/></p>
</xsl:template>

<xsl:template match="text:uno rdered-list">
<ul><xsl:appl y-templates /></ul>
</xsl:template>

<xsl:template match="text:lis t-item">
<li><xsl:appl y-templates /></li>
</xsl:template>

<xsl:template match="text:spa n[@text:style-name='T1']">
<em><xsl:appl y-templates/></em>
</xsl:template>

<!-- sections of the OO format we don't need at present -->
<xsl:template match="office:a utomatic-styles" />
<xsl:template match="office:f ont-decls" />
<xsl:template match="office:m eta" />
<xsl:template match="office:s cript" />
<xsl:template match="office:s ettings" />
<xsl:template match="office:s tyles" />
<xsl:template match="style:*" />
<xsl:template match="dc:*">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="meta:cre ation-date">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="meta:edi ting-cycles" />
<xsl:template match="meta:edi ting-duration" />
<xsl:template match="meta:gen erator" />
<xsl:template match="meta:use r-defined" />

<!-- xsl:template match="text()">
<xsl:apply-templates select="normali ze-space(.)"/>
</xsl:template -->

</xsl:stylesheet>

regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Ceterum censeo XML omnibus esse utendum
Jul 20 '05 #7
> Joris Gillis wrote:
You are extremely close to the solution; try this:
Nice stylesheet of yours, by the way.
Thanks a lot, now it works!

I'm glad it works. Concerning the stylesheet for export of plain
Speaker notes from OOImpress, I was working on the top of
http://www.xml.com/pub/a/2004/02/04/tr-xml.html, and as a former lawyer I
learned a value of good intendation hard way :-).

The only problem I have (and it is really unimportant) -- is there a way how
to clean XML output of all the redundant empty spaces and empty lines?


Yes, just set indent to no:

<xsl:output indent="no"
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"
/>

and use:
<xsl:template match="draw:pag e">
<h1><xsl:numb er/><xsl:text>.</xsl:text>
<xsl:value-of select="draw:te xt-box[1]/text:p[1]"/></h1>
<xsl:apply-templates />

</xsl:template>
to get optimal whitespace compression.
btw: I you're going to analyze the XML of OOo files. It's handy to uncheck Tools->Options->Load/Save->General->'size optimization' for nice indentation. That's easier to read;)

regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Ceterum censeo XML omnibus esse utendum
Jul 20 '05 #8
Joris Gillis wrote:
btw: I you're going to analyze the XML of OOo files. It's handy to uncheck
Tools->Options->Load/Save->General->'size optimization' for nice
indentation. That's easier to read;)


Thanks,

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

The state is the great fictitious entity by which everyone seeks
to live at the expense of everyone else.
-- Frederick Bastiat
Jul 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2824
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/authoring-faq Posting-Frequency: twice a week (Mondays and Thursdays) Last-modified: August 28, 2002 Version: 1.15 URL: http://css.nu/faq/ciwas-aFAQ.html Maintainer: Jan Roland Eriksson <rex@css.nu> ciwas stylesheet authoring FAQ v1.15 ______________________________________________________________________
0
1962
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/authoring-faq Posting-Frequency: twice a week (Mondays and Thursdays) Last-modified: April 10, 2003 Version: 1.16 URL: http://css.nu/faq/ciwas-aFAQ.html Maintainer: Jan Roland Eriksson <rex@css.nu> ciwas stylesheet authoring FAQ v1.16 ______________________________________________________________________
1
2297
by: Ellen Manning | last post by:
I'm trying to export an Excel2K spreadsheet to A2K. Here is a sample of the Excel spreadsheet: LastName FirstName Hours Location HoursPercent Doe John 9 WMC 2.94 VA Med Ctr 265 VA 86.60 32 VA Res Clinic 10.45 <blank row>
3
1723
by: msnews.microsoft.com | last post by:
Anyone ever play with Outline views in VS.NET? I'm amazed I never discovered this. None of this was ever discussed in my training. It's a big help to use this with HTML view. View/Synchronize Document Outline -Max
0
1197
by: Anil.Narla | last post by:
Hi, I'm trying to Export DataGrid to Excel in ASP.NET,But the Stylesheet is not same when i compared to the normal datagrid.Customer wants same stylesheet need to be applied on excel so they don't have to do double work on it. Any Help or Suggestions how to fix this?
8
13255
by: Taffman | last post by:
I've searched this goup for an answer to this, there are many discussions that come close but non that I can find that actually addresses this particular problem. I'm exporting queries to Excel. These queries have memo fields in them Each memo field is trunkated, i.e cuts off after 255 characters. Is there any way either via VBA or otherwise to get all my memo text to export to Excel. I note that there is no such limit when exporting...
4
2284
by: Rex | last post by:
Hi - I am new to VB.Net/2005, but not VB. I am trying to find an outline or tree - type control for VB.Net/2005 that provides the ability for the User to TYPE in one of the NODES of the outline... AND while typing, that node will visually expand to 2/3/4/etc lines if the User has reached the end of the line. Ideally, I would also like the User to be italicize or colorize any word within what they are typing also. Thanks much! Rex
0
1309
by: 1001 Webs | last post by:
As I read at: http://webpages.charter.net/edreamleo/front.html Leo is... * A general data management environment. Leo shows user-created relationships among any kind of data: computer programs, web sites, etc. * An outlining editor for programmers. Leo embeds the noweb and CWEB markup languages in an outline
2
1540
by: Paulson | last post by:
HI all I got a problem with my menu display.I am making a list as shown below in one of my aspx pages. And added a stylesheet in CSS for it. This is not working in IE but not in Mozilla Firefox it is working. Can anyone please help me with this? Just after the page html I pasted my CSS stylesheet code also. __________________________________________________________________
0
9670
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9033
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2917
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.