patch to fix XML parsing problem with new exception
David Faure
faure at kde.org
Tue Feb 24 11:05:20 CET 2004
On Thursday 04 December 2003 20:47, Darin Adler wrote:
Ouch, I'm already 2.5 months late...
> I added some exception handling to help with W3C DOM tests. But I did
> it wrong. This patch fixes it so it doesn't screw up XML parsing.
> Probably very different in your tree; not sure if it's applicable.
I had done most of those changes already.
+ int exceptioncode = 0;
+ ElementImpl *e = ((DocumentImpl *)impl)->createElement(tagName, exceptioncode);
Here I chose to pass a pointer to an int, so that getId doesn't have to do the checks
if we don't care for exceptions (e.g. during parsing). Not sure if it makes a big difference though.
getId() says
if ( pExceptioncode && _type != NodeImpl::NamespaceId && !Element::khtmlValidQualifiedName(_name)) {
*pExceptioncode = DOMException::INVALID_CHARACTER_ERR;
return 0;
}
BTW the improved id/namespace stuff (and uppercase/lowercase exposure of elements/attributes)
for the attached testcase is all in KDE_3_2_BRANCH now, if you want to merge a stable branch :)
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/khtml-devel/attachments/20040224/cdddeb7b/namespaces-0001.html
More information about the Khtml-devel
mailing list