#ifndef ARABICA_XSLT_CREATE_HANDLER_HPP #define ARABICA_XSLT_CREATE_HANDLER_HPP #include #include #include #include "../xslt_compilation_context.hpp" #include "../xslt_compiled_stylesheet.hpp" #include "xslt_constants.hpp" namespace Arabica { namespace XSLT { template SAX::DefaultHandler* CreateHandler(CompilationContext& context) { return new Handler(context); } // create template class NotImplementedYetHandler : public SAX::DefaultHandler { public: NotImplementedYetHandler(CompilationContext& /* context */) { } virtual void startElement(const string_type& /* namespaceURI */, const string_type& /* localName */, const string_type& qName, const SAX::Attributes& /* atts */) { throw SAX::SAXException("Haven't implemented " + qName + " yet"); } // startElement }; // NotImplementedYetHandler template struct ChildElement { typedef SAX::DefaultHandler* (*CreateHandlerPtr)(CompilationContext&); const char* const name; CreateHandlerPtr createHandler; }; // struct ChildElement } // namespace XSLT } // namespace Arabica #endif // ARABICA_XSLT_CONSTANTS_HPP