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

Christian Stocker <[email protected]> Mon, 11 Oct 2004 09:37:37 +0200
Newsgroups gmane.editors.bitflux.devel
Message-ID <[email protected]>
Hi Patrick

On 11.10.2004 9:29 Uhr, Patrick Kollitsch wrote:
> Hi,
> 
> i send this to the developerlist because it may belong to it because if 
> its a bug the solution is appended.

Looks like a bug to me.

I applied your fix. I hope, it solves your problem.

I hope your "intimate hours" with BXE weren't too much of a pain ;)

thanks a lot for the solution

chregu


> 
> 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
> 
> 
> 
> 

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [email protected]  |  gnupg-keyid 0x5CE1DECB
-- 
bx-editor-dev mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev