You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Huber, Daniel" <Da...@TechniDATA.DE> on 2004/09/21 10:12:49 UTC

XSP, name of root element

Hi,

is it right that in XSP I have no chance to specify the name of the root
element to be generated dynamically?
I try to implement a quite generic XSP which should get the name of the
root element via sitemap parameters.

It's no problem to do this for any element which is a child of the root
element, but it seems -- at least for me at the moment --  that this is
not possible for the root element itself.

When looking into the java class generated from the XSP it seems that
the following snippet won't produce any output (besides the XML header):

<xsp:page language="javascript" xmlns:xsp="http://apache.org/xsp">
   <xsp:element>
      <xsp:param
name="name"><xsp:expr>this.parameters.getParameter("element",
"root")</xsp:expr></xsp:param>
      .
      .
      .
   </xsp:element>
</xsp:page>


It _will_ work if I enclose <xsp:element> with a "hard coded" root
element...




Regards,

Daniel

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


Re: XSP, name of root element

Posted by Sylvain Wallez <sy...@apache.org>.
Huber, Daniel wrote:

>Hi,
>
>is it right that in XSP I have no chance to specify the name of the root
>element to be generated dynamically?
>  
>

Yes, that's right: the root element of an XSP *has* to be static.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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