#ifndef ARABICA_XSLT_PROCESSING_INSTRUCTION_HANDLER_HPP #define ARABICA_XSLT_PROCESSING_INSTRUCTION_HANDLER_HPP #include "../xslt_processing_instruction.hpp" #include "xslt_item_container_handler.hpp" namespace Arabica { namespace XSLT { template class ProcessingInstructionHandler : public ItemContainerHandler > { typedef ItemContainerHandler > baseT; typedef StylesheetConstant SC; typedef AttributeValidators AV; public: ProcessingInstructionHandler(CompilationContext& context) : ItemContainerHandler >(context) { } // ProcessingInstructionHandler virtual ProcessingInstruction* createContainer(const string_type& /* namespaceURI */, const string_type& /* localName */, const string_type& qName, const SAX::Attributes& atts) { static const AV rules = AV::rule(SC::name, true); string_type name = rules.gather(qName, atts)[SC::name]; return new ProcessingInstruction(baseT::context().xpath_attribute_value_template(name)); } // createContainer }; // class ProcessingInstructionHandler } // namespace XSLT } // namespace Arabica #endif