notimplementedyethandler

This commit is contained in:
Jez Higgins 2012-11-04 08:41:53 +00:00
parent a792502472
commit 895bd0baf3
3 changed files with 13 additions and 12 deletions

View file

@ -20,15 +20,16 @@ SAX::DefaultHandler<std::string>* CreateHandler(CompilationContext<std::string,
return new Handler(context);
} // create
class NotImplementedYetHandler : public SAX::DefaultHandler<std::string>
template<class string_type, class string_adaptor>
class NotImplementedYetHandler : public SAX::DefaultHandler<string_type, string_adaptor>
{
public:
NotImplementedYetHandler(CompilationContext<std::string, Arabica::default_string_adaptor<std::string> >& /* context */) { }
NotImplementedYetHandler(CompilationContext<string_type, string_adaptor>& /* context */) { }
virtual void startElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& qName,
const SAX::Attributes<std::string>& /* atts */)
virtual void startElement(const string_type& /* namespaceURI */,
const string_type& /* localName */,
const string_type& qName,
const SAX::Attributes<string_type, string_adaptor>& /* atts */)
{
throw SAX::SAXException("Haven't implemented " + qName + " yet");
} // startElement

View file

@ -147,11 +147,11 @@ const ChildElement* AllowedChildren()
{ "copy", CreateHandler<CopyHandler> },
{ "copy-of", CreateHandler<CopyOfHandler> },
{ "element", CreateHandler<ElementHandler<std::string, Arabica::default_string_adaptor<std::string> > > },
{ "fallback", CreateHandler<NotImplementedYetHandler>},
{ "fallback", CreateHandler<NotImplementedYetHandler<std::string, Arabica::default_string_adaptor<std::string> > >},
{ "for-each", CreateHandler<ForEachHandler<std::string, Arabica::default_string_adaptor<std::string> > > },
{ "if", CreateHandler<IfHandler<std::string, Arabica::default_string_adaptor<std::string> > > },
{ "message", CreateHandler<MessageHandler>},
{ "number", CreateHandler<NotImplementedYetHandler>},
{ "number", CreateHandler<NotImplementedYetHandler<std::string, Arabica::default_string_adaptor<std::string> > >},
{ "processing-instruction", CreateHandler<ProcessingInstructionHandler> },
{ "text", CreateHandler<TextHandler<std::string, Arabica::default_string_adaptor<std::string> > > },
{ "value-of", CreateHandler<ValueOfHandler<std::string, Arabica::default_string_adaptor<std::string> > > },

View file

@ -196,16 +196,16 @@ private:
template<class string_type, class string_adaptor>
const ChildElement StylesheetHandler<string_type, string_adaptor>::allowedChildren[] =
{
{ "attribute-set", CreateHandler<NotImplementedYetHandler>},
{ "decimal-format", CreateHandler<NotImplementedYetHandler>},
{ "attribute-set", CreateHandler<NotImplementedYetHandler<std::string, Arabica::default_string_adaptor<std::string> > >},
{ "decimal-format", CreateHandler<NotImplementedYetHandler<std::string, Arabica::default_string_adaptor<std::string> > >},
//"import"
//"include"
{ "key", CreateHandler<KeyHandler>},
{ "namespace-alias", CreateHandler<NamespaceAliasHandler>},
{ "output", CreateHandler<OutputHandler>},
{ "param", CreateHandler<TopLevelVariableHandler<Param> >},
{ "preserve-space", CreateHandler<NotImplementedYetHandler>},
{ "strip-space", CreateHandler<NotImplementedYetHandler>},
{ "preserve-space", CreateHandler<NotImplementedYetHandler<std::string, Arabica::default_string_adaptor<std::string> > >},
{ "strip-space", CreateHandler<NotImplementedYetHandler<std::string, Arabica::default_string_adaptor<std::string> > >},
{ "template", CreateHandler<TemplateHandler> },
{ "variable", CreateHandler<TopLevelVariableHandler<Variable> > },
{ 0, 0 }