On Fri, 31 Mar 2006, Trevor Glen wrote:
Michael Wechner wrote:
are you refering to Lenya 1.2.x or Lenya 1.4-dev?
1.2, but I am willing to use 1.4 if it is easier.
If just recently integrate a simple sql example into an existin page using
the SQLTransformer. That was quite easy to achieve. I did only add the sql
transformation into doctypes.xmap like:
map:transform type="sql" label="raw">
<map:parameter name="dburl"
value="jdbc:mysql://mysql.host:3306/database?autoReconnect=true"/>
<map:parameter name="username" value="name"/>
<map:parameter name="password" value="password"/>
</map:transform>
<map:transform src="lenya/xslt/databases/sql2html.xsl"/>
In an content xml document i have the following entries:
.....
<sql:execute-query>
<sql:query>SELECT .......</sql:query>
</sql:execute-query>
...
You have to update your schema in order to allwo sql:xxx tags. That is
basically all you have to do. Of course you have to write a stylesheet in
order to format your output (sql2html.xsl in my case).
In case of a simple select statment this seesm quite straight forward.
For more complex features including databas queries you probalby better
use the xsp approach.
HTH
Jann
Trev
Michi
Trevor Glen wrote:
Hi All,
I have been playing with lenya for about week now and I would like to
convert my personal home page over to lenya.
To do this, I need to generate some dynamic pages using sql. In my
searches of this mailing list and on the web, using xsp and esql seems
to be the best approach to do this (from a cocoon standpoint).
The problem that I am now facing is: What is the best way to integrate
this into lenya? From my research, I've found the two most
likely/easiest ways to do this is:
1. Use a xsp pipeline to generate a page and include that in another
xhtml page.
2. Have lenya recognise xsp pages as another doc type.
I have the first option working, but I don't really like it. Ideally, I
would love to use the menuing system to create pages in my browser and
have them display in the navigation and whatnot.
I've tried adding xsp as a doctype, but of course, I can't use a
different generator on those pages. I have tried using a different
pipeline to match a .xsp.html file, add the navigation, breadcrumbs,
etc, and then add a part which generates the XSP content. This option
seems to be in the right direction, but I wanted to check with the
experts before wasting any more time on it.
Sorry for the long-winded explanation, I hope you understand my
predicament.
Cheers,
Trev
--
Trevor Glen <[EMAIL PROTECTED]>
Sarugo: Securing your digital memories.
http://www.sarugo.net/
Why not give Sarugo Backup a try? http://www.sarugo.net/register
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------
Jann Forrer
Informatikdienste
Universität Zürich
Winterthurerstr. 190
CH-8057 Zuerich
oooO mail: [EMAIL PROTECTED]
( ) phone: +41 44 63 56772
\ ( fax: +41 44 63 54505
\_) http://www.id.unizh.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]