summaryrefslogtreecommitdiff
path: root/src/formats/osxml
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-18 21:29:36 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-18 21:29:36 +0100
commit5dfa2b6cba3e31d18e2cc23f05d330e387fc1a29 (patch)
tree2f97711bd12bfdb35425c0ffaca5af6a231b8076 /src/formats/osxml
parentf6d3495b681e19227a5ea9ec081d36644be55d68 (diff)
parent19e3e43e80e413d297ca8970d018eeda57ee65e1 (diff)
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'src/formats/osxml')
-rw-r--r--src/formats/osxml/OsxmlEventParser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/formats/osxml/OsxmlEventParser.cpp b/src/formats/osxml/OsxmlEventParser.cpp
index 788f376..c9254b0 100644
--- a/src/formats/osxml/OsxmlEventParser.cpp
+++ b/src/formats/osxml/OsxmlEventParser.cpp
@@ -253,6 +253,12 @@ static void xmlStartElementHandler(void *ref, const XML_Char *name,
// Convert the C string to a std::string
const std::string key{*(attr++)};
+ // Ignore xml namespace declarations
+ if (Utils::startsWith(key, "xmlns:") && parser->getData().depth == 1) {
+ attr++;
+ continue;
+ }
+
// Search the location of the key
SourceLocation keyLoc;
auto it = attributeOffsets.find(key);