[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-users
Subject:    AW: Dynamically add transformer to sitemap
From:       "Andres, Judith" <Judith.Andres () rauser-ag ! com>
Date:       2002-10-31 15:36:37
[Download RAW message or body]

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:robert.soesemann@gmx.de]
> Gesendet am:	Donnerstag, 31. Oktober 2002 16:12
> An:	cocoon-users@xml.apache.org
> 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" <joerg.heinicke@gmx.de>
> To: <cocoon-users@xml.apache.org>
> 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:     <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/faq/index.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/faq/index.html>

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic