cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bishop <>
Subject Re: XSP: How to create elements dynamically
Date Tue, 07 Feb 2006 08:13:43 GMT

I struggled with this one myself, I ended up having to use fixed  
element names, but being able to assign attributes dynamically using  
the following code.

<xsp:element name="table">
	<xsp:attribute name="name"><esql:get-string column="relname"/></ 
		<xsp:element name="column">
			<xsp:attribute name="index"><esql:get-string column="attnum"/></ 

My original aim was to query PostgreSQL to create an XML document  
describing the database schema of the database which would describe  
the relationships of the database for me to allow me to create forms  
more dynamically. The structure I ended up using which is created  
from the above is..

<table name="author>
	<column name="index">1</column>

This gets the information out and then of course if you needed it as


You could throw in a custom XSL transformation in the pipeline to  
achieve it.

Don't know if this helps,


On 6 Feb 2006, at 19:39, Ajit Bhave wrote:

> Hi,
> I am trying to creating elements dynamically in an XSP page. The
> XSP documentation has an example using  xspParentNode. xspCurrentNode
> variables. But, when I use them in XSP page, I get
> unresolved symbols error. What is the recommended method for
> doing this in Cocoon 2.1?
> My environment is Cocoon 2.1 + JDK 1.5 + Redhat 7.2.
> Any help will be appreciated.
> Regards,
> Ajit.
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message