You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2003/11/03 17:44:12 UTC
Do not hard-code the context prefix!
Hi Lenya developers,
please avoid hard-coding the context prefix like in
<img src="/lenya/lenya/images/util/bluedot.gif">
Thank you,
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: Do not hard-code the context prefix!
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Michael Wechner wrote:
>> yep, also keep in mind that bitflux support is broken because it is
>> expected to be in a special place and mounting lenya at / breaks
>> things up
>
>
> we could add a "bypass" pipeline for BXE within the Lenya root sitemap
> in order to pull it through as resources.
that seems an approach to explore. can you outline it a bit more
> Or is Jetty configurable such that Lenya doesn't have to run within the
> "ROOT" context?
while that is certainly possible, -1 to this hack
> btw, the location of BXE can be configured within
> src/webapp/lenya/resources/misc/bxeng/index.xhtml
you mean
<link rel="stylesheet" href="/bxeng/css/editor.css" type="text/css" />
<script src="/bxeng/bxeLoader.js" type="text/javascript"/>
i was wondering if doing container-specific things in the build would be
a good idea. for instance, tomcat needs endorsed libs, and jetty would
need this config change. but that way lies madness as more and more
one-offs enter the build process. i'd rather avoid that where possible.
-gregor
--
Gregor J. Rothfuss
Wyona Inc. - Open Source Content Management - Apache Lenya
http://wyona.com http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: Do not hard-code the context prefix!
Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:
> Stefano Mazzocchi wrote:
>
[...]
>> yep, also keep in mind that bitflux support is broken because it is
>> expected to be in a special place and mounting lenya at / breaks
>> things up
>
>
> we could add a "bypass" pipeline for BXE within the Lenya root sitemap
> in order to pull it through as resources.
>
> Or is Jetty configurable such that Lenya doesn't have to run within the
> "ROOT" context?
-1 to require this
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: Do not hard-code the context prefix!
Posted by Michael Wechner <mi...@wyona.com>.
Stefano Mazzocchi wrote:
>
<snip />
>> Please try to correct this.
>> E.g., when run with Jetty, the default context prefix is an
>> empty string.
>
>
> yep, also keep in mind that bitflux support is broken because it is
> expected to be in a special place and mounting lenya at / breaks things up
we could add a "bypass" pipeline for BXE within the Lenya root sitemap
in order to pull it through as resources.
Or is Jetty configurable such that Lenya doesn't have to run within the
"ROOT" context?
btw, the location of BXE can be configured within
src/webapp/lenya/resources/misc/bxeng/index.xhtml
Michi
>
> --
> Stefano.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
>
>
--
Michael Wechner
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://cocoon.apache.org/lenya/
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: Do not hard-code the context prefix!
Posted by Stefano Mazzocchi <st...@apache.org>.
On 7 Nov 2003, at 12:29, Andreas Hartmann wrote:
> Andreas Hartmann wrote:
>
>> please avoid hard-coding the context prefix like in
>
> Search for "/lenya/lenya" in /webapp returns
> 100 matches:
>
> ---------------------------------------------------------
>
> .#cocoon-xconf.xsl.1.22 - cocoon-lenya/src/webapp/WEB-INF
> .#menu.xsl.1.8 - cocoon-lenya/src/webapp/lenya/xslt/menu (33 matches)
> cocoon-xconf.xsl - cocoon-lenya/src/webapp/WEB-INF
> crawl-and-index.sh - cocoon-lenya/src/webapp/lenya/pubs/oscom/bin
> export-static-html.sh - cocoon-lenya/src/webapp/lenya/pubs/docs-new (2
> matches)
> form-layout.xsl - cocoon-lenya/src/webapp/lenya/xslt/authoring/edit (4
> matches)
> lenya.org.xsl - cocoon-lenya/src/webapp/lenya/pubs/docs-new/xslt
> menu.css - cocoon-lenya/src/webapp/lenya/resources/misc/menu2 (3
> matches)
> menu.js - cocoon-lenya/src/webapp/lenya/resources/misc/menu2 (2
> matches)
> menu.xsl - cocoon-lenya/src/webapp/lenya/xslt/menu2 (4 matches)
> menu.xsl - cocoon-lenya/src/webapp/lenya/xslt/menu (26 matches)
> openoffice.xml -
> cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/
> components/authoring (4 matches)
> page-util.xsl - cocoon-lenya/src/webapp/lenya/xslt/util
> parent-child.xsl - cocoon-lenya/src/webapp/lenya/xslt/authoring
> parent-child-new-cms-project.xsl -
> cocoon-lenya/src/webapp/lenya/pubs/oscom/lenya/xslt/authoring
> parent-child-new-editor-project.xsl -
> cocoon-lenya/src/webapp/lenya/pubs/oscom/lenya/xslt/authoring
> rollback.xsl - cocoon-lenya/src/webapp/lenya/xslt/rc
> root.xsl - cocoon-lenya/src/webapp/lenya/xslt/menu (2 matches)
> search-and-results.xsl - cocoon-lenya/src/webapp/lenya/xslt/search
> simple2xhtml.xsl - cocoon-lenya/src/webapp/lenya/pubs/default/xslt
> sitemaps.xml -
> cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/
> components/publication (2 matches)
> tasks.xconf - cocoon-lenya/src/webapp/lenya/pubs/oscom/config/tasks (2
> matches)
> url_rewrite.xsl - cocoon-lenya/src/webapp/lenya/pubs/docs-new/xslt (3
> matches)
> webdav.xml -
> cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/
> components/repository
> website-update.xml -
> cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/community
>
> ---------------------------------------------------------
>
> Please try to correct this.
> E.g., when run with Jetty, the default context prefix is an
> empty string.
yep, also keep in mind that bitflux support is broken because it is
expected to be in a special place and mounting lenya at / breaks things
up
--
Stefano.
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: Do not hard-code the context prefix!
Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann wrote:
> please avoid hard-coding the context prefix like in
Search for "/lenya/lenya" in /webapp returns
100 matches:
---------------------------------------------------------
.#cocoon-xconf.xsl.1.22 - cocoon-lenya/src/webapp/WEB-INF
.#menu.xsl.1.8 - cocoon-lenya/src/webapp/lenya/xslt/menu (33 matches)
cocoon-xconf.xsl - cocoon-lenya/src/webapp/WEB-INF
crawl-and-index.sh - cocoon-lenya/src/webapp/lenya/pubs/oscom/bin
export-static-html.sh - cocoon-lenya/src/webapp/lenya/pubs/docs-new (2
matches)
form-layout.xsl - cocoon-lenya/src/webapp/lenya/xslt/authoring/edit (4
matches)
lenya.org.xsl - cocoon-lenya/src/webapp/lenya/pubs/docs-new/xslt
menu.css - cocoon-lenya/src/webapp/lenya/resources/misc/menu2 (3 matches)
menu.js - cocoon-lenya/src/webapp/lenya/resources/misc/menu2 (2 matches)
menu.xsl - cocoon-lenya/src/webapp/lenya/xslt/menu2 (4 matches)
menu.xsl - cocoon-lenya/src/webapp/lenya/xslt/menu (26 matches)
openoffice.xml -
cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/authoring
(4 matches)
page-util.xsl - cocoon-lenya/src/webapp/lenya/xslt/util
parent-child.xsl - cocoon-lenya/src/webapp/lenya/xslt/authoring
parent-child-new-cms-project.xsl -
cocoon-lenya/src/webapp/lenya/pubs/oscom/lenya/xslt/authoring
parent-child-new-editor-project.xsl -
cocoon-lenya/src/webapp/lenya/pubs/oscom/lenya/xslt/authoring
rollback.xsl - cocoon-lenya/src/webapp/lenya/xslt/rc
root.xsl - cocoon-lenya/src/webapp/lenya/xslt/menu (2 matches)
search-and-results.xsl - cocoon-lenya/src/webapp/lenya/xslt/search
simple2xhtml.xsl - cocoon-lenya/src/webapp/lenya/pubs/default/xslt
sitemaps.xml -
cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/publication
(2 matches)
tasks.xconf - cocoon-lenya/src/webapp/lenya/pubs/oscom/config/tasks (2
matches)
url_rewrite.xsl - cocoon-lenya/src/webapp/lenya/pubs/docs-new/xslt (3
matches)
webdav.xml -
cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/docs/components/repository
website-update.xml -
cocoon-lenya/src/webapp/lenya/pubs/docs-new/content/xdocs/community
---------------------------------------------------------
Please try to correct this.
E.g., when run with Jetty, the default context prefix is an
empty string.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: Do not hard-code the context prefix!
Posted by Andreas Hartmann <an...@apache.org>.
Danny Bols wrote:
[...]
> A little misunderstanding here. I guess I was not making my point very
> clear. If one moves a document the links to that document do have to be
> changed. No discussion about that. But what about the hyperlinks which are
> contained in the document being moved? A psuedo protocol would alow us to
> move such a document around without any changes to the hyperlinks contained
> in the document. It would also be easier to rename a publication, area or
> webapp.
OK, I see.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
RE: Do not hard-code the context prefix!
Posted by Danny Bols <db...@osirion.be>.
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org]On Behalf Of Andreas Hartmann
> Sent: woensdag 5 november 2003 10:45
> To: lenya-dev@cocoon.apache.org
> Subject: Re: Do not hard-code the context prefix!
>
>
> Danny Bols wrote:
>
> [...]
>
> >>In source documents you could use
> >>
> >>- a pseudo protocol (site:/foo/bar/baz.html)
>
> > I like the pseude protocol approach, the other approaches wil
> introduce dead
> > links when moving documents around.
>
> In Lenya, the document ID is the identifier of a document.
> It depends on the document URL, so moving the file requires
> to update all links to the file, no matter if a protocol
> is used or not. But I think a protocol makes the link
> rewriting much easier (links to documents can easily be
> identified).
A little misunderstanding here. I guess I was not making my point very
clear. If one moves a document the links to that document do have to be
changed. No discussion about that. But what about the hyperlinks which are
contained in the document being moved? A psuedo protocol would alow us to
move such a document around without any changes to the hyperlinks contained
in the document. It would also be easier to rename a publication, area or
webapp.
--
Danny
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: Do not hard-code the context prefix!
Posted by Andreas Hartmann <an...@apache.org>.
Danny Bols wrote:
[...]
>>In source documents you could use
>>
>>- a pseudo protocol (site:/foo/bar/baz.html)
> I like the pseude protocol approach, the other approaches wil introduce dead
> links when moving documents around.
In Lenya, the document ID is the identifier of a document.
It depends on the document URL, so moving the file requires
to update all links to the file, no matter if a protocol
is used or not. But I think a protocol makes the link
rewriting much easier (links to documents can easily be
identified).
> Is this pseudo protocol approach some kinda of standard (is it documented
> anywhere)?
It is used by Forrest, I guess they have some documentation
about it.
> Does it mean a transformer has to take care of these tags?
For prototyping a stylesheet will do, but I think a transformer
will show a better performance.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Link Protocols was [Re: Do not hard-code the context prefix!]
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Andreas Hartmann wrote:
> I'm not aware of all consequences, and this has certainly
> be discussed quite often, but I think I would prefer
> protocols.
>
> (1) document:/{document-id}
>
> e.g., document://foo/bar
>
> This would add a link to the same (with fallback to
> existing) language version of a certain document.
> It would probably simplify link management etc.
>
> (2) site:/{absolute-url}
>
> e.g., site://images/logo.png
>
> This would add a link to a page / resource.
>
> Maybe it is worth considering link semantics for a
> document type. E.g., for XHTML it would mean to specify
> that @href and @src attributes are used for links and
> therefore are translated when they start with "site:/".
forrest does some pretty fancy stuff in that department. one would think
that we could converge on a solution with them.
i like the protocol abstraction. it provides flexibility in the right
place. http://www.windley.com/2003/10/28.html#a887
-gregor
--
Gregor J. Rothfuss
Wyona Inc. - Open Source Content Management - Apache Lenya
http://wyona.com http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: Do not hard-code the context prefix!
Posted by Andreas Hartmann <an...@apache.org>.
Gregor J. Rothfuss wrote:
> Andreas Hartmann wrote:
>
>> In source documents you could use
>>
>> - a relative URL (../foo/bar/baz.html)
>> - a pseudo protocol (site:/foo/bar/baz.html)
>> - an absolute path within the area (/foo/bar/baz.html)
>> (but I think this approach is error-prone, it might
>> lead to conflicts)
>
>
> which one should be used consistently? the current prefix is at least
> consistent, replacing it by a bunch of solutions does not strike me as a
> real improvement.
I'm not aware of all consequences, and this has certainly
be discussed quite often, but I think I would prefer
protocols.
(1) document:/{document-id}
e.g., document://foo/bar
This would add a link to the same (with fallback to
existing) language version of a certain document.
It would probably simplify link management etc.
(2) site:/{absolute-url}
e.g., site://images/logo.png
This would add a link to a page / resource.
Maybe it is worth considering link semantics for a
document type. E.g., for XHTML it would mean to specify
that @href and @src attributes are used for links and
therefore are translated when they start with "site:/".
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: Do not hard-code the context prefix!
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Andreas Hartmann wrote:
> In source documents you could use
>
> - a relative URL (../foo/bar/baz.html)
> - a pseudo protocol (site:/foo/bar/baz.html)
> - an absolute path within the area (/foo/bar/baz.html)
> (but I think this approach is error-prone, it might
> lead to conflicts)
which one should be used consistently? the current prefix is at least
consistent, replacing it by a bunch of solutions does not strike me as a
real improvement.
-gregor
--
Gregor J. Rothfuss
Wyona Inc. - Open Source Content Management - Apache Lenya
http://wyona.com http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
RE: Do not hard-code the context prefix!
Posted by Danny Bols <db...@osirion.be>.
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org]On Behalf Of Andreas Hartmann
> Sent: dinsdag 4 november 2003 18:04
> To: lenya-dev@cocoon.apache.org
> Subject: Re: Do not hard-code the context prefix!
>
>
> Danny Bols wrote:
>
> >
> >>-----Original Message-----
> >>From: news [mailto:news@sea.gmane.org]On Behalf Of Andreas Hartmann
> >>Sent: maandag 3 november 2003 17:44
> >>To: lenya-dev@cocoon.apache.org
> >>Subject: Do not hard-code the context prefix!
> >>
> >>
> >>Hi Lenya developers,
> >>
> >>please avoid hard-coding the context prefix like in
> >>
> >><img src="/lenya/lenya/images/util/bluedot.gif">
> >
> >
> > How would you write proper url in a document (not a stylesheet) without
> > using the full context?
>
> I'm sure there are lots of approaches addressing this
> issue.
>
> In source documents you could use
>
> - a relative URL (../foo/bar/baz.html)
> - a pseudo protocol (site:/foo/bar/baz.html)
> - an absolute path within the area (/foo/bar/baz.html)
> (but I think this approach is error-prone, it might
> lead to conflicts)
>
> The link should be completed/translated by a transformer
> or stylesheet etc.
>
> -- Andreas
I like the pseude protocol approach, the other approaches wil introduce dead
links when moving documents around.
Is this pseudo protocol approach some kinda of standard (is it documented
anywhere)? Does it mean a transformer has to take care of these tags?
--
Danny
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: Do not hard-code the context prefix!
Posted by Andreas Hartmann <an...@apache.org>.
Danny Bols wrote:
>
>>-----Original Message-----
>>From: news [mailto:news@sea.gmane.org]On Behalf Of Andreas Hartmann
>>Sent: maandag 3 november 2003 17:44
>>To: lenya-dev@cocoon.apache.org
>>Subject: Do not hard-code the context prefix!
>>
>>
>>Hi Lenya developers,
>>
>>please avoid hard-coding the context prefix like in
>>
>><img src="/lenya/lenya/images/util/bluedot.gif">
>
>
> How would you write proper url in a document (not a stylesheet) without
> using the full context?
I'm sure there are lots of approaches addressing this
issue.
In source documents you could use
- a relative URL (../foo/bar/baz.html)
- a pseudo protocol (site:/foo/bar/baz.html)
- an absolute path within the area (/foo/bar/baz.html)
(but I think this approach is error-prone, it might
lead to conflicts)
The link should be completed/translated by a transformer
or stylesheet etc.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
RE: Do not hard-code the context prefix!
Posted by Danny Bols <db...@osirion.be>.
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org]On Behalf Of Andreas Hartmann
> Sent: maandag 3 november 2003 17:44
> To: lenya-dev@cocoon.apache.org
> Subject: Do not hard-code the context prefix!
>
>
> Hi Lenya developers,
>
> please avoid hard-coding the context prefix like in
>
> <img src="/lenya/lenya/images/util/bluedot.gif">
How would you write proper url in a document (not a stylesheet) without
using the full context?
---
Danny
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org