[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kdom/core
From:       Rob Buis <rwlbuis () xs4all ! nl>
Date:       2005-11-18 9:55:20
Message-ID: 1132307720.161693.4009.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 481234 by buis:

More fixes for the dom1 tests, now 22 FAILs left.


 M  +6 -5      DocumentImpl.cpp  
 M  +5 -3      NamedAttrMapImpl.cpp  


--- trunk/kdenonbeta/kdom/core/DocumentImpl.cpp #481233:481234
@@ -235,7 +235,7 @@
     int dummy;
     Helper::CheckQualifiedName(_qualifiedName.impl(), _namespaceURI.impl(), dummy, \
false, false);  
-    DOMString qualifiedName = _namespaceURI.domString();
+    DOMString qualifiedName = _qualifiedName.domString();
     DOMString localName = qualifiedName;
     DOMString prefix;
     int colonpos;
@@ -245,13 +245,14 @@
         prefix.truncate(colonpos);
         localName.remove(0, colonpos+1);
     }
-#if 0
-    if (!isValidName(localName)) {
-        exception = DOMException::INVALID_CHARACTER_ERR;
+
+    //if (!isValidName(localName)) {
+    if (!Helper::ValidateAttributeName(localName.impl())) {
+        //exception = DOMException::INVALID_CHARACTER_ERR;
         throw new DOMExceptionImpl(INVALID_CHARACTER_ERR);
         return 0;
     }
-#endif
+
     // FIXME: Assume this is a mapped attribute, since createAttribute isn't \
namespace-aware.  There's no harm to XML  // documents if we're wrong.
 
--- trunk/kdenonbeta/kdom/core/NamedAttrMapImpl.cpp #481233:481234
@@ -294,16 +294,18 @@
         element->updateId(old ? old->value() : nullAtom, a->value());
 
     // ### slightly inefficient - resizes attribute array twice.
-    KXMLCore::SharedPtr<NodeImpl> r;
+    NodeImpl *r = 0;
     if (old) {
         if (!old->attrImpl())
             old->allocateImpl(element);
-        r.reset(old->m_impl);
+        //r.reset(old->m_impl);
+		r = old->m_impl;
+		if(r) r->ref();
         removeAttribute(a->name());
     }
 
     addAttribute(a);
-    return r.get();
+    return r;
 }
 
 void NamedAttrMapImpl::addAttribute(AttributeImpl *attr)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic