[Mozile] XHTML withing non-XHTML elements
Reto Bachmann-Gmür
reto at gmuer.ch
Mon Oct 23 05:22:13 PDT 2006
Success!
The changes I had to do:
- in mozile.dom.isHTML replaced "if(name.toLowerCase() == "html") return
true;" with "if(name == "HTML") return true;" so that it returns false
for proper XHTML, not sure if this is a cross browser solution, may
check for namespace (return true if it has no namespace and
name.toLowerCase() == "html").
- In the rng I has to use <ref name="Inline.model"/> instead of <ref
name="Flow.model"/> for my element.
Could the first change be integrated into mozile?
cheers,
reto
James A. Overton wrote:
> The relevant methods are these:
>
> mozile.rng.Schema.prototype._indexNode -- stores arrays of RNG nodes
> (as they are parsed from the RNG file) into a _types object by their
> type, and a _names object by type and name
>
> mozile.event.handle -- calls lookupRNG on the current DOM node
>
> mozile.edit.lookupRNG -- gets the node's name, calls getNodes to get
> an array of matching RNG nodes, and returns the first element of the
> array. (Will eventually be smarter.)
>
> mozile.rng.Schema.prototype.getNodes -- takes the node type and name
> and returns the array from _types or _names
>
> So you need to make sure that the node name stored by _indexNode() is
> the same one given to getNodes(). If we were just dealing with XML,
> then there would be no lowercasing at all. But because we want to
> deal with HTML, where the browser automatically uppercases tag names,
> sometimes lookupRNG() will lowercase the node name before calling
> getNodes().
>
> So make sure the node names used in _indexNode() and the getNodes()
> call in lookupRNG() match.
>
> James
>
>
> On 2006-Oct-22, at 2:41 PM, Reto Bachmann-Gmür wrote:
>
>
>> rng.js never gets loaded, but I found the function in mozile.js and
>> changed it there, however I'm not sure if this is the right place. My
>> XHTML/XML document contains the element with the upper-case letter
>> and I
>> think this method id lowercasing the element from the rng, where is
>> the
>> lowercasing of the elment-names of the dom?
>>
>> reto
>>
>
> _______________________________________________
> Mozile mailing list
> Mozile at mozdev.org
> http://mozdev.org/mailman/listinfo/mozile
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://mozdev.org/pipermail/mozile/attachments/20061023/8e1aa2c8/attachment.bin
More information about the Mozile
mailing list