Re: Manipulating the DOM in flowscript

2004-11-29 Thread Ugo Cei
Il giorno 29/nov/04, alle 08:02, Derek Hohls ha scritto: I don't understand your reply; I was trying to insert a new node before the first, second-level node... and as I said in the post; I have tried a whole variety of DOM manipulations, none of which worked. So I was concerned that either (a)

Re: Manipulating the DOM in flowscript

2004-11-29 Thread Brent Johnson
I think what is fundamentally wrong is your comprehansion of DOM. What you're trying to do: document.insertBefore(keyNode,keyNode); makes absolutely no sense to me, and probably to DOM. What does it mean to insert a node before itself??? Yes - you'd never use the same node as

Re: Manipulating the DOM in flowscript

2004-11-29 Thread Tony Edwards
Title: Re: Manipulating the DOM in flowscript Hi guys, I wrote a simple wiki page about creating and editing xml documents using flow: http://wiki.apache.org/cocoon/FlowBasedXMLEditor I attached a little flowscript file which exposes most of the DOM api calls in flow. It might be a little

Re: Manipulating the DOM in flowscript

2004-11-29 Thread Derek Hohls
Great, thanks Tony for a positive contibution and good support! [EMAIL PROTECTED] 2004/11/29 11:57:40 PM Hi guys, I wrote a simple wiki page about creating and editing xml documents using flow: http://wiki.apache.org/cocoon/FlowBasedXMLEditor I attached a little flowscript file which exposes

Re: Manipulating the DOM in flowscript

2004-11-29 Thread Derek Hohls
Brent Thanks for the clarification on the syntax; as I did point out in the post where I stated the problem - that was just an *example* of something I had tried; not all the other attempts were in that format or with that specific DOM call or syntax but nothing I tried would work -

Re: Manipulating the DOM in flowscript

2004-11-28 Thread Derek Hohls
Ugo I don't understand your reply; I was trying to insert a new node before the first, second-level node... and as I said in the post; I have tried a whole variety of DOM manipulations, none of which worked. So I was concerned that either (a) the document could not be manipulated at all or (b)

Manipulating the DOM in flowscript

2004-11-26 Thread Derek Hohls
Simple question; I need to extract/change data coming from a Cform after it has been updated, but before it is saved to file. So, typically, it looks like this: var document = loadDocument(documentID); form.load(document); form.showForm(mypipe); form.save(document); Now a call

Re: Manipulating the DOM in flowscript

2004-11-26 Thread Jan Hoskens
try this: var root = document.getDocumentElement(); And then operate on that root eg: var node = document.createElement(myelement); root.insertBefore(node,root.getFirstChild()); root.appendChild(node); Kind Regards, Jan Derek Hohls wrote: Simple question; I need to extract/change data coming from

Re: Manipulating the DOM in flowscript

2004-11-26 Thread Ugo Cei
Il giorno 26/nov/04, alle 13:45, Derek Hohls ha scritto: is valid, but a call like: var keyNode = document.firstChild.firstChild; if (keyNode != null) { document.insertBefore(keyNode,keyNode); } gives an error for the insert operation. org.w3c.dom.DOMException: NOT_FOUND_ERR: An