> On 11/14/05, Josias Thoeny <[EMAIL PROTECTED]> wrote:
>> On Mon, 2005-11-14 at 08:59 -0500, [EMAIL PROTECTED] wrote:
>> > On 11/14/05, Josias Thoeny <[EMAIL PROTECTED]> wrote:
>> If you run Lenya with Jetty, the context-prefix should empty, because
>> Lenya runs in the root context.
>> I made a test on Tomcat with your variables usecase (btw it's cool!) and
>> both {page-envelope:context-prefix} and {request:contextPath} show
>> "/lenya", which is the expected value in this case.
>
> OK.  I updated the Variables page.  That may help generally, but does
> not help with our rewritten URLs, since the URLs on the page do not
> even include the publication-id after being rewritten by Apache.

Are you doing the rewriting as described on [1] ?
I mean are you using the proxy settings in publication.xconf with the
link-rewriting transformer?

>
>> You might want to try the ProxyUrlModule, to access the url from
>> publication.xconf in the xmap. I never used it, but I think it's doing
>> what you need.
>
> There is no documentation.  It was added in May 2005, so the Class is
> not in the version (1.2.2) we use.  From a quick read of the code, it
> just adds a "proxy-url" variable by concatenating the proxy url with
> the document url.  No help for our issue.

Maybe it would make sense to extend this module s.t. it can also return
the proxy url without the document url. One could then use the proxy url
to create links in the xsl.

>
>> > Is there a place where a developer can define global constants to be
>> > accessed in many XMAPs?
>> I think you are looking for the GlobalInputModule
>> http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html#GlobalInputModule
>
> I believe the global variables are only usable within the XMAP that
> defines them, but it would not help even if they are available in
> lower XMAPs.  It would be nice to set one in sitemap.xmap and have it
> available in a Usecase XMAP, but the processing before a Usecase does
> not go through {pub}/sitemap.xmap, or any other publication-specific
> XMAP.  There is no method to import one XMAP into another to create a
> global header file (as far as I know.)  Any constants using this
> method would need to be set in a server-wide XMAP.

AFAIK global variables are also accessible in mounted sitemaps. But as you
said this doesn't help with the usecase sitemaps. Maybe you could try
cocoon's XmlFileModule (not much documentation on this one, only javadoc
[2]). It lets you access an xml configuration file by XPath expressions.

- Josias

[1] http://lenya.apache.org/1_2_x/components/deployment/proxying.html
[2]
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/XMLFileModule.html

>
> solprovider
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to