You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Daniel Pfuhl <pf...@yahoo.de> on 2002/09/23 19:11:27 UTC

action as input for a generator ??

hi

imagine the following scenario:

i have an xml-src which i have to enrich with
different
elements depending on the input document. with other
words the input xml will scale my process. in this
process i have to call different methods not driven
by cocoon but another underlaying system.
so i was thinking of using an action which will take
the input src and after processing it, it will return
the final document for transformation and
serialization
controled by the sitemap.

now my question(s):

is it possible to use an action as the input for
a generator or do i have to write my own generator?

i also thought of xsp, but i think it is to complex
to do it this way. i want to separate the logic which
processes the input as an autonomic module.

fyi: before i only used actions to manage formdata,
e.g.
manipulating xml-files depending on formdata. but now
i have no real file i can write to - so i have to
manipulate it to transform and serialize it directly
afterwards.

it would be very nice if somebody could give me an
advice how a solution can look like!!

thanks in advance !!

daniel

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de

---------------------------------------------------------------------
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: action as input for a generator ??

Posted by Vadim Gritsenko <va...@verizon.net>.
Barbara Post wrote:

>just an idea : you have your xml file, you transform it with xslt, and your
>stylesheet calls some java beans you use through xalan java extension. have
>a look on Apache's xalan-j page.
>Globally : you have a namespace for "java",
>you use your beans this way :
><xsl:variable name="mybean"><xsl:value-of
>select="java:package.MyBean.new()"/></xsl:variable>
>
>then to call a function :
>
><xsl:value-of select="myfunction($mybean,$arg0,$arg1)"/>
>
>given that the parameters (arguments) are defined as xsl variables.
>
>HTH but this is sometimes VERY useful because java is roughly quicker to
>execute that xslt...
>

It worth considering writing own transformer then. By example of session 
transformer, SQL, LDAP, etc.

Vadim


>My 2 cents ;-)
>
>Babs
>--
>website : www.babsfrance.fr.st
>ICQ : 135868405
>----- Original Message -----
>From: "Daniel Pfuhl" <pf...@yahoo.de>
>To: <co...@xml.apache.org>
>Sent: Monday, September 23, 2002 7:11 PM
>Subject: action as input for a generator ??
>
>
>  
>
>>hi
>>
>>imagine the following scenario:
>>
>>i have an xml-src which i have to enrich with
>>different
>>elements depending on the input document. with other
>>words the input xml will scale my process. in this
>>process i have to call different methods not driven
>>by cocoon but another underlaying system.
>>so i was thinking of using an action which will take
>>the input src and after processing it, it will return
>>the final document for transformation and
>>serialization
>>controled by the sitemap.
>>
>>now my question(s):
>>
>>is it possible to use an action as the input for
>>a generator or do i have to write my own generator?
>>
>>i also thought of xsp, but i think it is to complex
>>to do it this way. i want to separate the logic which
>>processes the input as an autonomic module.
>>
>>fyi: before i only used actions to manage formdata,
>>e.g.
>>manipulating xml-files depending on formdata. but now
>>i have no real file i can write to - so i have to
>>manipulate it to transform and serialize it directly
>>afterwards.
>>
>>it would be very nice if somebody could give me an
>>advice how a solution can look like!!
>>
>>thanks in advance !!
>>
>>daniel
>>    
>>




---------------------------------------------------------------------
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: action as input for a generator ??

Posted by Barbara Post <ba...@ifrance.com>.
just an idea : you have your xml file, you transform it with xslt, and your
stylesheet calls some java beans you use through xalan java extension. have
a look on Apache's xalan-j page.
Globally : you have a namespace for "java",
you use your beans this way :
<xsl:variable name="mybean"><xsl:value-of
select="java:package.MyBean.new()"/></xsl:variable>

then to call a function :

<xsl:value-of select="myfunction($mybean,$arg0,$arg1)"/>

given that the parameters (arguments) are defined as xsl variables.

HTH but this is sometimes VERY useful because java is roughly quicker to
execute that xslt...

My 2 cents ;-)

Babs
--
website : www.babsfrance.fr.st
ICQ : 135868405
----- Original Message -----
From: "Daniel Pfuhl" <pf...@yahoo.de>
To: <co...@xml.apache.org>
Sent: Monday, September 23, 2002 7:11 PM
Subject: action as input for a generator ??


> hi
>
> imagine the following scenario:
>
> i have an xml-src which i have to enrich with
> different
> elements depending on the input document. with other
> words the input xml will scale my process. in this
> process i have to call different methods not driven
> by cocoon but another underlaying system.
> so i was thinking of using an action which will take
> the input src and after processing it, it will return
> the final document for transformation and
> serialization
> controled by the sitemap.
>
> now my question(s):
>
> is it possible to use an action as the input for
> a generator or do i have to write my own generator?
>
> i also thought of xsp, but i think it is to complex
> to do it this way. i want to separate the logic which
> processes the input as an autonomic module.
>
> fyi: before i only used actions to manage formdata,
> e.g.
> manipulating xml-files depending on formdata. but now
> i have no real file i can write to - so i have to
> manipulate it to transform and serialize it directly
> afterwards.
>
> it would be very nice if somebody could give me an
> advice how a solution can look like!!
>
> thanks in advance !!
>
> daniel
>
> __________________________________________________________________
>
> Gesendet von Yahoo! Mail - http://mail.yahoo.de
> Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de
>
> ---------------------------------------------------------------------
> 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>
>
>


________________________________________________________________
Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros d'économies !
Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
+ 1 mois de jeu en réseau offert ! 
Clique ici : http://www.ifrance.com/_reloc/mail.etudiant 


---------------------------------------------------------------------
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>