changing
line 2493: if (index >= nodes.length ) {
to
line 2493: if (index >= nodes.length && nodes.length != 0) {
in xsltforms.js
fixes the issue for me
On Mon, Mar 1, 2010 at 11:34 AM, Christian Meisenbichler <
chr...@mu...> wrote:
> Hi all
> I do have a strange problem that might be a bug. I can now insert
> attributes and I can also insert elements into elements that contain already
> one sibling of the same name. If i try however to insert an element into an
> empty element I do get
>
> "Uncaught TypeError: Cannot read property 'nextSibling' of undefined
> xsltforms.js:2494<http://localhost:8080/exist/rest/www/xforms/xsltforms/xsltforms.js>
> "
>
> When I add an element to the instance and try again a second element is
> added just fine.
>
> my insert element looks as following:
>
> <xf:trigger>
> <xf:label>Add: spin</xf:label>
> <xf:action ev:event="DOMActivate">
> <xf:insert context="/input/groundstate"
> origin="instance('elemprototype')/spin" nodeset="spin"/>
> </xf:action>
> </xf:trigger>
>
> I am using xsltforms svn 357
>
> Yours grateful
> Christian
>
|