You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Paloma Gomez <pa...@gmail.com> on 2006/03/21 18:26:14 UTC

opendocument formatting

Hi all,

I've tried out the odt module and have noticed that it doesn't support
any formatting.  I've read in the dev mailing list how to fix it:

>The XSLT applied to the ODT XML is only rudimentary. There do
> exists better versions, but they are
> GPL and cannot be re-distributed. But see the links on the sample ;-)

I've downloaded a xslt from the link

ODT 2 XHTML by J. David Eisenberg

but I can't get it working. I've replaced the opendocument2xhtml.xsl
in $TOMCAT_HOME/webapps/lenya/lenya/modules/opendocument/xslt with the
one from the link and then I've run sh build.sh install-pub
-Dpub.prefix="". This has resulted in a blank page when I access the
document through lenya, so I guess that replacing the xslt file is not
enough. I've downloaded a file called ODTransform.jar along with the
xslt file. Should I copy this file as well somewhere in my deployment?

Thanks,

Paloma
--
Paloma Gomez
University of Seville

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Paloma Gomez <pa...@gmail.com>.
Hi,

> the problem is that the stylesheet relies heavily on an additional css
> stylesheet (included in the package iirc).
> currently there is no way for a module to add its own stylesheet link to
> the page header, since only its <div id="body"/> section will be used by
> lenya's pipelines. so you are basically getting the raw xhtml without
> any styles applied.
>
> let's whine at the devs in unison to provide a standard mechanism for
> modules to add header elements :-D

Thanks, I thought I was doing something wrong. After reading the whole
thread I've realized it wasn't as obvious as I thought at the
beginning, so I'll wait for it to be fixed before trying again.

Best,
Paloma
--
Paloma Gomez
University of Seville

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Andreas Hartmann <an...@apache.org>.
Jörn Nettingsmeier wrote:

[...]

>>> Then we could as well use plain XHTML for the view
>>> (including head and body), couldn't we?
>>
>> +1
>>
>> That was just an example. ;)
>>
>> IMO we should use plain xhtml grammar. I do not really see the benefit
>> yet of Jörns idee of adding lenya: ns. 
> 
> i'm proposing it to make things explicit. when i browse a stylesheet, i 
> can immediately see "hey, a tag from a special namespace, that's 
> probably a marker of some kind", and i can grep for it and learn what's 
> going on.
> imho, there are way too many non-obvious, implicit things going on in 
> cocoon and especially lenya, and here's a chance of getting rid of one.
> 
> for an example of the problems that can arise, see earlier in this 
> thread: a user forgot to add the <div id="body"/> to a module xslt and 
> ended up with an empty output, likely because she had not realized its 
> special meaning.
> 
> and why should i be forced to have a <div id="body"> in my output at all?

With plain XHTML, you wouldn't.

IMO the only reason not to use XHTML is that certain elements would
be stripped/replaced, e.g. the <xhtml:title> (because this would be
replaced with the <dc:title> so that all page titles are handled in
the same way, independent from the resource type).
This might cause confusion (but I don't think it is really harmful).

-- Andreas

-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
andreas.hartmann@wyona.com                     andreas@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Jörn Nettingsmeier <po...@uni-duisburg.de>.
Thorsten Scherler wrote:
> El vie, 24-03-2006 a las 12:09 +0100, Andreas Hartmann escribió:
>> Thorsten Scherler wrote:
>>
>> [...]
>>
>>> Hmm, I always wondered why we have been limiting everything to the <div
>>> id="body"/>. Why we are not changing the page2xhtml.xsl like:
>>> ...
>>> <head>
>>>  <xsl:apply-templates
>>> select="xhtml:div[@id='content']/xhtml:div[@id='head']"/>
>>> </head>
>> That (content/head) looks a little strange IMO.
>>
>> Then we could as well use plain XHTML for the view
>> (including head and body), couldn't we?
> 
> +1
> 
> That was just an example. ;)
> 
> IMO we should use plain xhtml grammar. I do not really see the benefit
> yet of Jörns idee of adding lenya: ns. 

i'm proposing it to make things explicit. when i browse a stylesheet, i 
can immediately see "hey, a tag from a special namespace, that's 
probably a marker of some kind", and i can grep for it and learn what's 
going on.
imho, there are way too many non-obvious, implicit things going on in 
cocoon and especially lenya, and here's a chance of getting rid of one.

for an example of the problems that can arise, see earlier in this 
thread: a user forgot to add the <div id="body"/> to a module xslt and 
ended up with an empty output, likely because she had not realized its 
special meaning.

and why should i be forced to have a <div id="body"> in my output at all?


-- 
"Open source takes the bullshit out of software."
	- Charles Ferguson on TechnologyReview.com

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Thorsten Scherler <th...@apache.org>.
El vie, 24-03-2006 a las 12:09 +0100, Andreas Hartmann escribió:
> Thorsten Scherler wrote:
> 
> [...]
> 
> > Hmm, I always wondered why we have been limiting everything to the <div
> > id="body"/>. Why we are not changing the page2xhtml.xsl like:
> > ...
> > <head>
> >  <xsl:apply-templates
> > select="xhtml:div[@id='content']/xhtml:div[@id='head']"/>
> > </head>
> 
> That (content/head) looks a little strange IMO.
> 
> Then we could as well use plain XHTML for the view
> (including head and body), couldn't we?

+1

That was just an example. ;)

IMO we should use plain xhtml grammar. I do not really see the benefit
yet of Jörns idee of adding lenya: ns. 

salu2

> 
> -- Andreas
> 
> > <body>
> >   <xsl:apply-templates
> > select="xhtml:div[@id='content']/xhtml:div[@id='body']"/>
> > </body>
> > 
> > This way we support as well the head parts of a content document.
> > 
> > salu2
> 
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Andreas Hartmann <an...@apache.org>.
Thorsten Scherler wrote:

[...]

> Hmm, I always wondered why we have been limiting everything to the <div
> id="body"/>. Why we are not changing the page2xhtml.xsl like:
> ...
> <head>
>  <xsl:apply-templates
> select="xhtml:div[@id='content']/xhtml:div[@id='head']"/>
> </head>

That (content/head) looks a little strange IMO.

Then we could as well use plain XHTML for the view
(including head and body), couldn't we?

-- Andreas

> <body>
>   <xsl:apply-templates
> select="xhtml:div[@id='content']/xhtml:div[@id='body']"/>
> </body>
> 
> This way we support as well the head parts of a content document.
> 
> salu2


-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
andreas.hartmann@wyona.com                     andreas@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Jörn Nettingsmeier <po...@uni-duisburg.de>.
Thorsten Scherler wrote:
> Hmm, I always wondered why we have been limiting everything to the <div
> id="body"/>. Why we are not changing the page2xhtml.xsl like:
> ...
> <head>
>  <xsl:apply-templates
> select="xhtml:div[@id='content']/xhtml:div[@id='head']"/>
> </head>
> <body>
>   <xsl:apply-templates
> select="xhtml:div[@id='content']/xhtml:div[@id='body']"/>
> </body>
> 
> This way we support as well the head parts of a content document.

votes++

but i'm wondering whether xhtml elements are a good choice as markers - 
perhaps it would be better have some lenya-internal namespace for 
markers, such as <lenya:head> and <lenya:body> or <page:*> or whatever 
(i'm not too familiar with lenya's namespaces, perhaps somebody else can 
suggest a better solution?)


-- 
"Open source takes the bullshit out of software."
	- Charles Ferguson on TechnologyReview.com

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Andreas Hartmann <an...@apache.org>.
Thorsten Scherler wrote:

[...]

> Hmm, I always wondered why we have been limiting everything to the <div
> id="body"/>. Why we are not changing the page2xhtml.xsl like:
> ...
> <head>
>  <xsl:apply-templates
> select="xhtml:div[@id='content']/xhtml:div[@id='head']"/>
> </head>

That (content/head) looks a little strange IMO.

Then we could as well use plain XHTML for the view
(including head and body), couldn't we?

-- Andreas

> <body>
>   <xsl:apply-templates
> select="xhtml:div[@id='content']/xhtml:div[@id='body']"/>
> </body>
> 
> This way we support as well the head parts of a content document.
> 
> salu2


-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
andreas.hartmann@wyona.com                     andreas@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Thorsten Scherler <th...@wyona.com>.
El jue, 23-03-2006 a las 21:48 -0500, Renaud Richardet escribió:
> Michael Wechner wrote:
> 
> > Joern Nettingsmeier wrote:
> >
> >>
> >> let's whine at the devs in unison to provide a standard mechanism for
> >> modules to add header elements :-D
> >> i had planned to look into it today, but alas...
> >>  
> >>
> >
> > what about the fallback for page2xhtml-RESOURCETYPE.xsl in the case
> > of the default publication resp. overwriting?
> 
> 
> Here is a start:
> 
> in modules/opendocument/xslt/opendocument2xhtml.xsl, under
> <div id="body">
> <xsl:apply-templates select="office:body/office:text"/>
> </div>
> 
> add:
> <div id="css">
> <xsl:apply-templates select="office:automatic-styles"/>
> </div>
> 
> in pubs/default/xslt/page2xhtml.xsl, under
>       <xsl:choose>
>         <xsl:when test="$document-type">
>             <link rel="stylesheet" 
> href="{$root}/css/{$document-type}.css" type="text/css"/>
>         </xsl:when>
>         <xsl:otherwise>
>             <!-- do nothing -->
>         </xsl:otherwise>
>       </xsl:choose>
> add:
>       <xsl:apply-templates select="xhtml:div[@id = 'css']"/>

Hmm, I always wondered why we have been limiting everything to the <div
id="body"/>. Why we are not changing the page2xhtml.xsl like:
...
<head>
 <xsl:apply-templates
select="xhtml:div[@id='content']/xhtml:div[@id='head']"/>
</head>
<body>
  <xsl:apply-templates
select="xhtml:div[@id='content']/xhtml:div[@id='body']"/>
</body>

This way we support as well the head parts of a content document.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)
-- 
Thorsten Scherler
COO Spain
Wyona Inc.  -  Open Source Content Management  -  Apache Lenya
http://www.wyona.com                   http://lenya.apache.org
thorsten.scherler@wyona.com                thorsten@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting for Apache Lenya

Posted by Renaud Richardet <re...@wyona.com>.
J David Eisenberg wrote:

>On Fri, 24 Mar 2006, Renaud Richardet wrote:
>
>  
>
>>J,
>>
>>Apache Lenya is an open source content management system. We are 
>>currently in the process of integrating odt documents into the 
>>framework. While looking for a stylesheet to convert the content.xml of 
>>and odt file to xhtml, we found your stylesheet odt_to_xhtml.xsl
>>
>>We would be very interested in reusing your stylesheet. Would you 
>>consider release it under an Apache or BSD-like licence. This way we 
>>could integrate it into Apache Lenya.
>>    
>>
>
>Sure; how do I do that? Just change the page? (I'd rather use Apache than 
>BSD.)
>  
>
Great :-) I guess it will be sufficient if you would paste the Apache 
licence header [1] at the top of the file and attach it to a bug [2]. 
Would that work for you?

Thanks,
Renaud

[1] can be found e.g. at the top of 
http://svn.apache.org/viewcvs.cgi/lenya/trunk/src/modules/opendocument/sitemap.xmap?view=markup
[2] http://issues.apache.org/bugzilla/enter_bug.cgi?product=Lenya , 
you'll probably have to create an account.

-- 
Renaud Richardet
COO America
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
office +1 857 776-3195                     mobile +1 617 230 9112
renaud.richardet <at> wyona.com              http://www.wyona.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting for Apache Lenya

Posted by Michael Wechner <mi...@wyona.com>.
J David Eisenberg wrote:

>On Fri, 24 Mar 2006, Renaud Richardet wrote:
>
>  
>
>>J,
>>
>>Apache Lenya is an open source content management system. We are 
>>currently in the process of integrating odt documents into the 
>>framework. While looking for a stylesheet to convert the content.xml of 
>>and odt file to xhtml, we found your stylesheet odt_to_xhtml.xsl
>>
>>We would be very interested in reusing your stylesheet. Would you 
>>consider release it under an Apache or BSD-like licence. This way we 
>>could integrate it into Apache Lenya.
>>    
>>
>
>Sure; how do I do that? Just change the page? (I'd rather use Apache 
>

Apache would be even better ;-)

As Renaud is pointing one needs to add the Apache License header into
each file and also add the Apache License to the distro. See for example

https://svn.apache.org/repos/asf/lenya/trunk/LICENSE.txt

resp. the header


<!--
  Copyright 1999-2004 The Apache Software Foundation

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

We could then pull it in with svn:externals from:

svn+ssh://opendocumentfoundation.org/repos/libopendocument

HTH

Michi

>than 
>BSD.)
>
>  
>
>>Thank you,
>>Renaud
>>
>>
>>    
>>
>
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting for Apache Lenya

Posted by J David Eisenberg <ca...@catcode.com>.
On Fri, 24 Mar 2006, Renaud Richardet wrote:

> J,
> 
> Apache Lenya is an open source content management system. We are 
> currently in the process of integrating odt documents into the 
> framework. While looking for a stylesheet to convert the content.xml of 
> and odt file to xhtml, we found your stylesheet odt_to_xhtml.xsl
> 
> We would be very interested in reusing your stylesheet. Would you 
> consider release it under an Apache or BSD-like licence. This way we 
> could integrate it into Apache Lenya.

Sure; how do I do that? Just change the page? (I'd rather use Apache than 
BSD.)

> 
> Thank you,
> Renaud
> 
> 

-- 
J. David Eisenberg  http://catcode.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


opendocument formatting for Apache Lenya

Posted by Renaud Richardet <re...@wyona.com>.
J,

Apache Lenya is an open source content management system. We are 
currently in the process of integrating odt documents into the 
framework. While looking for a stylesheet to convert the content.xml of 
and odt file to xhtml, we found your stylesheet odt_to_xhtml.xsl

We would be very interested in reusing your stylesheet. Would you 
consider release it under an Apache or BSD-like licence. This way we 
could integrate it into Apache Lenya.

Thank you,
Renaud

-- 
Renaud Richardet
COO America
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
office +1 857 776-3195                     mobile +1 617 230 9112
renaud.richardet <at> wyona.com              http://www.wyona.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Michael Wechner <mi...@wyona.com>.
Renaud Richardet wrote:

>
>
> BTW: is there a way to integrate the opendocument2xhtml.xsl from J. 
> David Eisenberg into Lenya (re copyrights)?


it's LGPL and AFAIK we cannot distribute LGPL stuff

> Shall we ask him if he would be ready to donate it to the ASF?


you might want to ask him if he wants to release under the Apache or BSD 
like license.

Michi

>
> - Renaud
>
>>
>> Michi
>>
>>>
>>> best,
>>>
>>>
>>> jörn
>>>
>>>
>>>
>>>
>>>
>>>
>>>  
>>>
>>
>>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Renaud Richardet <re...@wyona.com>.
Michael Wechner wrote:

> Joern Nettingsmeier wrote:
>
>>
>> let's whine at the devs in unison to provide a standard mechanism for
>> modules to add header elements :-D
>> i had planned to look into it today, but alas...
>>  
>>
>
> what about the fallback for page2xhtml-RESOURCETYPE.xsl in the case
> of the default publication resp. overwriting?


Here is a start:

in modules/opendocument/xslt/opendocument2xhtml.xsl, under
<div id="body">
<xsl:apply-templates select="office:body/office:text"/>
</div>

add:
<div id="css">
<xsl:apply-templates select="office:automatic-styles"/>
</div>

in pubs/default/xslt/page2xhtml.xsl, under
      <xsl:choose>
        <xsl:when test="$document-type">
            <link rel="stylesheet" 
href="{$root}/css/{$document-type}.css" type="text/css"/>
        </xsl:when>
        <xsl:otherwise>
            <!-- do nothing -->
        </xsl:otherwise>
      </xsl:choose>
add:
      <xsl:apply-templates select="xhtml:div[@id = 'css']"/>

It fixes the bold and italic, but not font sizes, etc...

BTW: is there a way to integrate the opendocument2xhtml.xsl from J. 
David Eisenberg into Lenya (re copyrights)? Shall we ask him if he would 
be ready to donate it to the ASF?

- Renaud

>
> Michi
>
>>
>> best,
>>
>>
>> jörn
>>
>>
>>
>>
>>
>>
>>  
>>
>
>

-- 
Renaud Richardet
COO America
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
office +1 857 776-3195                     mobile +1 617 230 9112
renaud.richardet <at> wyona.com              http://www.wyona.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Michael Wechner <mi...@wyona.com>.
Joern Nettingsmeier wrote:

>
>let's whine at the devs in unison to provide a standard mechanism for
>modules to add header elements :-D
>i had planned to look into it today, but alas...
>  
>

what about the fallback for page2xhtml-RESOURCETYPE.xsl in the case
of the default publication resp. overwriting?

Michi

>
>best,
>
>
>jörn
>
>
>
>
>
>
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Joern Nettingsmeier <po...@uni-duisburg.de>.
Paloma Gomez wrote:
> Hi,
> 
> Thorsten Scherler wrote:
>> Have you set (in lenya/local.build.properties)
>> #------------------------------------------------------------------------------------
>> # Enable file uploads in Lenya
>> # If you leave this set to false, asset and image upload will not work.
>> # It is disabled by default for security reasons
>>
>> enable.uploads=true
>>
>> The opendocument upload code will not work if you do not enable the
>> uploads.
> 
> That was it, thanks
> 
>> No, I fixed that again last night and it should work fine again
>> (otherwise you would not be able to choose to upload a odt).
>>
> 
> I've finally get it working, but the new xslt file doesn't format the
> page. For instance, it doesn't render text in neither italics or bold.
> The font has changed, though. I'd like to know if  someone has
> succeeded in formatting a document  with this xslt file.

the problem is that the stylesheet relies heavily on an additional css
stylesheet (included in the package iirc).
currently there is no way for a module to add its own stylesheet link to
the page header, since only its <div id="body"/> section will be used by
lenya's pipelines. so you are basically getting the raw xhtml without
any styles applied.

let's whine at the devs in unison to provide a standard mechanism for
modules to add header elements :-D
i had planned to look into it today, but alas...


best,


jörn






-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Paloma Gomez <pa...@gmail.com>.
Hi,

Thorsten Scherler wrote:
> Have you set (in lenya/local.build.properties)
> #------------------------------------------------------------------------------------
> # Enable file uploads in Lenya
> # If you leave this set to false, asset and image upload will not work.
> # It is disabled by default for security reasons
>
> enable.uploads=true
>
> The opendocument upload code will not work if you do not enable the
> uploads.

That was it, thanks

> No, I fixed that again last night and it should work fine again
> (otherwise you would not be able to choose to upload a odt).
>

I've finally get it working, but the new xslt file doesn't format the
page. For instance, it doesn't render text in neither italics or bold.
The font has changed, though. I'd like to know if  someone has
succeeded in formatting a document  with this xslt file.

Thanks,

Paloma

--
Paloma Gomez
University of Seville

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Thorsten Scherler <th...@wyona.com>.
El mié, 22-03-2006 a las 15:49 +0100, Paloma Gomez escribió:
> Hi all,

Hi Paloma,

> First, I'd like to thank you all for your help. :-)
> 
> I've tried a mix of Michi's and Thorsten's suggestions:
> 
> Thorsten Scherler wrote:
> >Hmm, I just did a change in the menus.xmap, can you try again after svn
> >up on 1.4?
> 
> Michael Werner wrote:
> >try to use
> >
> >http://svn.wyona.com/repos/public/lenya/modules/opendocument/xslt
> >
> >anonymous:anonymous
> >
> >which is a slightly modified version of J. David Eisenberg's XSLT
> 
>  I've downloaded the xslt file from the link provided by Michi and
> I've run svn update as Thorsten said. The problem is that after
> updating the opendocument module doesn't work any more: I can't upload
> odt files. When I fill in the form and click on the untranslated
> button, the form clears and nothing else happens. The file is not
> uploaded.

Have you set (in lenya/local.build.properties)
#------------------------------------------------------------------------------------
# Enable file uploads in Lenya
# If you leave this set to false, asset and image upload will not work.
# It is disabled by default for security reasons

enable.uploads=true

The opendocument upload code will not work if you do not enable the
uploads.

> 
> As Michi said the module is currently broken, I guess that's why it's
> not working. 

No, I fixed that again last night and it should work fine again
(otherwise you would not be able to choose to upload a odt).

> If this is so, I think I'll wait for the opendocument
> module to be fixed before I try it again. Anyway, I'd like to know if
> copying this xslt file to
> <my-pub>/lenya/modules/opendocument/xslt
> should be enough.
> 

well, I disagree with michi recommendation to just add it to the build
(see my last mail about that), so you should add this to the src and
then build as usual.

> In case this helps, I include the first 20 lines (*after* the
> namespace declarations :) ) of the xslt file provided by Michi:

jeje, that is working ;)

> [quote]
> <xsl:output
> 	method="xml"
> 	indent="yes"
> 	omit-xml-declaration="yes"
> 	doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
> 	doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
> 	encoding="UTF-8"
> />
> <xsl:variable name="lineBreak"><xsl:text>
> </xsl:text></xsl:variable>
> 
> <xsl:key name="listTypes" match="text:list-style" use="@style:name"/>
> 
> <xsl:template match="/office:document-content">
> 
> <div id="body">
> <xsl:apply-templates select="office:body/office:text"/>
> </div>
> 
> </xsl:template>
> 
> <xsl:template match="office:automatic-styles">
> 	<style type="text/css">
> 	<xsl:apply-templates/>
> 	</style>
> </xsl:template>
> [/quote]
> 
> Regards,
> 
> Paloma
> 
> PS: Thorsten: Soy del sevilla. ;-)

jeje. ;)

> 
> --
> Paloma Gomez
> University of Seville

salu2
-- 
Thorsten Scherler
COO Spain
Wyona Inc.  -  Open Source Content Management  -  Apache Lenya
http://www.wyona.com                   http://lenya.apache.org
thorsten.scherler@wyona.com                thorsten@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Paloma Gomez <pa...@gmail.com>.
Hi all,

First, I'd like to thank you all for your help. :-)

I've tried a mix of Michi's and Thorsten's suggestions:

Thorsten Scherler wrote:
>Hmm, I just did a change in the menus.xmap, can you try again after svn
>up on 1.4?

Michael Werner wrote:
>try to use
>
>http://svn.wyona.com/repos/public/lenya/modules/opendocument/xslt
>
>anonymous:anonymous
>
>which is a slightly modified version of J. David Eisenberg's XSLT

 I've downloaded the xslt file from the link provided by Michi and
I've run svn update as Thorsten said. The problem is that after
updating the opendocument module doesn't work any more: I can't upload
odt files. When I fill in the form and click on the untranslated
button, the form clears and nothing else happens. The file is not
uploaded.

As Michi said the module is currently broken, I guess that's why it's
not working. If this is so, I think I'll wait for the opendocument
module to be fixed before I try it again. Anyway, I'd like to know if
copying this xslt file to
<my-pub>/lenya/modules/opendocument/xslt
should be enough.

In case this helps, I include the first 20 lines (*after* the
namespace declarations :) ) of the xslt file provided by Michi:

[quote]
<xsl:output
	method="xml"
	indent="yes"
	omit-xml-declaration="yes"
	doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
	doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
	encoding="UTF-8"
/>
<xsl:variable name="lineBreak"><xsl:text>
</xsl:text></xsl:variable>

<xsl:key name="listTypes" match="text:list-style" use="@style:name"/>

<xsl:template match="/office:document-content">

<div id="body">
<xsl:apply-templates select="office:body/office:text"/>
</div>

</xsl:template>

<xsl:template match="office:automatic-styles">
	<style type="text/css">
	<xsl:apply-templates/>
	</style>
</xsl:template>
[/quote]

Regards,

Paloma

PS: Thorsten: Soy del sevilla. ;-)

--
Paloma Gomez
University of Seville

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Michael Wechner <mi...@wyona.com>.
Paloma Gomez wrote:

>Hi all,
>
>I've tried out the odt module and have noticed that it doesn't support
>any formatting.  I've read in the dev mailing list how to fix it:
>
>  
>
>>The XSLT applied to the ODT XML is only rudimentary. There do
>>exists better versions, but they are
>>GPL and cannot be re-distributed. But see the links on the sample ;-)
>>    
>>
>
>I've downloaded a xslt from the link
>
>ODT 2 XHTML by J. David Eisenberg
>
>but I can't get it working.
>
try to use

http://svn.wyona.com/repos/public/lenya/modules/opendocument/xslt

anonymous:anonymous

which is a slightly modified version of J. David Eisenberg's XSLT

HTH

Michi


> I've replaced the opendocument2xhtml.xsl
>in $TOMCAT_HOME/webapps/lenya/lenya/modules/opendocument/xslt with the
>one from the link and then I've run sh build.sh install-pub
>-Dpub.prefix="". This has resulted in a blank page when I access the
>document through lenya, so I guess that replacing the xslt file is not
>enough. I've downloaded a file called ODTransform.jar along with the
>xslt file. Should I copy this file as well somewhere in my deployment?
>
>Thanks,
>
>Paloma
>--
>Paloma Gomez
>University of Seville
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>For additional commands, e-mail: user-help@lenya.apache.org
>
>
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Renaud Richardet <re...@wyona.com>.
Thorsten Scherler wrote:

>El mar, 21-03-2006 a las 19:03 +0100, Paloma Gomez escribió:
>  
>
>>Hi Thorsten,
>>
>>    
>>
>>>Hmm, if you place it to
>>>{yourPub}/lenya/modules/opendocument/xslt/opendocument2xhtml.xsl and do
>>>./build.sh clean
>>>./build.sh
>>>./lenya.sh
>>>
>>>It should be triggered.
>>>      
>>>
>>Here is what I've done:
>>1. I've copied it to the place you suggested
>>2. build.sh clean
>>3. build.sh
>>4. build.sh install-pub -Dpub.prefix="" (Otherwise
>>index_manager_index.xconf is not loaded)
>>    
>>
>
>The step 4. I never have done, maybe for the sake of testing just leave
>it alone this time.
>
>  
>
>>Now when I try to access the publication I get this error:
>>[quote]
>>Resource not found: cocoon://menu-xml/module/authoring/opendocument.xml
>>    
>>
>
>Hmm, I just did a change in the menus.xmap, can you try again after svn
>up on 1.4? 
>
>  
>
>>org.apache.cocoon.ProcessingException: Unable to get transformer
>>handler for cocoon://lenya-page/prueba/authoring/index.xml?doctype=xhtml
>>    
>>
>
>That is weird, did you request
>http://localhost:8080/.../authoring/index.html ?
>
>  
>
>>at <map:serialize type="xhtml"> -
>>file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:227:50
>>at <map:transform> -
>>file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:207:91
>>at <map:transform> -
>>file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:200:164
>>at <map:generate> -
>>file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:189:171
>>at <map:mount> -
>>file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/global-sitemap.xmap:428:113
>>at <map:mount> -
>>file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/sitemap.xmap:634:106
>>
>>cause: org.apache.avalon.framework.CascadingException: Resource not
>>found: cocoon://menu-xml/module/authoring/opendocument.xml
>>[/quote]
>>
>>Yesterday I replaced the opendocument2xhtml.xsl in
>>/$LENYA_HOME/src/modules/opendocument/xslt with the one I downloaded,
>>    
>>
>
>That should work as well but has the downside, that you are patching the
>core. The other location I told you has preference over the core
>location and you do not have to patch the core. ;)
>
>  
>
>>because I didn't understand well the difference between /build and
>>/src. 
>>    
>>
>
>The changes in the build *should* be reflected after the next refresh,
>but they will be deleted with the next ./build.sh clean!!!
>
>I am using the build sometimes to develope xsl, but you never *have to*
>forget that you are working in the build and need to sync the sources
>otherwise you may loose your work (next ./build.sh clean).
>
>All changes in the src/ are "forever" meaning they get deployed with the
>next ./build.sh. Some files (like all java) need to be changed in the
>src because they need to be compiled.
>
>  
>
>>I don't know if this may be relevant or not.
>>    
>>
>
>You did it right, this way you have the changes in the next build.
>
>  
>
>>>Blank page sounds a lot like not matching something. ;)
>>>
>>>Can we see the first 10-20 lines of the stylesheet you are using?
>>>
>>>      
>>>
>>Here are the first 20 lines:
>>    
>>
>
>doh ;)
>
>We need to see the first matches. ;)
>  
>
Paloma, are you referring to the xsl in 
http://books.evc-cit.info/odf_utils/odt_to_xhtml.html ?

- Renaud

>  
>
>><xsl:stylesheet version="1.0"
>>	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
>>    xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
>>    xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
>>    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
>>    xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
>>    xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
>>    xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
>>    xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
>>    xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
>>    xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
>>    xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
>>    xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
>>    xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
>>    xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
>>
>>    xmlns:dc="http://purl.org/dc/elements/1.1/"
>>    xmlns:xlink="http://www.w3.org/1999/xlink"
>>    xmlns:math="http://www.w3.org/1998/Math/MathML"
>>    xmlns:xforms="http://www.w3.org/2002/xforms"
>>    
>>
>>>Vivo tambien en sevilla. ;)
>>>      
>>>
>>;-)
>>
>>    
>>
>
>¿eres de betis or de sevilla? ;)
>
>HTH
>
>salu2
>  
>

-- 
Renaud Richardet
COO America
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
office +1 857 776-3195                     mobile +1 617 230 9112
renaud.richardet <at> wyona.com              http://www.wyona.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Thorsten Scherler <th...@apache.org>.
El mar, 21-03-2006 a las 19:03 +0100, Paloma Gomez escribió:
> Hi Thorsten,
> 
> > Hmm, if you place it to
> > {yourPub}/lenya/modules/opendocument/xslt/opendocument2xhtml.xsl and do
> > ./build.sh clean
> > ./build.sh
> > ./lenya.sh
> >
> > It should be triggered.
> Here is what I've done:
> 1. I've copied it to the place you suggested
> 2. build.sh clean
> 3. build.sh
> 4. build.sh install-pub -Dpub.prefix="" (Otherwise
> index_manager_index.xconf is not loaded)

The step 4. I never have done, maybe for the sake of testing just leave
it alone this time.

> 
> Now when I try to access the publication I get this error:
> [quote]
> Resource not found: cocoon://menu-xml/module/authoring/opendocument.xml

Hmm, I just did a change in the menus.xmap, can you try again after svn
up on 1.4? 

> org.apache.cocoon.ProcessingException: Unable to get transformer
> handler for cocoon://lenya-page/prueba/authoring/index.xml?doctype=xhtml

That is weird, did you request
http://localhost:8080/.../authoring/index.html ?

> at <map:serialize type="xhtml"> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:227:50
> at <map:transform> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:207:91
> at <map:transform> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:200:164
> at <map:generate> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:189:171
> at <map:mount> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/global-sitemap.xmap:428:113
> at <map:mount> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/sitemap.xmap:634:106
> 
> cause: org.apache.avalon.framework.CascadingException: Resource not
> found: cocoon://menu-xml/module/authoring/opendocument.xml
> [/quote]
> 
> Yesterday I replaced the opendocument2xhtml.xsl in
> /$LENYA_HOME/src/modules/opendocument/xslt with the one I downloaded,

That should work as well but has the downside, that you are patching the
core. The other location I told you has preference over the core
location and you do not have to patch the core. ;)

> because I didn't understand well the difference between /build and
> /src. 

The changes in the build *should* be reflected after the next refresh,
but they will be deleted with the next ./build.sh clean!!!

I am using the build sometimes to develope xsl, but you never *have to*
forget that you are working in the build and need to sync the sources
otherwise you may loose your work (next ./build.sh clean).

All changes in the src/ are "forever" meaning they get deployed with the
next ./build.sh. Some files (like all java) need to be changed in the
src because they need to be compiled.

> I don't know if this may be relevant or not.

You did it right, this way you have the changes in the next build.

> >
> > Blank page sounds a lot like not matching something. ;)
> >
> > Can we see the first 10-20 lines of the stylesheet you are using?
> >
> Here are the first 20 lines:

doh ;)

We need to see the first matches. ;)

> <xsl:stylesheet version="1.0"
> 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>     xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
>     xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
>     xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
>     xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
>     xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
>     xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
>     xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
>     xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
>     xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
>     xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
>     xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
>     xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
>     xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
>     xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
> 
>     xmlns:dc="http://purl.org/dc/elements/1.1/"
>     xmlns:xlink="http://www.w3.org/1999/xlink"
>     xmlns:math="http://www.w3.org/1998/Math/MathML"
>     xmlns:xforms="http://www.w3.org/2002/xforms"
> >
> > Vivo tambien en sevilla. ;)
> ;-)
> 

¿eres de betis or de sevilla? ;)

HTH

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Jonathan Addison <jo...@wyona.com>.
Hi Paloma,

Paloma Gomez wrote:
> Hi Thorsten,
>
>   
>> Hmm, if you place it to
>> {yourPub}/lenya/modules/opendocument/xslt/opendocument2xhtml.xsl and do
>> ./build.sh clean
>> ./build.sh
>> ./lenya.sh
>>
>> It should be triggered.
>>     
> Here is what I've done:
> 1. I've copied it to the place you suggested
> 2. build.sh clean
> 3. build.sh
> 4. build.sh install-pub -Dpub.prefix="" (Otherwise
> index_manager_index.xconf is not loaded)
>
> Now when I try to access the publication I get this error:
> [quote]
> Resource not found: cocoon://menu-xml/module/authoring/opendocument.xml
>
> org.apache.cocoon.ProcessingException: Unable to get transformer
> handler for cocoon://lenya-page/prueba/authoring/index.xml?doctype=xhtml
> at <map:serialize type="xhtml"> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:227:50
> at <map:transform> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:207:91
> at <map:transform> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:200:164
> at <map:generate> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:189:171
> at <map:mount> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/global-sitemap.xmap:428:113
> at <map:mount> -
> file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/sitemap.xmap:634:106
>
> cause: org.apache.avalon.framework.CascadingException: Resource not
> found: cocoon://menu-xml/module/authoring/opendocument.xml
> [/quote]
>
> Yesterday I replaced the opendocument2xhtml.xsl in
> /$LENYA_HOME/src/modules/opendocument/xslt with the one I downloaded,
> because I didn't understand well the difference between /build and
> /src. I don't know if this may be relevant or not.
>   
>> Blank page sounds a lot like not matching something. ;)
>>
>> Can we see the first 10-20 lines of the stylesheet you are using?
>>
>>     
> Here are the first 20 lines:
> <xsl:stylesheet version="1.0"
> 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>     xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
>     xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
>     xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
>     xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
>     xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
>     xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
>     xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
>     xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
>     xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
>     xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
>     xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
>     xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
>     xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
>     xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
>
>     xmlns:dc="http://purl.org/dc/elements/1.1/"
>     xmlns:xlink="http://www.w3.org/1999/xlink"
>     xmlns:math="http://www.w3.org/1998/Math/MathML"
>     xmlns:xforms="http://www.w3.org/2002/xforms"
>   
Could you provide the first 20 lines after all of the namespace 
declarations?  Thanks.

-- Jonathan
>> Vivo tambien en sevilla. ;)
>>     
> ;-)
>
> Saludos,
> Paloma
>
> --
> Paloma Gomez
> University of Seville
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Paloma Gomez <pa...@gmail.com>.
Hi Thorsten,

> Hmm, if you place it to
> {yourPub}/lenya/modules/opendocument/xslt/opendocument2xhtml.xsl and do
> ./build.sh clean
> ./build.sh
> ./lenya.sh
>
> It should be triggered.
Here is what I've done:
1. I've copied it to the place you suggested
2. build.sh clean
3. build.sh
4. build.sh install-pub -Dpub.prefix="" (Otherwise
index_manager_index.xconf is not loaded)

Now when I try to access the publication I get this error:
[quote]
Resource not found: cocoon://menu-xml/module/authoring/opendocument.xml

org.apache.cocoon.ProcessingException: Unable to get transformer
handler for cocoon://lenya-page/prueba/authoring/index.xml?doctype=xhtml
at <map:serialize type="xhtml"> -
file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:227:50
at <map:transform> -
file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:207:91
at <map:transform> -
file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:200:164
at <map:generate> -
file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/sitemap.xmap:189:171
at <map:mount> -
file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/global-sitemap.xmap:428:113
at <map:mount> -
file:/usr/local/jakarta-tomcat-5.0.28/webapps/lenya/sitemap.xmap:634:106

cause: org.apache.avalon.framework.CascadingException: Resource not
found: cocoon://menu-xml/module/authoring/opendocument.xml
[/quote]

Yesterday I replaced the opendocument2xhtml.xsl in
/$LENYA_HOME/src/modules/opendocument/xslt with the one I downloaded,
because I didn't understand well the difference between /build and
/src. I don't know if this may be relevant or not.
>
> Blank page sounds a lot like not matching something. ;)
>
> Can we see the first 10-20 lines of the stylesheet you are using?
>
Here are the first 20 lines:
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
    xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
    xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
    xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
    xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
    xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
    xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
    xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
    xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
    xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
    xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
    xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
    xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"

    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:math="http://www.w3.org/1998/Math/MathML"
    xmlns:xforms="http://www.w3.org/2002/xforms"
>
> Vivo tambien en sevilla. ;)
;-)

Saludos,
Paloma

--
Paloma Gomez
University of Seville

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Thorsten Scherler <th...@wyona.com>.
El mar, 21-03-2006 a las 18:26 +0100, Paloma Gomez escribió:
> Hi all,
> 
> I've tried out the odt module and have noticed that it doesn't support
> any formatting.  I've read in the dev mailing list how to fix it:
> 
> >The XSLT applied to the ODT XML is only rudimentary. There do
> > exists better versions, but they are
> > GPL and cannot be re-distributed. But see the links on the sample ;-)
> 
> I've downloaded a xslt from the link
> 
> ODT 2 XHTML by J. David Eisenberg
> 
> but I can't get it working. I've replaced the opendocument2xhtml.xsl
> in $TOMCAT_HOME/webapps/lenya/lenya/modules/opendocument/xslt with the
> one from the link and then I've run sh build.sh install-pub
> -Dpub.prefix="". This has resulted in a blank page when I access the
> document through lenya, so I guess that replacing the xslt file is not
> enough. I've downloaded a file called ODTransform.jar along with the
> xslt file. Should I copy this file as well somewhere in my deployment?
> 

Hmm, if you place it to
{yourPub}/lenya/modules/opendocument/xslt/opendocument2xhtml.xsl and do 
./build.sh clean
./build.sh
./lenya.sh

It should be triggered.

Blank page sounds a lot like not matching something. ;)

Can we see the first 10-20 lines of the stylesheet you are using?

> Thanks,
> 
> Paloma
> --
> Paloma Gomez
> University of Seville

:)

Vivo tambien en sevilla. ;)

salu2
-- 
Thorsten Scherler
COO Spain
Wyona Inc.  -  Open Source Content Management  -  Apache Lenya
http://www.wyona.com                   http://lenya.apache.org
thorsten.scherler@wyona.com                thorsten@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: opendocument formatting

Posted by Michael Wechner <mi...@wyona.com>.
Paloma Gomez wrote:

>Hi all,
>
>I've tried out the odt module and have noticed that it doesn't support
>any formatting.  I've read in the dev mailing list how to fix it:
>
>  
>
>>The XSLT applied to the ODT XML is only rudimentary. There do
>>exists better versions, but they are
>>GPL and cannot be re-distributed. But see the links on the sample ;-)
>>    
>>
>
>I've downloaded a xslt from the link
>
>ODT 2 XHTML by J. David Eisenberg
>
>but I can't get it working. I've replaced the opendocument2xhtml.xsl
>in $TOMCAT_HOME/webapps/lenya/lenya/modules/opendocument/xslt with the
>one from the link 
>

the file of J. David Eisenberg (odt_to_xhtml.xsl) needs to be slightly 
modified,
which means something like

<div id="body"> needs to be added. Please compare with the one of Lenya:

src/modules/opendocument/xslt/opendocument2xhtml.xsl

because Lenya is using the <div id="body" as a hook ...

Unfortunately the opendocument module currently seems to be broken,
otherwise I would like to give it a try myself.

Btw, you don't need to re-build the application, but just copy/overwrite 
the XSLT
within your builded version (e.g. within Tomcat)

HTH

Michi

>and then I've run sh build.sh install-pub
>-Dpub.prefix="". This has resulted in a blank page when I access the
>document through lenya, so I guess that replacing the xslt file is not
>enough. I've downloaded a file called ODTransform.jar along with the
>xslt file. Should I copy this file as well somewhere in my deployment?
>
>Thanks,
>
>Paloma
>--
>Paloma Gomez
>University of Seville
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>For additional commands, e-mail: user-help@lenya.apache.org
>
>
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org