[patch] working out namespaces/css issues (was xml+css borken in head)
Germain Garand
germain at ebooksfrance.org
Fri Oct 24 02:29:20 BST 2003
Hello,
Some times ago, I said I'd work on those issues.
Here is broadly what the attached patch does:
- bring back the NodeImpl_NSMask bits in id() for Attributes and XMLElements
=> the cssselector need that to support CSS namespaces in an efficient way.
=> fixes CSS selection for XML documents
- change Nodeimpl::Id registration mechanism:
Peter Kelly tried to solve the DOM1/DOM2 NS methods compatibility problems
by registering the qualifiedName. However, this is doomed to fail in other
places that relies on Ids because prefixes aren't encoded in the Ids and
are irrelevant for NS nodes identification.
Instead, I used registered aliases (see DocumentImpl::getId) to solve
compatibility issues while maintaining a sound Id system.
- support some more exceptions in dom/ (createElement(NS),
createAttribute(NS), create DocumentFragment ...)
- factor qualifiedName exception checking code.
- fix a bug in the xml tokenizer (startElement must use the qualifiedName, not
the localName, otherwise we don't get the prefix)
- avoid scanning the qualifiedName 3 times
All in all, this is much closer to the system of the 3_1_BRANCH.
I ensured there were no regressions in the dom/namespaces tests.
4 tests out of 185 are failing but that's intentional: those are not
consistent with the other tests and look like a misinterpretation of the spec
for a corner case.
Namely: when a non-html attribute is set via setAttributeNS in an html
document, there is no reason why the nodeName should be uppercased (just
compare with createElementNS in the same set of tests, which preserves the
case).
Do you think it's OK?
Germain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: namespaces.tar.bz2
Type: application/x-tbz
Size: 15090 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20031024/664466cd/attachment.bin>
More information about the kfm-devel
mailing list