problems with including default-namespace-tags via button by insertElement

Patrick Kollitsch <[email protected]> Mon, 11 Oct 2004 09:29:14 +0200
Newsgroups gmane.editors.bitflux.devel
Organization akademie.de GmbH
Message-ID <[email protected]>
Hi,

i send this to the developerlist because it may belong to it because if 
its a bug the solution is appended.

we wanted to include a button to insert one of our tags like the following:

<button name="Image" col="3" row="5" type="insertElement" 
ns="http://www.w3.org/1999/xhtml">img</button>

we used our own tag "bild" and no namespace (tested too with an empty 
namespace). on every buttonclick we got the error "#tag1 is not allowed 
inside of #tag2". the schema said it is allowed, we know it is allowed, 
so we debugged the hole thing a little bit and found the following:

by loading the buttons on line 149 in bxeConfig.js there are the 
following lines

if (ns) {
	tmpArray['ns'] = ns;
}

we changed this to

if (ns !== null) {
	tmpArray['ns'] = ns;
}
else {
      tmpArray['ns'] = "";
}

and it worked for us.

the reason is, that on an empty namespace the editor has to think that 
the wanted namespace is the default namespace. the way it was written 
the debugger said that the namespace of the button ist "undefined" which 
is really no namespace we have and we found no position on which this 
undefained is internally transformed into the defaultnamespace.

maybe this is a bug or a wrong understanding of the system - you know it 
better. but as far as i unterstand bxe (and i had some very intimate 
hours the last weeks) with the line 149ff. which are current in it, its 
not possible to implement own tags via "insertElement".

have a nice day.

patrick




-- 
bx-editor-dev mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev