You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Chris Wolf <Ch...@morganstanley.com> on 2002/05/03 21:03:56 UTC
XSP + Dynamic XML generator ??
I am working on a project where we have a datasource
which produces XML based on certain parameters. I would
like to use this as input to an XSP page which defines
overall content structure (semantics) then, finally,
apply a stylsheet appropriate for the invoking client.
Problem: It seems that a pipeline must start
with one, and only one Generator. The problem is
that if I create an implementation of Generator
which produces the XML, then I cannot use XSP
(since the XSP code handler is itself a Generator).
I then tried to implement the XML generator from an
XSP page by invoking a method using xsp:expr, but then
the whole document is treated as a single string.
What I would like to do is some thig like:
Ideas anyone?
+---------------+
| XML Generator |
+------+--------+
|
v
+---------------+
| XSP structure |
+------+--------+
|
+------v-----------+
| XSL presentation |
+------+-----------+
|
+------v--------+
| Serializer |
+---------------+
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XSP + Dynamic XML generator ??
Posted by Chris Wolf <Ch...@morganstanley.com>.
Yes, now I think this might be what I'm looking for...
Bert Van Kets wrote:
>
> Isn't the xsl-dynamic page that you need? The sample can be found at
> http://localhost:8080/cocoon/sub/xsl-dynamic
> The transformer of the main pipeline calls a different pipeline where an
> XSP page generates the transformations. To my opinion XSP can be used as
> a transformer this way, no?
>
> <!-- Dynamic XSL -->
> <map:match pattern="xsl-dynamic-source">
> <map:generate type="serverpages" src="stylesheets/simple-page2html.xsp"/>
> <map:serialize type="xml"/>
> </map:match>
> <map:match pattern="xsl-dynamic">
> <map:generate src="docs/simple.xml"/>
> <map:transform src="cocoon:/xsl-dynamic-source"/>
> <map:serialize/>
> </map:match>
>
> Bert
>
> At 22:23 6/05/2002 -0400, you wrote:
> > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > >
> > > Thanks, I'll wait for this "XSPT" to be better documented,
> >
> >It does not exist. But it is possible.
> >
> >Vadim
> >
> > > until then, I'll just write a java-based Transformer...
> > >
> > > -Chris
> > >
> > > Vadim Gritsenko wrote:
> > > >
> > > > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > > > >
> > > > > Ok, after reading this, and your previous response, I
> > > > > can now articulate my problem better.
> > > > >
> > > > > It seems the XSP allows you to create reusable sections
> > > > > of code (logicsheets) and to embed Java, the result
> > > > > is auto-generated code which is an instance of Generator.
> > > >
> > > > You have got it right.
> > > >
> > > >
> > > > > I was hoping that XSP could also be used to define a
> >code-generated
> > > > > instance of Transformer.
> > > >
> > > > Cocoon markup->to->programming-language machinery can do that. But
> >it
> > > > will not be XSP, but other language on its own (I think "XSPT": XSP
> >for
> > > > transformations ;)
> > > >
> > > > > The way things are now, it seems that
> > > > > only Generators can be coded up using XSP -- not Transformers.
> > > >
> > > > Right now - yes.
> > > >
> > > > > In other words, I must write my Transformer entirely in Java.
> > > >
> > > > Or implement XSPT. I think it will be simplier for you to code
> > > > Transformer in Java at this stage. ;)
> > > >
> > > > > Thanks for your help,
> > > >
> > > > Welcome.
> > > >
> > > > Vadim
> > > >
> > > >
> > > > > -Chris
> > > > >
> > > > > Vadim Gritsenko wrote:
> > > > > >
> > > > > > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > > > > > >
> > > > > > > I looked over most of the examples, including this one,
> > > > > > > before posting. It's not really what I want to do, that
> > > > > > > just seems to be using another pipline as an imput source,
> > > > > >
> > > > > > But it sounds like what you need: Generate XML -> Use it as XSP
> > > > source
> > > > > > -> XSL -> Serialize.
> > > > > >
> > > > > > > effectively establishing alias URI's.
> > > > > >
> > > > > > Alias??? Alias should result in same result, but this produces
> > > > *very*
> > > > > > different result. Please compare:
> > > > > >
> > > > > > http://localhost:8080/cocoon/sub/xsp-cocoon
> > > > > > http://localhost:8080/cocoon/sub/xsp-source
> > > > > >
> > > > > > > I was hoping to use embedded java to perform what would
> > > > > > > otherwise be done with XSLT.
> > > > > >
> > > > > > It's called "Transformer" then.
> > > > > >
> > > >
> >http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon
> > > > > >
> > > >
> >/transformation/Transformer.java?rev=1.4&content-type=text/vnd.viewcvs-m
> > > > > > arkup
> > > > > >
> > > > > > Implement, declare in the sitemap, use.
> > > > > >
> > > > > > > I will look into "xinclude" it it will work for
> > > > > > > a dynamic datasource.
> > > > > >
> > > > > > It does work.
> > > > > >
> > > > > > Vadim
> > > > ...
> >
> >
> >---------------------------------------------------------------------
> >Please check that your question has not already been answered in the
> >FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> >To unsubscribe, e-mail: <co...@xml.apache.org>
> >For additional commands, e-mail: <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: XSP + Dynamic XML generator ??
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Bert Van Kets [mailto:bert@vankets.com]
>
> Isn't the xsl-dynamic page that you need?
I think that's not exactly what he needs...
> The sample can be found at
> http://localhost:8080/cocoon/sub/xsl-dynamic
> The transformer of the main pipeline calls a different pipeline where
an
> XSP page generates the transformations. To my opinion XSP can be
used as
> a transformer this way, no?
It uses XSP to create XSLT sheet dynamically (and XSL is XML - so no
issue here), but in no means this creates Transformer. You can not write
Java code which operates on the input SAX stream, but Java code which
creates XSLT.
Vadim
> <!-- Dynamic XSL -->
> <map:match pattern="xsl-dynamic-source">
> <map:generate type="serverpages"
src="stylesheets/simple-page2html.xsp"/>
> <map:serialize type="xml"/>
> </map:match>
> <map:match pattern="xsl-dynamic">
> <map:generate src="docs/simple.xml"/>
> <map:transform src="cocoon:/xsl-dynamic-source"/>
> <map:serialize/>
> </map:match>
>
>
> Bert
>
>
> At 22:23 6/05/2002 -0400, you wrote:
> > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > >
> > > Thanks, I'll wait for this "XSPT" to be better documented,
> >
> >It does not exist. But it is possible.
> >
> >Vadim
> >
> > > until then, I'll just write a java-based Transformer...
> > >
> > > -Chris
> > >
> > > Vadim Gritsenko wrote:
> > > >
> > > > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > > > >
> > > > > Ok, after reading this, and your previous response, I
> > > > > can now articulate my problem better.
> > > > >
> > > > > It seems the XSP allows you to create reusable sections
> > > > > of code (logicsheets) and to embed Java, the result
> > > > > is auto-generated code which is an instance of Generator.
> > > >
> > > > You have got it right.
> > > >
> > > >
> > > > > I was hoping that XSP could also be used to define a
> > > > > code-generated
> > > > > instance of Transformer.
> > > >
> > > > Cocoon markup->to->programming-language machinery can do that.
But
> > > > it
> > > > will not be XSP, but other language on its own (I think "XSPT":
XSP
> > > > for transformations ;)
> > > >
> > > > > The way things are now, it seems that
> > > > > only Generators can be coded up using XSP -- not Transformers.
> > > >
> > > > Right now - yes.
> > > >
> > > > > In other words, I must write my Transformer entirely in Java.
> > > >
> > > > Or implement XSPT. I think it will be simplier for you to code
> > > > Transformer in Java at this stage. ;)
> > > >
> > > > > Thanks for your help,
> > > >
> > > > Welcome.
> > > >
> > > > Vadim
...
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: XSP + Dynamic XML generator ??
Posted by Bert Van Kets <be...@vankets.com>.
Isn't the xsl-dynamic page that you need? The sample can be found at
http://localhost:8080/cocoon/sub/xsl-dynamic
The transformer of the main pipeline calls a different pipeline where an
XSP page generates the transformations. To my opinion XSP can be used as
a transformer this way, no?
<!-- Dynamic XSL -->
<map:match pattern="xsl-dynamic-source">
<map:generate type="serverpages" src="stylesheets/simple-page2html.xsp"/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="xsl-dynamic">
<map:generate src="docs/simple.xml"/>
<map:transform src="cocoon:/xsl-dynamic-source"/>
<map:serialize/>
</map:match>
Bert
At 22:23 6/05/2002 -0400, you wrote:
> > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> >
> > Thanks, I'll wait for this "XSPT" to be better documented,
>
>It does not exist. But it is possible.
>
>Vadim
>
> > until then, I'll just write a java-based Transformer...
> >
> > -Chris
> >
> > Vadim Gritsenko wrote:
> > >
> > > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > > >
> > > > Ok, after reading this, and your previous response, I
> > > > can now articulate my problem better.
> > > >
> > > > It seems the XSP allows you to create reusable sections
> > > > of code (logicsheets) and to embed Java, the result
> > > > is auto-generated code which is an instance of Generator.
> > >
> > > You have got it right.
> > >
> > >
> > > > I was hoping that XSP could also be used to define a
>code-generated
> > > > instance of Transformer.
> > >
> > > Cocoon markup->to->programming-language machinery can do that. But
>it
> > > will not be XSP, but other language on its own (I think "XSPT": XSP
>for
> > > transformations ;)
> > >
> > > > The way things are now, it seems that
> > > > only Generators can be coded up using XSP -- not Transformers.
> > >
> > > Right now - yes.
> > >
> > > > In other words, I must write my Transformer entirely in Java.
> > >
> > > Or implement XSPT. I think it will be simplier for you to code
> > > Transformer in Java at this stage. ;)
> > >
> > > > Thanks for your help,
> > >
> > > Welcome.
> > >
> > > Vadim
> > >
> > >
> > > > -Chris
> > > >
> > > > Vadim Gritsenko wrote:
> > > > >
> > > > > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > > > > >
> > > > > > I looked over most of the examples, including this one,
> > > > > > before posting. It's not really what I want to do, that
> > > > > > just seems to be using another pipline as an imput source,
> > > > >
> > > > > But it sounds like what you need: Generate XML -> Use it as XSP
> > > source
> > > > > -> XSL -> Serialize.
> > > > >
> > > > > > effectively establishing alias URI's.
> > > > >
> > > > > Alias??? Alias should result in same result, but this produces
> > > *very*
> > > > > different result. Please compare:
> > > > >
> > > > > http://localhost:8080/cocoon/sub/xsp-cocoon
> > > > > http://localhost:8080/cocoon/sub/xsp-source
> > > > >
> > > > > > I was hoping to use embedded java to perform what would
> > > > > > otherwise be done with XSLT.
> > > > >
> > > > > It's called "Transformer" then.
> > > > >
> > >
>http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon
> > > > >
> > >
>/transformation/Transformer.java?rev=1.4&content-type=text/vnd.viewcvs-m
> > > > > arkup
> > > > >
> > > > > Implement, declare in the sitemap, use.
> > > > >
> > > > > > I will look into "xinclude" it it will work for
> > > > > > a dynamic datasource.
> > > > >
> > > > > It does work.
> > > > >
> > > > > Vadim
> > > ...
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: XSP + Dynamic XML generator ??
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
>
> Thanks, I'll wait for this "XSPT" to be better documented,
It does not exist. But it is possible.
Vadim
> until then, I'll just write a java-based Transformer...
>
> -Chris
>
> Vadim Gritsenko wrote:
> >
> > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > >
> > > Ok, after reading this, and your previous response, I
> > > can now articulate my problem better.
> > >
> > > It seems the XSP allows you to create reusable sections
> > > of code (logicsheets) and to embed Java, the result
> > > is auto-generated code which is an instance of Generator.
> >
> > You have got it right.
> >
> >
> > > I was hoping that XSP could also be used to define a
code-generated
> > > instance of Transformer.
> >
> > Cocoon markup->to->programming-language machinery can do that. But
it
> > will not be XSP, but other language on its own (I think "XSPT": XSP
for
> > transformations ;)
> >
> > > The way things are now, it seems that
> > > only Generators can be coded up using XSP -- not Transformers.
> >
> > Right now - yes.
> >
> > > In other words, I must write my Transformer entirely in Java.
> >
> > Or implement XSPT. I think it will be simplier for you to code
> > Transformer in Java at this stage. ;)
> >
> > > Thanks for your help,
> >
> > Welcome.
> >
> > Vadim
> >
> >
> > > -Chris
> > >
> > > Vadim Gritsenko wrote:
> > > >
> > > > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > > > >
> > > > > I looked over most of the examples, including this one,
> > > > > before posting. It's not really what I want to do, that
> > > > > just seems to be using another pipline as an imput source,
> > > >
> > > > But it sounds like what you need: Generate XML -> Use it as XSP
> > source
> > > > -> XSL -> Serialize.
> > > >
> > > > > effectively establishing alias URI's.
> > > >
> > > > Alias??? Alias should result in same result, but this produces
> > *very*
> > > > different result. Please compare:
> > > >
> > > > http://localhost:8080/cocoon/sub/xsp-cocoon
> > > > http://localhost:8080/cocoon/sub/xsp-source
> > > >
> > > > > I was hoping to use embedded java to perform what would
> > > > > otherwise be done with XSLT.
> > > >
> > > > It's called "Transformer" then.
> > > >
> >
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon
> > > >
> >
/transformation/Transformer.java?rev=1.4&content-type=text/vnd.viewcvs-m
> > > > arkup
> > > >
> > > > Implement, declare in the sitemap, use.
> > > >
> > > > > I will look into "xinclude" it it will work for
> > > > > a dynamic datasource.
> > > >
> > > > It does work.
> > > >
> > > > Vadim
> > ...
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XSP + Dynamic XML generator ??
Posted by Chris Wolf <Ch...@morganstanley.com>.
Thanks, I'll wait for this "XSPT" to be better documented,
until then, I'll just write a java-based Transformer...
-Chris
Vadim Gritsenko wrote:
>
> > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> >
> > Ok, after reading this, and your previous response, I
> > can now articulate my problem better.
> >
> > It seems the XSP allows you to create reusable sections
> > of code (logicsheets) and to embed Java, the result
> > is auto-generated code which is an instance of Generator.
>
> You have got it right.
>
>
> > I was hoping that XSP could also be used to define a code-generated
> > instance of Transformer.
>
> Cocoon markup->to->programming-language machinery can do that. But it
> will not be XSP, but other language on its own (I think "XSPT": XSP for
> transformations ;)
>
> > The way things are now, it seems that
> > only Generators can be coded up using XSP -- not Transformers.
>
> Right now - yes.
>
> > In other words, I must write my Transformer entirely in Java.
>
> Or implement XSPT. I think it will be simplier for you to code
> Transformer in Java at this stage. ;)
>
> > Thanks for your help,
>
> Welcome.
>
> Vadim
>
>
> > -Chris
> >
> > Vadim Gritsenko wrote:
> > >
> > > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > > >
> > > > I looked over most of the examples, including this one,
> > > > before posting. It's not really what I want to do, that
> > > > just seems to be using another pipline as an imput source,
> > >
> > > But it sounds like what you need: Generate XML -> Use it as XSP
> source
> > > -> XSL -> Serialize.
> > >
> > > > effectively establishing alias URI's.
> > >
> > > Alias??? Alias should result in same result, but this produces
> *very*
> > > different result. Please compare:
> > >
> > > http://localhost:8080/cocoon/sub/xsp-cocoon
> > > http://localhost:8080/cocoon/sub/xsp-source
> > >
> > > > I was hoping to use embedded java to perform what would
> > > > otherwise be done with XSLT.
> > >
> > > It's called "Transformer" then.
> > >
> http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon
> > >
> /transformation/Transformer.java?rev=1.4&content-type=text/vnd.viewcvs-m
> > > arkup
> > >
> > > Implement, declare in the sitemap, use.
> > >
> > > > I will look into "xinclude" it it will work for
> > > > a dynamic datasource.
> > >
> > > It does work.
> > >
> > > Vadim
> ...
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: XSP + Dynamic XML generator ??
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
>
> Ok, after reading this, and your previous response, I
> can now articulate my problem better.
>
> It seems the XSP allows you to create reusable sections
> of code (logicsheets) and to embed Java, the result
> is auto-generated code which is an instance of Generator.
You have got it right.
> I was hoping that XSP could also be used to define a code-generated
> instance of Transformer.
Cocoon markup->to->programming-language machinery can do that. But it
will not be XSP, but other language on its own (I think "XSPT": XSP for
transformations ;)
> The way things are now, it seems that
> only Generators can be coded up using XSP -- not Transformers.
Right now - yes.
> In other words, I must write my Transformer entirely in Java.
Or implement XSPT. I think it will be simplier for you to code
Transformer in Java at this stage. ;)
> Thanks for your help,
Welcome.
Vadim
> -Chris
>
> Vadim Gritsenko wrote:
> >
> > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > >
> > > I looked over most of the examples, including this one,
> > > before posting. It's not really what I want to do, that
> > > just seems to be using another pipline as an imput source,
> >
> > But it sounds like what you need: Generate XML -> Use it as XSP
source
> > -> XSL -> Serialize.
> >
> > > effectively establishing alias URI's.
> >
> > Alias??? Alias should result in same result, but this produces
*very*
> > different result. Please compare:
> >
> > http://localhost:8080/cocoon/sub/xsp-cocoon
> > http://localhost:8080/cocoon/sub/xsp-source
> >
> > > I was hoping to use embedded java to perform what would
> > > otherwise be done with XSLT.
> >
> > It's called "Transformer" then.
> >
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon
> >
/transformation/Transformer.java?rev=1.4&content-type=text/vnd.viewcvs-m
> > arkup
> >
> > Implement, declare in the sitemap, use.
> >
> > > I will look into "xinclude" it it will work for
> > > a dynamic datasource.
> >
> > It does work.
> >
> > Vadim
...
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XSP + Dynamic XML generator ??
Posted by Chris Wolf <Ch...@morganstanley.com>.
I meant to able to use embedded java to create
an instance of:
org.apache.cocoon.transformation.Transformer
Analogous to the way XSP currently works by
creating an instance of:
org.apache.cocoon.generation.Generator
(called XSPGenerator)
Now I see this is not supported, but what you have
suggested may help, thanks,
-Chris
Paul Pattison wrote:
>
> What do you mean by 'Transformer'? Do you mean that you want to dynamically
> create the XSLT page? If so, check out:
>
> http://localhost:8080/cocoon/sub/all-dynamic
>
> Paul
>
> -----Original Message-----
> From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> Sent: 06 May 2002 16:32
> To: cocoon-users@xml.apache.org
> Subject: Re: XSP + Dynamic XML generator ??
>
> Ok, after reading this, and your previous response, I
> can now articulate my problem better.
>
> It seems the XSP allows you to create reusable sections
> of code (logicsheets) and to embed Java, the result
> is auto-generated code which is an instance of Generator.
>
> I was hoping that XSP could also be used to define a code-generated
> instance of Transformer. The way things are now, it seems that
> only Generators can be coded up using XSP -- not Transformers.
> In other words, I must write my Transformer entirely in Java.
>
> Thanks for your help,
>
> -Chris
>
> Vadim Gritsenko wrote:
> >
> > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > >
> > > I looked over most of the examples, including this one,
> > > before posting. It's not really what I want to do, that
> > > just seems to be using another pipline as an imput source,
> >
> > But it sounds like what you need: Generate XML -> Use it as XSP source
> > -> XSL -> Serialize.
> >
> > > effectively establishing alias URI's.
> >
> > Alias??? Alias should result in same result, but this produces *very*
> > different result. Please compare:
> >
> > http://localhost:8080/cocoon/sub/xsp-cocoon
> > http://localhost:8080/cocoon/sub/xsp-source
> >
> > > I was hoping to use embedded java to perform what would
> > > otherwise be done with XSLT.
> >
> > It's called "Transformer" then.
> > http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon
> > /transformation/Transformer.java?rev=1.4&content-type=text/vnd.viewcvs-m
> > arkup
> >
> > Implement, declare in the sitemap, use.
> >
> > > I will look into "xinclude" it it will work for
> > > a dynamic datasource.
> >
> > It does work.
> >
> > Vadim
> >
> > > Thanks,
> > >
> > > -Chris
> > >
> > >
> > > Vadim Gritsenko wrote:
> > > >
> > > > One line for you:
> > > >
> > > > http://localhost:8080/cocoon/sub/xsp-cocoon
> > > >
> > > > Other samples might be useful too.
> > > >
> > > > PS Why not use xsp, then xinclude your xml and xslt as necessary?
> > > >
> > > > Vadim
> > > >
> > > > --
> > > > Resistance is futile.
> > > >
> > > > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > > > >
> > > > >
> > > > > I am working on a project where we have a datasource
> > > > > which produces XML based on certain parameters. I would
> > > > > like to use this as input to an XSP page which defines
> > > > > overall content structure (semantics) then, finally,
> > > > > apply a stylsheet appropriate for the invoking client.
> > > > >
> > > > >
> > > > > Problem: It seems that a pipeline must start
> > > > > with one, and only one Generator. The problem is
> > > > > that if I create an implementation of Generator
> > > > > which produces the XML, then I cannot use XSP
> > > > > (since the XSP code handler is itself a Generator).
> > > > >
> > > > > I then tried to implement the XML generator from an
> > > > > XSP page by invoking a method using xsp:expr, but then
> > > > > the whole document is treated as a single string.
> > > > >
> > > > > What I would like to do is some thig like:
> > > > >
> > > > > Ideas anyone?
> > > > >
> > > > > +---------------+
> > > > > | XML Generator |
> > > > > +------+--------+
> > > > > |
> > > > > v
> > > > > +---------------+
> > > > > | XSP structure |
> > > > > +------+--------+
> > > > > |
> > > > > +------v-----------+
> > > > > | XSL presentation |
> > > > > +------+-----------+
> > > > > |
> > > > > +------v--------+
> > > > > | Serializer |
> > > > > +---------------+
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: XSP + Dynamic XML generator ??
Posted by Paul Pattison <pa...@76design.com>.
What do you mean by 'Transformer'? Do you mean that you want to dynamically
create the XSLT page? If so, check out:
http://localhost:8080/cocoon/sub/all-dynamic
Paul
-----Original Message-----
From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
Sent: 06 May 2002 16:32
To: cocoon-users@xml.apache.org
Subject: Re: XSP + Dynamic XML generator ??
Ok, after reading this, and your previous response, I
can now articulate my problem better.
It seems the XSP allows you to create reusable sections
of code (logicsheets) and to embed Java, the result
is auto-generated code which is an instance of Generator.
I was hoping that XSP could also be used to define a code-generated
instance of Transformer. The way things are now, it seems that
only Generators can be coded up using XSP -- not Transformers.
In other words, I must write my Transformer entirely in Java.
Thanks for your help,
-Chris
Vadim Gritsenko wrote:
>
> > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> >
> > I looked over most of the examples, including this one,
> > before posting. It's not really what I want to do, that
> > just seems to be using another pipline as an imput source,
>
> But it sounds like what you need: Generate XML -> Use it as XSP source
> -> XSL -> Serialize.
>
> > effectively establishing alias URI's.
>
> Alias??? Alias should result in same result, but this produces *very*
> different result. Please compare:
>
> http://localhost:8080/cocoon/sub/xsp-cocoon
> http://localhost:8080/cocoon/sub/xsp-source
>
> > I was hoping to use embedded java to perform what would
> > otherwise be done with XSLT.
>
> It's called "Transformer" then.
> http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon
> /transformation/Transformer.java?rev=1.4&content-type=text/vnd.viewcvs-m
> arkup
>
> Implement, declare in the sitemap, use.
>
> > I will look into "xinclude" it it will work for
> > a dynamic datasource.
>
> It does work.
>
> Vadim
>
> > Thanks,
> >
> > -Chris
> >
> >
> > Vadim Gritsenko wrote:
> > >
> > > One line for you:
> > >
> > > http://localhost:8080/cocoon/sub/xsp-cocoon
> > >
> > > Other samples might be useful too.
> > >
> > > PS Why not use xsp, then xinclude your xml and xslt as necessary?
> > >
> > > Vadim
> > >
> > > --
> > > Resistance is futile.
> > >
> > > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > > >
> > > >
> > > > I am working on a project where we have a datasource
> > > > which produces XML based on certain parameters. I would
> > > > like to use this as input to an XSP page which defines
> > > > overall content structure (semantics) then, finally,
> > > > apply a stylsheet appropriate for the invoking client.
> > > >
> > > >
> > > > Problem: It seems that a pipeline must start
> > > > with one, and only one Generator. The problem is
> > > > that if I create an implementation of Generator
> > > > which produces the XML, then I cannot use XSP
> > > > (since the XSP code handler is itself a Generator).
> > > >
> > > > I then tried to implement the XML generator from an
> > > > XSP page by invoking a method using xsp:expr, but then
> > > > the whole document is treated as a single string.
> > > >
> > > > What I would like to do is some thig like:
> > > >
> > > > Ideas anyone?
> > > >
> > > > +---------------+
> > > > | XML Generator |
> > > > +------+--------+
> > > > |
> > > > v
> > > > +---------------+
> > > > | XSP structure |
> > > > +------+--------+
> > > > |
> > > > +------v-----------+
> > > > | XSL presentation |
> > > > +------+-----------+
> > > > |
> > > > +------v--------+
> > > > | Serializer |
> > > > +---------------+
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XSP + Dynamic XML generator ??
Posted by Chris Wolf <Ch...@morganstanley.com>.
Ok, after reading this, and your previous response, I
can now articulate my problem better.
It seems the XSP allows you to create reusable sections
of code (logicsheets) and to embed Java, the result
is auto-generated code which is an instance of Generator.
I was hoping that XSP could also be used to define a code-generated
instance of Transformer. The way things are now, it seems that
only Generators can be coded up using XSP -- not Transformers.
In other words, I must write my Transformer entirely in Java.
Thanks for your help,
-Chris
Vadim Gritsenko wrote:
>
> > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> >
> > I looked over most of the examples, including this one,
> > before posting. It's not really what I want to do, that
> > just seems to be using another pipline as an imput source,
>
> But it sounds like what you need: Generate XML -> Use it as XSP source
> -> XSL -> Serialize.
>
> > effectively establishing alias URI's.
>
> Alias??? Alias should result in same result, but this produces *very*
> different result. Please compare:
>
> http://localhost:8080/cocoon/sub/xsp-cocoon
> http://localhost:8080/cocoon/sub/xsp-source
>
> > I was hoping to use embedded java to perform what would
> > otherwise be done with XSLT.
>
> It's called "Transformer" then.
> http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon
> /transformation/Transformer.java?rev=1.4&content-type=text/vnd.viewcvs-m
> arkup
>
> Implement, declare in the sitemap, use.
>
> > I will look into "xinclude" it it will work for
> > a dynamic datasource.
>
> It does work.
>
> Vadim
>
> > Thanks,
> >
> > -Chris
> >
> >
> > Vadim Gritsenko wrote:
> > >
> > > One line for you:
> > >
> > > http://localhost:8080/cocoon/sub/xsp-cocoon
> > >
> > > Other samples might be useful too.
> > >
> > > PS Why not use xsp, then xinclude your xml and xslt as necessary?
> > >
> > > Vadim
> > >
> > > --
> > > Resistance is futile.
> > >
> > > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > > >
> > > >
> > > > I am working on a project where we have a datasource
> > > > which produces XML based on certain parameters. I would
> > > > like to use this as input to an XSP page which defines
> > > > overall content structure (semantics) then, finally,
> > > > apply a stylsheet appropriate for the invoking client.
> > > >
> > > >
> > > > Problem: It seems that a pipeline must start
> > > > with one, and only one Generator. The problem is
> > > > that if I create an implementation of Generator
> > > > which produces the XML, then I cannot use XSP
> > > > (since the XSP code handler is itself a Generator).
> > > >
> > > > I then tried to implement the XML generator from an
> > > > XSP page by invoking a method using xsp:expr, but then
> > > > the whole document is treated as a single string.
> > > >
> > > > What I would like to do is some thig like:
> > > >
> > > > Ideas anyone?
> > > >
> > > > +---------------+
> > > > | XML Generator |
> > > > +------+--------+
> > > > |
> > > > v
> > > > +---------------+
> > > > | XSP structure |
> > > > +------+--------+
> > > > |
> > > > +------v-----------+
> > > > | XSL presentation |
> > > > +------+-----------+
> > > > |
> > > > +------v--------+
> > > > | Serializer |
> > > > +---------------+
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: XSP + Dynamic XML generator ??
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
>
> I looked over most of the examples, including this one,
> before posting. It's not really what I want to do, that
> just seems to be using another pipline as an imput source,
But it sounds like what you need: Generate XML -> Use it as XSP source
-> XSL -> Serialize.
> effectively establishing alias URI's.
Alias??? Alias should result in same result, but this produces *very*
different result. Please compare:
http://localhost:8080/cocoon/sub/xsp-cocoon
http://localhost:8080/cocoon/sub/xsp-source
> I was hoping to use embedded java to perform what would
> otherwise be done with XSLT.
It's called "Transformer" then.
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon
/transformation/Transformer.java?rev=1.4&content-type=text/vnd.viewcvs-m
arkup
Implement, declare in the sitemap, use.
> I will look into "xinclude" it it will work for
> a dynamic datasource.
It does work.
Vadim
> Thanks,
>
> -Chris
>
>
> Vadim Gritsenko wrote:
> >
> > One line for you:
> >
> > http://localhost:8080/cocoon/sub/xsp-cocoon
> >
> > Other samples might be useful too.
> >
> > PS Why not use xsp, then xinclude your xml and xslt as necessary?
> >
> > Vadim
> >
> > --
> > Resistance is futile.
> >
> > > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> > >
> > >
> > > I am working on a project where we have a datasource
> > > which produces XML based on certain parameters. I would
> > > like to use this as input to an XSP page which defines
> > > overall content structure (semantics) then, finally,
> > > apply a stylsheet appropriate for the invoking client.
> > >
> > >
> > > Problem: It seems that a pipeline must start
> > > with one, and only one Generator. The problem is
> > > that if I create an implementation of Generator
> > > which produces the XML, then I cannot use XSP
> > > (since the XSP code handler is itself a Generator).
> > >
> > > I then tried to implement the XML generator from an
> > > XSP page by invoking a method using xsp:expr, but then
> > > the whole document is treated as a single string.
> > >
> > > What I would like to do is some thig like:
> > >
> > > Ideas anyone?
> > >
> > > +---------------+
> > > | XML Generator |
> > > +------+--------+
> > > |
> > > v
> > > +---------------+
> > > | XSP structure |
> > > +------+--------+
> > > |
> > > +------v-----------+
> > > | XSL presentation |
> > > +------+-----------+
> > > |
> > > +------v--------+
> > > | Serializer |
> > > +---------------+
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XSP + Dynamic XML generator ??
Posted by Chris Wolf <Ch...@morganstanley.com>.
I looked over most of the examples, including this one,
before posting. It's not really what I want to do, that
just seems to be using another pipline as an imput source,
effectively establishing alias URI's.
I was hoping to use embedded java to perform what would
otherwise be done with XSLT.
I will look into "xinclude" it it will work for
a dynamic datasource.
Thanks,
-Chris
Vadim Gritsenko wrote:
>
> One line for you:
>
> http://localhost:8080/cocoon/sub/xsp-cocoon
>
> Other samples might be useful too.
>
> PS Why not use xsp, then xinclude your xml and xslt as necessary?
>
> Vadim
>
> --
> Resistance is futile.
>
> > From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> >
> >
> > I am working on a project where we have a datasource
> > which produces XML based on certain parameters. I would
> > like to use this as input to an XSP page which defines
> > overall content structure (semantics) then, finally,
> > apply a stylsheet appropriate for the invoking client.
> >
> >
> > Problem: It seems that a pipeline must start
> > with one, and only one Generator. The problem is
> > that if I create an implementation of Generator
> > which produces the XML, then I cannot use XSP
> > (since the XSP code handler is itself a Generator).
> >
> > I then tried to implement the XML generator from an
> > XSP page by invoking a method using xsp:expr, but then
> > the whole document is treated as a single string.
> >
> > What I would like to do is some thig like:
> >
> > Ideas anyone?
> >
> > +---------------+
> > | XML Generator |
> > +------+--------+
> > |
> > v
> > +---------------+
> > | XSP structure |
> > +------+--------+
> > |
> > +------v-----------+
> > | XSL presentation |
> > +------+-----------+
> > |
> > +------v--------+
> > | Serializer |
> > +---------------+
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: XSP + Dynamic XML generator ??
Posted by Vadim Gritsenko <va...@verizon.net>.
One line for you:
http://localhost:8080/cocoon/sub/xsp-cocoon
Other samples might be useful too.
PS Why not use xsp, then xinclude your xml and xslt as necessary?
Vadim
--
Resistance is futile.
> From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
>
>
> I am working on a project where we have a datasource
> which produces XML based on certain parameters. I would
> like to use this as input to an XSP page which defines
> overall content structure (semantics) then, finally,
> apply a stylsheet appropriate for the invoking client.
>
>
> Problem: It seems that a pipeline must start
> with one, and only one Generator. The problem is
> that if I create an implementation of Generator
> which produces the XML, then I cannot use XSP
> (since the XSP code handler is itself a Generator).
>
> I then tried to implement the XML generator from an
> XSP page by invoking a method using xsp:expr, but then
> the whole document is treated as a single string.
>
> What I would like to do is some thig like:
>
> Ideas anyone?
>
> +---------------+
> | XML Generator |
> +------+--------+
> |
> v
> +---------------+
> | XSP structure |
> +------+--------+
> |
> +------v-----------+
> | XSL presentation |
> +------+-----------+
> |
> +------v--------+
> | Serializer |
> +---------------+
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XSP + Dynamic XML generator ??
Posted by Chris Wolf <Ch...@morganstanley.com>.
What I wanted to do
is use Java to perform what would otherwise have to be
done in XSLT. I did some performance tests which indicate
that for certain operations, such as changing the overall
structure of an XML document, using XSLT exhibits
a quadratic rise in time for increasing number of input
elements. Using Java to restructure the document,
it's more linear. I wanted to use XSLT just for the
final application of presentation style.
Zack Angelo wrote:
>
> Chris,
>
> Generally speaking, you don't use XSP to transform XML that has already been
> generated, you use it generate XML in the first place. So it seems that
> you'd want to follow the typical pipeline layout, generate your XML with XSP
> based on parameters gathered from your datasource (perhaps via esql or some
> embedded java code). Then apply a stylesheet to that and serialize it. So,
> XSP->XSLT->Serialize.
>
> I'm sorry if I'm completely off, I don't quite get what you're trying to do.
>
> -Zack
>
> On 5/3/02 2:03 PM, "Chris Wolf" <Ch...@morganstanley.com> wrote:
>
> >
> > I am working on a project where we have a datasource
> > which produces XML based on certain parameters. I would
> > like to use this as input to an XSP page which defines
> > overall content structure (semantics) then, finally,
> > apply a stylsheet appropriate for the invoking client.
> >
> >
> > Problem: It seems that a pipeline must start
> > with one, and only one Generator. The problem is
> > that if I create an implementation of Generator
> > which produces the XML, then I cannot use XSP
> > (since the XSP code handler is itself a Generator).
> >
> > I then tried to implement the XML generator from an
> > XSP page by invoking a method using xsp:expr, but then
> > the whole document is treated as a single string.
> >
> > What I would like to do is some thig like:
> >
> > Ideas anyone?
> >
> > +---------------+
> > | XML Generator |
> > +------+--------+
> > |
> > v
> > +---------------+
> > | XSP structure |
> > +------+--------+
> > |
> > +------v-----------+
> > | XSL presentation |
> > +------+-----------+
> > |
> > +------v--------+
> > | Serializer |
> > +---------------+
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XSP + Dynamic XML generator ??
Posted by Chris Wolf <Ch...@morganstanley.com>.
Yes but I really wanted:
genXML --> Java (via XSP) --> XSLT --> Serialize
I'm thinking from a background in JSP where logic
can be written in Java either directly or via custom tags.
I'm starting to think the only choice in the C2 framework
is just XSLT.
Dean McGowan wrote:
>
> Can you use 2 transforms instead ie: genXML --> XSLT --> XSLT -->
> Serialize ? or does the XSP draw from another data - source .. just kind
> of soundslike you want to re arrange your data then transform ?? could
> be wrong too :)
>
> -----Original Message-----
> From: Zack Angelo [mailto:zack@nostromocorp.com]
> Sent: Sunday, 5 May 2002 8:45 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: XSP + Dynamic XML generator ??
>
> Chris,
>
> Generally speaking, you don't use XSP to transform XML that has already
> been
> generated, you use it generate XML in the first place. So it seems that
> you'd want to follow the typical pipeline layout, generate your XML with
> XSP
> based on parameters gathered from your datasource (perhaps via esql or
> some
> embedded java code). Then apply a stylesheet to that and serialize it.
> So,
> XSP->XSLT->Serialize.
>
> I'm sorry if I'm completely off, I don't quite get what you're trying to
> do.
>
> -Zack
>
> On 5/3/02 2:03 PM, "Chris Wolf" <Ch...@morganstanley.com> wrote:
>
> >
> > I am working on a project where we have a datasource
> > which produces XML based on certain parameters. I would
> > like to use this as input to an XSP page which defines
> > overall content structure (semantics) then, finally,
> > apply a stylsheet appropriate for the invoking client.
> >
> >
> > Problem: It seems that a pipeline must start
> > with one, and only one Generator. The problem is
> > that if I create an implementation of Generator
> > which produces the XML, then I cannot use XSP
> > (since the XSP code handler is itself a Generator).
> >
> > I then tried to implement the XML generator from an
> > XSP page by invoking a method using xsp:expr, but then
> > the whole document is treated as a single string.
> >
> > What I would like to do is some thig like:
> >
> > Ideas anyone?
> >
> > +---------------+
> > | XML Generator |
> > +------+--------+
> > |
> > v
> > +---------------+
> > | XSP structure |
> > +------+--------+
> > |
> > +------v-----------+
> > | XSL presentation |
> > +------+-----------+
> > |
> > +------v--------+
> > | Serializer |
> > +---------------+
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: XSP + Dynamic XML generator ??
Posted by Dean McGowan <de...@bigpond.com>.
Can you use 2 transforms instead ie: genXML --> XSLT --> XSLT -->
Serialize ? or does the XSP draw from another data - source .. just kind
of soundslike you want to re arrange your data then transform ?? could
be wrong too :)
-----Original Message-----
From: Zack Angelo [mailto:zack@nostromocorp.com]
Sent: Sunday, 5 May 2002 8:45 AM
To: cocoon-users@xml.apache.org
Subject: Re: XSP + Dynamic XML generator ??
Chris,
Generally speaking, you don't use XSP to transform XML that has already
been
generated, you use it generate XML in the first place. So it seems that
you'd want to follow the typical pipeline layout, generate your XML with
XSP
based on parameters gathered from your datasource (perhaps via esql or
some
embedded java code). Then apply a stylesheet to that and serialize it.
So,
XSP->XSLT->Serialize.
I'm sorry if I'm completely off, I don't quite get what you're trying to
do.
-Zack
On 5/3/02 2:03 PM, "Chris Wolf" <Ch...@morganstanley.com> wrote:
>
> I am working on a project where we have a datasource
> which produces XML based on certain parameters. I would
> like to use this as input to an XSP page which defines
> overall content structure (semantics) then, finally,
> apply a stylsheet appropriate for the invoking client.
>
>
> Problem: It seems that a pipeline must start
> with one, and only one Generator. The problem is
> that if I create an implementation of Generator
> which produces the XML, then I cannot use XSP
> (since the XSP code handler is itself a Generator).
>
> I then tried to implement the XML generator from an
> XSP page by invoking a method using xsp:expr, but then
> the whole document is treated as a single string.
>
> What I would like to do is some thig like:
>
> Ideas anyone?
>
> +---------------+
> | XML Generator |
> +------+--------+
> |
> v
> +---------------+
> | XSP structure |
> +------+--------+
> |
> +------v-----------+
> | XSL presentation |
> +------+-----------+
> |
> +------v--------+
> | Serializer |
> +---------------+
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XSP + Dynamic XML generator ??
Posted by Zack Angelo <za...@nostromocorp.com>.
Chris,
Generally speaking, you don't use XSP to transform XML that has already been
generated, you use it generate XML in the first place. So it seems that
you'd want to follow the typical pipeline layout, generate your XML with XSP
based on parameters gathered from your datasource (perhaps via esql or some
embedded java code). Then apply a stylesheet to that and serialize it. So,
XSP->XSLT->Serialize.
I'm sorry if I'm completely off, I don't quite get what you're trying to do.
-Zack
On 5/3/02 2:03 PM, "Chris Wolf" <Ch...@morganstanley.com> wrote:
>
> I am working on a project where we have a datasource
> which produces XML based on certain parameters. I would
> like to use this as input to an XSP page which defines
> overall content structure (semantics) then, finally,
> apply a stylsheet appropriate for the invoking client.
>
>
> Problem: It seems that a pipeline must start
> with one, and only one Generator. The problem is
> that if I create an implementation of Generator
> which produces the XML, then I cannot use XSP
> (since the XSP code handler is itself a Generator).
>
> I then tried to implement the XML generator from an
> XSP page by invoking a method using xsp:expr, but then
> the whole document is treated as a single string.
>
> What I would like to do is some thig like:
>
> Ideas anyone?
>
> +---------------+
> | XML Generator |
> +------+--------+
> |
> v
> +---------------+
> | XSP structure |
> +------+--------+
> |
> +------v-----------+
> | XSL presentation |
> +------+-----------+
> |
> +------v--------+
> | Serializer |
> +---------------+
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>