summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swiften/Parser/ExpatParser.cpp2
-rw-r--r--Swiften/Parser/LibXMLParser.cpp2
-rw-r--r--Swiften/Parser/UnitTest/XMLParserTest.cpp2
-rw-r--r--Swiften/Parser/XMLParserClient.cpp2
-rw-r--r--Swiften/Parser/XMLParserClient.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Parser/ExpatParser.cpp b/Swiften/Parser/ExpatParser.cpp
index 6c3845a..32d4f53 100644
--- a/Swiften/Parser/ExpatParser.cpp
+++ b/Swiften/Parser/ExpatParser.cpp
@@ -61,19 +61,19 @@ static void handleStartElement(void* parser, const XML_Char* name, const XML_Cha
AttributeMap attributeValues;
const XML_Char** currentAttribute = attributes;
while (*currentAttribute) {
auto attribInfo = splitExpatInfo(*currentAttribute, NAMESPACE_SEPARATOR);
attributeValues.addAttribute(attribInfo.name, attribInfo.uri, attribInfo.prefix, std::string(*(currentAttribute+1)));
currentAttribute += 2;
}
auto* client = static_cast<XMLParser*>(parser)->getClient();
- client->handleStartElementPrefix(elemInfo.prefix, elemInfo.uri, elemInfo.name, elemInfo.name, elemInfo.uri, attributeValues);
+ client->handleStartElementPrefix(elemInfo.prefix, elemInfo.uri, elemInfo.name, attributeValues);
client->handleStartElement(elemInfo.name, elemInfo.uri, attributeValues);
}
static void handleEndElement(void* parser, const XML_Char* name) {
auto elemInfo = splitExpatInfo(name, NAMESPACE_SEPARATOR);
static_cast<XMLParser*>(parser)->getClient()->handleEndElement(elemInfo.name, elemInfo.uri);
}
static void handleCharacterData(void* parser, const XML_Char* data, int len) {
diff --git a/Swiften/Parser/LibXMLParser.cpp b/Swiften/Parser/LibXMLParser.cpp
index 71515a7..b8d941c 100644
--- a/Swiften/Parser/LibXMLParser.cpp
+++ b/Swiften/Parser/LibXMLParser.cpp
@@ -51,19 +51,19 @@ static void handleStartElement(void* parser, const xmlChar* name, const xmlChar*
auto* client = static_cast<XMLParser*>(parser)->getClient();
for (auto i = 0; i < nbNamespaces * 2; i += 2) {
const auto prefix = asString(namespaces[i]);
const auto uri = asString(namespaces[i + 1]);
client->handleNamespaceDeclaration(prefix, uri);
}
auto nameStr = asString(name);
auto xmlsnsStr = asString(xmlns);
auto prefixStr = asString(prefix);
- client->handleStartElementPrefix(prefixStr, xmlsnsStr, nameStr, nameStr, xmlsnsStr, attributeValues);
+ client->handleStartElementPrefix(prefixStr, xmlsnsStr, nameStr, attributeValues);
client->handleStartElement(nameStr, xmlsnsStr, attributeValues);
}
static void handleEndElement(void *parser, const xmlChar* name, const xmlChar*, const xmlChar* xmlns) {
static_cast<XMLParser*>(parser)->getClient()->handleEndElement(asString(name), asString(xmlns));
}
static void handleCharacterData(void* parser, const xmlChar* data, int len) {
assert(len >= 0);
diff --git a/Swiften/Parser/UnitTest/XMLParserTest.cpp b/Swiften/Parser/UnitTest/XMLParserTest.cpp
index 4db694e..d38c1cc 100644
--- a/Swiften/Parser/UnitTest/XMLParserTest.cpp
+++ b/Swiften/Parser/UnitTest/XMLParserTest.cpp
@@ -443,19 +443,19 @@ class XMLParserTest : public CppUnit::TestFixture {
};
Client() {}
void handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes) override {
if (testingStartElementPrefix) return;
events.push_back(Event(StartElement, element, ns, attributes, std::move(namespaces_)));
}
- void handleStartElementPrefix(const std::string& prefix, const std::string& uri, const std::string& name, const std::string&, const std::string&, const AttributeMap&) override {
+ void handleStartElementPrefix(const std::string& prefix, const std::string& uri, const std::string& name, const AttributeMap&) override {
if (!testingStartElementPrefix) return;
events.push_back(Event(StartElementPrefix, name, uri, prefix, AttributeMap(), NamespaceMap()));
}
void handleEndElement(const std::string& element, const std::string& ns) override {
events.push_back(Event(EndElement, element, ns));
}
void handleCharacterData(const std::string& data) override {
diff --git a/Swiften/Parser/XMLParserClient.cpp b/Swiften/Parser/XMLParserClient.cpp
index 847e1f3..6698900 100644
--- a/Swiften/Parser/XMLParserClient.cpp
+++ b/Swiften/Parser/XMLParserClient.cpp
@@ -8,17 +8,17 @@
namespace Swift {
XMLParserClient::~XMLParserClient() {
}
void XMLParserClient::handleStartElement(const std::string&, const std::string&, const AttributeMap&) {
}
-void XMLParserClient::handleStartElementPrefix(const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, const AttributeMap&) {
+void XMLParserClient::handleStartElementPrefix(const std::string&, const std::string&, const std::string&, const AttributeMap&) {
}
void XMLParserClient::handleNamespaceDeclaration(const std::string&, const std::string&) {
}
}
diff --git a/Swiften/Parser/XMLParserClient.h b/Swiften/Parser/XMLParserClient.h
index f519646..2f0bc9e 100644
--- a/Swiften/Parser/XMLParserClient.h
+++ b/Swiften/Parser/XMLParserClient.h
@@ -13,19 +13,19 @@ namespace Swift {
class SWIFTEN_API XMLParserClient {
public:
virtual ~XMLParserClient();
/**
* Client will have to implement only one of the following methods depending on whether
* he is interested in processing the element prefix or not.
*/
virtual void handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes);
- virtual void handleStartElementPrefix(const std::string& prefix, const std::string& uri, const std::string& name, const std::string& element, const std::string& ns, const AttributeMap& attributes);
+ virtual void handleStartElementPrefix(const std::string& prefix, const std::string& uri, const std::string& element, const AttributeMap& attributes);
virtual void handleEndElement(const std::string& element, const std::string& ns) = 0;
virtual void handleCharacterData(const std::string& data) = 0;
/**
* Signal that a namespace prefix has been declared
* This callback might be called multiple times for a single element,
* and will trigger before the corresponding \ref handleStartElement
* is called.