You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christof Nef <ne...@abanet.ch> on 2001/01/15 18:23:18 UTC

Dynamically add XML statements to an XML file?

Is there a way to dynamically add XML statements to an XML file that is
processed by Cocoon?

I have an XML resp XSP file that is processed by Cocoon and I want to add
some additional XML statements depending on who views the page.
I call a Java object that returns the XML statements as plain text. I use
<xsp:expr> to inject these XML statements into the XML file. But it seems
that the XSL processor has already processed the XSP stuff and my additional
XML statements are never actually recognized as XML.

Any ideas how to solve this problem? Thanks a lot.

_________________________________________
Christof Nef, mailto:nef@abanet.ch
ABACUS Research AG, 9006 St.Gallen, Switzerland
"No Day But Today" - Rent


Re: Dynamically add XML statements to an XML file?

Posted by Srinivas Konchada <ks...@mpower.com>.
Do not use <xsp:expr> to inject XML fragments, instead use <xsp:element>
construct to added new
elements and <xsp:attribute> at add attributes. This way dynamically added
XML elements will be processed properly.
Take a look at the XSP working draft at
http://xml.apache.org/cocoon/wd-xsp.html It has an example on how to use it.

Srinivas
----- Original Message -----
From: "Christof Nef" <ne...@abanet.ch>
To: <co...@xml.apache.org>
Sent: Monday, January 15, 2001 9:23 AM
Subject: Dynamically add XML statements to an XML file?


> Is there a way to dynamically add XML statements to an XML file that is
> processed by Cocoon?
>
> I have an XML resp XSP file that is processed by Cocoon and I want to add
> some additional XML statements depending on who views the page.
> I call a Java object that returns the XML statements as plain text. I use
> <xsp:expr> to inject these XML statements into the XML file. But it seems
> that the XSL processor has already processed the XSP stuff and my
additional
> XML statements are never actually recognized as XML.
>
> Any ideas how to solve this problem? Thanks a lot.
>
> _________________________________________
> Christof Nef, mailto:nef@abanet.ch
> ABACUS Research AG, 9006 St.Gallen, Switzerland
> "No Day But Today" - Rent
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>