cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Philippe Courson <>
Subject C1 -> C2 and XML -> XSP -> XSL
Date Tue, 22 Jan 2002 18:08:26 GMT
Hi there,

I have been using Cocoon 1 for a while but I am completely new to

If I have well understood, processing instructions that were defining
in Cocoon 1 the way the documents had to be processed has been replaced
in Cocoon 2 by entries the sitemap file.

Here is my problem : I wonder how to tell Cocoon 2 to do the following
processings :
-> read the content from a XML file
-> introduce the logic with a XSP file
-> introduce the style with a XSL file

Apparently, in Cocoon 2, XSP generation has to be the first of the 
pipline, and I've not seen XSP transformers.

So how can I tell Cocoon 2 to process an XML document with an XSP as I 
was doing it with Cocoon 1 ?

If it could help you to understand , here is way I was doing with Cocoon 1 :

The XML file : foo.xml

<?xml version="1.0" encoding="iso-8859-1"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="/igware-xml/xsp/foo-xsp.xsl" type="text/xsl"?>

The XSP file : foo-xsp.xsl

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"

<xsl:template match="page">
  <xsp:page language="java" xmlns:xsp="">
   <xsp:structure> ... </xsp:structure>

<xsl:template match="page/foo">
  <xsp:logic> ... </xsp:logic>


The XSL file : foo-html.xsl

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" 

<xsl:output method="html"/>

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match="page">

<xsl:template match="foo">


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message