On 11/14/05, Josias Thoeny <[EMAIL PROTECTED]> wrote:
> Hi Solprovider,
>
> Normally {page-envelope:context-prefix} or {request:contextPath} should
> give the correct prefix, or not?
> I think the problem is that the prefix is stored in the links in the
> content, so you cannot copy the content between systems with different
> url prefixes.
> Or maybe I'm not understanding your problem.

My "Variables" page was created by testing Lenya 1.2.2 on Jetty on
MSWindows and Linux.  I do not remember if any testing used Tomcat. 
The URL is:
http://solprovider.com/lenya/variables
You can test using the two files linked under "Standard Variables".  It lists:
{page-envelope:context-prefix} = "\" + pubid + "\" + area [ + "\pathToDoc" ]
{request:contextPath} - BROKEN. Always empty string.

Damjan's post suggests changing JavaScript to not use
request.getContextPath() because the function often returns null.  It
seems request:contextPath is just broken.

---
Apache rewrites URLs, but I never got mod_proxy_html working, so Lenya
must produce the proper URLs on the page.  (Why isn't that standard
functionality in Apache httpd?  I wrote my own webserver in the 90s
that had that functionality in the first version.)

The problem is there is no place to store a prefix that is not used by
Lenya.  The only place anything close exists is publication.xconf's
<proxy area="live">, but that is not usable in XMAPs or XSLs.

Is there a place where a developer can define global constants to be
accessed in many XMAPs?  (It is easy to pass constants from an XMAP to
the XSLs.)  If not, how can we create one?  I would like to use
{global:my-url-prefix}, {global:my-img-prefix}, and
{global:my-css-prefix}.  I do not mind updating all the XMAPs and XSLs
if maintenance could be improved by having a single place for the
prefixes that change when the webserver and rewrite rules change.

I just realized I could create the constants ("xsl:variable") in an
XSL that is imported into all the other XSLs.  That would work for all
custom XSLs, but would not be good for standard XSLs that want to be
passed the "contextprefix" from an XMAP.

solprovider

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

Reply via email to