You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by System Administrator <ro...@black-dog-consultants.co.uk> on 2002/06/17 19:38:16 UTC

XML output transformed into XSP.

Hi, 

I am a newcomer to cocoon, using it to implement a commercial 
application.

I have a problem.

I have a pre-generated XML file which specifies a database table 
configuration. I am trying to do the following:

1 - Transform the xml into xsp.
2 - Transform the xsp tags using esql logicsheet.
3 - display results from the database call.

The following sitemap snip is how I was thinking it should work 
but dosen't. Am I completley off the mark here or is this possible?


<!-- Internal pipeline used to transform xml to an xsp file -->
    <map:pipeline internal-only="true">
     <map:match pattern="config">
       <map:generate  src="docs/dbConfig.xml"/>
       <map:transform src= "stylesheets/dbConfig.xsl"/> 
       <map:serialize type="xml"/>
     </map:match>
   </map:pipeline>
   .
   .
   .
   <map:match pattern="test.html">
     <map:generate  type="serverpages" src="cocoon:/config"/>
     <map:transform src="stylesheets/apache.xsl"/>
     <map:serialize/>
   </map:match>

The above was attempting to transform the xml using an internal 
pipeline, then use this transformed xml as input to the 
serverpages generator. But it's not working.

The outpur being sent to the browser:

<dependency xmlns:xsp="http://apache.org/xsp" xmlns:xsp-
session="http://apache.org/xsp/session/2.0" 
xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1" 
xmlns:esql="http://apache.org/cocoon/SQL/v2" 
xmlns:damDb="http://hostname/damDb/1.0">C:/Program Files/Tomcat 
4.0.3/webapps/cocoon/WEB-
INF/classes/dams/logicsheets/damDb.xsl</dependency>


Any help would be most gratefully received.

Regards
Graeme
 



 
                   

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: XML output transformed into XSP.

Posted by Graeme Colman <gr...@yahoo.com>.
I never got this working :( 

I resorted to using java to add the xml that I needed.

Regards
Graeme.

 --- Vadim Gritsenko <va...@verizon.net>
wrote: > > From: Graeme Colman
> [mailto:graeme_colman@yahoo.com]
> > 
> > I know that this type of question has been
> answered a
> > lot on this list but I still can't get this to
> work as
> > I would like.
> > 
> > What I have is an xml file.
> > I need to transform this xml adding a few tags.
> > I then need to put this through an xsp processor.
> > 
> > so:  pipeline 1: xml file -> xsl -> xml
> >      pipeline 2: pipeline1 -> xsp -> xsl -> html
> > 
> > 
> > with the sitemap:
> > 
> >    <map:match pattern="config">
> >      <map:generate  src="docs/dbConfig.xml"/>
> >      <map:transform
> src="stylesheets/dbConfig.xsl"/>
> >      <map:serialize type="xml"/>
> >    </map:match>
> > 
> > 
> >    <map:match pattern="test.html">
> >      <map:generate type="serverpages"
> > src="cocoon:/config"/>
> >      <map:transform src="stylesheets/db.xsl"/>
> >      <map:serialize/>
> >    </map:match>
> > 
> > 
> > Sounds simple using the sub sitemap stuff.
> 
> Did you make it work? Sub sitemap has identical
> sample:
> 
> http://localhost:8080/cocoon/sub/xsp-cocoon
> 
> The only difference is that it does not have
> transformation:
> 
> >      <map:transform
> src="stylesheets/dbConfig.xsl"/>
> 
> I can speculate that there is an issue in this XSLT.
> 
> 
> Vadim
> 
> 
> > 
> > I can get this working if the original xml is an
> xsp
> > file and generated with a type="serverpages".
> > 
> > But.
> > 
> > When I try to do as above, the html output is
> still as
> > the original post which is:
> > 
> > <dependency>
> >   C:\...WEB-INF/classes/dams/logicsheets/damDb.xsl
> > </dependency>
> > 
> > 
> > Question:
> > Can this work with an XML file input to a pipeline
> and
> > using this XML output as the source for an XSP
> > processing pipeline?
> > 
> > 
> > Any help much appreciated
> > Graeme Colman.
> ...
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: XML output transformed into XSP.

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Graeme Colman [mailto:graeme_colman@yahoo.com]
> 
> I know that this type of question has been answered a
> lot on this list but I still can't get this to work as
> I would like.
> 
> What I have is an xml file.
> I need to transform this xml adding a few tags.
> I then need to put this through an xsp processor.
> 
> so:  pipeline 1: xml file -> xsl -> xml
>      pipeline 2: pipeline1 -> xsp -> xsl -> html
> 
> 
> with the sitemap:
> 
>    <map:match pattern="config">
>      <map:generate  src="docs/dbConfig.xml"/>
>      <map:transform src="stylesheets/dbConfig.xsl"/>
>      <map:serialize type="xml"/>
>    </map:match>
> 
> 
>    <map:match pattern="test.html">
>      <map:generate type="serverpages"
> src="cocoon:/config"/>
>      <map:transform src="stylesheets/db.xsl"/>
>      <map:serialize/>
>    </map:match>
> 
> 
> Sounds simple using the sub sitemap stuff.

Did you make it work? Sub sitemap has identical sample:

http://localhost:8080/cocoon/sub/xsp-cocoon

The only difference is that it does not have transformation:

>      <map:transform src="stylesheets/dbConfig.xsl"/>

I can speculate that there is an issue in this XSLT.


Vadim


> 
> I can get this working if the original xml is an xsp
> file and generated with a type="serverpages".
> 
> But.
> 
> When I try to do as above, the html output is still as
> the original post which is:
> 
> <dependency>
>   C:\...WEB-INF/classes/dams/logicsheets/damDb.xsl
> </dependency>
> 
> 
> Question:
> Can this work with an XML file input to a pipeline and
> using this XML output as the source for an XSP
> processing pipeline?
> 
> 
> Any help much appreciated
> Graeme Colman.
...


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: XML output transformed into XSP.

Posted by Graeme Colman <gr...@yahoo.com>.
I know that this type of question has been answered a
lot on this list but I still can't get this to work as
I would like.

What I have is an xml file.
I need to transform this xml adding a few tags.
I then need to put this through an xsp processor.

so:  pipeline 1: xml file -> xsl -> xml
     pipeline 2: pipeline1 -> xsp -> xsl -> html


with the sitemap:

   <map:match pattern="config">
     <map:generate  src="docs/dbConfig.xml"/>
     <map:transform src="stylesheets/dbConfig.xsl"/>
     <map:serialize type="xml"/>
   </map:match>
   

   <map:match pattern="test.html">
     <map:generate type="serverpages"
src="cocoon:/config"/>
     <map:transform src="stylesheets/db.xsl"/>
     <map:serialize/>
   </map:match>


Sounds simple using the sub sitemap stuff.

I can get this working if the original xml is an xsp
file and generated with a type="serverpages".

But.

When I try to do as above, the html output is still as
the original post which is:

<dependency>
  C:\...WEB-INF/classes/dams/logicsheets/damDb.xsl
</dependency>


Question:
Can this work with an XML file input to a pipeline and
using this XML output as the source for an XSP
processing pipeline?


Any help much appreciated
Graeme Colman.


 --- Vadim Gritsenko <va...@verizon.net>
wrote: > > From: System Administrator
> [mailto:root@black-dog-consultants.co.uk]
> > 
> > Hi,
> > 
> > I am a newcomer to cocoon, using it to implement a
> commercial
> > application.
> > 
> > I have a problem.
> > 
> > I have a pre-generated XML file which specifies a
> database table
> > configuration. I am trying to do the following:
> > 
> > 1 - Transform the xml into xsp.
> > 2 - Transform the xsp tags using esql logicsheet.
> > 3 - display results from the database call.
> > 
> > The following sitemap snip is how I was thinking
> it should work
> > but dosen't. Am I completley off the mark here or
> is this possible?
> 
> This is possible and sample is provided. Install
> cocoon and go to
> http://localhost:8080/cocoon/sub/
> 
> 
> Happy hacking,
> Vadim
> 
> 
> > <!-- Internal pipeline used to transform xml to an
> xsp file -->
> >     <map:pipeline internal-only="true">
> >      <map:match pattern="config">
> >        <map:generate  src="docs/dbConfig.xml"/>
> >        <map:transform src=
> "stylesheets/dbConfig.xsl"/>
> >        <map:serialize type="xml"/>
> >      </map:match>
> >    </map:pipeline>
> >    .
> >    .
> >    .
> >    <map:match pattern="test.html">
> >      <map:generate  type="serverpages"
> src="cocoon:/config"/>
> >      <map:transform src="stylesheets/apache.xsl"/>
> >      <map:serialize/>
> >    </map:match>
> > 
> > The above was attempting to transform the xml
> using an internal
> > pipeline, then use this transformed xml as input
> to the
> > serverpages generator. But it's not working.
> > 
> > The outpur being sent to the browser:
> > 
> > <dependency xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-
> > session="http://apache.org/xsp/session/2.0"
> > xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1"
> > xmlns:esql="http://apache.org/cocoon/SQL/v2"
> > xmlns:damDb="http://hostname/damDb/1.0">C:/Program
> Files/Tomcat
> > 4.0.3/webapps/cocoon/WEB-
> >
> INF/classes/dams/logicsheets/damDb.xsl</dependency>
> > 
> > 
> > Any help would be most gratefully received.
> > 
> > Regards
> > Graeme
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: XML output transformed into XSP.

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: System Administrator [mailto:root@black-dog-consultants.co.uk]
> 
> Hi,
> 
> I am a newcomer to cocoon, using it to implement a commercial
> application.
> 
> I have a problem.
> 
> I have a pre-generated XML file which specifies a database table
> configuration. I am trying to do the following:
> 
> 1 - Transform the xml into xsp.
> 2 - Transform the xsp tags using esql logicsheet.
> 3 - display results from the database call.
> 
> The following sitemap snip is how I was thinking it should work
> but dosen't. Am I completley off the mark here or is this possible?

This is possible and sample is provided. Install cocoon and go to
http://localhost:8080/cocoon/sub/


Happy hacking,
Vadim


> <!-- Internal pipeline used to transform xml to an xsp file -->
>     <map:pipeline internal-only="true">
>      <map:match pattern="config">
>        <map:generate  src="docs/dbConfig.xml"/>
>        <map:transform src= "stylesheets/dbConfig.xsl"/>
>        <map:serialize type="xml"/>
>      </map:match>
>    </map:pipeline>
>    .
>    .
>    .
>    <map:match pattern="test.html">
>      <map:generate  type="serverpages" src="cocoon:/config"/>
>      <map:transform src="stylesheets/apache.xsl"/>
>      <map:serialize/>
>    </map:match>
> 
> The above was attempting to transform the xml using an internal
> pipeline, then use this transformed xml as input to the
> serverpages generator. But it's not working.
> 
> The outpur being sent to the browser:
> 
> <dependency xmlns:xsp="http://apache.org/xsp" xmlns:xsp-
> session="http://apache.org/xsp/session/2.0"
> xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:damDb="http://hostname/damDb/1.0">C:/Program Files/Tomcat
> 4.0.3/webapps/cocoon/WEB-
> INF/classes/dams/logicsheets/damDb.xsl</dependency>
> 
> 
> Any help would be most gratefully received.
> 
> Regards
> Graeme


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>