@@ -114,11 +114,11 @@ return nil; } static OF_INLINE void resolve_attribute_namespace(OFXMLAttribute *attribute, OFArray *namespaces, - Class isa) + OFXMLParser *self) { OFString *attributeNS; OFString *attributePrefix = attribute->ns; if (attributePrefix == nil) @@ -126,11 +126,11 @@ attributeNS = namespace_for_prefix(attributePrefix, namespaces); if ((attributePrefix != nil && attributeNS == nil)) @throw [OFUnboundNamespaceException - exceptionWithClass: isa + exceptionWithClass: [self class] prefix: attributePrefix]; [attribute->ns release]; attribute->ns = [attributeNS retain]; } @@ -309,11 +309,11 @@ size_t length; if ((finishedParsing || [previous count] < 1) && buffer[*i] != ' ' && buffer[*i] != '\t' && buffer[*i] != '\n' && buffer[*i] != '\r' && buffer[*i] != '<') - @throw [OFMalformedXMLException exceptionWithClass: isa + @throw [OFMalformedXMLException exceptionWithClass: [self class] parser: self]; if (buffer[*i] != '<') return; @@ -343,11 +343,11 @@ - (void)_parseTagOpenedWithBuffer: (const char*)buffer i: (size_t*)i last: (size_t*)last { if (finishedParsing && buffer[*i] != '!' && buffer[*i] != '?') - @throw [OFMalformedXMLException exceptionWithClass: isa + @throw [OFMalformedXMLException exceptionWithClass: [self class] parser: self]; switch (buffer[*i]) { case '?': *last = *i + 1; @@ -485,11 +485,11 @@ if ([pi isEqual: @"xml"] || [pi hasPrefix: @"xml "] || [pi hasPrefix: @"xml\t"] || [pi hasPrefix: @"xml\r"] || [pi hasPrefix: @"xml\n"]) if (![self _parseXMLProcessingInstructions: pi]) @throw [OFMalformedXMLException - exceptionWithClass: isa + exceptionWithClass: [self class] parser: self]; [delegate parser: self foundProcessingInstructions: pi]; @@ -545,11 +545,11 @@ ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) @throw [OFUnboundNamespaceException - exceptionWithClass: isa + exceptionWithClass: [self class] prefix: prefix]; pool2 = [[OFAutoreleasePool alloc] init]; [delegate parser: self @@ -629,21 +629,22 @@ name = [cacheString copy]; prefix = nil; } if (![[previous lastObject] isEqual: cacheString]) - @throw [OFMalformedXMLException exceptionWithClass: isa + @throw [OFMalformedXMLException exceptionWithClass: [self class] parser: self]; [previous removeLastObject]; [cache removeAllItems]; ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) - @throw [OFUnboundNamespaceException exceptionWithClass: isa - prefix: prefix]; + @throw [OFUnboundNamespaceException + exceptionWithClass: [self class] + prefix: prefix]; [delegate parser: self didEndElement: name withPrefix: prefix namespace: ns]; @@ -689,16 +690,17 @@ attributesCount = [attributes count]; ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) - @throw [OFUnboundNamespaceException exceptionWithClass: isa - prefix: prefix]; + @throw [OFUnboundNamespaceException + exceptionWithClass: [self class] + prefix: prefix]; for (j = 0; j < attributesCount; j++) resolve_attribute_namespace(attributesObjects[j], namespaces, - isa); + self); pool = [[OFAutoreleasePool alloc] init]; [delegate parser: self didStartElement: name @@ -793,11 +795,11 @@ if (buffer[*i] == ' ' || buffer[*i] == '\t' || buffer[*i] == '\n' || buffer[*i] == '\r') return; if (buffer[*i] != '\'' && buffer[*i] != '"') - @throw [OFMalformedXMLException exceptionWithClass: isa + @throw [OFMalformedXMLException exceptionWithClass: [self class] parser: self]; delimiter = buffer[*i]; state = OF_XMLPARSER_IN_ATTR_VALUE; } @@ -850,11 +852,11 @@ { if (buffer[*i] == '>') { *last = *i + 1; state = OF_XMLPARSER_OUTSIDE_TAG; } else - @throw [OFMalformedXMLException exceptionWithClass: isa + @throw [OFMalformedXMLException exceptionWithClass: [self class] parser: self]; } /* Expecting closing '>' or space */ - (void)_parseExpectSpaceOrCloseWithBuffer: (const char*)buffer @@ -864,21 +866,21 @@ if (buffer[*i] == '>') { *last = *i + 1; state = OF_XMLPARSER_OUTSIDE_TAG; } else if (buffer[*i] != ' ' && buffer[*i] != '\t' && buffer[*i] != '\n' && buffer[*i] != '\r') - @throw [OFMalformedXMLException exceptionWithClass: isa + @throw [OFMalformedXMLException exceptionWithClass: [self class] parser: self]; } /* In ') - @throw [OFMalformedXMLException exceptionWithClass: isa + @throw [OFMalformedXMLException exceptionWithClass: [self class] parser: self]; pool = [[OFAutoreleasePool alloc] init]; cache_append(cache, buffer + *last, encoding, *i - *last); @@ -1014,11 +1016,11 @@ last: (size_t*)last { if ((level < 6 && buffer[*i] != "OCTYPE"[level]) || (level == 6 && buffer[*i] != ' ' && buffer[*i] != '\t' && buffer[*i] != '\n' && buffer[*i] != '\r')) - @throw [OFMalformedXMLException exceptionWithClass: isa + @throw [OFMalformedXMLException exceptionWithClass: [self class] parser: self]; if (level < 7 || buffer[*i] == '<') level++;