You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by MORĂVEK Peter <mo...@pobox.sk> on 2000/03/01 18:33:51 UTC
xsp:element
Hello,
is there a way to dynamically generate an element with dynamic name and
dynamic value ?
something better than this:
xspParentNode = xspCurrentNode;
xspNodeStack.push(xspParentNode);
xspCurrentNode = document.createElement("<xsl:value-of
select="@name"/>");
xspParentNode.appendChild(xspCurrentNode);
xspCurrentNode.appendChild(document.createTextNode("<xsl:value-of
select="@value"/>"));
xspCurrentNode = (Node) xspNodeStack.pop();
i mean something like this:
<xsp:element>
<xsp:attribute name="name">
<xsl:value-of select="@name"/>
</xsp:attribute>
<xsl:value-of select="@value"/>
<xsp:element>
Any help ?
Peter