On 1/20/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> sorry, my description of the problem was not good enough. i'll try again:
>
> i've created a new document with the ID "test" and this is integrated in 
> another
> page (i call it overview-page for now) as menu item. the test-page shows 
> resuls
> from a database query. when i click this test-item in the menu, i want the
> contents of the "test"-page to show up in the body of the overview-page.
> However, the result is actually shown in another page (not in the
> overview-page) with white background. for example: if i click on another menu
> item (simple page, not static page or something else), which was also created
> with lenya, then i see the result in the body of the overview-page and right
> here i want to see the result from the database, when i click on the "test"
> item.
>
> here the test.xsp:
>
> -------------Begin test.xsp-------------
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp";
> xmlns:esql="http://apache.org/cocoon/SQL/v2";>
> <content>
> <esql:connection>
> <esql:pool>oracle_pool</esql:pool>
> <esql:execute-query>
> <esql:query>
> select RANK_TITLE from phpbb_ranks
> </esql:query>
> <esql:results>
> <esql:row-results>
> <rank_title><esql:get-string column="RANK_TITLE"/></rank_title>
> </esql:row-results>
> </esql:results>
> <esql:no-results>
> Der Query gab eine leere Liste zur?ck!
> </esql:no-results>
> <esql:error-results>
> Es ist ein Fehler bei der Anfrage aufgetreten!
> </esql:error-results>
> </esql:execute-query>
> </esql:connection>
> </content>
> </xsp:page>
> -------------End test.xsp-------------
>
>
> and here the test2xhtml.xsl:
>
> -------------Begin test2xhtml.xsl-------------
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> xmlns:xhtml="http://www.w3.org/1999/xhtml";
> xmlns:i18n="http://apache.org/cocoon/i18n/2.1";>
>
>
>
> <xsl:param name="root"/>
> <xsl:param name="document-id"/>
> <xsl:param name="language"/>
>
> <xsl:template name="login"/>
> <xsl:param name="users-login"/>
>
> <xsl:template match="content">
> <html>
> <body>
> <table border="1">
> <tr>
> <td><xsl:apply-templates /></td>
> </tr>
> </table>
> </body>
> </html>
> </xsl:template>
>
> <xsl:template match="rank_title">
> <xsl:value-of select="."/>
> </xsl:template>
>
> </xsl:stylesheet>
> -------------End test2xhtml.xsl-------------
>
> CuPaKoB
>
> >
> > If I am interpreting this correctly, you have the "test" DIV on the
> > response page, probably outside the BODY tags.  View the HTML source
> > of the response page.
> >
> > 1. test.xsp generates some XML.
> > 2. test2xhtml.xsl transforms the XML to XHTML, usually a named DIV:
> > <DIV name="test">My XML</DIV>
> >
> > This is typically aggregated with other XML, such as the navigation
> > elements.  That is then transformed by a step you are missing:
> > 3. page2xhtml.xsl merges the DIVs from all the content and navigation
> > XHTML, placing them on the response page where desired within the BODY
> > tags.


Same answer.  The response to your link must use a pipeline match that
aggregates the navigation and whatever else you want on the page. 
Your <map:match pattern="**/test.html"> generates the data without any
of the navigation elements, and your  "test2xhtml" creates HTML/BODY
without any navigation.  You need to modify the pipeline to aggregate
the navigation elements, and use the DIVs in your HTML/BODY during the
final transformation.

Phrased differently, your test page must recreate your overview page
replacing the content with the test data.

The easy and standard method is for "test2xhtml.xsl" to translate the
data to xhtml in the top level <DIV id="body">, then use the standard
"page2xhtml.xsl" to insert the "body" into the normal HTML. 
"test2xhtml.xsl" should create a DIV, not HTML/BODY.

Look at default xslt/page2xhtml.xsl for an example.

solprovider

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

Reply via email to