cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: Simple question: Building XML elements in XSP code two ways or only one way?
Date Mon, 30 Apr 2001 12:51:24 GMT
On Mon, 30 Apr 2001, Oskar Werewka wrote:

> So the question is: Do I have to build elements using
> code like that:
>
>      xspParentNode = xspCurrentNode;
>      xspNodeStack.push(xspParentNode);
>      xspCurrentNode =
>        document.createElement("label");
>      xspParentNode.appendChild(xspCurrentNode);
>
>      ((Element) xspCurrentNode).setAttribute(
>        "id",
>        "200"
>      );
>      xspCurrentNode.appendChild(
>        document.createTextNode("My label value")
>      );

just a quick heads up - if you're creating xml directly in your xsp page,
you shouldn't mess with the xsp internal variables directly, you should
just create a literal result element:

<label id="200">My label value</label>

- donald


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message