diff --git a/include/XSLT/impl/handler/xslt_sort_handler.hpp b/include/XSLT/impl/handler/xslt_sort_handler.hpp index c750d201..e58840ab 100644 --- a/include/XSLT/impl/handler/xslt_sort_handler.hpp +++ b/include/XSLT/impl/handler/xslt_sort_handler.hpp @@ -19,8 +19,8 @@ public: { } // SortHandler - virtual void startElement(const std::string& namespaceURI, - const std::string& localName, + virtual void startElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, const std::string& qName, const SAX::Attributes& atts) { @@ -29,12 +29,12 @@ public: static const char* DataTypes[] = { "text", "number", 0 }; static const char* SortOrder[] = { "ascending", "descending", 0 }; static const char* CaseOrder[] = { "upper-first", "lower-first", 0 }; - static const ValueRule rules[] = { { "select", false, "." }, - { "lang", false, 0 }, + static const ValueRule rules[] = { { "select", false, ".", 0 }, + { "lang", false, 0, 0 }, { "data-type", false, "text", DataTypes }, { "order", false, "ascending", SortOrder }, { "case-order", false, "upper-first", CaseOrder }, - { 0, false, 0 } }; + { 0, false, 0, 0 } }; std::map attr = gatherAttributes(qName, atts, rules); @@ -57,9 +57,9 @@ public: throw SAX::SAXException("xsl:sort can not contain elements"); } // startElement - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { sortee_.add_sort(sort_); context_.pop(); diff --git a/include/XSLT/impl/handler/xslt_template_handler.hpp b/include/XSLT/impl/handler/xslt_template_handler.hpp index c2f2c332..9b50ab47 100644 --- a/include/XSLT/impl/handler/xslt_template_handler.hpp +++ b/include/XSLT/impl/handler/xslt_template_handler.hpp @@ -34,16 +34,16 @@ public: } // characters protected: - virtual Template* createContainer(const std::string& namespaceURI, - const std::string& localName, + virtual Template* createContainer(const std::string& /* namespaceURI */, + const std::string& /* localName */, const std::string& qName, const SAX::Attributes& atts) { - static const ValueRule rules[] = { { "match", false, 0 }, - { "mode", false, 0 }, - { "name", false, 0 }, - { "priority", false, 0 }, - { 0, false, 0} }; + static const ValueRule rules[] = { { "match", false, 0, 0 }, + { "mode", false, 0, 0 }, + { "name", false, 0, 0 }, + { "priority", false, 0, 0 }, + { 0, false, 0, 0 } }; std::map attributes = gatherAttributes(qName, atts, rules); const std::string& match = attributes["match"]; @@ -112,9 +112,9 @@ protected: } // createChild public: - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { context().stylesheet().add_template(container()); context().pop(); diff --git a/include/XSLT/impl/handler/xslt_text_handler.hpp b/include/XSLT/impl/handler/xslt_text_handler.hpp index 3f3e1cfd..c0c8a3c2 100644 --- a/include/XSLT/impl/handler/xslt_text_handler.hpp +++ b/include/XSLT/impl/handler/xslt_text_handler.hpp @@ -17,15 +17,15 @@ public: { } // TextHandler - virtual void startElement(const std::string& namespaceURI, - const std::string& localName, + virtual void startElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, const std::string& qName, const SAX::Attributes& atts) { if(text_ == 0) { static const ValueRule rules[] = { { "disable-output-escaping", false, No, AllowedYesNo }, - { 0, false, 0} }; + { 0, false, 0, 0 } }; text_ = new Text(gatherAttributes(qName, atts, rules)["disable-output-escaping"] == Yes); return; } // if(text_ == 0) @@ -33,9 +33,9 @@ public: throw SAX::SAXException(qName + " can not contain elements"); } // startElement - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { text_->set(buffer_); context_.parentContainer().add_item(text_); diff --git a/include/XSLT/impl/handler/xslt_value_of_handler.hpp b/include/XSLT/impl/handler/xslt_value_of_handler.hpp index 1fa8eb53..8399e8b2 100644 --- a/include/XSLT/impl/handler/xslt_value_of_handler.hpp +++ b/include/XSLT/impl/handler/xslt_value_of_handler.hpp @@ -18,16 +18,16 @@ public: { } // ValueOfHandler - virtual void startElement(const std::string& namespaceURI, - const std::string& localName, + virtual void startElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, const std::string& qName, const SAX::Attributes& atts) { if(valueOf_ == 0) { - static const ValueRule rules[] = { { "select", true, 0 }, + static const ValueRule rules[] = { { "select", true, 0, 0 }, { "disable-output-escaping", false, No, AllowedYesNo }, - { 0, false, 0} }; + { 0, false, 0, 0 } }; std::map attrs = gatherAttributes(qName, atts, rules); valueOf_ = new ValueOf(context_.xpath_expression(attrs["select"]), @@ -38,9 +38,9 @@ public: throw SAX::SAXException(qName + " can not contain elements"); } // startElement - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { context_.parentContainer().add_item(valueOf_); context_.pop(); diff --git a/include/XSLT/impl/handler/xslt_value_validation.hpp b/include/XSLT/impl/handler/xslt_value_validation.hpp index 6c6fa09e..4fab6d2f 100644 --- a/include/XSLT/impl/handler/xslt_value_validation.hpp +++ b/include/XSLT/impl/handler/xslt_value_validation.hpp @@ -87,7 +87,7 @@ std::map gatherAttributes(const std::string& parentEle } return results; -}; // validateAttributes +} // validateAttributes } // namespace XSLT } // namespace Arabica diff --git a/include/XSLT/impl/handler/xslt_variable_handler.hpp b/include/XSLT/impl/handler/xslt_variable_handler.hpp index 1d306bb6..8dd8d3c9 100644 --- a/include/XSLT/impl/handler/xslt_variable_handler.hpp +++ b/include/XSLT/impl/handler/xslt_variable_handler.hpp @@ -29,14 +29,14 @@ public: } // VariableHandler protected: - virtual VType* createContainer(const std::string& namespaceURI, - const std::string& localName, + virtual VType* createContainer(const std::string& /* namespaceURI */, + const std::string& /* localName */, const std::string& qName, const SAX::Attributes& atts) { - static const ValueRule rules[] = { { "name", true, 0 }, - { "select", false, 0 }, - { 0, false, 0} }; + static const ValueRule rules[] = { { "name", true, 0, 0 }, + { "select", false, 0, 0 }, + { 0, false, 0, 0 } }; std::map attrs = gatherAttributes(qName, atts, rules); @@ -78,9 +78,9 @@ public: { } // VariableHandler - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { this->context().stylesheet().add_variable(this->container()); this->context().pop(); diff --git a/include/XSLT/impl/handler/xslt_with_param_handler.hpp b/include/XSLT/impl/handler/xslt_with_param_handler.hpp index 3b864907..5ec672ee 100644 --- a/include/XSLT/impl/handler/xslt_with_param_handler.hpp +++ b/include/XSLT/impl/handler/xslt_with_param_handler.hpp @@ -19,9 +19,9 @@ public: { } // WithParamHandler - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { paramee_.add_with_param(container()); context().pop(); diff --git a/include/XSLT/impl/xslt_sink.hpp b/include/XSLT/impl/xslt_sink.hpp index 2eea937f..99539289 100644 --- a/include/XSLT/impl/xslt_sink.hpp +++ b/include/XSLT/impl/xslt_sink.hpp @@ -84,21 +84,22 @@ public: stream_(stream), disable_output_escaping_(false), in_cdata_(false), + empty_(false), seen_root_(true), - out_again_(false), indent_(-1), - empty_(false) + out_again_(false) { } // StreamSink StreamSink(const StreamSink& rhs) : stream_(rhs.stream_), disable_output_escaping_(rhs.disable_output_escaping_), - seen_root_(rhs.seen_root_), - settings_(rhs.settings_), - indent_(rhs.indent_), + in_cdata_(rhs.in_cdata_), empty_(false), - out_again_(rhs.out_again_) + seen_root_(rhs.seen_root_), + indent_(rhs.indent_), + out_again_(rhs.out_again_), + settings_(rhs.settings_) { } // StreamSink @@ -123,7 +124,7 @@ protected: } // do_end_document void do_start_element(const std::string& qName, - const std::string& namespaceURI, + const std::string& /* namespaceURI */, const SAX::Attributes& atts) { if(!seen_root_) @@ -144,7 +145,8 @@ protected: empty_ = true; } // do_start_element - void do_end_element(const std::string& qName, const std::string& namespaceURI) + void do_end_element(const std::string& qName, + const std::string& /* namespaceURI */) { if(!seen_root_) do_decl(""); @@ -305,9 +307,9 @@ private: bool in_cdata_; bool empty_; bool seen_root_; - Settings settings_; int indent_; bool out_again_; + Settings settings_; bool operator==(const StreamSink&) const; StreamSink& operator=(const StreamSink&); diff --git a/include/XSLT/impl/xslt_sort.hpp b/include/XSLT/impl/xslt_sort.hpp index 046e45f1..ad706a39 100644 --- a/include/XSLT/impl/xslt_sort.hpp +++ b/include/XSLT/impl/xslt_sort.hpp @@ -145,8 +145,8 @@ private: Arabica::XPath::XPathExpressionPtr datatype_; Arabica::XPath::XPathExpressionPtr order_; Arabica::XPath::XPathExpressionPtr caseorder_; - ExecutionContext* context_; Sort* sub_sort_; + ExecutionContext* context_; sortFn sort_fn_; Sort& operator=(const Sort&); diff --git a/include/XSLT/impl/xslt_stylesheet_compiler.hpp b/include/XSLT/impl/xslt_stylesheet_compiler.hpp index 3b2b56fd..4bd4f8c1 100644 --- a/include/XSLT/impl/xslt_stylesheet_compiler.hpp +++ b/include/XSLT/impl/xslt_stylesheet_compiler.hpp @@ -59,9 +59,9 @@ public: oops(qName); } // startElement - virtual void endElement(const std::string& namespaceURI, - const std::string& localName, - const std::string& qName) + virtual void endElement(const std::string& /* namespaceURI */, + const std::string& /* localName */, + const std::string& /* qName */) { } // endElement @@ -79,7 +79,7 @@ public: } // endDocument private: - void startStylesheet(const std::string& namespaceURI, + void startStylesheet(const std::string& /* namespaceURI */, const std::string& localName, const std::string& qName, const SAX::Attributes& atts) @@ -87,11 +87,11 @@ private: if(localName != "stylesheet" && localName != "transform") throw SAX::SAXException("Top-level element must be 'stylesheet' or 'transform'."); - static const ValueRule rules[] = { { "version", true, 0 }, - { "extension-element-prefixes", false, 0 }, - { "exclude-result-prefixes", false, 0 }, - { "id", false, 0 }, - { 0, false, 0 } }; + static const ValueRule rules[] = { { "version", true, 0, 0 }, + { "extension-element-prefixes", false, 0, 0 }, + { "exclude-result-prefixes", false, 0, 0 }, + { "id", false, 0, 0 }, + { 0, false, 0, 0 } }; std::map attributes = gatherAttributes(qName, atts, rules); if(attributes["version"] != StylesheetConstant::Version()) throw SAX::SAXException("I'm only a poor version 1.0 XSLT Transformer."); diff --git a/include/XSLT/impl/xslt_template.hpp b/include/XSLT/impl/xslt_template.hpp index efad6002..43843920 100644 --- a/include/XSLT/impl/xslt_template.hpp +++ b/include/XSLT/impl/xslt_template.hpp @@ -14,8 +14,8 @@ class Template : public ItemContainer public: Template(const std::string& name, const std::string& mode, - const std::string& priority, - const Precedence& precedence) : + const std::string& /* priority */, + const Precedence& precedence) : matches_(), name_(name), mode_(mode), diff --git a/include/XSLT/impl/xslt_text.hpp b/include/XSLT/impl/xslt_text.hpp index 1543ed31..188a3c87 100644 --- a/include/XSLT/impl/xslt_text.hpp +++ b/include/XSLT/impl/xslt_text.hpp @@ -24,7 +24,8 @@ public: void set(const std::string& text) { text_ = text; } - virtual void execute(const DOM::Node& node, ExecutionContext& context) const + virtual void execute(const DOM::Node& /* node */, + ExecutionContext& context) const { if(disable_) context.sink().disableOutputEscaping(true); diff --git a/include/XSLT/impl/xslt_top_level_param.hpp b/include/XSLT/impl/xslt_top_level_param.hpp index d7fae9a9..d7ae5757 100644 --- a/include/XSLT/impl/xslt_top_level_param.hpp +++ b/include/XSLT/impl/xslt_top_level_param.hpp @@ -27,9 +27,9 @@ public: virtual const std::string& namespace_uri() const { return namespace_uri_; } virtual const std::string& name() const { return name_; } - virtual Arabica::XPath::XPathValue value(const DOM::Node& node, - ExecutionContext& context, - DOMSink& sink) const + virtual Arabica::XPath::XPathValue value(const DOM::Node& /* node */, + ExecutionContext& /* context */, + DOMSink& /* sink */) const { return value_; } // value