cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MORÁVEK Peter <mora...@pobox.sk>
Subject xsp:element
Date Wed, 01 Mar 2000 17:33:51 GMT
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

Mime
View raw message