#ifndef ARABICA_XSLT_IF_HANDLER_HPP #define ARABICA_XSLT_IF_HANDLER_HPP #include "../xslt_if.hpp" #include "xslt_item_container_handler.hpp" namespace Arabica { namespace XSLT { template class IfHandler : public ItemContainerHandler > { typedef StylesheetConstant SC; typedef AttributeValidators AV; public: IfHandler(CompilationContext& context) : ItemContainerHandler >(context) { } // IfHandler virtual If* createContainer(const string_type& /* namespaceURI */, const string_type& /* localName */, const string_type& qName, const SAX::Attributes& atts) { static const AV rules = AV::rule(SC::test, true); string_type test = rules.gather(qName, atts)[SC::test]; return new If(ItemContainerHandler >::context().xpath_expression(test)); } // startElement }; // class IfHandler } // namespace XSLT } // namespace Arabica #endif