cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <>
Subject Re: Manipulating the DOM in flowscript
Date Tue, 30 Nov 2004 06:08:09 GMT
Great, thanks Tony for a positive contibution and good

>>> 2004/11/29 11:57:40 PM >>>
Hi guys,
I wrote a simple wiki page about creating and editing xml documents 
using flow: 

I attached a little flowscript file which exposes most of the DOM api 
calls in flow. It might be a little vague as it was written for an 
application with a specific purpose and is in no way generic enough but

it will give you some clues about manipulating DOM objects in flow.


Brent Johnson wrote:

> > I think what is fundamentally wrong is your comprehansion of DOM.
> > you're trying to do:
> >
> >  >      document.insertBefore(keyNode,keyNode);
> >
> > makes absolutely no sense to me, and probably to DOM. What does it
> > "to insert a node before itself"???
> Yes - you'd never use the same node as arguments to insertBefore. 
> I understand the API you would use insertBefore like this:
> <person>
> <name>Brent Johnson</name>
> <occupation>Web Developer</occupation>
> </person>
> if "newChild" is a reference to a node with child nodes like
> "<id>4</id>" and refChild is a reference to the "<name>" node then
> call to:
> document.insertBefore(newChild, refChild);
> Would have a result of something like:
> <person>
> <id>4</id>
> <name>Brent Johnson</name>
> <occupation>Web Developer</occupation>
> </person>
> I've never used it.. but that seems to be what the DOM API says.  Per

> the API:
> "Inserts the node newChild before the existing child node refChild.
> refChild is null, insert newChild at the end of the list of
> "
> Hope that helps... and I agree that this isnt a Cocoon problem and
> should probably read the DOM Java API a little closer before posting
> Java Exception to this mailing list.  Just my 2 cents.
> - Brent
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 

This email is from Civica Pty Limited and it, together with any
is confidential to the intended recipient(s) and the contents may be
privileged or contain proprietary and private information. It is
solely for the person to whom it is addressed. If you are not an
recipient, you may not review, copy or distribute this email. If
received in
error, please notify the sender and delete the message from your
Any views or opinions expressed in this email and any files transmitted
it are those of the author only and may not necessarily reflect the
views of
Civica and do not create any legally binding rights or obligations
whatsoever. Unless otherwise pre-agreed by exchange of hard copy
signed by duly authorised representatives, contracts may not be
concluded on
behalf of Civica by email. 
Please note that neither Civica nor the sender accepts any
for any viruses and it is your responsibility to scan the email and
attachments (if any). All email received and sent by Civica may be
to protect the business interests of Civica. 

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message