Thanks for answer but the generator is a simple xml file not a xsp. It
couldn't be a xsp. The xsp or whatever has to transform the xml file to
another (depending on the session). This generated file has to be
transformed to html vai xslt.


-----Ursprüngliche Nachricht-----
Von: Sven Kuenzler [mailto:[EMAIL PROTECTED]]
Gesendet: Sonntag, 10. Juni 2001 12:33
An: [EMAIL PROTECTED]
Betreff: Re: Adding dynamically element


> I want to add an element dynamically to a xml document (depending of a
> attribute in the session object).
> With C1 it works with XML->XSP->XSLT.
> I tried the same in C2:
>
> <map:match pattern="**.xml">
> <map:generate src="{1}.xml"/>
> <map:transform src="ses/ses_xsp.xsl"/>
> <map:transform src="xsl/page.xsl"/>
> <map:serialize/>
> </map:match>

> But in the output the <xsp:logic> part is printed out so that I thing it
> isn't parsed. So I tried to set the type of the second transformation to
> 'xsp' and 'serverpages' without success.

Despite being implemented using XSLT, XSP is not really a transformation,
but a generation step from C2's point of view. If you look at the
<map:transformers/> element in your sitemap you'll note that there is no
such thing as an XSPTransformer

assuming that "{1}.xml" contains the <xsp:logic/> which adds the element,
tell C2 to use the XSP generator instead of the default FileGenerator:

<map:generate src="{1}.xml" type="serverpages"/>

If ses_xsp.xsl needs to be applied before, it should be registered as
Logicsheet (or taglib or whatever the official terminology is). Please have
a look at cocoon.xconf to learn how to do that.

    HTH, Sven.....


---------------------------------------------------------------------
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: <[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/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to