diff options
Diffstat (limited to 'server/src/templateheaderparser.cc')
-rw-r--r-- | server/src/templateheaderparser.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/templateheaderparser.cc b/server/src/templateheaderparser.cc index e549035..57b0a4e 100644 --- a/server/src/templateheaderparser.cc +++ b/server/src/templateheaderparser.cc @@ -92,13 +92,17 @@ TemplateHeaderParser::~TemplateHeaderParser() if(t) delete t; } -void TemplateHeaderParser::startTag(std::string name, std::map< std::string, std::string> attributes) +void TemplateHeaderParser::startTag(std::string name, attributes_t &attr) { if(t) return; if(name == "template") { t = new Template(); - t->attributes = attributes; + + if(attr.find("name") != attr.end()) t->name = attr["name"]; + if(attr.find("title") != attr.end()) t->title = attr["title"]; + if(attr.find("version") != attr.end()) t->version = attr["version"]; + } else { throw Exception("Missing root tag 'template' - found '" + name + "'"); } |