diff --git a/include/XSLT/impl/xslt_stylesheet_compiler.hpp b/include/XSLT/impl/xslt_stylesheet_compiler.hpp index bacb78f7..edab806c 100644 --- a/include/XSLT/impl/xslt_stylesheet_compiler.hpp +++ b/include/XSLT/impl/xslt_stylesheet_compiler.hpp @@ -94,11 +94,11 @@ private: if(localName != SC::stylesheet && localName != SC::transform) throw SAX::SAXException("Top-level element must be 'stylesheet' or 'transform'."); - static const ValueRule rules[] = { { SC::version, true, 0, 0 }, - { SC::extension_element_prefixes, false, 0, 0 }, - { SC::exclude_result_prefixes, false, 0, 0 }, - { SC::id, false, 0, 0 }, - { 0, false, 0, 0 } }; + static const ValueRule rules[] = { { SC::version, true }, + { SC::extension_element_prefixes, false }, + { SC::exclude_result_prefixes, false }, + { SC::id, false }, + { string_adaptor::empty_string(), false } }; std::map attributes = gatherAttributes(qName, atts, rules); if(attributes[SC::version] != SC::Version) throw SAX::SAXException("I'm only a poor version 1.0 XSLT Transformer."); @@ -150,7 +150,9 @@ private: return; } // if ... - for(const ChildElement* c = allowedChildren; c->name != string_adaptor::empty_string(); ++c) + for(const ChildElement* c = allowedChildren; + c->name != string_adaptor::empty_string(); + ++c) if(c->name == localName) { context_.push(0, @@ -202,19 +204,19 @@ private: template const ChildElement StylesheetHandler::allowedChildren[] = { + { SC::template_, CreateHandler > }, + { SC::param, CreateHandler > >}, + { SC::variable, CreateHandler > > }, + { SC::output, CreateHandler >}, { SC::attribute_set, CreateHandler >}, { SC::decimal_format, CreateHandler >}, //"import" //"include" { SC::key, CreateHandler >}, { SC::namespace_alias, CreateHandler >}, - { SC::output, CreateHandler >}, - { SC::param, CreateHandler > >}, { SC::preserve_space, CreateHandler >}, { SC::strip_space, CreateHandler >}, - { SC::template_, CreateHandler > }, - { SC::variable, CreateHandler > > }, - { 0, 0 } + { string_adaptor::empty_string(), 0 } }; // StylesheetHandler::allowedChildren template >