You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Joern Nettingsmeier <po...@uni-due.de> on 2006/06/14 11:56:47 UTC

how can i handle a subset of the uri space with a lenya module?

hi *!


i want to integrate an eXist xml database into lenya. ideally, the
connection will be handled by a lenya module.

the database contains staff data, and on the website we want an
automatically generated page for each staff member.

since i don't want to write a lenya stub document for each person in the
database, those pages and the corresponding menu entries should be
created dynamically.

i'd like to have all requests of the form
http://mysite.org/publication/area/people/*xml handed over to my module.

the problem is that afaiu lenya takes complete control of the global uri
space, and there is no way yet to pass control over to a module for a
subset of uris.

while i could hack the global sitemaps and be done, i would prefer a
clean hook that would be suitable for inclusion into the trunk.
in the spirit of SoC,  it should be up to the module to register that it
wants to handle part of the uri space itself.
i could imaginge a new option in module.xconf that will create such a
hook in the global maps.

would you consider this useful? and can you think of other/better ways
to do it?


regards,

jörn




-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-due.de, Telefon: 0203/379-2736


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


Re: how can i handle a subset of the uri space with a lenya module?

Posted by so...@apache.org.
On 6/14/06, Joern Nettingsmeier <po...@uni-due.de> wrote:
> I want to integrate an eXist xml database into lenya. ideally, the
> connection will be handled by a lenya module.
>
> the database contains staff data, and on the website we want an
> automatically generated page for each staff member.
>
> since i don't want to write a lenya stub document for each person in the
> database, those pages and the corresponding menu entries should be
> created dynamically.
>
> i'd like to have all requests of the form
> http://mysite.org/publication/area/people/*xml handed over to my module.
>
> the problem is that afaiu lenya takes complete control of the global uri
> space, and there is no way yet to pass control over to a module for a
> subset of uris.
>
> while i could hack the global sitemaps and be done, i would prefer a
> clean hook that would be suitable for inclusion into the trunk.
> in the spirit of SoC,  it should be up to the module to register that it
> wants to handle part of the uri space itself.
> i could imaginge a new option in module.xconf that will create such a
> hook in the global maps.
>
> would you consider this useful? and can you think of other/better ways
> to do it?

In 1.2, you had 2 choices:
- Add a match in the main pipeline (either the global pipelines or in
publication-sitemap.xmap).
- Add a Usecase, and use the ?lenya.usecase=people URL format.

In 1.3, the Modules (much like 1.2's Usecases) area called by the URL.
 Complete SoC.  Write a "people" Module, and the following URL
automatically uses it:
http://mysite.org/publication/people/xxx

I assume you are using 1.4.  Does 1.4 make it difficult to specify
which code should run for which URL?  If you do add a module for
redirecting certain URL patterns to different modules, how do you
handle duplicate configurations?  (This is not an issue in 1.3 because
each Module identifier must be unique for a specific Publication, and
the URL is based on the Publication and Module identifiers.)

solprovider

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