Navneet Joneja wrote:
> 
> Hi!
> I was just wondering if there's some neat way to do this:
> basically I'm using the ESQL logicsheet to do some SQL extraction, but I
> want the database to be configurable using a config.xml file.
> So fundamentally, I want to be able to do the XSP equivalent of
> <some-element><xsl:value-of
> select="document('config.xml')/config/db-url"/></some-element>
> Is there some way to do this? I read all the XSP docs as well as the
> additional logicsheets but came up with my hands empty.

This is possible with the auth taglib (http://ulim.cocoonhost.com). The
auth taglib stores its data in the session object, so you could load the
values from your config.xml file into the session and then use the auth
taglib to access the values. It would look like this:

<esql:dburl><auth:var name="auth:dburl"/></esql:dburl>

If you don't want to use the auth taglib, you can simply look at its
code and write your own customized taglib.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to