KHTML: Namespace handling

David Faure faure at kde.org
Tue Jun 24 23:42:55 BST 2003


Dirk or Peter: could someone explain to me the change in CVS HEAD relating
to attribute and tag IDs, and namespacing?
I see the addition of a "local name" concept in addition to prefix, namespaceURI
(what's the difference between those 2?), and I think there's a difference in the
way IDs are used?

This means e.g. createAttribute doesn't call createAttributeNS anymore, but
directly calls a different AttrImpl constructor, etc.
This is giving me a hell of time when backporting patches between the two
branches :) - more importantly I'm not sure how to do it properly.

In the 3.1 branch I added an XMLElementImpl( id ) constructor, to be able
to validate the name in tagId() before creating an element. In the case of 
the namespaceURI + qualifiedname variant I let createElementNS do the checks 
first.
In HEAD there's no tagId() anymore... and XMLElementImpl doesn't store
an id at all, anymore. Hmm, then I could do the validation in createElement
itself. But the reason I did it in tagId was to avoid doing the slow (char-per-char)
validation on known tag names (all those already in the map). How can
I do something similar in HEAD? It doesn't seem possible.

It looks to me like the new code isn't as fast as the one in the branch...
So before I spend more time on the new code I'd like to be 100% sure it's 
going to stay... :}

-- 
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
Qtella users - stability patches at http://blackie.dk/~dfaure/qtella.html




More information about the kfm-devel mailing list