You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Christophe Jolif <cj...@ilog.fr> on 2001/04/19 16:29:24 UTC

Batik DOM and Node.insertBefore()

Batik DOM doesn't allow the following call on a node without children:

myNode.insertBefore(newNode, null);

However the DOM 2 spec says that an insertBefore with a null as second
parameter should be considered as an appendChild(). So it should work?

Is it possible to modify this to let it works? (this will avoid to do a
particular case when the children list is empty to do something like:
myNode.insertBefore(newNode, myNode.getFirstChild()).

Thanks!
-- 
Christophe

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


Re: Batik DOM and Node.insertBefore()

Posted by Stephane Hillion <St...@sophia.inria.fr>.
On Thursday 19 April 2001 16:29, Christophe Jolif wrote:
> Batik DOM doesn't allow the following call on a node without children:
>
> myNode.insertBefore(newNode, null);
>
> However the DOM 2 spec says that an insertBefore with a null as second
> parameter should be considered as an appendChild(). So it should work?
>
> Is it possible to modify this to let it works? (this will avoid to do a
> particular case when the children list is empty to do something like:
> myNode.insertBefore(newNode, myNode.getFirstChild()).
>

I commited a fix for this bug.
Thanks.
--
  Stephane.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org