[Mozile] XHTML withing non-XHTML elements
James A. Overton
james at overton.ca
Fri Oct 20 06:59:14 PDT 2006
Hi Reto,
This will work, in Firefox at least, with a couple of caveats. Just
add a bit of code like this to the RNG file you're using (e.g.
xhtml.rng):
<define name="myelem">
<element name="myelem">
<ref name="Common.attrib"/>
<ref name="Flow.model"/>
</element>
</define>
So you're just copying the RNG for "div" and changing the name. Two
limitations due to the current implementation of mozile.edit.lookupRNG
():
1. No namespace support. Lookups currently ignore the namespace.
2. Name comparison is done lowercase in X/HTML, so your element name
should be lowercase. This is in part because HTML tag names are
automatically uppercased by browsers, and also because IE doesn't
distinguish XHTML from HTML.
Solving these problems properly will be a bit tricky, which is why
they aren't solved already. But hopefully Mozile will do what you
need for your current purposes.
James
On 2006-Oct-20, at 8:57 AM, Reto Bachmann-Gmür wrote:
> How do I tell mozile that the editable element "myns:MyElem"
> support the
> same child-elements as an xhtml:div element?
>
> thanks!
>
> reto
>
> _______________________________________________
> Mozile mailing list
> Mozile at mozdev.org
> http://mozdev.org/mailman/listinfo/mozile
More information about the Mozile
mailing list