Hi Robert,

say you're action returns a Map that contains the key 'stylesheet'

You could then have

<map:act type="retrieve-stylesheet">
  <map:transform type="xsl" src={stylesheet}/>
</map:act>

somewhere in your pipeline.

Looking at your sample, I reckon you need the stylesheet when someone followed the 
link to an article. 
If it is so, you can then store the information in the request and use an existing 
action like RequestParamAction.

HTH

Judith


> -----Ursprüngliche Nachricht-----
> Von:  Robert Sösemann [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Donnerstag, 31. Oktober 2002 16:12
> An:   [EMAIL PROTECTED]
> Betreff:      Re: Dynamically add transformer to sitemap
> 
> Sound quite good, Joerg. But I have no idea how to pass the filepath string
> from an Action to to an Transformer in the sitemap.
> 
> Can I have a transformer with an variable "src" attribute value?
> 
> It would be great if you could give a short example or snippet, how to get
> that.
> 
> Thanks in advance.
> 
> Robert
> ----- Original Message -----
> From: "Joerg Heinicke" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, October 31, 2002 10:19 AM
> Subject: Re: Dynamically add transformer to sitemap
> 
> 
> > Hello Robert,
> >
> > what about an action, which retrieves the stylesheet path (or name) and
> > returns it to the sitemap. I can't think of other ways, especially
> > <xsl:include/> is evaluated on compile time, not run time like variables.
> >
> > Regards,
> >
> > Joerg
> >
> > Robert Sösemann wrote:
> > > Question:
> > > -----------
> > > Is it possible to dynamically add a certain transformer to the sitemap
> > > pipeline later dependant on generated xml content?
> > >
> > > Background:
> > > -------------
> > > My cocoon app generates website from content in a Mysql DB.
> > > In my sitemaps pipeline there is an xsp generator which gets the DB raw
> > > data. Every article in my DB has an attribute src which is a path to a
> xsl
> > > which should later style my article.
> > >
> > > This is how the result of the xsp look like:----------------------------
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <seite xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1";
> > > xmlns:esql="http://apache.org/cocoon/SQL/v2";
> > > xmlns:xsp="http://apache.org/xsp";>
> > >             <rahmen>
> > >                 <laschen oberrubrik="service" unterrubrik="recht">
> > >                 </laschen>
> > >                 <inhalt>
> > >                     <artikel id="1" stylesheet="toArticle.xsl">
> > > <<<----------------- here is the file name
> > >                                  ....
> > >                                               </artikel>
> > >                 </inhalt>
> > >
> > >                 <rechts/>
> > >
> > >                 <footer/>
> > >             </rahmen>
> > >     </seite>
> > >
> > > ----------------------------------------
> > > Can I bring cocoon to add a transformer to the sitemap pipeline with
> > > excately that generated filename as src?
> > > Or can I do it with xsl:include without cocoon?
> > >
> > > R.S.
> >
> >
> > ---------------------------------------------------------------------
> > 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:     <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   <[EMAIL PROTECTED]>
> >
> 
> 
> ---------------------------------------------------------------------
> 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:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 

---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to