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) the document could not be manipulated at all or (b) there was something more fundamentally wrong.
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"???
In a reply to one of your mails in the "Using htmlArea 'output' with SVG" thread I showed how you can use the "importNode" call to import a fragment of a document into another document. If that is what you're trying to accompish, it might help you.
I appreciate that this is not a "Cocoon" problem per se (if one wants to be pedantically accurate) - nonetheless the Cocoon developers have chosen to allow use of Javascript in the flow controller, so it not unreasonable to ask and/or answer the odd question related to its use... just as we try to deal with simpler, XSL-related questions before referring folk (esp. newbies) to the XSL mailing list.
This is not a Javascript problem either. This is a DOM API problem. If you expect help on any java API that can be called by flowscript, be prepared to be disillusioned.
Ugo
-- Ugo Cei - http://beblogging.com/
smime.p7s
Description: S/MIME cryptographic signature
