You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by hu...@groepper.com on 2003/09/08 02:17:32 UTC

Editing global.xsl of blog publication

Hello.

I'm new to the world of XML/XSL-transformation and new to lenya, so I appologize
in advance if this is obvious or has been asked before.

I installed lenya and now want to start modifying the blog publication. All I do
is to place a comment around a tr of the layout table and place the XSL-stuff
into a new div.
Sometimes, I get a "page not published" error when reloading the page in lenya
(both in authoring view and live view).  I then undo some of the changes like
removing the comments until the page works fine again.
This seems to happen more or less randomly.

Well, and finally, after
a while of "editing" this file, lenya came up with the original table-layout. At
this point, there was nothing left of the table in the xsl-template, everything
was now inside divs. The source of the generated files in live view after a
fresh publish had nothing in common with my XSL-template...

What's the best way to edit the template files?
What to do when locked out of lenya because of a page not published error in the
authoring view?
Is there any caching in the way that could be turned on/off?
(My browser cache is off btw and i checked with a second browser).

-- Hubertus

-------------------------------------------------
This mail sent through Thielpark Webmail

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


Re: Editing global.xsl of blog publication

Posted by Christian Egli <ch...@wyona.com>.
hubertus@groepper.com writes:

> Hello.

Hi

> I'm new to the world of XML/XSL-transformation and new to lenya, so
> I appologize in advance if this is obvious or has been asked before.
> 
> I installed lenya and now want to start modifying the blog
> publication. All I do is to place a comment around a tr of the
> layout table and place the XSL-stuff into a new div.  Sometimes, I
> get a "page not published" error when reloading the page in lenya
> (both in authoring view and live view).  I then undo some of the
> changes like removing the comments until the page works fine again.
> This seems to happen more or less randomly.

I'm not too familiar with the blog publication, but the reason why the
"page not published" shows up so often is because it masks all
exceptions. This is a problem with the handle-error pipeline in the
blog publication. We fixed this to some degree in another publication
that we did for a customer, but haven't adapted the blog publication.

Most likely your changes in the xsl produce exceptions, which are
masked by the "page not published" screen. Try commenting the
<map:handle-errors> section. That will allow you to see the original
exception and will give you a hint where to locate the problem.

> What's the best way to edit the template files?  

Ocassionally, if I have just one xml and one xslt, I use an external
xslt processor to test the result a transformation.

> What to do when locked out of lenya because of a page not published
> error in the authoring view?

In the specific case of the blog publication: Comment the
handle-errors section

> Is there any caching in the way that could be turned on/off?

Not that I'd know of.

-- 
Christian Egli       christian.egli@wyona.com   +41 1 272 9161
                     Wyona AG, Hardstrasse 219, CH-8005 Zurich
Open Source CMS      http://www.wyona.org http://www.wyona.com 

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


Re: Editing global.xsl of blog publication

Posted by Hubertus Groepper <hu...@groepper.com>.
Michael Wechner wrote:
> Tim Cavanagh wrote:
> 
>> Hubertus,
>>
>> I have not set Lenya up yet but have been a long time cocoon user so 
>> know a
>> bit about xml and xslt. Seeing no one else is replying here is 
>> something to
>> try...
>>
>> Comments in XSLT need to be in this format <xsl:comment> Some comment
>> </xsl:comment> But generally they will have no effect on the execution of
>> the parser. In other words the are just to mark your code with 
>> comments not
>> to prevent some execution of code. So I think that maybe your problem. A
>> great source for XSLT resources is the mulberry tech site and list. 
>> That¹s
>> how I learnt... Good luck
>>
> In order to see the errors better, you can modify the handle-errors 
> within the blog sitemap (pubs/blog/sitemap.xmap):
> 
>      <map:handle-errors type="500">
>        <!-- FIXME: can also contain other errors than "not published 
> yet" -->
>        <map:transform src="../../xslt/exception/not_published_yet.xsl"/>
>        <map:transform src="../../xslt/util/page2xhtml.xsl"/>
>        <map:serialize type="html"/>
>      </map:handle-errors>
> 
> change it to:
> 
>      <map:handle-errors type="500">
>         <map:serialize type="xml"/>
>      </map:handle-errors>
> 
> then you should see the XSLT errors
> 
> HTH
> 
> Michael
> 
> P.S.: If I find some time then I will improve the handle-errors by using 
> exception selector. But please feel free to be quicker than me ;-)
> 
> 
> 
>>
>> Cheers
>>
>> Tim Cavanagh

Thanks to Tim, Christian and Michael.
It was indeed a syntax error with my comments which could be resolved by 
"enabling" the XSLT error messages. I will continue my journey into the 
new world of web publishing.
Thanks!
Hubertus


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


Re: Editing global.xsl of blog publication

Posted by Michael Wechner <mi...@wyona.org>.
Tim Cavanagh wrote:

>Hubertus,
>
>I have not set Lenya up yet but have been a long time cocoon user so know a
>bit about xml and xslt. Seeing no one else is replying here is something to
>try...
>
>Comments in XSLT need to be in this format <xsl:comment> Some comment
></xsl:comment> But generally they will have no effect on the execution of
>the parser. In other words the are just to mark your code with comments not
>to prevent some execution of code. So I think that maybe your problem. A
>great source for XSLT resources is the mulberry tech site and list. That¹s
>how I learnt... Good luck
>
In order to see the errors better, you can modify the handle-errors 
within the blog sitemap (pubs/blog/sitemap.xmap):

      <map:handle-errors type="500">
        <!-- FIXME: can also contain other errors than "not published 
yet" -->
        <map:transform src="../../xslt/exception/not_published_yet.xsl"/>
        <map:transform src="../../xslt/util/page2xhtml.xsl"/>
        <map:serialize type="html"/>
      </map:handle-errors>

change it to:

      <map:handle-errors type="500">
         <map:serialize type="xml"/>
      </map:handle-errors>

then you should see the XSLT errors

HTH

Michael

P.S.: If I find some time then I will improve the handle-errors by using 
exception selector. But please feel free to be quicker than me ;-)



>
>Cheers
>
>Tim Cavanagh
>
>
>  
>
>>From: hubertus@groepper.com
>>Reply-To: "Lenya Users List" <le...@cocoon.apache.org>
>>Date: Mon,  8 Sep 2003 02:17:32 +0200
>>To: Lenya Users List <le...@cocoon.apache.org>
>>Subject: Editing global.xsl of blog publication
>>
>>
>>Hello.
>>
>>I'm new to the world of XML/XSL-transformation and new to lenya, so I
>>appologize
>>in advance if this is obvious or has been asked before.
>>
>>I installed lenya and now want to start modifying the blog publication. All I
>>do
>>is to place a comment around a tr of the layout table and place the XSL-stuff
>>into a new div.
>>Sometimes, I get a "page not published" error when reloading the page in lenya
>>(both in authoring view and live view).  I then undo some of the changes like
>>removing the comments until the page works fine again.
>>This seems to happen more or less randomly.
>>
>>Well, and finally, after
>>a while of "editing" this file, lenya came up with the original table-layout.
>>At
>>this point, there was nothing left of the table in the xsl-template,
>>everything
>>was now inside divs. The source of the generated files in live view after a
>>fresh publish had nothing in common with my XSL-template...
>>
>>What's the best way to edit the template files?
>>What to do when locked out of lenya because of a page not published error in
>>the
>>authoring view?
>>Is there any caching in the way that could be turned on/off?
>>(My browser cache is off btw and i checked with a second browser).
>>
>>-- Hubertus
>>
>>-------------------------------------------------
>>This mail sent through Thielpark Webmail
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>>
>>
>>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>
>
>  
>



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


Re: Editing global.xsl of blog publication

Posted by Tim Cavanagh <ti...@tafe.sa.edu.au>.
Hubertus,

I have not set Lenya up yet but have been a long time cocoon user so know a
bit about xml and xslt. Seeing no one else is replying here is something to
try...

Comments in XSLT need to be in this format <xsl:comment> Some comment
</xsl:comment> But generally they will have no effect on the execution of
the parser. In other words the are just to mark your code with comments not
to prevent some execution of code. So I think that maybe your problem. A
great source for XSLT resources is the mulberry tech site and list. That¹s
how I learnt... Good luck

Cheers

Tim Cavanagh


> From: hubertus@groepper.com
> Reply-To: "Lenya Users List" <le...@cocoon.apache.org>
> Date: Mon,  8 Sep 2003 02:17:32 +0200
> To: Lenya Users List <le...@cocoon.apache.org>
> Subject: Editing global.xsl of blog publication
> 
> 
> Hello.
> 
> I'm new to the world of XML/XSL-transformation and new to lenya, so I
> appologize
> in advance if this is obvious or has been asked before.
> 
> I installed lenya and now want to start modifying the blog publication. All I
> do
> is to place a comment around a tr of the layout table and place the XSL-stuff
> into a new div.
> Sometimes, I get a "page not published" error when reloading the page in lenya
> (both in authoring view and live view).  I then undo some of the changes like
> removing the comments until the page works fine again.
> This seems to happen more or less randomly.
> 
> Well, and finally, after
> a while of "editing" this file, lenya came up with the original table-layout.
> At
> this point, there was nothing left of the table in the xsl-template,
> everything
> was now inside divs. The source of the generated files in live view after a
> fresh publish had nothing in common with my XSL-template...
> 
> What's the best way to edit the template files?
> What to do when locked out of lenya because of a page not published error in
> the
> authoring view?
> Is there any caching in the way that could be turned on/off?
> (My browser cache is off btw and i checked with a second browser).
> 
> -- Hubertus
> 
> -------------------------------------------------
> This mail sent through Thielpark Webmail
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
> 
> 
> 



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