cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sven Kuenzler" <sv...@gmx.net>
Subject Re: Adding dynamically element
Date Sun, 10 Jun 2001 10:33:20 GMT
> 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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message