cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: Basic how-to
Date Sun, 10 Sep 2000 13:13:57 GMT
"Steve Lane" <stevelcmc@mindspring.com> wrote:
>this should be a simple question, from someone new to both XML and Cocoon:
>
>I've figured out the basics of associating XML docs and stylesheets. My
>problem is that I want to tie a stylesheet to a dynamic XML source. I have 
>a
>URL that, based on the exact parameters I feed it, will hand me back an XML
>stream based on the contents of a database.
>
>How do I tie this dynamic XML source to a stylesheet using cocoon? I've 
>read
>the various user guides without finding an answer.


<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="yourstylesheet.xsl" type="text/xsl"?>

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:util="http://www.apache.org/1999/XSP/Util">
  <page>
    <util:include-uri href="http://your.uri.here"/>
  </page>
</xsp:page>

Note that, instead of getting just the XML page returned from that URI, you 
will get the XML page with a <page> tag wrapped around it, so you may need 
to change your stylesheet slightly to account for that. This is unavoidable 
if you use XSP.


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message