You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Christian Egli <ch...@wyona.com> on 2003/05/08 09:54:00 UTC

util.xsl

I changed the util.xsl and made it used the PageEnvelope class. I
added the following tags to it (they match the names in the URI
scheme):

xsp-lenya:context-prefix
xsp-lenya:publication-id
xsp-lenya:area
xsp-lenya:document-id

All other tags should probably be deprecated and removed. Also the
code could now be cleaned up as most of the functionality is now done
in the PageEnvelope class.

If I remove the old tags it will break backwards compatibility but I
think no one is making much use of the util.xsl stuff yet since it is
still fairly new.

Should I go ahead and clean it up?

Also I added some code to the PageEnvelope class which calculates the
document-id. It does this based on some assumptions (everything
between area and .(html|pdf|xml|whatever) is the document-id) which
are not true for all publications and URIs. It is a cheap guess which
holds up fairly well. Of course I should use the uriparametrizer but
this is a very expensive operation. It issues another cocoon:
request. Since the PageEnvelope is used fairly extensively (almost
every xsp uses it now due to it being used in util.xsl) I thought this
would be too expensive.

What do you think.

-- 
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-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: util.xsl

Posted by Christian Egli <ch...@wyona.com>.
Felix Maeder <fe...@wyona.com> writes:

> Christian Egli wrote:

> > All other tags should probably be deprecated and removed. Also the
> > code could now be cleaned up as most of the functionality is now done
> > in the PageEnvelope class.
> > If I remove the old tags it will break backwards compatibility but I
> > think no one is making much use of the util.xsl stuff yet since it is
> > still fairly new.
> > Should I go ahead and clean it up?
> 
> +1

Done.

> > Also I added some code to the PageEnvelope class which calculates the
> > document-id. It does this based on some assumptions

> +1
> I think there will be no way around making assumptions to a certain
> degree if we want to deliver a cms and not just a framework. To
> consider the part between the area (e.g. authoring or live) and the
> suffix the document id looks pretty straightforward and reasonable to
> me (what happens to a language suffix?).

The heuristic is growing. When adding a page to the "Home" page, I'm
basically adding a node to the root node. The "Home" page in our case
is default/authoring/index.html. So according to above heuristic I have
to add a node to "/index" which is wrong. I want to add it to "/". 

So in addition to chopping the suffix I also snip away "index" if it
is at the last position.

-- 
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-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: util.xsl

Posted by Felix Maeder <fe...@wyona.com>.

Christian Egli wrote:
> I changed the util.xsl and made it used the PageEnvelope class. I
> added the following tags to it (they match the names in the URI
> scheme):
> 
> xsp-lenya:context-prefix
> xsp-lenya:publication-id
> xsp-lenya:area
> xsp-lenya:document-id
> 
> All other tags should probably be deprecated and removed. Also the
> code could now be cleaned up as most of the functionality is now done
> in the PageEnvelope class.
> 
> If I remove the old tags it will break backwards compatibility but I
> think no one is making much use of the util.xsl stuff yet since it is
> still fairly new.
> 
> Should I go ahead and clean it up?

+1

> 
> Also I added some code to the PageEnvelope class which calculates the
> document-id. It does this based on some assumptions (everything
> between area and .(html|pdf|xml|whatever) is the document-id) which
> are not true for all publications and URIs. It is a cheap guess which
> holds up fairly well. Of course I should use the uriparametrizer but
> this is a very expensive operation. It issues another cocoon:
> request. Since the PageEnvelope is used fairly extensively (almost
> every xsp uses it now due to it being used in util.xsl) I thought this
> would be too expensive.
> 
> What do you think.
> 
+1
I think there will be no way around making assumptions to a certain 
degree if we want to deliver a cms and not just a framework. To consider 
the part between the area (e.g. authoring or live) and the suffix the 
document id looks pretty straightforward and reasonable to me (what 
happens to a language suffix?).

-Felix



-- 
Felix Mäder          felix.maeder@wyona.com     +41 1 272 9163
                      Wyona AG, Hardstrasse 219, CH-8005 Zürich
Open Source CMS      http://www.wyona.org http://www.wyona.com


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