Hi,

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:attribute>
                <xsp:element name="column">
<xsp:attribute name="index"><esql:get-string column="attnum"/></ xsp:attribute>
                        ...
                </xsp:element>
        </xsp:attribute>
</xsp:element>

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>
       ...
</table>

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

<author>
        <index>1</index>
</author>

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

Don't know if this helps,

David.



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
http://mail.yahoo.com

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



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