arabica/include/XSLT/impl/handler/xslt_comment_handler.hpp

41 lines
1.2 KiB
C++
Raw Normal View History

2007-07-19 19:01:42 +02:00
#ifndef ARABICA_XSLT_COMMENT_HANDLER_HPP
#define ARABICA_XSLT_COMMENT_HANDLER_HPP
#include "../xslt_comment.hpp"
#include "xslt_item_container_handler.hpp"
namespace Arabica
{
namespace XSLT
{
2012-11-04 23:34:40 +01:00
template<class stringT, class adaptorT>
class CommentHandler : public ItemContainerHandler<Comment<stringT, adaptorT> >
2007-07-19 19:01:42 +02:00
{
public:
2012-11-04 23:34:40 +01:00
typedef stringT string_type;
typedef adaptorT string_adaptor;
2012-11-02 23:37:46 +01:00
CommentHandler(CompilationContext<string_type, string_adaptor>& context) :
ItemContainerHandler<Comment<string_type, string_adaptor> >(context)
2007-07-19 19:01:42 +02:00
{
} // CommentHandler
2012-11-02 23:37:46 +01:00
virtual Comment<string_type, string_adaptor>* createContainer(const string_type& /* namespaceURI */,
const string_type& /* localName */,
const string_type& /* qName */,
const SAX::Attributes<string_type, string_adaptor>& atts)
2007-07-19 19:01:42 +02:00
{
if(atts.getLength() != 0)
throw SAX::SAXException("xsl:comment can not have attributes");
2012-11-02 23:37:46 +01:00
return new Comment<string_type, string_adaptor>();
2007-07-19 19:01:42 +02:00
} // createContainer
}; // class CommentHandler
} // namespace XSLT
} // namespace Arabica
#endif