cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amit Kaushik" <smartkaus...@yahoo.co.uk>
Subject XML rendering
Date Tue, 05 Dec 2000 14:55:24 GMT
Hi,
We have some problem related to rendering of an XML file.We have a database in which we are
storing all the XML files as text.We have saveral different section in our project and for
each section we have different XSL file.We are using XSP for dynamic content generation but
when we invoke the XML file from the databse with the help of SQL taglib cocoon doesn't parse
it according to corresponding XSL.

Here is the code.....


-------------------------------------------------------This is my XML file----------------------------------------

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="page-html.xsl" type="text/xsl"?>

<xsp:page
  language="java" 
  xmlns:sql="http://www.apache.org/1999/SQL"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
 
<page>  
        <title>News Now</title>
        <author>
                <name>Amit Kaushik</name>
                <address>akaushik@india-today.com</address>
        </author>
        <xsp:expr>request.getQueryString()</xsp:expr>
        <sql:execute-query>
                <sql:driver>driver class</sql:driver>
                <sql:dburl>database url</sql:dburl>
                <sql:username>username</sql:username>
                <sql:password>password</sql:password>
               <sql:doc-element>options</sql:doc-element>
                <sql:row-element>options</sql:row-element>
                <sql:tag-case>lower</sql:tag-case>
                <sql:null-indicator>yes</sql:null-indicator>
                <sql:id-attribute>ID</sql:id-attribute>
                <sql:id-attribute-column>foo_id</sql:id-attribute-column> 
                <sql:query>select xml_story from content where news_id=(select max(news_id)
from content)</sql:query>
                <sql:count-attribute>count</sql:count-attribute>
        </sql:execute-query>
 </page>
</xsp:page>

this code invokes the right XML file from the database but display it in it's orginal form
not according to XSL

Any help regarding to this will be appretiated.

Thanks
Amit Kaushik

Mime
View raw message