cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wolf <Chris.W...@morganstanley.com>
Subject Re: XSP + Dynamic XML generator ??
Date Mon, 06 May 2002 17:58:45 GMT
This is certainly one solution that might work for me,
I'll give it a try.  Is the "util" logicsheet documented
anywhere? 


Thanks,

	-Chris

"Lai, Harry" wrote:
> 
> Hi Chris,
> 
> Instead of just using xsp:expr, you need to also use the util logicsheet
> (comes with Cocoon 2).  If you have that logicsheet declared in the "util"
> namespace, for example, you can do the following in your XSP:
> 
> ...
> <xsp:logic>
>         MyXmlSource xmlSource = new MyXmlSource();
> 
>         ... init xmlSource and do whatever you need to prepare content ...
> 
>         String xmlContent = xmlSource.getContent();
> 
> 
> <util:include-expr><util:expr><xsp:expr>xmlContent</xsp:expr></util:expr></u
> til:include-expr>
> </xsp:logic>
> ...
> 
> If you do this, the xml generated by your source will be included as xml
> elements, not just as a string.  Hope that helps!
> 
> Harry
> 
> -----Original Message-----
> From: Chris Wolf [mailto:Chris.Wolf@morganstanley.com]
> Sent: Friday, May 03, 2002 2:04 PM
> To: cocoon-users@xml.apache.org
> Subject: 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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message